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

Fix Error -3 decompress when using JWE with deflate #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tebruno99
Copy link

Fixes header error with compression DEFLATE when decrypting payloads generated by Go,Java, and PHP JOSE implementations. I do no know if this effects other implementations, this is a bug our Python applications hit when trying to consume encrypted cookies from our Webapp.

File "/home/me/Projects/Pycharm/TestJWE/venv/lib/python3.11/site-packages/jose/jwe.py", line 187, in decrypt plain_text = _decompress(header.get("zip"), plain_text) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/me/Projects/Pycharm/TestJWE/venv/lib/python3.11/site-packages/jose/jwe.py", line 453, in _decompress decompressed = zlib.decompress(compressed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ zlib.error: Error -3 while decompressing data: incorrect header check

Fixes header error with compression DEFLATE when decrypting payloads generated by Go,Java, and PHP JOSE implementations
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

Successfully merging this pull request may close these issues.

None yet

1 participant