use 401 for sig fail
Ted Unangst tedu@tedunangst.com
Tue, 19 Dec 2023 18:10:13 -0500
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
web.go
→
web.go
@@ -443,7 +443,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) } - http.Error(w, "what did you call me?", http.StatusTeapot) + http.Error(w, "what did you call me?", http.StatusUnauthorized) return } origin := keymatch(keyname, who)@@ -556,7 +556,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) } - http.Error(w, "what did you call me?", http.StatusTeapot) + http.Error(w, "what did you call me?", http.StatusUnauthorized) return } who, _ := j.GetString("actor")