Renaming the variable used for checs, adding more explanatory text

Signed-off-by: Alejandro Liu <alejandro_liu@hotmail.com>
This commit is contained in:
Alejandro Liu
2019-06-01 19:18:53 +02:00
parent 2548a592f1
commit f03cd092fe

View File

@@ -33,17 +33,17 @@ class OC_User_BasicAuth extends \OCA\user_external\Base {
'method'=>"GET",
))
);
$headers = get_headers($this->authUrl, 1);
if(!$headers) {
$canary = get_headers($this->authUrl, 1);
if(!$canary) {
OC::$server->getLogger()->error(
'ERROR: Not possible to connect to BasicAuth Url: '.$this->authUrl,
['app' => 'user_external']
);
return false;
}
if (!isset($headers['WWW-Authenticate'])) {
if (!isset($canary['WWW-Authenticate'])) {
OC::$server->getLogger()->error(
'ERROR: Mis-configured BasicAuth Url: '.$this->authUrl,
'ERROR: Mis-configured BasicAuth Url: '.$this->authUrl.', provided URL does not do authentication!',
['app' => 'user_external']
);
return false;