ui: fix preview namespace conflict

This commit is contained in:
undefined committed 2022-10-20 11:40:19 +08:00
1 parent dc13760852
commit 500e08abac
3 files changed
+6 -5

No files matched your search

+2 -1
View File
@@ -121,7 +121,8 @@ class UserLoginHandler extends Handler {
if (!udoc) udoc = await user.getByUname(domainId, uname);
if (!udoc) throw new UserNotFoundError(uname);
await Promise.all([
this.limitRate('user_login', 60, 5),
this.limitRate('user_login', 60, 30),
this.limitRate(`user_login_${uname}`, 60, 5),
oplog.log(this, 'user.login', { redirect }),
]);
if (udoc._tfa && !verifyToken(udoc._tfa, tfa)) throw new InvalidTokenError('2FA token invalid.');