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 142b7dd commit 221087c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 221087c

Please sign in to comment.