Skip to content
Snippets Groups Projects
Commit b9d48e00 authored by Rick Carback's avatar Rick Carback
Browse files

revert message sender id to enable hack for retrieving sender in unencrypted messages

parent 95f3929a
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ package io
import (
"crypto/sha256"
"fmt"
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/globals"
"gitlab.com/elixxir/client/parse"
"gitlab.com/elixxir/primitives/format"
......@@ -53,9 +54,11 @@ func (mb *Collator) AddMessage(message *format.Message,
// There's currently no mechanism for knowing who sent an unencrypted
// message, I think?
// Let's just try ZeroID for now...
sender := id.ZeroID
sender := id.NewUserFromBytes(message.GetMAC())
recipient := message.GetRecipient()
jww.ERROR.Printf("Sender: %v, Recipient: %v", sender, recipient)
partition, err := parse.ValidatePartition(payload)
if err == nil {
......
......@@ -172,6 +172,7 @@ func (m *Messaging) send(session user.Session, topology *circuit.Circuit,
}
message.Contents.Set(padded)
e2e.SetUnencrypted(message)
message.SetMAC(session.GetCurrentUser().User.Bytes())
}
// CMIX Encryption
salt := cmix.NewSalt(csprng.Source(&csprng.SystemRNG{}), 32)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment