proxyauth: typo in basic auth validation

This commit is contained in:
Girish Ramakrishnan
2023-03-14 11:35:24 +01:00
parent ef3d23ebd9
commit e86a613d86
+1 -1
View File
@@ -68,7 +68,7 @@ async function authorizationHeader(req, res, next) {
if (!app.manifest.addons.proxyAuth.basicAuth) return next(); // this is a flag because this allows auth to bypass 2FA
const verifyFunc = credentials.name.indexOf('@') !== -1 ? users.verifyWithEmail : users.verifyWithUsername;
const [verifyError, user] = await safe(verifyFunc(credentials.name, credentials.pass, appId));
const [verifyError, user] = await safe(verifyFunc(credentials.name, credentials.pass, appId, { relaxedTotpCheck: true }));
if (verifyError) return next(new HttpError(403, 'Invalid username or password' ));
req.user = user;