mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix preview namespace conflict
This commit is contained in:
1 parent
dc13760852
commit
500e08abac
3 files changed
+6
-5
No files matched your search
@@ -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.');
|
||||
|
||||
Reference in new issue
Block a user