diff options
author | Kyle D <kdumontnu@gmail.com> | 2024-01-03 16:48:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-03 18:48:20 -0600 |
commit | 54acf7b0d4b57907a6d8a2ac470744f185adf0b5 (patch) | |
tree | a9c6a5df44c445b5301ad8f7e3e3218f68fde5f7 /routers/web/auth/linkaccount.go | |
parent | 657b23d6359bbbb25b3dcfee233cae0735997188 (diff) | |
download | gitea-54acf7b0d4b57907a6d8a2ac470744f185adf0b5.tar.gz gitea-54acf7b0d4b57907a6d8a2ac470744f185adf0b5.zip |
Normalize oauth email username (#28561)
Diffstat (limited to 'routers/web/auth/linkaccount.go')
-rw-r--r-- | routers/web/auth/linkaccount.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/web/auth/linkaccount.go b/routers/web/auth/linkaccount.go index f41590dc13..1d94e52fe3 100644 --- a/routers/web/auth/linkaccount.go +++ b/routers/web/auth/linkaccount.go @@ -55,7 +55,11 @@ func LinkAccount(ctx *context.Context) { } gu, _ := gothUser.(goth.User) - uname := getUserName(&gu) + uname, err := getUserName(&gu) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } email := gu.Email ctx.Data["user_name"] = uname ctx.Data["email"] = email |