mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-22 09:37:48 +08:00
Change EncodePasswd to HashPassword (#3329)
* Change EncodePasswd to HashPassword * Create test+benchmark for HashPassword
This commit is contained in:

committed by
Kim "BKC" Carlbäcker

parent
f2b841d0ec
commit
674cfb7cac
@ -111,7 +111,7 @@ func runChangePassword(c *cli.Context) error {
|
||||
if user.Salt, err = models.GetUserSalt(); err != nil {
|
||||
return fmt.Errorf("%v", err)
|
||||
}
|
||||
user.EncodePasswd()
|
||||
user.HashPassword()
|
||||
if err := models.UpdateUserCols(user, "passwd", "salt"); err != nil {
|
||||
return fmt.Errorf("%v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user