[BUGFIX] Fix parameter type in BackendModuleRequestHandler 91/51791/3
authorMarkus Hoelzle <typo3@markus-hoelzle.de>
Wed, 22 Feb 2017 08:38:40 +0000 (09:38 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sun, 26 Feb 2017 22:05:25 +0000 (23:05 +0100)
The function
\TYPO3\CMS\Core\Authentication\BackendUserAuthentication
->getPagePermsClause accepts only an integer value as parameter,
but a boolean value is given in
TYPO3\CMS\Backend\Http\BackendModuleRequestHandler->dispatchModule

Resolves: #79949
Releases: master
Change-Id: I6d0e6049ce2f68f361853f5c5ea50984c9448347
Reviewed-on: https://review.typo3.org/51791
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Http/BackendModuleRequestHandler.php

index 61fc8c9..d04c39f 100644 (file)
@@ -24,6 +24,7 @@ use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
 use TYPO3\CMS\Core\Http\Dispatcher;
 use TYPO3\CMS\Core\Http\RequestHandlerInterface;
 use TYPO3\CMS\Core\Http\Response;
+use TYPO3\CMS\Core\Type\Bitmask\Permission;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 
@@ -149,7 +150,7 @@ class BackendModuleRequestHandler implements RequestHandlerInterface
         $this->backendUserAuthentication->modAccess($moduleConfiguration, true);
         $id = isset($this->request->getQueryParams()['id']) ? $this->request->getQueryParams()['id'] : $this->request->getParsedBody()['id'];
         if ($id && MathUtility::canBeInterpretedAsInteger($id)) {
-            $permClause = $this->backendUserAuthentication->getPagePermsClause(true);
+            $permClause = $this->backendUserAuthentication->getPagePermsClause(Permission::PAGE_SHOW);
             // Check page access
             $access = is_array(BackendUtility::readPageAccess((int)$id, $permClause));
             if (!$access) {