Skip to content
Snippets Groups Projects
Unverified Commit 18e37bca authored by Simon Esposito's avatar Simon Esposito Committed by GitHub
Browse files

Return error on empty Google receipt PackageName (#1085)

parent 173b560c
Branches
Tags
No related merge requests found
......@@ -283,6 +283,10 @@ func decodeReceiptGoogle(receipt string) (*ReceiptGoogle, error) {
if err := json.Unmarshal([]byte(unwrapped), &gr); err != nil {
return nil, errors.New("receipt is malformed")
}
if gr.PackageName == "" {
return nil, errors.New("receipt is malformed")
}
return &gr, nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment