|
|
| Author |
Message |
ripienaar
Joined: 24 Oct 2003 Posts: 7
|
Posted: Mon Mar 17, 2008 2:05 pm Post subject: Small change to web basic auth |
|
|
Hello,
I want to manage my authentication using a single singon system, unfortunately from Apache this means AuthType cannot be Basic.
PHP unfortunately only sets $_SERVER[PHP_AUTH_USER] if AuthType = Basic, which is often not the case for custom auth types. This is unfortunately a stupid assumption by PHP developers that only type Basic would have usernames!
The simple work around for this is to check for $_SERVER[PHP_AUTH_USER] and for $_SERVER[REMOTE_USER] in the auth module:
Currently auth_login.php:
| Code: |
if (isset($_SERVER["PHP_AUTH_USER"])) {
$username = str_replace("\\", "\\\\", $_SERVER["PHP_AUTH_USER"]);
}
|
If this code can also check if $_SERVER[REMOTE_USER] is present and use that in the event that PHP_AUTH_USER isnt there that will help people with some other auth methods |
|
| Back to top |
|
 |
rony Developer/Forum Admin
Joined: 17 Nov 2003 Posts: 5453 Location: Wisconsin, USA
|
|
| Back to top |
|
 |
ripienaar
Joined: 24 Oct 2003 Posts: 7
|
Posted: Tue Mar 18, 2008 4:10 pm Post subject: |
|
|
Done, bug number 1211 |
|
| Back to top |
|
 |
|