diff --git a/front/deviceDetails.php b/front/deviceDetails.php index 73f63e46..7bda2d1f 100755 --- a/front/deviceDetails.php +++ b/front/deviceDetails.php @@ -8,14 +8,6 @@ #--------------------------------------------------------------------------- --> diff --git a/front/devices.php b/front/devices.php index fc3d2600..811a6fb7 100755 --- a/front/devices.php +++ b/front/devices.php @@ -8,20 +8,11 @@ #--------------------------------------------------------------------------- --> diff --git a/front/help_faq.php b/front/help_faq.php index a209f5f5..724ff17b 100755 --- a/front/help_faq.php +++ b/front/help_faq.php @@ -1,12 +1,4 @@ diff --git a/front/index.php b/front/index.php index 7e963db4..bdc6ac03 100755 --- a/front/index.php +++ b/front/index.php @@ -1,33 +1,9 @@ pass and set initial cookie -if ($Pia_Password == hash('sha256',$_POST["loginpassword"])) +if (isset ($_POST["loginpassword"]) && $Pia_Password == hash('sha256',$_POST["loginpassword"])) { header('Location: devices.php'); $_SESSION["login"] = 1; - if (isset($_POST['PWRemember'])) {setcookie("PiAler_SaveLogin", hash('sha256',$_POST["loginpassword"]), time()+604800);} + if (isset($_POST['PWRemember'])) {setcookie("PiAlert_SaveLogin", hash('sha256',$_POST["loginpassword"]), time()+604800);} } // active Session or valid cookie (cookie not extends) -if (($_SESSION["login"] == 1) || ($Pia_Password == $_COOKIE["PiAler_SaveLogin"])) +if (( isset ($_SESSION["login"]) && ($_SESSION["login"] == 1)) || (isset ($_COOKIE["PiAlert_SaveLogin"]) && $Pia_Password == $_COOKIE["PiAlert_SaveLogin"])) { header('Location: devices.php'); $_SESSION["login"] = 1; - if (isset($_POST['PWRemember'])) {setcookie("PiAler_SaveLogin", hash('sha256',$_POST["loginpassword"]), time()+604800);} + if (isset($_POST['PWRemember'])) {setcookie("PiAlert_SaveLogin", hash('sha256',$_POST["loginpassword"]), time()+604800);} } +$login_headline = lang('Login_Toggle_Info_headline'); +$login_info = ""; + // no active session, cookie not checked -if ($_SESSION["login"] != 1) +if (isset ($_SESSION["login"]) == FALSE || $_SESSION["login"] != 1) { - if (file_exists('../db/setting_darkmode')) {$ENABLED_DARKMODE = True;} - if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92') { - $login_info = 'Defaultpassword "123456" is still active'; - $login_mode = 'danger'; - $login_display_mode = 'display: block;'; - $login_headline = lang('Login_Toggle_Alert_headline'); - $login_icon = 'fa-ban'; - } else { - $login_mode = 'info'; - $login_display_mode = 'display: none;'; - $login_headline = lang('Login_Toggle_Info_headline'); - $login_icon = 'fa-info'; - } + if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92') + { + $login_info = lang('Login_Default_PWD'); + $login_mode = 'danger'; + $login_display_mode = 'display: block;'; + $login_headline = lang('Login_Toggle_Alert_headline'); + $login_icon = 'fa-ban'; + } + else + { + $login_mode = 'info'; + $login_display_mode = 'display: none;'; + $login_headline = lang('Login_Toggle_Info_headline'); + $login_icon = 'fa-info'; + } +} // ################################################## // ## Login Processing end @@ -196,8 +170,3 @@ function Passwordhinfo() { - - \ No newline at end of file diff --git a/front/maintenance.php b/front/maintenance.php index d3835353..b43c6d00 100755 --- a/front/maintenance.php +++ b/front/maintenance.php @@ -1,14 +1,4 @@ 0) +{ + $latestbackup = $latestfiles[0]; + $latestbackup_date = date ("Y-m-d H:i:s", filemtime($latestbackup)); +} + // Skin selector ----------------------------------------------------------------- -if (submit && isset($_POST['skinselector_set'])) { +if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) { $pia_skin_set_dir = '../db/'; $pia_skin_selector = htmlspecialchars($_POST['skinselector']); if (in_array($pia_skin_selector, $pia_installed_skins)) { diff --git a/front/network.php b/front/network.php index 79093313..1b924b6b 100755 --- a/front/network.php +++ b/front/network.php @@ -1,14 +1,4 @@ diff --git a/front/php/templates/language/en_us.php b/front/php/templates/language/en_us.php index 303f3946..b12eadc7 100755 --- a/front/php/templates/language/en_us.php +++ b/front/php/templates/language/en_us.php @@ -37,6 +37,7 @@ $lang['en_us'] = array( 'Login_Toggle_Info' => 'Password Information', 'Login_Toggle_Info_headline' => 'Password Information', 'Login_Toggle_Alert_headline' => 'Password Alert!', +'Login_Default_PWD' => 'Default password "123456" is still active.', ////////////////////////////////////////////////////////////////// // Device Page diff --git a/front/php/templates/security.php b/front/php/templates/security.php new file mode 100644 index 00000000..5ae17081 --- /dev/null +++ b/front/php/templates/security.php @@ -0,0 +1,64 @@ + \ No newline at end of file diff --git a/front/presence.php b/front/presence.php index 80b91976..49f5d0bd 100755 --- a/front/presence.php +++ b/front/presence.php @@ -8,14 +8,6 @@ #--------------------------------------------------------------------------- --> diff --git a/front/settings.php b/front/settings.php index 0885e29f..82034558 100644 --- a/front/settings.php +++ b/front/settings.php @@ -1,19 +1,7 @@