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

[1.x] Fixes Relying Party custom ID #65

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Conversation

DarkGhostHunter
Copy link
Contributor

Fixes #50

Because WebAuthn RP custom ID was always wrong, you will need to update your user credentials to conform with the RP ID being a domain rather than an URL.

This introduces three fixes:

  • When a new Credential is created, it will save the RelyingParty ID verbatim if was manually set, or extract the domain from the APP_URL.
  • When an old Credential is retrieved, it will parse the rp_id to correctly extract the domain from the URL.
  • Credential Attestation has been modified to always compare the RP ID as domains, rather than URL.

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b172112) 85.44% compared to head (a670676) 85.45%.

Additional details and impacted files
@@             Coverage Diff              @@
##                1.x      #65      +/-   ##
============================================
+ Coverage     85.44%   85.45%   +0.01%     
- Complexity      373      375       +2     
============================================
  Files            63       63              
  Lines           996      997       +1     
============================================
+ Hits            851      852       +1     
  Misses          145      145              

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

@DarkGhostHunter DarkGhostHunter marked this pull request as ready for review February 20, 2024 17:18
@DarkGhostHunter DarkGhostHunter force-pushed the fix/relying-party-domain branch from a772222 to a670676 Compare February 20, 2024 23:13
Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@DarkGhostHunter DarkGhostHunter merged commit 48eaa33 into 1.x Feb 20, 2024
31 checks passed
@DarkGhostHunter DarkGhostHunter deleted the fix/relying-party-domain branch April 6, 2024 21:58
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.

[1.2.1] Custom Relying Party Id does not pass CheckRelyingPartyIdContained pipe
1 participant