Commit bfcf62a5 authored by Bart Vullings's avatar Bart Vullings

ZP-1394 Extract domain from email address format in username. Released under...

ZP-1394 Extract domain from email address format in username. Released under the Affero GNU General Public License (AGPL) version 3.
parent 4c334595
......@@ -182,7 +182,12 @@ class Request {
// authUser & authPassword are unfiltered!
// split username & domain if received as one
if (isset($_SERVER['PHP_AUTH_USER'])) {
list(self::$authUserString, self::$authDomain) = Utils::SplitDomainUser($_SERVER['PHP_AUTH_USER']);
if (!strpos($_SERVER['PHP_AUTH_USER'], "\\") && strpos($_SERVER['PHP_AUTH_USER'], "@")) {
list(self::$authUserString, self::$authDomain) = explode("@", $_SERVER['PHP_AUTH_USER']);
}
else {
list(self::$authUserString, self::$authDomain) = Utils::SplitDomainUser($_SERVER['PHP_AUTH_USER']);
}
self::$authPassword = (isset($_SERVER['PHP_AUTH_PW']))?$_SERVER['PHP_AUTH_PW'] : "";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment