mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 09:57:07 +02:00
Backport #13966 `user.HashPassword` may potentially - and in fact now likely does - change the `passwd_hash_algo` therefore whenever the `passwd` is updated, this also needs to be updated. Fix #13832 Thanks @fblaese for the hint Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
1 parent
05ee88e576
commit
8e8e8ee150
3 files changed
+4
-4
No files matched your search
@@ -68,7 +68,7 @@ func AccountPost(ctx *context.Context, form auth.ChangePasswordForm) {
|
||||
return
|
||||
}
|
||||
ctx.User.HashPassword(form.Password)
|
||||
if err := models.UpdateUserCols(ctx.User, "salt", "passwd"); err != nil {
|
||||
if err := models.UpdateUserCols(ctx.User, "salt", "passwd_hash_algo", "passwd"); err != nil {
|
||||
ctx.ServerError("UpdateUser", err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user