Skip to content

Commit 73ef59b

Browse files
#30950 allow login without redirect when using a secret key
1 parent 760a4e3 commit 73ef59b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Backend/App/Action/Plugin/Authentication.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ protected function _redirectIfNeededAfterLogin(\Magento\Framework\App\RequestInt
225225

226226
// Checks, whether secret key is required for admin access or request uri is explicitly set
227227
if ($this->_url->useSecretKey()) {
228-
$requestUri = $this->_url->getUrl('*/*/*', ['_current' => true]);
228+
$requestParts = explode('/', trim($request->getRequestUri(), '/'), 2);
229+
$requestUri = $this->_url->getUrl(array_pop($requestParts));
229230
} elseif ($request) {
230231
$requestUri = $request->getRequestUri();
231232
}

0 commit comments

Comments
 (0)