Skip to content

Commit

Permalink
refactor: Copy all values when sanitizing
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Aug 5, 2020
1 parent b0d5fea commit 2cedce6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ func (a *Request) Sanitize(allowedParameters []string) Requester {
b.ID = a.GetID()
b.Form = url.Values{}
for k := range a.Form {
if _, ok := allowed[k]; ok {
b.Form.Add(k, a.Form.Get(k))
if allowed[k] {
b.Form[k] = a.Form[k]
}
}

Expand Down

0 comments on commit 2cedce6

Please sign in to comment.