From 3f772f5a2f7584de39785f3816accb447edccfa0 Mon Sep 17 00:00:00 2001 From: wrongecho Date: Mon, 19 Aug 2024 19:56:12 +0100 Subject: [PATCH] Bugfix: credentials Fix an edge-case bug causing the user_encryption_session_key session cookie to not be set due to error output (when display PHP errors in browser is enabled). This means login credentials are still encrypted but cannot be decrypted properly by other users. Prevent users creating new credentials if they do not have the correct cookie set. --- client_logins.php | 2 +- login.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client_logins.php b/client_logins.php index 83acddc07..6f2636508 100644 --- a/client_logins.php +++ b/client_logins.php @@ -44,7 +44,7 @@

Credentials

- diff --git a/login.php b/login.php index 7bdda3670..edfeef333 100644 --- a/login.php +++ b/login.php @@ -145,7 +145,7 @@ } // Validate MFA code - if (TokenAuth6238::verify($token, $current_code)) { + if (!empty($current_code) && TokenAuth6238::verify($token, $current_code)) { $mfa_is_complete = true; $extended_log = 'with 2FA'; }