From 3a272baf38e1fe8a50be0cb0c1e4d330e7c256d3 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 20 Sep 2025 18:03:36 -0700 Subject: Revert "Add temporary logging" This reverts commit 413535b9c6d76f57e17bec50131e3144be421c05. --- roseh.moe.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/roseh.moe.go b/roseh.moe.go index 8c5a967..da88003 100644 --- a/roseh.moe.go +++ b/roseh.moe.go @@ -149,33 +149,26 @@ func attachCookie(w http.ResponseWriter) error { func checkCookie(w http.ResponseWriter, r *http.Request) bool { cookie, err := r.Cookie("auth") if err != nil { - fmt.Println("no cookie") return false } bytes, err := base64.RawStdEncoding.DecodeString(cookie.Value) if err != nil { - fmt.Printf("bad base64: %s\n", err) return false } if len(bytes) < ed25519.SignatureSize { - fmt.Printf("too small\n") return false } msg, sig := bytes[:len(bytes)-ed25519.SignatureSize], bytes[len(bytes)-ed25519.SignatureSize:] if !ed25519.Verify(publicKey, msg, sig) { - fmt.Printf("bad sig\n") return false } var t time.Time if err := t.UnmarshalBinary(msg); err != nil { - fmt.Printf("bad time.Time\n") return false } if time.Since(t) > cookieExpiration { - fmt.Printf("expired\n") return false } - fmt.Printf("verified\n") attachCookie(w) return true } -- cgit v1.3.1