mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Fixed http-auth not honouring http_auth_guest (#6699)
* fix: Fixed http-auth not honouring http_auth_guest * Always fall back to http_auth_guest. Make sure $username is set, otherwise, we won't try to authenticate. * reverted elseif to default to http-auth-guest * Update authenticate.inc.php simplify logic
This commit is contained in:
@@ -56,9 +56,9 @@ try {
|
||||
$username = clean($_REQUEST['username']);
|
||||
$password = $_REQUEST['password'];
|
||||
} elseif (isset($_SERVER['REMOTE_USER'])) {
|
||||
$username = $_SERVER['REMOTE_USER'];
|
||||
$username = clean($_SERVER['REMOTE_USER']);
|
||||
} elseif (isset($_SERVER['PHP_AUTH_USER']) && $config['auth_mechanism'] === 'http-auth') {
|
||||
$username = $_SERVER['PHP_AUTH_USER'];
|
||||
$username = clean($_SERVER['PHP_AUTH_USER']);
|
||||
}
|
||||
|
||||
// form authentication
|
||||
|
||||
Reference in New Issue
Block a user