From bbd2ea7daa6a3edc9214f42b06497df6df179448 Mon Sep 17 00:00:00 2001 From: arzumify Date: Tue, 25 Jun 2024 16:46:09 +0100 Subject: [PATCH] Fixed an error where version1legacychange would delete your current password on any login --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 24a7bfc..3259c13 100644 --- a/main.go +++ b/main.go @@ -333,7 +333,7 @@ func main() { if versionCheck != "" { versionCheckInt, err := strconv.Atoi(versionCheck) if err != nil { - log.Println("[ERROR] Unknown in /api/login versionCheck at", strconv.FormatInt(time.Now().Unix(), 10)+":", err) + log.Println("[ERROR] Unknown in /api/signup versionCheck at", strconv.FormatInt(time.Now().Unix(), 10)+":", err) c.JSON(500, gin.H{"error": "Something went wrong on our end. Please report this bug at https://centrifuge.hectabit.org/hectabit/burgernotes and refer to the documentation for more info. Your error code is: UNKNOWN-API-SIGNUP-VERSIONCHECK"}) return } @@ -452,7 +452,7 @@ func main() { return } - if enableAPIVersion1 || version1PasswordChange != "" { + if enableAPIVersion1 || version1PasswordChange != "no" { salt, err := genSalt(16) if err != nil { log.Println("[ERROR] Unknown in /api/login genSalt() at", strconv.FormatInt(time.Now().Unix(), 10)+":", err)