Skip to content

Commit

Permalink
fix: digest auth handle qop values separated without spaces
Browse files Browse the repository at this point in the history
The digest auth qop validation did only handle values separated
like "auth, auth-int", but not "auth,auth-int".
  • Loading branch information
phw committed Apr 12, 2024
1 parent ff6ba7a commit 853c78d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion digest.go
Expand Up @@ -264,9 +264,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
Expand Down

0 comments on commit 853c78d

Please sign in to comment.