Giter VIP home page Giter VIP logo

app-store-notifications-v2-validator's People

Contributors

dependabot[bot] avatar jawad-khan avatar rickwierenga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

app-store-notifications-v2-validator's Issues

suggestion

I suggest to comment #25 fn = os.path.expanduser(fn)
because sounds like force me to put apple cert in home dir, perhaps put full file path is good. Just a suggestion.
btw, the tool is so cool.

Insecure choice of decoding algorithm

Reading the PyJWT docs, it is warned that:

Do not compute the algorithms parameter based on the alg from the token itself, or on any other data that an attacker may be able to influence, as that might expose you to various vulnerabilities (see RFC 8725 §2.1). Instead, either hard-code a fixed value for algorithms, or configure it in the same place you configure the key.

Which is what happens here instead:

alg = header["alg"]
return jwt.decode(token, public_key, algorithms=[alg])

I think you should hardcode ["ES256"] here.

Error due to insufficient _decode_jws() argument in parse() of subscription renewal notification

Issue Description:
When calling the parse() method on a subscription renewal notification, an error occurs because _decode_jws() has received only one required argument.

Error Log:

File "/usr/local/lib/python3.10/site-packages/app_store_notifications_v2_validator/__init__.py", line 78, in parse
    signedRenewalInfo = _decode_jws(payload["data"]["signedRenewalInfo"])
TypeError: _decode_jws() missing 1 required positional argument: 'root_cert_path'"

Problem Cause:
This error may be caused by the fact that _decode_jws() requires two arguments (token and root_cert_path), but only one argument is passed in the parse() method for processing when signedRenewalInfo is included.

signedRenewalInfo = _decode_jws(payload["data"]["signedRenewalInfo"])

As a suggested fix, I suggest passing the second argument root_cert_path to _decode_jws() appropriately.

I've been using this software and find it incredibly helpful due to its simplicity and convenience. I'm truly grateful for your work. Thank you so much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.