storing localized targetPath in a string as opposed to updating the attribute
This commit is contained in:
parent
17b7b558ce
commit
8fd4158468
@ -69,8 +69,8 @@ class LogoutListener implements ListenerInterface
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
$this->targetUrl = str_replace('{_locale}', $request->getSession()->getLocale(), $this->targetUrl);
|
||||
|
||||
$targetUrl = str_replace('{_locale}', $request->getSession()->getLocale(), $this->targetUrl);
|
||||
|
||||
if ($this->logoutPath !== $request->getPathInfo()) {
|
||||
return;
|
||||
}
|
||||
@ -82,7 +82,7 @@ class LogoutListener implements ListenerInterface
|
||||
throw new \RuntimeException('Logout Success Handler did not return a Response.');
|
||||
}
|
||||
} else {
|
||||
$response = new RedirectResponse(0 !== strpos($this->targetUrl, 'http') ? $request->getUriForPath($this->targetUrl) : $this->targetUrl, 302);
|
||||
$response = new RedirectResponse(0 !== strpos($targetUrl, 'http') ? $request->getUriForPath($targetUrl) : $targetUrl, 302);
|
||||
}
|
||||
|
||||
// handle multiple logout attempts gracefully
|
||||
@ -96,4 +96,3 @@ class LogoutListener implements ListenerInterface
|
||||
|
||||
$event->setResponse($response);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user