From 6dd73947e84b488aabf5c01d9be0e90097d59b7c Mon Sep 17 00:00:00 2001 From: Benjamin Wenger <ben@elixxir.ioo> Date: Fri, 6 Nov 2020 15:05:49 -0800 Subject: [PATCH] fixed use of EOL to be a semi colin as the fact terminator --- auth/request.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/auth/request.go b/auth/request.go index ba231d297..036ca5354 100644 --- a/auth/request.go +++ b/auth/request.go @@ -20,7 +20,7 @@ import ( jww "github.com/spf13/jwalterweatherman" ) -const eol = string(0x0a) +const terminator = ";" func RequestAuth(partner, me contact.Contact, message string, rng io.Reader, storage *storage.Session, net interfaces.NetworkManager) error { @@ -46,8 +46,8 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader, } // check that the message is properly formed - if strings.Contains(message, eol) { - return errors.Errorf("Message cannot contain 'EOL'") + if strings.Contains(message, terminator) { + return errors.Errorf("Message cannot contain '%s'", terminator) } //lookup if an ongoing request is occurring @@ -76,7 +76,7 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader, //check the payload fits facts := me.Facts.Stringify() - msgPayload := facts + message + eol + msgPayload := facts + message + terminator msgPayloadBytes := []byte(msgPayload) if len(msgPayloadBytes) > requestFmt.MsgPayloadLen() { -- GitLab