summaryrefslogtreecommitdiffstats
path: root/routers/web/user/auth.go
diff options
context:
space:
mode:
authorDavid Jimenez <dvejmz@users.noreply.github.com>2021-10-14 17:37:35 +0100
committerGitHub <noreply@github.com>2021-10-14 18:37:35 +0200
commitfa8b8c055d3131fd3dff1b943ed1a20f7044088f (patch)
tree4f9f640f82e11bb31e0ccf6d8eed5078a4920c31 /routers/web/user/auth.go
parentd47798ccc72236fa239834583ae8367a16ab3fbe (diff)
downloadgitea-fa8b8c055d3131fd3dff1b943ed1a20f7044088f.tar.gz
gitea-fa8b8c055d3131fd3dff1b943ed1a20f7044088f.zip
Don't panic if we fail to parse U2FRegistration data (#17304)
* Don't panic if we fail to parse a U2FRegistration data Downgrade logging statement from Fatal to Error so that errors parsing U2FRegistration data does not panic; instead, the invalid key will be skipped and we will attempt to parse the next one, if available. Signed-off-by: David Jimenez <dvejmz@sgfault.com>
Diffstat (limited to 'routers/web/user/auth.go')
-rw-r--r--routers/web/user/auth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/user/auth.go b/routers/web/user/auth.go
index 65515402cf..99885e5ce3 100644
--- a/routers/web/user/auth.go
+++ b/routers/web/user/auth.go
@@ -462,7 +462,7 @@ func U2FSign(ctx *context.Context) {
for _, reg := range regs {
r, err := reg.Parse()
if err != nil {
- log.Fatal("parsing u2f registration: %v", err)
+ log.Error("parsing u2f registration: %v", err)
continue
}
newCounter, authErr := r.Authenticate(*signResp, *challenge, reg.Counter)