Skip to content

Commit 217c32c

Browse files
redirect to backend if request uri isn't valid
1 parent 73ef59b commit 217c32c

File tree

2 files changed

+6
-1
lines changed
  • app/code/Magento

2 files changed

+6
-1
lines changed

app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public function execute()
4848
return $this->getRedirect($this->_backendUrl->getStartupPageUrl());
4949
}
5050

51+
$requestUrl = $this->getRequest()->getUri();
52+
if (!$requestUrl->isValid()) {
53+
return $this->getRedirect($this->getUrl('*'));
54+
}
55+
5156
return $this->resultPageFactory->create();
5257
}
5358

app/code/Magento/User/Controller/Adminhtml/User/Save.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function execute()
105105
$this->getSecurityCookie()->setLogoutReasonCookie(
106106
\Magento\Security\Model\AdminSessionsManager::LOGOUT_REASON_USER_LOCKED
107107
);
108-
$this->_redirect('adminhtml/*/');
108+
$this->_redirect('*');
109109
} catch (NotificationExceptionInterface $exception) {
110110
$this->messageManager->addErrorMessage($exception->getMessage());
111111
} catch (\Magento\Framework\Exception\AuthenticationException $e) {

0 commit comments

Comments
 (0)