Skip to content

Commit

Permalink
Allow splitting digest parameters without spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
imroc committed Aug 21, 2023
1 parent ea515f9 commit bc78220
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ func parseChallenge(input string) (*challenge, error) {
return nil, errDigestBadChallenge
}
s = strings.Trim(s[7:], ws)
sl := strings.Split(s, ", ")
sl := strings.Split(s, ",")
c := &challenge{}
var r []string
for i := range sl {
r = strings.SplitN(sl[i], "=", 2)
r = strings.SplitN(strings.TrimSpace(sl[i]), "=", 2)
if len(r) != 2 {
return nil, errDigestBadChallenge
}
Expand Down

0 comments on commit bc78220

Please sign in to comment.