summaryrefslogtreecommitdiffstats
path: root/etc/inc/auth.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-11 02:53:00 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-11 02:53:00 +0000
commit6d526f3843d312fe2a16273b11491b339c5cfba5 (patch)
treee42b48c7b05d55a0da66c55a31e3f5a24d435cf3 /etc/inc/auth.inc
parentf75941421ba5777646195afd29a3036564abd555 (diff)
downloadpfsense-6d526f3843d312fe2a16273b11491b339c5cfba5.zip
pfsense-6d526f3843d312fe2a16273b11491b339c5cfba5.tar.gz
restore 1.10
Ticket #598
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r--etc/inc/auth.inc39
1 files changed, 7 insertions, 32 deletions
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
OpenPOWER on IntegriCloud