We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit ce32f0bd authored by Alessio Zampatti's avatar Alessio Zampatti Committed by GitHub

Merge pull request #179 from Adyen/recurring-cse

Fixes #178 support colon in Password field.
parents bddfa80f 97d26279
...@@ -300,22 +300,25 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -300,22 +300,25 @@ class Json extends \Magento\Framework\App\Action\Action
*/ */
protected function _fixCgiHttpAuthentication() protected function _fixCgiHttpAuthentication()
{ {
if (isset($_SERVER['REDIRECT_REMOTE_AUTHORIZATION']) && // do nothing if values are already there
if(!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
return;
} elseif (isset($_SERVER['REDIRECT_REMOTE_AUTHORIZATION']) &&
$_SERVER['REDIRECT_REMOTE_AUTHORIZATION'] != '') { $_SERVER['REDIRECT_REMOTE_AUTHORIZATION'] != '') {
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
explode(':', base64_decode($_SERVER['REDIRECT_REMOTE_AUTHORIZATION'])); explode(':', base64_decode($_SERVER['REDIRECT_REMOTE_AUTHORIZATION']),2);
} elseif (!empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { } elseif (!empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
explode(':', base64_decode(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 6))); explode(':', base64_decode(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 6)),2);
} elseif (!empty($_SERVER['HTTP_AUTHORIZATION'])) { } elseif (!empty($_SERVER['HTTP_AUTHORIZATION'])) {
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)),2);
} elseif (!empty($_SERVER['REMOTE_USER'])) { } elseif (!empty($_SERVER['REMOTE_USER'])) {
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
explode(':', base64_decode(substr($_SERVER['REMOTE_USER'], 6))); explode(':', base64_decode(substr($_SERVER['REMOTE_USER'], 6)),2);
} elseif (!empty($_SERVER['REDIRECT_REMOTE_USER'])) { } elseif (!empty($_SERVER['REDIRECT_REMOTE_USER'])) {
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
explode(':', base64_decode(substr($_SERVER['REDIRECT_REMOTE_USER'], 6))); explode(':', base64_decode(substr($_SERVER['REDIRECT_REMOTE_USER'], 6)),2);
} }
} }
......
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