mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-10 18:14:00 +02:00
fix password decode on api requests
This commit is contained in:
@@ -988,7 +988,7 @@ f00bar;
|
|||||||
|
|
||||||
$credentials_header = $_SERVER['HTTP_X_IFM_AUTH'] ?? $_SERVER['HTTP_AUTHORIZATION'] ?? false;
|
$credentials_header = $_SERVER['HTTP_X_IFM_AUTH'] ?? $_SERVER['HTTP_AUTHORIZATION'] ?? false;
|
||||||
if ($credentials_header && !$this->config['auth_ignore_basic']) {
|
if ($credentials_header && !$this->config['auth_ignore_basic']) {
|
||||||
$cred = explode(":", base64_decode(str_replace("Basic ", "", $credentials_header)));
|
$cred = explode(":", base64_decode(str_replace("Basic ", "", $credentials_header)), 2);
|
||||||
if (count($cred) == 2 && $this->checkCredentials($cred[0], $cred[1]))
|
if (count($cred) == 2 && $this->checkCredentials($cred[0], $cred[1]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user