diff --git a/common/crypto/auth.go b/common/crypto/auth.go index 706e2ea84..ec197ceea 100644 --- a/common/crypto/auth.go +++ b/common/crypto/auth.go @@ -159,7 +159,7 @@ func (v *AuthenticationReader) Read(b []byte) (int, error) { } totalBytes := v.CopyChunk(b) - for v.aggressive { + for v.aggressive && totalBytes < len(b) { if err := v.NextChunk(); err != nil { break }