From 6d526f3843d312fe2a16273b11491b339c5cfba5 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 11 Oct 2005 02:53:00 +0000 Subject: restore 1.10 Ticket #598 --- etc/inc/auth.inc | 39 +++++++-------------------------------- 1 file changed, 7 insertions(+), 32 deletions(-) (limited to 'etc/inc') diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 49b3d21..b9d1d6b 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -61,21 +61,8 @@ function passwd_backed_basic_auth() { /* Check to see if user even exists */ $username = $HTTP_SERVER_VARS['AUTH_USER']; - - /* - * auth the username - * honour custom username set in webConfigurator page - */ - if($config['system']['username'] == $HTTP_SERVER_VARS['AUTH_USER']) { - /* we match, check the password in xml configuration file */ - $username = "admin"; - } else { - /* finally, if we're here then we didn't match the username in - * the webConfigurator. Check the password file. - */ - if(!($line = array_shift(preg_grep("/^$username:.*$/", $authfile)))) - continue; - } + if(!($line = array_shift(preg_grep("/^$username:.*$/", $authfile)))) + continue; /* Get crypted password */ preg_match("/^$username:((\\$1\\$[.\d\w_\/]{8}\\$)[.\d\w_\/]{22})$/", $line, $matches); @@ -115,22 +102,10 @@ function htpasswd_backed_basic_auth() { if (!isset($HTTP_SERVER_VARS['AUTH_USER'])) continue; - /* - * auth the username - * honour custom username set in webConfigurator page - */ - if($config['system']['username'] == $HTTP_SERVER_VARS['AUTH_USER']) { - /* we match, check the password in xml configuration file */ - $username = "admin"; - } else { - /* finally, if we're here then we didn't match the username in - * the webConfigurator. Check the password file. - */ - /* Check to see if user even exists */ - $username = $HTTP_SERVER_VARS['AUTH_USER']; - if(!($line = array_shift(preg_grep("/^$username:.*$/", $authfile)))) - continue; - } + /* Check to see if user even exists */ + $username = $HTTP_SERVER_VARS['AUTH_USER']; + if(!($line = array_shift(preg_grep("/^$username:.*$/", $authfile)))) + continue; /* Get crypted password */ preg_match("/^$username:((\\$1\\$[.\d\w_\/]{8}\\$)[.\d\w_\/]{22})$/", $line, $matches); @@ -151,4 +126,4 @@ function htpasswd_backed_basic_auth() { return false; } -?> +?> \ No newline at end of file -- cgit v1.1