From cc2bd063b7ee11fa30426613f6f27c3b3c0ac567 Mon Sep 17 00:00:00 2001
From: Frank Naegler <frank.naegler@typo3.org>
Date: Thu, 12 Oct 2017 19:35:10 +0200
Subject: [PATCH] [BUGFIX] cast systemMaintainer values to int

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>
---
 .../core/Classes/Authentication/BackendUserAuthentication.php   | 1 +
 typo3/sysext/install/Classes/Controller/SettingsController.php  | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php b/typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
index 86378fb4bda2..c6d716a022e6 100644
--- a/typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
+++ b/typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
@@ -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);
         }
diff --git a/typo3/sysext/install/Classes/Controller/SettingsController.php b/typo3/sysext/install/Classes/Controller/SettingsController.php
index 592c88a6cae7..35d4292e993e 100644
--- a/typo3/sysext/install/Classes/Controller/SettingsController.php
+++ b/typo3/sysext/install/Classes/Controller/SettingsController.php
@@ -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(
-- 
GitLab