Skip to content

Commit

Permalink
jwt.decode: Set algorithms to all when None
Browse files Browse the repository at this point in the history
See #346
  • Loading branch information
danigm committed May 2, 2024
1 parent 34bd82c commit 4638c12
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jose/jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def decode(token, key, algorithms=None, options=None, audience=None, issuer=None

verify_signature = defaults.get("verify_signature", True)

if algorithms is None:
algorithms = ALGORITHMS.ALL

try:
payload = jws.verify(token, key, algorithms, verify=verify_signature)
except JWSError as e:
Expand Down

0 comments on commit 4638c12

Please sign in to comment.