mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Moved the header call to after setcookie, also added an exit statement.
This commit is contained in:
@ -25,10 +25,11 @@ if ($vars['page'] == "logout" && $_SESSION['authenticated'])
|
|||||||
dbInsert(array('user' => $_SESSION['username'], 'address' => $_SERVER["REMOTE_ADDR"], 'result' => 'Logged Out'), 'authlog');
|
dbInsert(array('user' => $_SESSION['username'], 'address' => $_SERVER["REMOTE_ADDR"], 'result' => 'Logged Out'), 'authlog');
|
||||||
unset($_SESSION);
|
unset($_SESSION);
|
||||||
session_destroy();
|
session_destroy();
|
||||||
header('Location: /');
|
|
||||||
setcookie ("username", "", time() - 60*60*24*100, "/");
|
setcookie ("username", "", time() - 60*60*24*100, "/");
|
||||||
setcookie ("password", "", time() - 60*60*24*100, "/");
|
setcookie ("password", "", time() - 60*60*24*100, "/");
|
||||||
$auth_message = "Logged Out";
|
$auth_message = "Logged Out";
|
||||||
|
header('Location: /');
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['username']) && isset($_GET['password']))
|
if (isset($_GET['username']) && isset($_GET['password']))
|
||||||
|
Reference in New Issue
Block a user