diff options
author | Vlad <gluk256@gmail.com> | 2018-02-27 22:45:00 +0800 |
---|---|---|
committer | Vlad <gluk256@gmail.com> | 2018-02-27 22:45:00 +0800 |
commit | dadf4d53abd8be13f59fb09820712d74ce8f89a7 (patch) | |
tree | c650a764bdd85d2a20035f50e46b0870e534523c /whisper | |
parent | 4c845bdc271c46706ea4af248a1efec8683dc53a (diff) | |
download | dexon-dadf4d53abd8be13f59fb09820712d74ce8f89a7.tar dexon-dadf4d53abd8be13f59fb09820712d74ce8f89a7.tar.gz dexon-dadf4d53abd8be13f59fb09820712d74ce8f89a7.tar.bz2 dexon-dadf4d53abd8be13f59fb09820712d74ce8f89a7.tar.lz dexon-dadf4d53abd8be13f59fb09820712d74ce8f89a7.tar.xz dexon-dadf4d53abd8be13f59fb09820712d74ce8f89a7.tar.zst dexon-dadf4d53abd8be13f59fb09820712d74ce8f89a7.zip |
whisper: mailserver no longer supports the signature vaidation
Diffstat (limited to 'whisper')
-rw-r--r-- | whisper/mailserver/mailserver.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/whisper/mailserver/mailserver.go b/whisper/mailserver/mailserver.go index 6555fd5c0..a889c2bd2 100644 --- a/whisper/mailserver/mailserver.go +++ b/whisper/mailserver/mailserver.go @@ -17,7 +17,6 @@ package mailserver import ( - "bytes" "encoding/binary" "fmt" @@ -175,7 +174,10 @@ func (s *WMailServer) validateRequest(peerID []byte, request *whisper.Envelope) if len(src)-len(peerID) == 1 { src = src[1:] } - if !bytes.Equal(peerID, src) { + + // if you want to check the signature, you can do it here. e.g.: + // if !bytes.Equal(peerID, src) { + if src == nil { log.Warn(fmt.Sprintf("Wrong signature of p2p request")) return false, 0, 0, topic } |