fixed issue with Basic Authorization for cgi/fastcgi
This commit is contained in:
@@ -4,5 +4,7 @@ RedirectMatch 403 \.config$
|
|||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
|
||||||
|
|
||||||
RewriteRule reset/?$ reset.html [QSA,L]
|
RewriteRule reset/?$ reset.html [QSA,L]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
@@ -6,5 +6,7 @@ RewriteEngine On
|
|||||||
#
|
#
|
||||||
# RewriteBase /
|
# RewriteBase /
|
||||||
|
|
||||||
|
RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
|
||||||
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule ^ index.php [QSA,L]
|
RewriteRule ^ index.php [QSA,L]
|
||||||
@@ -51,9 +51,12 @@ class Auth extends \Slim\Middleware
|
|||||||
|
|
||||||
$espoAuth = $req->headers('HTTP_ESPO_AUTHORIZATION');
|
$espoAuth = $req->headers('HTTP_ESPO_AUTHORIZATION');
|
||||||
if (isset($espoAuth)) {
|
if (isset($espoAuth)) {
|
||||||
$credentials = explode(':', base64_decode($espoAuth));
|
list($authUsername, $authPassword) = explode(':', base64_decode($espoAuth));
|
||||||
$authUsername = $credentials[0];
|
}
|
||||||
$authPassword = $credentials[1];
|
|
||||||
|
$espoCgiAuth = $req->headers('HTTP_ESPO_CGI_AUTH');
|
||||||
|
if ( !isset($authUsername) && !isset($authPassword) && isset($espoCgiAuth) ) {
|
||||||
|
list($authUsername, $authPassword) = explode(':' , base64_decode(substr($espoCgiAuth, 6)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($this->authRequired)) {
|
if (is_null($this->authRequired)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user