From 90e271df972e71e7e13ca319f34b22618aecd307 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sun, 23 Oct 2022 08:49:54 -0700 Subject: [PATCH] Telegram 2FA fixes (#4650) --- views/default.handlebars | 2 +- views/login.handlebars | 12 ++++++------ views/login2.handlebars | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/views/default.handlebars b/views/default.handlebars index 8bfbcffb..41ceb279 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -424,8 +424,8 @@
Manage authenticator app
Manage security keys
Manage push authentication
-
Manage backup codes
Manage messaging
+
Manage backup codes
View previous logins
diff --git a/views/login.handlebars b/views/login.handlebars index 70296ed4..7c398df0 100644 --- a/views/login.handlebars +++ b/views/login.handlebars @@ -456,9 +456,9 @@ try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null } var twofakey = (hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn'); QV('securityKeyButton', twofakey); - QV('emailKeyButton', otpemail && (messageid != 2) && (messageid != 4)); - QV('smsKeyButton', otpsms && (messageid != 2) && (messageid != 4)); - QV('msgKeyButton', otpmsg && (messageid != 2) && (messageid != 4)); + QV('emailKeyButton', otpemail && (messageid != 2) && (messageid != 4) && (messageid != 6)); + QV('smsKeyButton', otpsms && (messageid != 2) && (messageid != 4) && (messageid != 6)); + QV('msgKeyButton', otpmsg && (messageid != 2) && (messageid != 4) && (messageid != 6)); // If hardware key is an option, trigger it now if (autofido && twofakey) { setTimeout(function () { useSecurityKey(1); }, 300); } @@ -469,9 +469,9 @@ try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null } var twofakey = (hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn'); QV('securityKeyButton2', twofakey); - QV('emailKeyButton2', otpemail && (messageid != 2) && (messageid != 4)); - QV('smsKeyButton2', otpsms && (messageid != 2) && (messageid != 4)); - QV('msgKeyButton2', otpmsg && (messageid != 2) && (messageid != 4)); + QV('emailKeyButton2', otpemail && (messageid != 2) && (messageid != 4) && (messageid != 6)); + QV('smsKeyButton2', otpsms && (messageid != 2) && (messageid != 4) && (messageid != 6)); + QV('msgKeyButton2', otpmsg && (messageid != 2) && (messageid != 4) && (messageid != 6)); // If hardware key is an option, trigger it now if (autofido && twofakey) { setTimeout(function () { useSecurityKey(2); }, 300); } diff --git a/views/login2.handlebars b/views/login2.handlebars index a04325f1..2e8cc9ec 100644 --- a/views/login2.handlebars +++ b/views/login2.handlebars @@ -528,10 +528,10 @@ if (tokenTimeout > 0) { setTimeout(function () { Q('hwtokenInput').value = '**timeout**'; QE('tokenOkButton', true); Q('tokenOkButton').click(); }, tokenTimeout); } try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null } var twofakey = (hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn'); - var emailkey = otpemail && (messageid != 2) && (messageid != 4); - var smskey = otpsms && (messageid != 2) && (messageid != 4); - var msgkey = otpmsg && (messageid != 2) && (messageid != 4); - var pushkey = otppush && (messageid != 2) && (messageid != 4); + var emailkey = otpemail && (messageid != 2) && (messageid != 4) && (messageid != 6); + var smskey = otpsms && (messageid != 2) && (messageid != 4) && (messageid != 6); + var msgkey = otpmsg && (messageid != 2) && (messageid != 4) && (messageid != 6); + var pushkey = otppush && (messageid != 2) && (messageid != 4) && (messageid != 6); QV('securityKeyButton2', twofakey); QV('emailKeyButton2', emailkey); QV('smsKeyButton2', smskey);