diff --git a/config/reset_password.sh b/config/reset_password.sh index a7f933ee..6f79e7a4 100644 --- a/config/reset_password.sh +++ b/config/reset_password.sh @@ -1,7 +1,32 @@ -cp pialert.conf pialert.conf.bak +#!/bin/sh +PIA_CONF_FILE='pialert.conf' PIA_PASS=$1 -echo "The password '$1' is hashed" -PIA_PASS_HASH=$(echo -n $PIA_PASS | sha256sum | awk '{print $1}') -echo "The hashed password is: $PIA_PASS_HASH" -sed -i "/PIALERT_WEB_PASSWORD/c\PIALERT_WEB_PASSWORD = '$PIA_PASS_HASH'" pialert.conf -echo "The hash was saved in the configuration file" \ No newline at end of file +echo "Check of key PIALERT_WEB_PROTECTION exists:" +CHECK_PROT=$(grep "PIALERT_WEB_PROTECTION" $PIA_CONF_FILE | wc -l) +if [ $CHECK_PROT -eq 0 ] +then + cp $PIA_CONF_FILE $PIA_CONF_FILE.bak1 + echo " Key not found. Key 'PIALERT_WEB_PROTECTION' will be created." + echo " Check Config after the script is finished." + sed -i "/^VENDORS_DB.*/a PIALERT_WEB_PROTECTION = False" $PIA_CONF_FILE > pialert.tmp +else + echo " Key exists. Nothing to do." +fi +echo "" +echo "Check of key PIALERT_WEB_PASSWORD exists:" +CHECK_PWD=$(grep "PIALERT_WEB_PASSWORD" $PIA_CONF_FILE | wc -l) +if [ $CHECK_PWD -eq 0 ] +then + cp $PIA_CONF_FILE $PIA_CONF_FILE.bak2 + echo " Key not found. Key 'PIALERT_WEB_PASSWORD' will be created." + echo " Check Config after the script is finished." + echo " If the key is just created, please run the script again to set a new password". + sed -i "/^PIALERT_WEB_PROTECTION.*/a PIALERT_WEB_PASSWORD = '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92'" $PIA_CONF_FILE +else + echo " The password '$1' is hashed" + PIA_PASS_HASH=$(echo -n $PIA_PASS | sha256sum | awk '{print $1}') + echo " The hashed password is:" + echo " $PIA_PASS_HASH" + sed -i "/PIALERT_WEB_PASSWORD/c\PIALERT_WEB_PASSWORD = '$PIA_PASS_HASH'" $PIA_CONF_FILE + echo " The hash was saved in the configuration file" +fi diff --git a/front/css/dark-patch.css b/front/css/dark-patch.css index 97738f34..0c9ed484 100644 --- a/front/css/dark-patch.css +++ b/front/css/dark-patch.css @@ -664,6 +664,27 @@ input[type="password"]::-webkit-caps-lock-indicator { margin: auto; } +.nav-tabs-custom > .nav-tabs > li:hover > a, .nav-tabs-custom > .nav-tabs > li.active:hover > a { + background-color: #272c30; + color: #bec5cb; +} + +.nav-tabs-custom > .nav-tabs > li.active > a, .nav-tabs-custom > .nav-tabs > li.active:hover > a { + border-left-color: #30383f; + border-right-color: #30383f; + background-color: #272c30; + color: #bec5cb; +} +.nav-tabs-custom > .nav-tabs { + background-color: #353c42; +} +.nav-tabs-custom .tab-content { + background-color: #272c30; +} +.top_small_box_gray_text { + color: white !important; +} + /* remove white border that appears on mobile screen sizes */ .box-body { border: 0px; diff --git a/front/index.php b/front/index.php index 55005e41..4aae0831 100644 --- a/front/index.php +++ b/front/index.php @@ -19,7 +19,7 @@ $config_file_lines_bypass = array_values(preg_grep('/^PIALERT_WEB_PROTECTION\s.* $protection_line = explode("=", $config_file_lines_bypass[0]); $Pia_WebProtection = strtolower(trim($protection_line[1])); -if ($Pia_WebProtection == 'false') +if ($Pia_WebProtection != 'true') { header('Location: /pialert/devices.php'); $_SESSION["login"] = 1; @@ -156,4 +156,4 @@ if ($ENABLED_DARKMODE === True) { \ No newline at end of file +?> diff --git a/front/maintenance.php b/front/maintenance.php index 0057584f..a753e805 100644 --- a/front/maintenance.php +++ b/front/maintenance.php @@ -214,7 +214,6 @@ if (submit && isset($_POST['langselector_set'])) { -
+ + +