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: don't override error before return #1447

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

FreddyDevelop
Copy link
Contributor

Description

When registering a webauthn credential fails the internal error is overridden and therefore not returned.

Implementation

The error is overridden by an auditLogger error, now the auditLog error is now assigned to a new variable instead.

Tests

Create a webauthn config where origins is not set correct (e.g. "https://example.com") and try to register a new webauthn credential. Before the fix the error on the logs on show code=400, message=failed to validate attestation. With the fix it should include the internal error code=400, message=failed to validate attestation, internal=Error validating origin

@FreddyDevelop FreddyDevelop merged commit 4bea1e3 into main Apr 29, 2024
12 checks passed
@FreddyDevelop FreddyDevelop deleted the fix-webauthn-return-error branch April 29, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants