note 94349 deleted from features.http-auth by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 11:18:05 +0000 |
| Subject: | note 94349 deleted from features.http-auth by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197092@lists.php.net to get a copy of this message | ||
Note Submitter: admin at torrentsbook dot com
----
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