From 93e06457169322a3a4fa816c1a399e248b79246e Mon Sep 17 00:00:00 2001 From: "eapl.mx" Date: Thu, 23 Jan 2025 13:14:07 -0600 Subject: [PATCH] fix(session): replace old auth method with libs/session.php --- libs/session.php | 6 ++++-- partials/header.php | 7 +++---- partials/listSelect.php | 33 +++++++++++++++------------------ partials/lists.php | 37 ++++++++++++++++++------------------- partials/timeline.php | 3 ++- views/__profile.php | 17 +++++++++-------- views/conv.php | 6 ++++-- views/following.php | 14 +++++++------- views/login.php | 12 ++++++------ views/profile.php | 6 ++++-- views/replies.php | 8 +++++--- 11 files changed, 77 insertions(+), 72 deletions(-) diff --git a/libs/session.php b/libs/session.php index a920687..0e5bfcb 100644 --- a/libs/session.php +++ b/libs/session.php @@ -16,14 +16,16 @@ if (isset($_POST['submit_pass']) && $_POST['pass']) { $passwordInForm = $_POST['pass']; if ($passwordInForm == $passwordInConfig) { - $_SESSION['password'] = $passwordInForm; + # TODO: Remove this legacy auth method completely + # $_SESSION['password'] = $passwordInForm; saveLogin(); } elseif ($isCodeValid = verifyTOTP( $config['totp_secret'], $passwordInForm, intval($config['totp_digits']) )) { - $_SESSION['password'] = 'valid_totp'; + # TODO: Remove this legacy auth method completely + # $_SESSION['password'] = 'valid_totp'; saveLogin(); } else { $error = 'Incorrect Password'; diff --git a/partials/header.php b/partials/header.php index c5f03e9..c76a9e6 100644 --- a/partials/header.php +++ b/partials/header.php @@ -1,7 +1,7 @@ @@ -9,7 +9,7 @@ $profile = getTwtsFromTwtxtString($config['public_txt_url']); - + @@ -43,8 +43,7 @@ $profile = getTwtsFromTwtxtString($config['public_txt_url']);