Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfc7519 JsonWebEncryption is initialized with an incorrect list of algorhythms. #624

Open
danilovmy opened this issue Feb 1, 2024 · 0 comments
Assignees
Labels

Comments

@danilovmy
Copy link

danilovmy commented Feb 1, 2024

Initialization of JsonWebEncryption class happens with wrong set of encription algorythms.

# jose/__init__.py
jwt = JsonWebToken(list(JsonWebSignature.ALGORITHMS_REGISTRY.keys()))

# jose/rfc7519/jwt.py
class JsonWebToken:
    def __init__(self, algorithms, private_headers=None):
        self._jws = JsonWebSignature(algorithms, private_headers=private_headers)
        self._jwe = JsonWebEncryption(algorithms, private_headers=private_headers)

in this case we initiate self._jwe (Web Encription) with algorythm list from JsonWebSignature.ALGORITHMS_REGISTRY
but it should be initiated from JsonWebEncryption.ALG_REGISTRY

This is also not clear, why in the one class it is named ALGORITHMS_REGISTRY in other class - ALG_REGISTRY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants