We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Empty key sets give the wrong exception. The error is here:
pyjwt/jwt/api_jwk.py
Lines 80 to 84 in 24b29ad
When keys is the empty list, not keys is true so the second check is never reached (unless some list subclass overrides __bool__).
keys
not keys
list
__bool__
Should raise PyJWKSetError("The JWK Set did not contain any keys").
PyJWKSetError("The JWK Set did not contain any keys")
Raises PyJWKSetError("Invalid JWK Set value").
PyJWKSetError("Invalid JWK Set value")
import jwt jwt.PyJWKSet.from_dict({"keys": []})
The text was updated successfully, but these errors were encountered:
probably fixed by #762
Sorry, something went wrong.
Not fixed. #762 changes code beyond the point where this exception occurs. Would you please reopen the issue?
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
No branches or pull requests
Empty key sets give the wrong exception. The error is here:
pyjwt/jwt/api_jwk.py
Lines 80 to 84 in 24b29ad
When
keys
is the empty list,not keys
is true so the second check is never reached (unless somelist
subclass overrides__bool__
).Expected Result
Should raise
PyJWKSetError("The JWK Set did not contain any keys")
.Actual Result
Raises
PyJWKSetError("Invalid JWK Set value")
.Reproduction Steps
The text was updated successfully, but these errors were encountered: