Skip to content

Commit

Permalink
Merge pull request awa#255 from dai65527/master
Browse files Browse the repository at this point in the history
fix(appstore): possible nil pointer access in ParseNotificationV2
  • Loading branch information
richzw authored Nov 28, 2023
2 parents 5d2e2c2 + 88142b2 commit 8209e2e
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 8209e2e

Please sign in to comment.