From dfc676c3e3fb1c8b2075610b6ab50434afb0dfff Mon Sep 17 00:00:00 2001 From: John Erik Halse Date: Thu, 26 Aug 2021 14:45:12 +0200 Subject: [PATCH] * Validation of payload digest * Reduced disk access * Config option for default digest algorithm --- digest.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/digest.go b/digest.go index 04b15e5..595086a 100644 --- a/digest.go +++ b/digest.go @@ -92,7 +92,8 @@ func (d digestFilterReader) Read(p []byte) (n int, err error) { if n > 0 { pp := p[:n] for _, dd := range d.digests { - dd.Write(pp) + // OK to ignore error. The digest might be wrong, but client gets wanted data. + _, _ = dd.Write(pp) } } return