all repos — honk @ 65f175d7add19e465731ca834796695ecbd9b65d

my fork of honk

add a newline after dumped payloads
Ted Unangst tedu@tedunangst.com
Wed, 18 May 2022 14:46:38 -0400
commit

65f175d7add19e465731ca834796695ecbd9b65d

parent

751ebfcd0c0e45720a40a5db9ca5ec1b43a5c282

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M web.goweb.go

@@ -341,6 +341,7 @@ j, err := junk.FromBytes(payload)

if err != nil { ilog.Printf("bad payload: %s", err) ilog.Writer().Write(payload) + ilog.Writer().Write([]byte{'\n'}) return }

@@ -367,6 +368,7 @@ ilog.Printf("inbox message failed signature for %s from %s: %s", keyname, r.Header.Get("X-Forwarded-For"), err)

if keyname != "" { ilog.Printf("bad signature from %s", keyname) ilog.Writer().Write(payload) + ilog.Writer().Write([]byte{'\n'}) } http.Error(w, "what did you call me?", http.StatusTeapot) return

@@ -456,6 +458,7 @@ j, err := junk.FromBytes(payload)

if err != nil { ilog.Printf("bad payload: %s", err) ilog.Writer().Write(payload) + ilog.Writer().Write([]byte{'\n'}) return } if crappola(j) {

@@ -471,6 +474,7 @@ ilog.Printf("inbox message failed signature for %s from %s: %s", keyname, r.Header.Get("X-Forwarded-For"), err)

if keyname != "" { ilog.Printf("bad signature from %s", keyname) ilog.Writer().Write(payload) + ilog.Writer().Write([]byte{'\n'}) } http.Error(w, "what did you call me?", http.StatusTeapot) return