From dc9cfc1c813c17d853ebc694601dd9a0a54e10dd Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 15 Feb 2016 10:44:33 +0100 Subject: [PATCH] Call getRequest() only once in Auth::authHttp() refs #11151 --- library/Icinga/Authentication/Auth.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Authentication/Auth.php b/library/Icinga/Authentication/Auth.php index f80326999..e63b10ef1 100644 --- a/library/Icinga/Authentication/Auth.php +++ b/library/Icinga/Authentication/Auth.php @@ -278,10 +278,11 @@ class Auth */ protected function authHttp() { - if ($this->getRequest()->isXmlHttpRequest()) { + $request = $this->getRequest(); + if ($request->isXmlHttpRequest()) { return false; } - if (($header = $this->getRequest()->getHeader('Authorization')) === false) { + if (($header = $request->getHeader('Authorization')) === false) { return false; } if (empty($header)) {