Skip to content

Commit

Permalink
fix(appstore): possible nil pointer access in ParseNotificationV2
Browse files Browse the repository at this point in the history
  • Loading branch information
dai65527 committed Nov 28, 2023
1 parent 5d2e2c2 commit 88142b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion appstore/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ func (c *Client) ParseNotificationV2(tokenStr string, result *jwt.Token) error {
token, err := jwt.Parse(tokenStr, func(token *jwt.Token) (interface{}, error) {
return cert.ExtractPublicKeyFromToken(tokenStr)
})
*result = *token
if token != nil {
*result = *token
}
return err
}

Expand Down

0 comments on commit 88142b2

Please sign in to comment.