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.
This commit is contained in:
wrongecho
2024-08-19 19:56:12 +01:00
parent 86e3f377ab
commit 3f772f5a2f
2 changed files with 2 additions and 2 deletions

View File

@@ -145,7 +145,7 @@ if (isset($_POST['login'])) {
}
// 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';
}