Skip to content

Commit

Permalink
fix: postPolicy contentRange max must be > 0 (#1675)
Browse files Browse the repository at this point in the history
fixes #1675
  • Loading branch information
hotrungnhan committed Jul 9, 2022
1 parent ef3e45e commit a2b5454
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions post-policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ func (p *PostPolicy) SetContentLengthRange(min, max int64) error {
if min < 0 {
return errInvalidArgument("Minimum limit cannot be negative.")
}
if max < 0 {
return errInvalidArgument("Maximum limit cannot be negative.")
if max <= 0 {
return errInvalidArgument("Maximum limit cannot be non-positive.")
}
p.contentLengthRange.min = min
p.contentLengthRange.max = max
Expand Down

0 comments on commit a2b5454

Please sign in to comment.