From 2df88d11598868a558f5204d9e7a35c97f2026fe Mon Sep 17 00:00:00 2001 From: Harry-zklcdc Date: Sat, 8 Feb 2025 02:22:50 +0800 Subject: [PATCH] =?UTF-8?q?[Chore]=20=F0=9F=93=8C=20Use=20CreateTime=20Ins?= =?UTF-8?q?tead=20of=20Email=20as=20Salt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/users.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/users.go b/models/users.go index ded9dcc..967128c 100644 --- a/models/users.go +++ b/models/users.go @@ -24,7 +24,7 @@ type Users struct { } func (u *Users) PasswordHash(password string) string { - return crypto.Sha256(password + u.Email + config.GetSystemSalt()) + return crypto.Sha256(password + u.CreatedAt.GoString() + config.GetSystemSalt()) } func (u *Users) CheckPassword(password string) bool {