Skip to content

Commit db86583

Browse files
#32100: Admin login issue fix.
1 parent 06d918f commit db86583

File tree

1 file changed

+13
-4
lines changed
  • app/code/Magento/Backend/Controller/Adminhtml/Auth

1 file changed

+13
-4
lines changed

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,35 @@ class Login extends \Magento\Backend\Controller\Adminhtml\Auth implements HttpGe
3939
*/
4040
private $backendUrlFactory;
4141

42+
/**
43+
* @var Http
44+
*/
45+
private $http;
46+
4247
/**
4348
* Constructor
4449
*
4550
* @param \Magento\Backend\App\Action\Context $context
4651
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
47-
* @param FrontNameResolver $frontNameResolver
48-
* @param UrlFactory $backendUrlFactory
52+
* @param FrontNameResolver|null $frontNameResolver
53+
* @param BackendAppList|null $backendAppList
54+
* @param UrlFactory|null $backendUrlFactory
55+
* @param Http|null $http
4956
*/
5057
public function __construct(
5158
\Magento\Backend\App\Action\Context $context,
5259
\Magento\Framework\View\Result\PageFactory $resultPageFactory,
5360
FrontNameResolver $frontNameResolver = null,
5461
BackendAppList $backendAppList = null,
55-
UrlFactory $backendUrlFactory = null
62+
UrlFactory $backendUrlFactory = null,
63+
Http $http = null
5664
) {
5765
$this->resultPageFactory = $resultPageFactory;
5866
parent::__construct($context);
5967
$this->frontNameResolver = $frontNameResolver ?? ObjectManager::getInstance()->get(FrontNameResolver::class);
6068
$this->backendAppList = $backendAppList ?? ObjectManager::getInstance()->get(BackendAppList::class);
6169
$this->backendUrlFactory = $backendUrlFactory ?? ObjectManager::getInstance()->get(UrlFactory::class);
70+
$this->http = $http ?? ObjectManager::getInstance()->get(Http::class);
6271
}
6372

6473
/**
@@ -113,7 +122,7 @@ private function isValidBackendUri(): bool
113122
} else {
114123
//In case of application authenticating through the admin login, the script name should be removed
115124
//from the path, because application has own script.
116-
$baseUrl = Http::getUrlNoScript($baseUrl);
125+
$baseUrl = $this->http->getUrlNoScript($baseUrl);
117126
$backendFrontName = $backendApp->getCookiePath();
118127
}
119128

0 commit comments

Comments
 (0)