auth: parse to uint instead of int

The strconv.Atoi is equivalent to ParseInt. The index is later used as
uint so we should use strconv.ParseUint.
This commit is contained in:
Sahdev P. Zala 2020-02-08 20:28:44 -05:00
parent 4e5314e9b5
commit cc5999db3a

View File

@ -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
}