From a2d574dbd72421434b67cb1ae979b3b9a6b3528c Mon Sep 17 00:00:00 2001 From: pp2amd6 Date: Fri, 29 Sep 2023 18:03:23 +0300 Subject: [PATCH 1/3] Added possibility for disabling login with password --- README.md | 19 +++++++++++++++++++ defaults.php | 1 + index.php | 14 +++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 93e1d89..f6d772a 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,25 @@ In order to use the remote shutdown functionality you have to give the user `www [...] ``` +#### Disabling password login + +If your RaspberryPi is on a private part of the network and you don't want to use a password, you can disable it. +To do this, in the `local.config` file, set the `loginWithPassword` parameter to `0`. +If there is no `loginWithPassword` parameter in your `local.config` file, simply add it after the `pass` option. + +Example: +``` +[...] + 'general' => + array ( + [...] + 'pass' => 'xxxxxxxxxxxxxxxxxx', + 'loginWithPassword' => '0', + [...] + ), +[...] +``` + 4. Remember password and enjoy! > **As always**: Make sure to change the default password (which is **root**) and choose a more secure one at first setup and if your dashboard is accessible on the network. diff --git a/defaults.php b/defaults.php index 230bdf6..ff5570e 100644 --- a/defaults.php +++ b/defaults.php @@ -10,6 +10,7 @@ 'general' => array ( 'pass' => '63a9f0ea7bb98050796b649e85481845', + 'loginWithPassword' => '1', 'initialsetup' => '0', 'tempunit' => '0' ), diff --git a/index.php b/index.php index 219b0db..f230577 100755 --- a/index.php +++ b/index.php @@ -11,7 +11,15 @@ $config = new Config; $config->load("local.config", "defaults.php"); -$auth=(isset($_SESSION["rpidbauth"])) ? true : false; +$loginWithPassword = $config->get("general.loginWithPassword"); + +if($loginWithPassword) { + $auth = (isset($_SESSION["rpidbauth"])) ? true : false; +} +else { + $auth = true; + $_SESSION["rpidbauth"]=time(); +} if(!isset($_SESSION["setup"])){ if( ($config->get("general.initialsetup")=="0") || ($config->get("general.initialsetup")=="") ){ @@ -311,7 +319,11 @@
 System
  + +
From 78d6da36f67d1b04fd77017cb4c98b7a6b25cbe0 Mon Sep 17 00:00:00 2001 From: pp2amd6 Date: Fri, 29 Sep 2023 18:05:35 +0300 Subject: [PATCH 2/3] README.MD little change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6d772a..c842315 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ Example: 'general' => array ( [...] - 'pass' => 'xxxxxxxxxxxxxxxxxx', + 'pass' => 'YOUR_MD5_PASSPHRASE_HERE', 'loginWithPassword' => '0', [...] ), From 579eeb985a104e940cd4630146ea11c234de6e0b Mon Sep 17 00:00:00 2001 From: femto-code <59444046+femto-code@users.noreply.github.com> Date: Tue, 10 Oct 2023 22:17:11 +0200 Subject: [PATCH 3/3] Fix login modal showing despite disabled password --- index.php | 2 ++ js/main.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index f230577..f7c6cc7 100755 --- a/index.php +++ b/index.php @@ -720,6 +720,8 @@