Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
b9d48e00
Commit
b9d48e00
authored
Jul 29, 2019
by
Rick Carback
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
io/collate.go
+4
-1
4 additions, 1 deletion
io/collate.go
io/messaging.go
+1
-0
1 addition, 0 deletions
io/messaging.go
with
5 additions
and
1 deletion
io/collate.go
+
4
−
1
View file @
b9d48e00
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
io/messaging.go
+
1
−
0
View file @
b9d48e00
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment