Project

General

Profile

Bug #92520

Updated by Stephan Großberndt about 4 years ago

Just found a bug in TYPO3 backend module SYSTEM->Backend users when using PostgreSQL. If you enter any text in the filter text field "Username" and send the search you get a @Doctrine\DBAL\Exception\DriverException@. 

 This happens because of 
 @typo3/sysext/beuser/Classes/Domain/Repository/BackendUserRepository.php@: 

 <pre><code class="php"> 
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('be_users'); 
             foreach (['userName', 'uid', 'realName'] as $field) { 
                 $searchConstraints[] = $query->like( 
                     $field, 
                     '%' . $queryBuilder->escapeLikeWildcards($demand->getUserName()) . '%' 
                 ); 
             } 
             $constraints[] = $query->logicalOr($searchConstraints); 
 </code></pre> 

 which searches for @uid@ (an @int@ column) using @LIKE@ which probably will fail on MSSQL and SQLite too. There is no direct replacement which is database platform agnostic to my knowledge. 

 "As As discussed on Slack":https://typo3.slack.com/archives/C03AM9R17/p1602170100197300 Slack we simply go for @$constraints[] = $query->equals('uid', (int)$demand->getUserName());@ instead to only directly show backend user @4@ when searching for @4@ instead of showing @4@ and @14@. 
 

Back