From 221087c9fd9a4688c7fc5da21f7923b1702b6c46 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Fri, 12 Apr 2024 18:27:05 +0200 Subject: [PATCH] fix: digest auth handle qop values separated without spaces The digest auth qop validation did only handle values separated like "auth, auth-int", but not "auth,auth-int". --- digest.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/digest.go b/digest.go index 7e45504..6c31a0c 100644 --- a/digest.go +++ b/digest.go @@ -263,9 +263,10 @@ func (c *credentials) validateQop() error { if c.messageQop == "" { return ErrDigestNoQop } - possibleQops := strings.Split(c.messageQop, ", ") + possibleQops := strings.Split(c.messageQop, ",") var authSupport bool for _, qop := range possibleQops { + qop = strings.TrimSpace(qop) if qop == "auth" { authSupport = true break