Skip to content

Commit

Permalink
auth: parse to uint instead of int
Browse files Browse the repository at this point in the history
The strconv.Atoi is equivalent to ParseInt. The index is later used as
uint so we should use strconv.ParseUint.
  • Loading branch information
spzala committed Feb 9, 2020
1 parent 4e5314e commit cc5999d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth/simple_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (t *tokenSimple) isValidSimpleToken(ctx context.Context, token string) bool
if len(splitted) != 2 {
return false
}
index, err := strconv.Atoi(splitted[1])
index, err := strconv.ParseUint(splitted[1], 10, 0)
if err != nil {
return false
}
Expand Down

0 comments on commit cc5999d

Please sign in to comment.