Skip to content

Return 400 instead of 500 when Origin is missing from FIDO2 requests#840

Merged
abergs merged 3 commits intomainfrom
anders/origin-check
Feb 19, 2026
Merged

Return 400 instead of 500 when Origin is missing from FIDO2 requests#840
abergs merged 3 commits intomainfrom
anders/origin-check

Conversation

@abergs
Copy link
Copy Markdown
Member

@abergs abergs commented Feb 17, 2026

Description

Validate Origin in GetFido2Instance so a null value throws an ApiException(400) instead of letting the Fido2 library blow up with an unhandled ArgumentNullException.

Shape

Adds e2e tests and validation.

Screenshots

Checklist

I did the following to ensure that my changes were tested thoroughly:

  • __

I did the following to ensure that my changes do not introduce security vulnerabilities:

  • __

Validate Origin in GetFido2Instance so a null value throws an
ApiException(400) instead of letting the Fido2 library blow up with
an unhandled ArgumentNullException.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abergs abergs requested a review from a team as a code owner February 17, 2026 21:12
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.81%. Comparing base (279497d) to head (7f6bbf4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #840   +/-   ##
=======================================
  Coverage   36.80%   36.81%           
=======================================
  Files         586      586           
  Lines       31474    31476    +2     
  Branches      903      904    +1     
=======================================
+ Hits        11585    11587    +2     
  Misses      19742    19742           
  Partials      147      147           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@abergs abergs enabled auto-merge (squash) February 19, 2026 15:28
@abergs abergs merged commit 1229966 into main Feb 19, 2026
13 checks passed
@abergs abergs deleted the anders/origin-check branch February 19, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants