[CORE][SECURITY][UX] Save previous url on /register and /logout

This commit is contained in:
Hugo Sales 2020-07-26 16:49:09 +00:00 committed by Hugo Sales
parent 199fa0278c
commit 22e292276c
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -151,7 +151,7 @@ class GNUsocial implements EventSubscriberInterface
$request = $event->getRequest(); $request = $event->getRequest();
// Save the target path, so we can redirect back after logging in // Save the target path, so we can redirect back after logging in
if (!(!$event->isMasterRequest() || $request->isXmlHttpRequest() || in_array($request->attributes->get('_route'), ['login', 'initialize']))) { if (!(!$event->isMasterRequest() || $request->isXmlHttpRequest() || in_array($request->attributes->get('_route'), ['login', 'register', 'logout']))) {
$this->saveTargetPath($this->session, 'main', $request->getBaseUrl()); $this->saveTargetPath($this->session, 'main', $request->getBaseUrl());
} }