X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FSecurity%2FBasicAuth.php;h=f2154ae8a4374da15fa121719a0f7af660eb442d;hb=5d92713a8eb8467385387fb2d2a3ac20f6eda06c;hp=b76073e8b328f1dbccf2388d6e16fe8e01958551;hpb=fa2c8cad9d4419182d3c72115d4f67cb1971ca13;p=friendica.git diff --git a/src/Security/BasicAuth.php b/src/Security/BasicAuth.php index b76073e8b3..f2154ae8a4 100644 --- a/src/Security/BasicAuth.php +++ b/src/Security/BasicAuth.php @@ -124,7 +124,7 @@ class BasicAuth // workaround for HTTP-auth in CGI mode if (!empty($_SERVER['REDIRECT_REMOTE_USER'])) { $userpass = base64_decode(substr($_SERVER["REDIRECT_REMOTE_USER"], 6)); - if (strlen($userpass)) { + if (!empty($userpass) && strpos($userpass, ':')) { list($name, $password) = explode(':', $userpass); $_SERVER['PHP_AUTH_USER'] = $name; $_SERVER['PHP_AUTH_PW'] = $password; @@ -184,7 +184,7 @@ class BasicAuth Session::set('allow_api', true); - Hook::callAll('logged_in', $a->user); + Hook::callAll('logged_in', $record); if (Session::get('allow_api')) { self::$current_user_id = local_user();