mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Log the real reason when authentication fails (but don't show the user) (#25414)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user