Add feature to use script without password prompt

This commit is contained in:
Hamid
2019-07-15 08:10:55 +04:30
parent 81f70e89d1
commit 4908da2ffc
+1 -1
View File
@@ -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;