From cc5999db3a02151c4cf9bdf0de457598cca79e64 Mon Sep 17 00:00:00 2001 From: "Sahdev P. Zala" Date: Sat, 8 Feb 2020 20:28:44 -0500 Subject: [PATCH] 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. --- auth/simple_token.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/simple_token.go b/auth/simple_token.go index d96cc48db..147978e8f 100644 --- a/auth/simple_token.go +++ b/auth/simple_token.go @@ -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 }