Make sure check of headers is case insensitive.

Signed-off-by: Alejandro Liu <alejandro_liu@hotmail.com>
This commit is contained in:
Alejandro Liu
2019-06-03 08:54:57 +02:00
parent f03cd092fe
commit f3302a352c

View File

@@ -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']