note 94349 modified in features.http-auth by thiago
| From: | thiago@php.net | Date: | Thu, 29 Oct 2009 18:45:36 +0000 |
| Subject: | note 94349 modified in features.http-auth by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-162263@lists.php.net to get a copy of this message | ||
PHP-CGI auth fix:
<?php
if(isset($_SERVER['HTTP_AUTHORIZATION'])) {
$auth_params = explode(":" ,
base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
$_SERVER['PHP_AUTH_USER'] = $auth_params[0];
unset($auth_params[0]);
$_SERVER['PHP_AUTH_PW'] = implode('',$auth_params);
}
?>
Fixes autorization with passwords, containing ":" symbol
--was--
PHP-CGI auth fix:
if(isset($_SERVER['HTTP_AUTHORIZATION'])) {
$auth_params = explode(":" ,
base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
$_SERVER['PHP_AUTH_USER'] = $auth_params[0];
unset($auth_params[0]);
$_SERVER['PHP_AUTH_PW'] = implode('',$auth_params);
}
Fixes autorization with passwords, containing ":" symbol
http://php.net/manual/en/features.http-auth.php