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

The methode JWEnc.is_jwe does not work correctly when Python was called with the "-O" or "-OO" option #100

Open
wmeyer opened this issue Dec 7, 2022 · 0 comments

Comments

@wmeyer
Copy link

wmeyer commented Dec 7, 2022

The method mentioned in the title uses the "assert" statement to check the headers of a token.

Unfortunately, assert statements are completely removed when starting Python with "-O" (or "-OO").
See here https://docs.python.org/3/using/cmdline.html#miscellaneous-options

As a result, the OIDC connection cannot be established.

Recommended fix: Use "if" statements in such cases.

I found two more issues like this relevant to my usecase:

  • method JWS._is_compact_jws
  • Operator __eq__ in class jwk.Key

Note: #99 fixes the first of these issues, but not the other ones.

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

No branches or pull requests

1 participant