From 287b594803105ba517680aa50be478648d434035 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 12 Dec 2020 18:59:49 +0000 Subject: Whenever the password is updated ensure that the hash algorithm is too (#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 --- cmd/admin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/admin.go b/cmd/admin.go index 8989ec2ebd..6b8c26fc0c 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -335,7 +335,7 @@ func runChangePassword(c *cli.Context) error { } user.HashPassword(c.String("password")) - if err := models.UpdateUserCols(user, "passwd", "salt"); err != nil { + if err := models.UpdateUserCols(user, "passwd", "passwd_hash_algo", "salt"); err != nil { return err } -- cgit v1.2.3