From f3302a352c28c335f8b43e79daf5fa78f498af09 Mon Sep 17 00:00:00 2001 From: Alejandro Liu Date: Mon, 3 Jun 2019 08:54:57 +0200 Subject: [PATCH] Make sure check of headers is case insensitive. Signed-off-by: Alejandro Liu --- lib/basicauth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/basicauth.php b/lib/basicauth.php index 7bf608a..c6e55f1 100644 --- a/lib/basicauth.php +++ b/lib/basicauth.php @@ -41,7 +41,7 @@ class OC_User_BasicAuth extends \OCA\user_external\Base { ); return false; } - if (!isset($canary['WWW-Authenticate'])) { + if (!isset(array_change_key_case($canary, CASE_LOWER)['www-authenticate'])) { OC::$server->getLogger()->error( 'ERROR: Mis-configured BasicAuth Url: '.$this->authUrl.', provided URL does not do authentication!', ['app' => 'user_external']