all repos — honk @ 8e602ed499ecefe37e9633ecc4963a1e97cacb55

my fork of honk

if the digest is in the httpsig, we should also verify it matches content
Ted Unangst tedu@tedunangst.com
Tue, 21 May 2019 15:44:58 -0400
commit

8e602ed499ecefe37e9633ecc4963a1e97cacb55

parent

9e28eae7b416d8836d54a3040cb1d06fe8aa4fa3

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

jump to
M zig.gozig.go

@@ -139,6 +139,12 @@ s = req.Host

if s != serverName { log.Printf("caution: servername host header mismatch") } + case "digest": + s = req.Header.Get(h) + expv := "SHA-256=" + sb64sha256(content) + if s != expv { + return "", fmt.Errorf("digest header '%s' did not match content", s) + } default: s = req.Header.Get(h) }