diff --git a/library/Icinga/Authentication/Auth.php b/library/Icinga/Authentication/Auth.php index 4e15c9512..2a9b18627 100644 --- a/library/Icinga/Authentication/Auth.php +++ b/library/Icinga/Authentication/Auth.php @@ -282,10 +282,7 @@ class Auth if ($request->isXmlHttpRequest() || ! $request->isApiRequest()) { return false; } - if (($header = $request->getHeader('Authorization')) === false) { - return false; - } - if (empty($header)) { + if (($header = $request->getHeader('Authorization')) === false || empty($header)) { $this->challengeHttp(); } list($scheme) = explode(' ', $header, 2);