// Merge 1.4 => 1.5

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9819 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vSchoener
2011-11-03 10:07:19 +00:00
parent 2d64b31bfb
commit 1fbf610497
3 changed files with 14 additions and 5 deletions
+8 -3
View File
@@ -71,12 +71,17 @@
* @param string $headers the headers from the request
*/
function HttpAuthentication($headers=null, $die=true) {
if(!is_null($headers)) {
if (!is_null($headers))
$_SERVER = $headers;
}
if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_GET['HTTP_AUTHORIZATIOIZATION'], 6)));
if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
$compare_mer_id = $_SERVER['PHP_AUTH_USER'];
$compare_mer_key = $_SERVER['PHP_AUTH_PW'];
unset($_SERVER['PHP_AUTH_USER']);
unset($_SERVER['PHP_AUTH_PW']);
}
// IIS Note:: For HTTP Authentication to work with IIS,
// the PHP directive cgi.rfc2616_headers must be set to 0 (the default value).