From 4908da2ffc838c13e9d35f8fdc02250090f5842b Mon Sep 17 00:00:00 2001 From: Hamid Date: Mon, 15 Jul 2019 08:10:55 +0430 Subject: [PATCH] Add feature to use script without password prompt --- pheditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pheditor.php b/pheditor.php index aa48306..01f1cf9 100755 --- a/pheditor.php +++ b/pheditor.php @@ -53,7 +53,7 @@ if (file_exists(LOG_FILE)) { session_name('pheditor'); session_start(); -if (isset($_SESSION['pheditor_admin']) === false || $_SESSION['pheditor_admin'] !== true) { +if (empty(PASSWORD) === false && (isset($_SESSION['pheditor_admin']) === false || $_SESSION['pheditor_admin'] !== true)) { if (isset($_POST['pheditor_password']) && empty($_POST['pheditor_password']) === false) { if (hash('sha512', $_POST['pheditor_password']) === PASSWORD) { $_SESSION['pheditor_admin'] = true;