Skip to content

Commit

Permalink
[BUGFIX] Prevent undefined array key uid and username in FrontendUser…
Browse files Browse the repository at this point in the history
…Authentication (#1014)
  • Loading branch information
Patta authored May 23, 2023
1 parent 6b8bffa commit 604cc67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Classes/Middleware/FrontendUserAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ private function getFrontendUser(string $grList, ServerRequestInterface $request
/** @var FrontendUserAuthentication $frontendUser */
$frontendUser = $request->getAttribute('frontend.user');
$frontendUser->user[$frontendUser->usergroup_column] = '0,-2,' . $grList;
$frontendUser->user[$frontendUser->userid_column] = 0;
$frontendUser->user[$frontendUser->username_column] = '';
$frontendUser->fetchGroupData($request);
$frontendUser->user['uid'] = PHP_INT_MAX;
return $frontendUser;
Expand Down

0 comments on commit 604cc67

Please sign in to comment.