Group names with apostrophe seems to be a problem for Concrete \ Core \ User \ Group \ Group getGroupMembers

Permalink 0 0 Browser Info Environment
Group names with apostrophe seems to be a problem for Concrete \ Core \ User \ Group \ Group getGroupMembers

I added a user Group called: PMQ FC's
It is in a Group heierarchy: /Club Applications/PMQ FC's
When I used getGroupMembers I got and SQL error because of the apostrophe:

Error (see near "PMQ's")
===================
An exception occurred while executing 'SELECT u.uID FROM Users u LEFT JOIN UserSearchIndexAttributes ua ON u.uID = ua.uID LEFT JOIN UserGroups ug ON ug.uID = u.uID LEFT JOIN `Groups` g ON ug.gID = g.gID WHERE (u.uID IN (SELECT u.uID FROM Users u LEFT JOIN UserGroups ug ON u.uID=ug.uID LEFT JOIN `Groups` g ON ug.gID=g.gID WHERE (g.gPath LIKE '/Club Applications/PMQ FC's/%') OR (g.gID = 41))) AND (u.uIsActive = ?) AND (u.uIsValidated != 0) GROUP BY u.uID' with params [true]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's/%') OR (g.gID = 41))) AND (u.uIsActive = '1') AND (u.uIsValidated != 0) GROUP ' at line 1



The Rest of the Debug Info
=====================
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's/%') OR (g.gID = 41))) AND (u.uIsActive = '1') AND (u.uIsValidated != 0) GROUP ' at line 1"

Stacktrace:
#36 Doctrine\DBAL\Exception\SyntaxErrorException in /home/technicf/public_html/test/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:90
#35 Doctrine\DBAL\Driver\AbstractMySQLDriver:convertException in /home/technicf/public_html/test/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:128
#34 Doctrine\DBAL\DBALException:driverExceptionDuringQuery in /home/technicf/public_html/test/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:855
#33 Doctrine\DBAL\Driver\PDOException in /home/technicf/public_html/test/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107
#32 PDOException in /home/technicf/public_html/test/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105
#31 PDOStatement:execute in /home/technicf/public_html/test/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105
#30 Doctrine\DBAL\Driver\PDOStatement:execute in /home/technicf/public_html/test/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:847
#29 Doctrine\DBAL\Connection:executeQuery in /home/technicf/public_html/test/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php:206
#28 Doctrine\DBAL\Query\QueryBuilder:execute in /home/technicf/public_html/test/concrete/src/Search/ItemList/Database/ItemList.php:63
#27 Concrete\Core\Search\ItemList\Database\ItemList:executeGetResults in /home/technicf/public_html/test/concrete/src/Search/ItemList/ItemList.php:84
#26 Concrete\Core\Search\ItemList\ItemList:getResults in /home/technicf/public_html/test/concrete/src/Search/ItemList/ItemList.php:235
#25 Concrete\Core\Search\ItemList\ItemList:get in /home/technicf/public_html/test/concrete/src/User/Group/Group.php:121
#24 Concrete\Core\User\Group\Group:getGroupMembers in /home/technicf/public_html/test/application/single_pages/manage_members.php:113
#23 include in /home/technicf/public_html/test/concrete/src/View/View.php:233
#22 Concrete\Core\View\View:renderInnerContents in /home/technicf/public_html/test/concrete/src/View/View.php:211
#21 Concrete\Core\View\View:renderViewContents in /home/technicf/public_html/test/concrete/src/View/AbstractView.php:151
#20 Concrete\Core\View\AbstractView:render in /home/technicf/public_html/test/concrete/src/Http/ResponseFactory.php:148
#19 Concrete\Core\Http\ResponseFactory:view in /home/technicf/public_html/test/concrete/src/Http/ResponseFactory.php:215
#18 Concrete\Core\Http\ResponseFactory:controller in /home/technicf/public_html/test/concrete/src/Http/ResponseFactory.php:393
#17 Concrete\Core\Http\ResponseFactory:collection in /home/technicf/public_html/test/concrete/src/Routing/DispatcherRouteCallback.php:34
#16 Concrete\Core\Routing\DispatcherRouteCallback:execute in /home/technicf/public_html/test/concrete/src/Http/DefaultDispatcher.php:130
#15 Concrete\Core\Http\DefaultDispatcher:handleDispatch in /home/technicf/public_html/test/concrete/src/Http/DefaultDispatcher.php:57
#14 Concrete\Core\Http\DefaultDispatcher:dispatch in /home/technicf/public_html/test/concrete/src/Http/Middleware/DispatcherDelegate.php:39
#13 Concrete\Core\Http\Middleware\DispatcherDelegate:next in /home/technicf/public_html/test/concrete/src/Http/Middleware/ThumbnailMiddleware.php:71
#12 Concrete\Core\Http\Middleware\ThumbnailMiddleware:process in /home/technicf/public_html/test/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#11 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/technicf/public_html/test/concrete/src/Http/Middleware/FrameOptionsMiddleware.php:39
#10 Concrete\Core\Http\Middleware\FrameOptionsMiddleware:process in /home/technicf/public_html/test/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#9 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/technicf/public_html/test/concrete/src/Http/Middleware/CookieMiddleware.php:37
#8 Concrete\Core\Http\Middleware\CookieMiddleware:process in /home/technicf/public_html/test/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#7 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/technicf/public_html/test/concrete/src/Http/Middleware/ApplicationMiddleware.php:29
#6 Concrete\Core\Http\Middleware\ApplicationMiddleware:process in /home/technicf/public_html/test/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#5 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/technicf/public_html/test/concrete/src/Http/Middleware/MiddlewareStack.php:86
#4 Concrete\Core\Http\Middleware\MiddlewareStack:process in /home/technicf/public_html/test/concrete/src/Http/DefaultServer.php:85
#3 Concrete\Core\Http\DefaultServer:handleRequest in /home/technicf/public_html/test/concrete/src/Foundation/Runtime/Run/DefaultRunner.php:119
#2 Concrete\Core\Foundation\Runtime\Run\DefaultRunner:run in /home/technicf/public_html/test/concrete/src/Foundation/Runtime/DefaultRuntime.php:102
#1 Concrete\Core\Foundation\Runtime\DefaultRuntime:run in /home/technicf/public_html/test/concrete/dispatcher.php:36
#0 require in /home/technicf/public_html/test/index.php:3


Status: New

concrete5 Environment Information

# concrete5 Version
Core Version - 8.4.3
Version Installed - 8.4.3
Database Version - 20180716000000

# concrete5 Packages
Cloneamental (0.9.3), Membership Subscriptions (3.0.2), Migration Tool (0.9.0)

# concrete5 Overrides
controllers/single_page/club_application.php, controllers/single_page/manage_members.php, controllers/single_page, single_pages/club_admin_bak/view.php, single_pages/club_admin_bak/manage_members.php, single_pages/club_admin_bak/create_club.php, single_pages/club_admin_bak, single_pages/club_application.php, single_pages/manage_members.php

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.29 (Unix) OpenSSL/1.0.1e-fips Phusion_Passenger/5.3.3 mod_bwlimited/1.4 mod_fcgid/2.3.9

# Server API
cgi-fcgi

# PHP Version
5.6.39

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, ionCube Loader, json, libxml, mbstring, mcrypt, mhash, mysql, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, readline, Reflection, session, shmop, SimpleXML, sockets, SPL, sqlite3, standard, suhosin, tokenizer, xml, xmlreader, xmlwriter, Zend Guard Loader, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - -1
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 2M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
suhosin.cookie.max_array_depth - 50
suhosin.cookie.max_array_index_length - 64
suhosin.cookie.max_name_length - 64
suhosin.cookie.max_totalname_length - 256
suhosin.cookie.max_value_length - 10000
suhosin.cookie.max_vars - 100
suhosin.executor.include.max_traversal - 0
suhosin.executor.max_depth - 750
suhosin.get.max_array_depth - 50
suhosin.get.max_array_index_length - 64
suhosin.get.max_name_length - 64
suhosin.get.max_totalname_length - 256
suhosin.get.max_value_length - 512
suhosin.get.max_vars - 100
suhosin.log.phpscript.is_safe - Off
suhosin.memory_limit - 0
suhosin.post.max_array_depth - 50
suhosin.post.max_array_index_length - 64
suhosin.post.max_name_length - 64
suhosin.post.max_totalname_length - 256
suhosin.post.max_value_length - 1000000
suhosin.post.max_vars - 1000
suhosin.request.max_array_depth - 50
suhosin.request.max_array_index_length - 64
suhosin.request.max_totalname_length - 256
suhosin.request.max_value_length - 1000000
suhosin.request.max_varname_length - 64
suhosin.request.max_vars - 1000
suhosin.session.max_id_length - 128
suhosin.upload.max_newlines - 100
suhosin.upload.max_uploads - 25
opcache.max_accelerated_files - 2000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5
zend_optimizerplus.max_accelerated_files - 2000
zend_optimizerplus.max_file_size - 0
zend_optimizerplus.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36