Repository navigation
Conversation
FanWu-ai
marked this pull request as ready for review
October 6, 2026 04:32
This branch has not been deployed
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.
A JWK with a non-empty array or object as its
algvalue raises a rawTypeErrorduring the algorithm dictionary lookup. BecausePyJWKSetskips unusable keys by catchingPyJWTError, one malformed entry aborts an otherwise usable key set.Validate the selected algorithm's type before the cryptography availability check and algorithm lookup. Selected non-string algorithm values now raise
InvalidKeyError, allowing the existing key-set filtering to retain valid siblings. Explicit valid algorithm overrides retain their existing behavior. Falsey metadata values, including empty arrays and objects, continue through the existing algorithm-inference path; this patch does not change that compatibility behavior.Add eight regression/control cases for array/object algorithms, direct construction, mixed key sets, entirely unusable sets, and explicit overrides. Six cases fail on unchanged master.
Validation (Linux, CPython 3.12.14):
AI disclosure: OpenAI Codex was used to inspect the code, reproduce the failure, implement the patch, write regression tests, run checks, and prepare this description. The hosted CI matrix has not been run locally.