From ea1a36b6e102d2b9574bffec5417cacd104f7d77 Mon Sep 17 00:00:00 2001 From: Tony Roman Date: Mon, 1 Sep 2008 22:43:55 +0000 Subject: [PATCH] 0001211: Allow use of "REMOTE_USER" if "PHP_AUTH_USER" is not set for authenication git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/cacti/branches/0.8.7@4683 860744bd-22fc-0310-8c96-e9fe5004b5ca --- auth_login.php | 4 +++- docs/CHANGELOG | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/auth_login.php b/auth_login.php index fe67e57d5d..7016ef9e88 100644 --- a/auth_login.php +++ b/auth_login.php @@ -35,7 +35,9 @@ if (read_config_option("auth_method") == "2") { $action = "login"; if (isset($_SERVER["PHP_AUTH_USER"])) { $username = str_replace("\\", "\\\\", $_SERVER["PHP_AUTH_USER"]); - } else { + }elseif (isset($_SERVER["REMOTE_USER"])) { + $username = str_replace("\\", "\\\\", $_SERVER["REMOTE_USER"]); + }else{ /* No user - Bad juju! */ $username = ""; cacti_log("ERROR: No username passed with Web Basic Authentication enabled.", false, "AUTH"); diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 2e663bd50c..5b9b842f7b 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -13,6 +13,7 @@ Cacti CHANGELOG -bug#0001191: Faulty IP address validation by ping.php script -bug#0001204: since upgrade to 0.87b the hosts with ip address with 255 are down and have no datas -bug#0001206: wrong "include" statements replaced by "include_once" (was: Graphs are not Zoom-able) +-bug#0001211: Allow use of "REMOTE_USER" if "PHP_AUTH_USER" is not set for authenication -bug#0001213: Template Copy does not hash copied template_items -bug#0001215: Impossible to define a none availability with the client cli/add_device.php -bug#0001216: CSV Export for zoomed graph, results in Validation error