[#6132] replaced strconv.Itoa with strconv.FormatInt where it could overflow

This commit is contained in:
Gani Georgiev
2024-12-17 21:41:55 +02:00
parent 9b4200a65c
commit ef0170cf0b
39 changed files with 61 additions and 56 deletions

View File

@@ -53,7 +53,7 @@ func (p *Strava) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) {
}
extracted := struct {
Id int `json:"id"`
Id int64 `json:"id"`
FirstName string `json:"firstname"`
LastName string `json:"lastname"`
Username string `json:"username"`
@@ -78,7 +78,7 @@ func (p *Strava) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) {
user.Expiry, _ = types.ParseDateTime(token.Expiry)
if extracted.Id != 0 {
user.Id = strconv.Itoa(extracted.Id)
user.Id = strconv.FormatInt(extracted.Id, 10)
}
return user, nil