From fcb518231345d9404d6fbcecd79e8b1cc7f28ac6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 9 Oct 2023 11:42:54 -0400 Subject: [PATCH] more --- auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth.go b/auth.go index b0014a7..149b54b 100644 --- a/auth.go +++ b/auth.go @@ -44,7 +44,7 @@ func Login(username, password string) bool { } func (u *UserData) SetPassword(newcrypt []byte) bool { - q := fmt.Sprintf("update %s_users set password=? where id=?", c.TablePrefix) + q := fmt.Sprintf("update %s_users set password=? where id=? limit 1", c.TablePrefix) _, err := c.db.Exec(q, newcrypt, u.UserID) if err != nil { log.Printf("scsusers.SetPassword: update failed for %s: %s\n", u.Username, err.Error())