1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-09 17:46:31 +02:00

fix password decode on api requests

This commit is contained in:
Dmitriy Novash
2022-05-24 17:37:32 +03:00
parent 80e3a9dd71
commit 6226f8a16c

View File

@@ -988,7 +988,7 @@ f00bar;
$credentials_header = $_SERVER['HTTP_X_IFM_AUTH'] ?? $_SERVER['HTTP_AUTHORIZATION'] ?? false;
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]))
return true;
}