diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-07-04 06:39:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-03 18:39:38 -0400 |
commit | 0403bd989f60ab84497eb5e04366496b3c9d2534 (patch) | |
tree | 24ab2e5052a6d4bffc61bb6771073a2b0f84ec12 /routers/web/auth/openid.go | |
parent | ad57be04b87d16ff509da4f1632d444b75eb9efc (diff) | |
download | gitea-0403bd989f60ab84497eb5e04366496b3c9d2534.tar.gz gitea-0403bd989f60ab84497eb5e04366496b3c9d2534.zip |
Log the real reason when authentication fails (but don't show the user) (#25414)
Diffstat (limited to 'routers/web/auth/openid.go')
-rw-r--r-- | routers/web/auth/openid.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/routers/web/auth/openid.go b/routers/web/auth/openid.go index 5e0e7b258f..7a4bb7f209 100644 --- a/routers/web/auth/openid.go +++ b/routers/web/auth/openid.go @@ -282,11 +282,7 @@ func ConnectOpenIDPost(ctx *context.Context) { u, _, err := auth.UserSignIn(form.UserName, form.Password) if err != nil { - if user_model.IsErrUserNotExist(err) { - ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplConnectOID, &form) - } else { - ctx.ServerError("ConnectOpenIDPost", err) - } + handleSignInError(ctx, form.UserName, &form, tplConnectOID, "ConnectOpenIDPost", err) return } |