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\Forms\Authentication\LoginForm;
|
||||
use Icinga\Web\Controller;
|
||||
use Icinga\Web\Cookie;
|
||||
use Icinga\Web\Url;
|
||||
|
||||
/**
|
||||
|
@ -36,6 +37,11 @@ class AuthenticationController extends Controller
|
|||
$this->redirectNow($form->getRedirectUrl());
|
||||
}
|
||||
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();
|
||||
}
|
||||
$this->view->form = $form;
|
||||
|
|
Loading…
Reference in New Issue