From 22b8de85ddda50725480b21c5bf6ef9c0202b5e9 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Wed, 21 Feb 2024 12:57:22 +0800 Subject: [PATCH] Do not use `ctx.Doer` when reset password (#29289) Fix #29278. Caused by a small typo in #28733 --- routers/web/auth/password.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/auth/password.go b/routers/web/auth/password.go index c23379b87a..1f2d133282 100644 --- a/routers/web/auth/password.go +++ b/routers/web/auth/password.go @@ -204,7 +204,7 @@ func ResetPasswdPost(ctx *context.Context) { Password: optional.Some(ctx.FormString("password")), MustChangePassword: optional.Some(false), } - if err := user_service.UpdateAuth(ctx, ctx.Doer, opts); err != nil { + if err := user_service.UpdateAuth(ctx, u, opts); err != nil { ctx.Data["IsResetForm"] = true ctx.Data["Err_Password"] = true switch {