From d07acf64a9a9a58712cffc70339df59f0a157388 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 29 Sep 2020 10:52:03 -0700 Subject: [PATCH] Fixed 2FA result when token is invalid. --- webserver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webserver.js b/webserver.js index f2af82a2..e02c97b3 100644 --- a/webserver.js +++ b/webserver.js @@ -5460,7 +5460,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { try { ws.send(JSON.stringify({ action: 'close', cause: 'noauth', msg: 'tokenrequired', sms2fa: sms2fa, sms2fasent: true, twoFactorCookieDays: twoFactorCookieDays })); ws.close(); } catch (e) { } } else { // Ask for a login token - try { ws.send(JSON.stringify({ action: 'close', cause: 'noauth', msg: 'tokenrequired', email2fa: email2fa })); ws.close(); } catch (e) { } + try { ws.send(JSON.stringify({ action: 'close', cause: 'noauth', msg: 'tokenrequired', email2fa: email2fa, twoFactorCookieDays: twoFactorCookieDays })); ws.close(); } catch (e) { } } } else { // We are authenticated with 2nd factor.