[BUGFIX] cast systemMaintainer values to int 83/54383/3
authorFrank Naegler <frank.naegler@typo3.org>
Thu, 12 Oct 2017 17:35:10 +0000 (19:35 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Fri, 13 Oct 2017 09:22:42 +0000 (11:22 +0200)
Resolves: #82751
Releases: master
Change-Id: Ie87cccc2d890ffaf93fe8558f2a67da82ee8c495
Reviewed-on: https://review.typo3.org/54383
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/install/Classes/Controller/SettingsController.php

index 86378fb..c6d716a 100644 (file)
@@ -463,6 +463,7 @@ class BackendUserAuthentication extends AbstractUserAuthentication
             return true;
         }
         $systemMaintainers = $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemMaintainers'] ?? [];
+        $systemMaintainers = array_map('intval', $systemMaintainers);
         if (!empty($systemMaintainers)) {
             return in_array($this->getRealUserId(), $systemMaintainers, true);
         }
index 592c88a..35d4292 100644 (file)
@@ -124,6 +124,7 @@ class SettingsController extends AbstractController
             ->fetchAll();
 
         $systemMaintainerList = $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemMaintainers'] ?? [];
+        $systemMaintainerList = array_map('intval', $systemMaintainerList);
         $currentTime = time();
         foreach ($users as &$user) {
             $user['disable'] = $user['disable'] ||
@@ -172,6 +173,7 @@ class SettingsController extends AbstractController
             )->execute()->fetchAll();
 
         $validatedUserList = array_column($validatedUserList, 'uid');
+        $validatedUserList = array_map('intval', $validatedUserList);
 
         $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
         $configurationManager->setLocalConfigurationValuesByPathValuePairs(