From b25c4a19420c2fde1f290dd360c68b84e4eaa1ed Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Tue, 3 Aug 2021 18:00:05 -0700 Subject: Fix string negation bug --- hotline/transaction_handlers.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hotline/transaction_handlers.go') diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go index b06297d..0ae6071 100644 --- a/hotline/transaction_handlers.go +++ b/hotline/transaction_handlers.go @@ -625,7 +625,6 @@ func HandleSetUser(cc *ClientConn, t *Transaction) (res []Transaction, err error func HandleGetUser(cc *ClientConn, t *Transaction) (res []Transaction, err error) { userLogin := string(t.GetField(fieldUserLogin).Data) - decodedUserLogin := NegatedUserString(t.GetField(fieldUserLogin).Data) account := cc.Server.Accounts[userLogin] if account == nil { errorT := cc.NewErrReply(t, "Account does not exist.") @@ -635,7 +634,7 @@ func HandleGetUser(cc *ClientConn, t *Transaction) (res []Transaction, err error res = append(res, cc.NewReply(t, NewField(fieldUserName, []byte(account.Name)), - NewField(fieldUserLogin, []byte(decodedUserLogin)), + NewField(fieldUserLogin, negateString(t.GetField(fieldUserLogin).Data)), NewField(fieldUserPassword, []byte(account.Password)), NewField(fieldUserAccess, *account.Access), )) -- cgit