From ea17defe93df33a5fa6f2ed8bf4b8364d0aba9bc Mon Sep 17 00:00:00 2001 From: Jessie <2302541+Kangaroux@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:32:46 -0400 Subject: [PATCH 1/2] Fix typo in username validation --- home/login/login.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/login/login.go b/home/login/login.go index d0ebba3..7ea0920 100644 --- a/home/login/login.go +++ b/home/login/login.go @@ -27,7 +27,7 @@ func SetAccount(acc *models.Account, username, password string, tier rpcnet.Tier return err } - if err := UsernameValidate(password); err != nil { + if err := UsernameValidate(username); err != nil { return err } From 11f0a979d7764583f3908fe8a36f4fe9f86008a6 Mon Sep 17 00:00:00 2001 From: Jessie <2302541+Kangaroux@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:32:59 -0400 Subject: [PATCH 2/2] Remove redundant check --- home/login/login.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/home/login/login.go b/home/login/login.go index 7ea0920..e103ba5 100644 --- a/home/login/login.go +++ b/home/login/login.go @@ -31,10 +31,6 @@ func SetAccount(acc *models.Account, username, password string, tier rpcnet.Tier return err } - if password == "" { - return ErrPasswordCannotBeEmpty - } - acc.Username = username acc.Tier = tier acc.IdentityHash = srp.HashCredentials(