diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-08-06 11:45:12 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-08-06 11:45:12 +0000 |
commit | 1dbcd26106d91a0ca024f00e33cbc7ab108cdc28 (patch) | |
tree | e8a1b3e35d49699132b54e8a0f5bbed06586b2ac /frontends | |
parent | 4b307ca6b94c1ba582ce31961e053d6927a564e6 (diff) | |
download | zabbix-1dbcd26106d91a0ca024f00e33cbc7ab108cdc28.tar.gz zabbix-1dbcd26106d91a0ca024f00e33cbc7ab108cdc28.tar.xz zabbix-1dbcd26106d91a0ca024f00e33cbc7ab108cdc28.zip |
- [DEV-144] fixes for HTTP auth method (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5880 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/php/index.php | 12 | ||||
-rw-r--r-- | frontends/php/users.php | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/frontends/php/index.php b/frontends/php/index.php index 97da7afa..86972612 100644 --- a/frontends/php/index.php +++ b/frontends/php/index.php @@ -57,25 +57,23 @@ $config = select_config(); $authentication_type = $config['authentication_type']; - + if($authentication_type == ZBX_AUTH_HTTP){ - if(isset($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_USER'])){ if(!isset($sessionid)) $_REQUEST['enter'] = 'Enter'; $_REQUEST['name'] = $_SERVER["PHP_AUTH_USER"]; -// $_REQUEST['password'] = $_SERVER["PHP_AUTH_PW"]; + $_REQUEST['password'] = 'zabbix';//$_SERVER["PHP_AUTH_PW"]; } else{ access_deny(); } } - + if(isset($_REQUEST['enter'])&&($_REQUEST['enter']=='Enter')){ $name = get_request('name',''); $passwd = get_request('password',''); - $password = md5($passwd); $sql = 'SELECT u.userid,u.attempt_failed, u.attempt_clock, u.attempt_ip '. @@ -88,10 +86,10 @@ // ' AND ('.time().'-attempt_clock)>'.ZBX_LOGIN_BLOCK.'))'; $login = $attempt = DBfetch(DBselect($sql)); - + if(($name!=ZBX_GUEST_USER) && zbx_empty($passwd)){ $login = $attempt = false; - } + } if($login){ if($login['attempt_failed'] >= ZBX_LOGIN_ATTEMPTS){ diff --git a/frontends/php/users.php b/frontends/php/users.php index 9340557d..d9f27652 100644 --- a/frontends/php/users.php +++ b/frontends/php/users.php @@ -540,7 +540,7 @@ include_once 'include/page_header.php'; $jsmenu->InsertJavaScript(); } } - else if($_REQUEST['config']==1){ + else if($_REQUEST['config']==1){ // USER GROUPS if(isset($_REQUEST['form'])){ insert_usergroups_form(); } |