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: invalid challenge causes a query exception #473

Merged
merged 2 commits into from
Feb 26, 2024
Merged

Conversation

matthijs
Copy link
Contributor

@matthijs matthijs commented Feb 7, 2024

In our project there was a QueryException which was caused by an invalid challenge. The webauthnKey could not be found which throwed an ModelNotFoundException.

Because there was no handling in the catch statement it falled back to the parent class.

In that class the credential array is used to build a query to fetch the user. And that caused a query exception.

When there is a signed challenge and no webauthn key could be find just return null instead of calling the parent function.

I've also added a unit test to handle this situation.

@asbiin asbiin changed the title Invalid challenge causes a query exception fix: invalid challenge causes a query exception Feb 26, 2024
@asbiin asbiin merged commit 7199d4e into asbiin:main Feb 26, 2024
17 of 18 checks passed
@asbiin
Copy link
Owner

asbiin commented Feb 26, 2024

Thank you @matthijs !

Copy link

🎉 This PR is included in version 4.2.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants