]> git.mxchange.org Git - friendica.git/blobdiff - src/Security/BasicAuth.php
Rename Depository to Repository
[friendica.git] / src / Security / BasicAuth.php
index b76073e8b328f1dbccf2388d6e16fe8e01958551..f2154ae8a4374da15fa121719a0f7af660eb442d 100644 (file)
@@ -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();