Skip to content
New issue

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

fix(JWT): Response with 401 on token payload validation #3705

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

provinzkraut
Copy link
Member

Fix a bug introduced in #3692 that would cause a 500 status response to be returned when ValidationError was raised during the token payload conversion.

This was caused by the switch to msgspec for converting the token payload after decoding and verification, and the lack of error handling for this case.

@provinzkraut provinzkraut force-pushed the fix/jwt-decode-validation-error branch from 6dee3b6 to cb1e221 Compare August 25, 2024 19:28
@provinzkraut provinzkraut enabled auto-merge (squash) August 25, 2024 19:28
Copy link

Copy link

codecov bot commented Aug 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.28%. Comparing base (eb31341) to head (cb1e221).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3705   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         330      330           
  Lines       15035    15041    +6     
  Branches     2393     2394    +1     
=======================================
+ Hits        14777    14783    +6     
  Misses        116      116           
  Partials      142      142           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3705

@provinzkraut provinzkraut merged commit 8b46feb into main Aug 25, 2024
26 checks passed
@provinzkraut provinzkraut deleted the fix/jwt-decode-validation-error branch August 25, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants