1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-12-03 09:45:19 +02:00

[#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

@@ -54,17 +54,17 @@ func (p *Github) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) {
extracted := struct {
Login string `json:"login"`
Id int `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
AvatarURL string `json:"avatar_url"`
Id int64 `json:"id"`
}{}
if err := json.Unmarshal(data, &extracted); err != nil {
return nil, err
}
user := &AuthUser{
Id: strconv.Itoa(extracted.Id),
Id: strconv.FormatInt(extracted.Id, 10),
Name: extracted.Name,
Username: extracted.Login,
Email: extracted.Email,