mirror of
https://github.com/pi-hole/web.git
synced 2026-04-22 17:59:20 +01:00
Remove invalid cookie
If cookie is invalid, it is cleared from the browser before continuing
This commit is contained in:
@@ -43,9 +43,14 @@
|
||||
if (isset($_COOKIE["persistentlogin"]))
|
||||
{
|
||||
if ($pwhash = $_COOKIE["persistentlogin"])
|
||||
$auth = true;
|
||||
{ $auth = true;
|
||||
// Refresh cookie with new expiry
|
||||
setcookie('persistentlogin', $pwhash, time()+60*60*24*7);
|
||||
else
|
||||
// Invalid cookie
|
||||
$auth = false;
|
||||
setcookie('persistentlogin', '');
|
||||
}
|
||||
}
|
||||
// Compare doubly hashes password input with saved hash
|
||||
else if(isset($_POST["pw"]))
|
||||
|
||||
Reference in New Issue
Block a user