Discord compatible webhooks + bugfix of redirect after logon

This commit is contained in:
jokob.sk
2022-08-17 13:39:06 +10:00
parent 929ea98fce
commit ced6190b55
4 changed files with 27 additions and 14 deletions

View File

@@ -3,7 +3,7 @@ session_start();
if ($_SESSION["login"] != 1)
{
header('Location: /pialert/index.php');
header('Location: index.php');
exit;
}

View File

@@ -77,13 +77,6 @@ if (($_SESSION["login"] == 1) || ($Pia_Password == $_COOKIE["PiAler_SaveLogin"])
if (isset($_POST['PWRemember'])) {setcookie("PiAler_SaveLogin", hash('sha256',$_POST["loginpassword"]), time()+604800);}
}
// active Session or valid cookie (cookie not extends)
if (($_SESSION["login"] == 1) || ($Pia_Password == $_COOKIE["PiAler_SaveLogin"]))
{
header('Location: /pialert/devices.php');
$_SESSION["login"] = 1;
}
// no active session, cookie not checked
if ($_SESSION["login"] != 1)
{
@@ -181,7 +174,7 @@ if ($ENABLED_DARKMODE === True) {
<div id="myDIV" class="box-body" style="margin-top: 50px; <?php echo $login_display_mode;?>">
<div class="alert alert-<?php echo $login_mode;?> alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
<h4><i class="icon fa <?php echo $login_icon;?>"></i><?php echo $login_headline;?></h4>
<p><?php echo $login_info;?></p>
<p><?php echo $pia_lang['Login_Psw_run'];?><br><span style="border: solid 1px yellow; padding: 2px;">./reset_password.sh <?php echo $pia_lang['Login_Psw_new'];?></span><br><?php echo $pia_lang['Login_Psw_folder'];?></p>