retry key lookups don't usually seem to work
Ted Unangst tedu@tedunangst.com
Tue, 08 Oct 2019 02:31:27 -0400
1 files changed,
6 insertions(+),
8 deletions(-)
jump to
M
web.go
→
web.go
@@ -286,16 +286,14 @@ return
} keyname, err := httpsig.VerifyRequest(r, payload, zaggy) if err != nil { - log.Printf("inbox message failed signature: %s", err) + log.Printf("inbox message failed signature for %s from %s", keyname, r.Header.Get("X-Forwarded-For")) if keyname != "" { - keyname, err = makeitworksomehowwithoutregardforkeycontinuity(keyname, r, payload) - if err != nil { - log.Printf("still failed: %s", err) - } - } - if err != nil { - return + log.Printf("bad signature from %s", keyname) + io.WriteString(os.Stdout, "bad payload\n") + os.Stdout.Write(payload) + io.WriteString(os.Stdout, "\n") } + return } what, _ := j.GetString("type") if what == "Like" {