]> source.dussan.org Git - gitea.git/commit
Fix bugs with WebAuthn preventing sign in and registration. (#22651)
authorzeripath <art27@cantab.net>
Wed, 1 Feb 2023 07:24:10 +0000 (07:24 +0000)
committerGitHub <noreply@github.com>
Wed, 1 Feb 2023 07:24:10 +0000 (07:24 +0000)
commit19d5b2f922c2defde579a935fbedb680eb8fff18
tree5dd539b782ce277d0f30a7878e6c9a6ac07a81c1
parent2871ea08096cba15546f357d0ec473734ee9d8be
Fix bugs with WebAuthn preventing sign in and registration. (#22651)

This PR fixes two bugs with Webauthn support:

* There was a longstanding bug within webauthn due to the backend using
URLEncodedBase64 but the javascript using decoding using plain base64.
This causes intermittent issues with users reporting decoding errors.
* Following the recent upgrade to webauthn there was a change in the way
the library expects RPOrigins to be configured. This leads to the
Relying Party Origin not being configured and prevents registration.

Fix #22507

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
modules/auth/webauthn/webauthn.go
modules/auth/webauthn/webauthn_test.go
web_src/js/features/user-auth-webauthn.js