Closed sanders41 closed 1 year ago
We notice the same thing @ the Home Assistant project.
https://github.com/home-assistant/core/pull/78776 (CI fails for the same reason as above).
That's because of sorting header keys introduced in https://github.com/jpadilla/pyjwt/pull/721. What's the use case of JWTs for equality instead of validity?
Clear @jpadilla 👍 It just made alarm bells ring, without a clear reason why. Thanks for the clarification 👍
Yes, we have switched to testing validity instead. It was just a surprise to see things fail since we didn't see anything in the change log.
Summary.
After updating from 2.4.0 to 2.5.0 we started seeing failing tests in our CI (for example). We have tracked the issue down to the encoded value being different for the value we used to get. I didn't see anything in the change log that would cause this, and looking through the PRs the only thing I saw that may be related is here.
Expected Result
I didn't expect a change in the encoded values.
Actual Result
Got different encoded values when encoding the same strings.
Reproduction Steps
Run the following with pyjwt 2.4.0 and then again with 2.5.0 and the values will be different.
System Information
Also tested and same results with
This command is only available on PyJWT v1.6.3 and greater. Otherwise, please provide some basic information about your system.