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

[server] Report a client error instead of 5xx on invalid pk signature #4833

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

mnvr
Copy link
Member

@mnvr mnvr commented Jan 24, 2025

e.g.

--- at /etc/ente/pkg/api/user.go:352 (UserHandler.FinishPasskeyAuthenticationCeremony) ---
--- at /etc/ente/pkg/repo/passkey/passkey.go:395 (Repository.FinishAuthentication) ---
Caused by: Error validating the assertion signature: \u003cnil\u003e

Tested by

Modifying the pk app to pass null as the signature, and observing that client gets back a 401 (previously 500).

e.g.

    --- at /etc/ente/pkg/api/user.go:352 (UserHandler.FinishPasskeyAuthenticationCeremony) ---
    --- at /etc/ente/pkg/repo/passkey/passkey.go:395 (Repository.FinishAuthentication) ---
    Caused by: Error validating the assertion signature: \u003cnil\u003e
@mnvr mnvr requested a review from ua741 January 24, 2025 00:10
@mnvr mnvr merged commit 13040cc into main Jan 24, 2025
2 checks passed
@mnvr mnvr deleted the mpk branch January 24, 2025 00:14
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