kagi
kagi copied to clipboard
Silent failure if WebAuthn key name is omitted
Steps to Reproduce
- Log in and choose “Manage WebAuthn keys”
- Tap the appropriate link to add a key
- Without entering a key name, tap the “Add WebAuthn Key” button.
Expected Result
Using the same browser-based validation that occurs in other parts of Kagi’s form validation, the browser would indicate that a key name must be provided.
Observed Result
Nothing visible happens. In the browser console, the following output is displayed:
**XHR** POST http://localhost:8000/kagi/api/begin-activate/ [HTTP/1.1 400 Bad Request 42ms]
Uncaught (in promise) TypeError: credentialCreateOptionsFromServer.user is undefined
transformCredentialCreateOptions http://localhost:8000/static/kagi/webauthn.js:155
didClickRegister http://localhost:8000/static/kagi/webauthn.js:68
async* http://localhost:8000/static/kagi/webauthn.js:312
EventListener.handleEvent* http://localhost:8000/static/kagi/webauthn.js:309
Environment
- macOS 10.14.6
- Python 3.8.6
- Django 3.1.2