mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
AuthenticationController: Add cookie detection to login action
refs #7383
This commit is contained in:
parent
813154f6ef
commit
d468c59e32
@ -8,6 +8,7 @@ use Icinga\Application\Icinga;
|
|||||||
use Icinga\Application\Logger;
|
use Icinga\Application\Logger;
|
||||||
use Icinga\Forms\Authentication\LoginForm;
|
use Icinga\Forms\Authentication\LoginForm;
|
||||||
use Icinga\Web\Controller;
|
use Icinga\Web\Controller;
|
||||||
|
use Icinga\Web\Cookie;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,6 +37,11 @@ class AuthenticationController extends Controller
|
|||||||
$this->redirectNow($form->getRedirectUrl());
|
$this->redirectNow($form->getRedirectUrl());
|
||||||
}
|
}
|
||||||
if (! $requiresSetup) {
|
if (! $requiresSetup) {
|
||||||
|
if (! $this->getRequest()->hasCookieSupport()) {
|
||||||
|
echo $this->translate("Cookies must be enabled to run this application.\n");
|
||||||
|
$this->getResponse()->setHttpResponseCode(403)->sendHeaders();
|
||||||
|
exit();
|
||||||
|
}
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
}
|
}
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user