mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-02 19:20:54 -05: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
@ -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 New Issue
Block a user