diff --git a/application/controllers/AuthenticationController.php b/application/controllers/AuthenticationController.php index 9431b7fbc..f19b53fc5 100644 --- a/application/controllers/AuthenticationController.php +++ b/application/controllers/AuthenticationController.php @@ -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;