diff options
Diffstat (limited to 'roseh.moe.go')
| -rw-r--r-- | roseh.moe.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/roseh.moe.go b/roseh.moe.go index 2640250..0369740 100644 --- a/roseh.moe.go +++ b/roseh.moe.go @@ -813,7 +813,7 @@ func totp(t int64) []byte { func checkOTP(auth string) int { now := time.Now().Unix() / 30 - return subtle.ConstantTimeCompare([]byte(auth), totp(now)) | subtle.ConstantTimeCompare([]byte(auth), totp(now-1)) + return subtle.ConstantTimeCompare([]byte(auth), totp(now-1)) | subtle.ConstantTimeCompare([]byte(auth), totp(now)) | subtle.ConstantTimeCompare([]byte(auth), totp(now+1)) } func checkPassword(password string) int { |
