From 148a66a1c37487f62535b896200e7c9f81d6a288 Mon Sep 17 00:00:00 2001 From: Adnan ELARAJI Date: Sun, 8 Dec 2024 16:10:13 +0100 Subject: [PATCH 1/2] fix Undefined array key url in views/home.php --- views/home.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/views/home.php b/views/home.php index e9cda6a..a326e6d 100644 --- a/views/home.php +++ b/views/home.php @@ -24,9 +24,11 @@ $title = "Timeline for ".$title; // Redirect guests to Profile view, if url not set til home twtxt.txt -if (!isset($_SESSION['password']) && ($_GET['url'] != $config['public_txt_url']) ) { - header('Location: ./profile'); - exit(); +if (!isset($_SESSION['password']) && (isset($_GET['url']))) { + if ($_GET['url'] != $config['public_txt_url']) { + header('Location: ./profile'); + exit(); + } } include_once 'partials/header.php'; @@ -43,4 +45,4 @@ if (isset($_SESSION['password'])) { include_once 'partials/timeline.php'; -include_once 'partials/footer.php'; \ No newline at end of file +include_once 'partials/footer.php'; From 4c929340326d6a2efc5a598e81431b712cc9028c Mon Sep 17 00:00:00 2001 From: Adnan ELARAJI Date: Sun, 8 Dec 2024 17:07:03 +0100 Subject: [PATCH 2/2] fix for the "Cannot modify header information - headers already sent by .../header.php" warning on login page --- views/login.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/views/login.php b/views/login.php index 6024384..dfa0d93 100644 --- a/views/login.php +++ b/views/login.php @@ -3,19 +3,18 @@ require_once("partials/base.php"); $title = "Login - ".$title; -include 'partials/header.php'; -?> - - + else { + include 'partials/header.php'; +?>

Enter password or TOTP

@@ -26,4 +25,4 @@ include 'partials/header.php';
- \ No newline at end of file +