mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 03:10:18 +01:00
Redirect the user in a POST-Redirect-GET fashion after a successful login
This commit is contained in:
@@ -40,6 +40,13 @@
|
||||
if($postinput == $pwhash)
|
||||
{
|
||||
$_SESSION["hash"] = $pwhash;
|
||||
|
||||
// Login successful, redirect the user to the homepage to discard the POST request
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_SERVER['QUERY_STRING'] === 'login') {
|
||||
header(sprintf('Location: index.php'));
|
||||
exit();
|
||||
}
|
||||
|
||||
$auth = true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user