Skip to content

Commit

Permalink
pass normalizedParams directly to $feUser->appendCookieToResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Gschwandtner committed Mar 14, 2024
1 parent e7252b7 commit 54d314c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Classes/Middleware/FrontendUserMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface

protected function weShouldHaveCookie(FrontendUserAuthentication $feUser, ServerRequestInterface $request): bool
{
if ($GLOBALS['TYPO3_REQUEST'] === null) {
$GLOBALS['TYPO3_REQUEST'] = $request;
}

$setCookieHeader = $feUser->appendCookieToResponse(new HtmlResponse(''))->getHeaderLine('Set-Cookie');
$setCookieHeader = $feUser->appendCookieToResponse(new HtmlResponse(''), $request->getAttribute('normalizedParams'))->getHeaderLine('Set-Cookie');

if (strpos($setCookieHeader, 'Max-Age=0')) {
// the new cookie is to delete the old cookie:
Expand Down

0 comments on commit 54d314c

Please sign in to comment.