mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-28 06:08:02 +03:00
avoid default values for token verification
override default values: window=1, window size=30 (see https://github.com/louislam/uptime-kuma/issues/640)
This commit is contained in:
parent
ad0cde6554
commit
b5b391c73b
1 changed files with 2 additions and 2 deletions
|
@ -265,7 +265,7 @@ exports.entryPage = "dashboard";
|
|||
}
|
||||
|
||||
if (data.token) {
|
||||
let verify = notp.totp.verify(data.token, user.twofa_secret);
|
||||
let verify = notp.totp.verify(data.token, user.twofa_secret, {"window": 1, "time": 30});
|
||||
|
||||
if (verify && verify.delta == 0) {
|
||||
callback({
|
||||
|
@ -383,7 +383,7 @@ exports.entryPage = "dashboard";
|
|||
socket.userID,
|
||||
]);
|
||||
|
||||
let verify = notp.totp.verify(token, user.twofa_secret);
|
||||
let verify = notp.totp.verify(token, user.twofa_secret, {"window": 1, "time": 30});
|
||||
|
||||
if (verify && verify.delta == 0) {
|
||||
callback({
|
||||
|
|
Loading…
Reference in a new issue