gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 75e1b9c896ed78bb97ea7d0eb3ef8a888c86ce50
parent 83b522a1b651fd20e45755c2ad0a0a124395fbd4
Author: tobi <31960611+tsmethurst@users.noreply.github.com>
Date:   Mon,  6 Feb 2023 09:44:13 +0100

[bugfix] fix old password hash staying in cache (#1432)


Diffstat:
Minternal/processing/user/changepassword.go | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/internal/processing/user/changepassword.go b/internal/processing/user/changepassword.go @@ -20,7 +20,6 @@ package user import ( "context" - "time" "github.com/superseriousbusiness/gotosocial/internal/gtserror" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" @@ -43,10 +42,9 @@ func (p *processor) ChangePassword(ctx context.Context, user *gtsmodel.User, old } user.EncryptedPassword = string(newPasswordHash) - user.UpdatedAt = time.Now() - if err := p.db.UpdateByID(ctx, user, user.ID, "encrypted_password", "updated_at"); err != nil { - return gtserror.NewErrorInternalError(err, "database error") + if err := p.db.UpdateUser(ctx, user, "encrypted_password"); err != nil { + return gtserror.NewErrorInternalError(err) } return nil