Skip to content

Commit

Permalink
re-fixin bug 2656
Browse files Browse the repository at this point in the history
this bug caused basic authentication to fail on new systems.  present in
0.8.8g too.
  • Loading branch information
cigamit committed Mar 6, 2016
1 parent 7e40b66 commit 6e5f3be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions auth_login.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@
/* Locate user in database */
$user = db_fetch_row_prepared('SELECT * FROM user_auth WHERE username = ? AND realm = 2', array($username));

if (!$user) {
cacti_log("AUTH LOGIN: User " . $username . " authenticated by web server but not found in Cacti database.");
if (!$user && read_config_option('user_template') == '0') {
cacti_log("ERROR: User '" . $username . "' authenticated by Web Server, but a Template User is not defined in Cacti. Exiting.", false, 'AUTH');
$username = htmlspecialchars($username);
auth_display_custom_error_message("$username is not authorized to use Cacti.");
auth_display_custom_error_message("$username authenticated by Web Server, but a Template User is not defined in Cacti.");
exit;
}

Expand Down

0 comments on commit 6e5f3be

Please sign in to comment.