]> git.mxchange.org Git - friendica.git/blobdiff - src/Security/BasicAuth.php
Merge pull request #10498 from MrPetovan/bug/10477-frio-csp-error-event-edit
[friendica.git] / src / Security / BasicAuth.php
index b76073e8b328f1dbccf2388d6e16fe8e01958551..070c6500d3582a7104c66650193359e5ec34bb31 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;