From 063f8745f9c47f2f230b6a62b698cece555b752e Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Sat, 17 Sep 2005 05:00:31 +0000 Subject: If there's a PHP_AUTH_* copy it over to AUTH_* (mini sets AUTH_*, lighttpd sets PHP_AUTH_*) --- etc/inc/auth.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index e86e25f..a13b815 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -52,6 +52,10 @@ function passwd_backed_basic_auth() { for($attempt = 0; $attempt <= 3; basic_auth_prompt()){ $attempt++; /* Check for AUTH_USER */ + if ($HTTP_SERVER_VARS['PHP_AUTH_USER'] <> "") { + $HTTP_SERVER_VARS['AUTH_USER'] = $HTTP_SERVER_VARS['PHP_AUTH_USER']; + $HTTP_SERVER_VARS['AUTH_PW'] = $HTTP_SERVER_VARS['PHP_AUTH_PW']; + } if (!isset($HTTP_SERVER_VARS['AUTH_USER'])) continue; @@ -91,6 +95,10 @@ function htpasswd_backed_basic_auth() { for($attempt = 0; $attempt <= 3; basic_auth_prompt()){ $attempt++; /* Check for AUTH_USER */ + if ($HTTP_SERVER_VARS['PHP_AUTH_USER'] <> "") { + $HTTP_SERVER_VARS['AUTH_USER'] = $HTTP_SERVER_VARS['PHP_AUTH_USER']; + $HTTP_SERVER_VARS['AUTH_PW'] = $HTTP_SERVER_VARS['PHP_AUTH_PW']; + } if (!isset($HTTP_SERVER_VARS['AUTH_USER'])) continue; @@ -118,4 +126,4 @@ function htpasswd_backed_basic_auth() { return false; } -?> \ No newline at end of file +?> -- cgit v1.1