diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2026-10-17 11:50:34 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2026-10-17 11:50:39 -0700 |
| commit | 707726463a52cb2cebf9a174149995852632d26d (patch) | |
| tree | 78da6bde391e9e5fb9c910c9758953aa1c202b77 | |
| parent | Use a more insane cookie format (diff) | |
| download | roseh.moe-707726463a52cb2cebf9a174149995852632d26d.tar.zst | |
| -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 { |
