Fixed 2FA result when token is invalid.

Ylian Saint-Hilaire committed Sep 29, 2020 at 10:52 UTC c0eb30850a1b89217a547a0fd5bfdffc00df8ee4
1 file changed +1 -1
webserver.js
+1 -1
@@ -5460,7 +5460,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
5460 try { ws.send(JSON.stringify({ action: 'close', cause: 'noauth', msg: 'tokenrequired', sms2fa: sms2fa, sms2fasent: true, twoFactorCookieDays: twoFactorCookieDays })); ws.close(); } catch (e) { }
5461 } else {
5462 // Ask for a login token
5463 - try { ws.send(JSON.stringify({ action: 'close', cause: 'noauth', msg: 'tokenrequired', email2fa: email2fa })); ws.close(); } catch (e) { }
5463 + try { ws.send(JSON.stringify({ action: 'close', cause: 'noauth', msg: 'tokenrequired', email2fa: email2fa, twoFactorCookieDays: twoFactorCookieDays })); ws.close(); } catch (e) { }
5464 }
5465 } else {
5466 // We are authenticated with 2nd factor.