mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-15 22:51:37 -07:00
Fix logout #181
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
require dirname(__FILE__).'/php/server/init.php';
|
require dirname(__FILE__).'/php/server/init.php';
|
||||||
require 'php/templates/security.php';
|
require 'php/templates/security.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($Pia_WebProtection != 'true')
|
if ($Pia_WebProtection != 'true')
|
||||||
{
|
{
|
||||||
header('Location: devices.php');
|
header('Location: devices.php');
|
||||||
@@ -9,6 +11,15 @@ if ($Pia_WebProtection != 'true')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Logout
|
||||||
|
if (isset ($_GET["action"]) && $_GET["action"] == 'logout')
|
||||||
|
{
|
||||||
|
setcookie("PiAlert_SaveLogin", '', time()+1); // reset cookie
|
||||||
|
$_SESSION["login"] = 0;
|
||||||
|
header('Location: index.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
// Password without Cookie check -> pass and set initial cookie
|
// Password without Cookie check -> pass and set initial cookie
|
||||||
if (isset ($_POST["loginpassword"]) && $Pia_Password == hash('sha256',$_POST["loginpassword"]))
|
if (isset ($_POST["loginpassword"]) && $Pia_Password == hash('sha256',$_POST["loginpassword"]))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user