Skip to content
Snippets Groups Projects
Commit 81e901ca authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

[BUGFIX] Fix loose type check in BackendUserAuthentication

empty() returns true if a record contains 0 as value.
Therefore isset() needs to be used instead.

The corresponding fix that was introduced with #91145
to workaround this flaw is removed again.

Resolves: #95972
Related: #91145
Releases: master, 10.4
Change-Id: Idfea91b84d8391d680900966f57b406c28a616ce
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72170


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarNikita Hovratov <nikita.h@live.de>
Tested-by: default avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: default avatarBenjamin Franzke <bfr@qbus.de>
parent 736d7d30
Branches
Tags
No related merge requests found
......@@ -352,9 +352,6 @@ class TreeController
if (in_array($pageId, $this->hiddenRecords, true)) {
return [];
}
if ($pageId === 0 && !$backendUser->isAdmin()) {
return [];
}
$stopPageTree = !empty($page['php_tree_stop']) && $depth > 0;
$identifier = $entryPoint . '_' . $pageId;
......
......@@ -340,7 +340,7 @@ class BackendUserAuthentication extends AbstractUserAuthentication
$checkRec = [];
$fetchPageFromDatabase = true;
if (is_array($idOrRow)) {
if (empty($idOrRow['uid'])) {
if (!isset($idOrRow['uid'])) {
throw new \RuntimeException('The given page record is invalid. Missing uid.', 1578950324);
}
$checkRec = $idOrRow;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment