fix auth for 5.5

This commit is contained in:
yuri
2015-10-22 10:41:07 +03:00
parent bb5d5a0ccf
commit 0a0f8da2f4
+4 -1
View File
@@ -55,7 +55,10 @@ class Auth extends \Slim\Middleware
}
$espoCgiAuth = $req->headers('HTTP_ESPO_CGI_AUTH');
if ( !isset($authUsername) && !isset($authPassword) && !empty($espoCgiAuth) ) {
if (empty($espoCgiAuth)) {
$espoCgiAuth = $req->headers('REDIRECT_HTTP_ESPO_CGI_AUTH');
}
if (!isset($authUsername) && !isset($authPassword) && !empty($espoCgiAuth)) {
list($authUsername, $authPassword) = explode(':' , base64_decode(substr($espoCgiAuth, 6)));
}