Merge pull request #4308 from decacis/patch-1

Fix for #4307
This commit is contained in:
Ylian Saint-Hilaire 2022-07-22 16:16:36 -07:00 committed by GitHub
commit 6d1dc263f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -979,7 +979,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
// Return a U2F hardware key challenge
function getHardwareKeyChallenge(req, domain, user, func) {
delete req.session.u2f;
if (req.session = null) { req.session = {}; }
if (req.session == null) { req.session = {}; }
const sec = parent.decryptSessionData(req.session.e);
if (user.otphkeys && (user.otphkeys.length > 0)) {