all repos — honk @ e9da2099c1bc4de46534eb76227fcfaa785d759b

my fork of honk

m
Ted Unangst tedu@tedunangst.com
Fri, 01 Apr 2022 15:23:03 -0400
commit

e9da2099c1bc4de46534eb76227fcfaa785d759b

parent

41deae42c872cab5b3758e610a0564a5137e8644

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

jump to
M web.goweb.go

@@ -337,9 +337,7 @@ payload := buf.Bytes()

j, err := junk.FromBytes(payload) if err != nil { ilog.Printf("bad payload: %s", err) - io.WriteString(os.Stdout, "bad payload\n") - os.Stdout.Write(payload) - io.WriteString(os.Stdout, "\n") + ilog.Writer().Write(payload) return }

@@ -365,9 +363,7 @@ if err != nil {

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) - io.WriteString(os.Stdout, "bad payload\n") - os.Stdout.Write(payload) - io.WriteString(os.Stdout, "\n") + ilog.Writer().Write(payload) } http.Error(w, "what did you call me?", http.StatusTeapot) return

@@ -456,9 +452,7 @@ payload := buf.Bytes()

j, err := junk.FromBytes(payload) if err != nil { ilog.Printf("bad payload: %s", err) - io.WriteString(os.Stdout, "bad payload\n") - os.Stdout.Write(payload) - io.WriteString(os.Stdout, "\n") + ilog.Writer().Write(payload) return } if crappola(j) {

@@ -473,9 +467,7 @@ if err != nil {

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) - io.WriteString(os.Stdout, "bad payload\n") - os.Stdout.Write(payload) - io.WriteString(os.Stdout, "\n") + ilog.Writer().Write(payload) } http.Error(w, "what did you call me?", http.StatusTeapot) return