Skip to content

Commit

Permalink
whisper: mailserver no longer supports the signature vaidation
Browse files Browse the repository at this point in the history
  • Loading branch information
gluk256 committed Feb 27, 2018
1 parent 4c845bd commit dadf4d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions whisper/mailserver/mailserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package mailserver

import (
"bytes"
"encoding/binary"
"fmt"

Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit dadf4d5

Please sign in to comment.