Repository navigation
Fix JWT signing on Windows - #189
Open
Shubham-Padkonde wants to merge 1 commit into
Open
Shubham-Padkonde wants to merge 1 commit into
Shubham-Padkonde wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JWT signing with a normal key identifier such as
issuer.example/signing-keyfails on Windows: filesystem normalization changes the separators and rejects the identifier. Once that is corrected, generating the JWT ID also fails because Windows does not supportstrftime("%s").Use POSIX normalization for the slash-delimited key identifiers and
calendar.timegm()for the UTC timestamp, which the signer already uses elsewhere. Keep rejecting noncanonical identifiers, including repeated separators and traversal segments.Validation: all 224 tests pass on Linux/Python 3.12; all 11 focused key and signer tests pass on Windows/Python 3.12. Added regressions simulate Windows path rules and the absence of the
%sextension. Ruff lint and formatting checks pass. The full Windows suite still has 13 failures involving existing file-URL fixtures, token-lifetime tests, and a local HTTP cache test. Mypy reports four existing session-inference errors outside this change.