Skip to content

Commit f1f8285

Browse files
Alexander Paliarushisitnikov
authored andcommitted
MAGETWO-51376: Application Information disclosure on Update
1 parent 926385c commit f1f8285

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,16 @@ public function authPreDispatch($event)
123123
/** @var \Magento\Framework\App\State $adminAppState */
124124
$adminAppState = $objectManager->get('Magento\Framework\App\State');
125125
$adminAppState->setAreaCode(\Magento\Framework\App\Area::AREA_ADMIN);
126-
$objectManager->create(
127-
'Magento\Backend\Model\Auth\Session',
126+
/** @var \Magento\Backend\Model\Auth\Session $adminSession */
127+
$adminSession = $objectManager->create(
128+
\Magento\Backend\Model\Auth\Session::class,
128129
[
129-
'sessionConfig' => $objectManager->get('Magento\Backend\Model\Session\AdminConfig'),
130+
'sessionConfig' => $objectManager->get(\Magento\Backend\Model\Session\AdminConfig::class),
130131
'appState' => $adminAppState
131132
]
132133
);
133-
134-
if (!$objectManager->get('Magento\Backend\Model\Auth')->isLoggedIn()) {
134+
if (!$objectManager->get(\Magento\Backend\Model\Auth::class)->isLoggedIn()) {
135+
$adminSession->expireSessionCookie();
135136
$response = $event->getResponse();
136137
$response->getHeaders()->addHeaderLine('Location', 'index.php/session/unlogin');
137138
$response->setStatusCode(302);

0 commit comments

Comments
 (0)