Skip to content

Commit dadf4d5

Browse files
committed
whisper: mailserver no longer supports the signature vaidation
1 parent 4c845bd commit dadf4d5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎whisper/mailserver/mailserver.go‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package mailserver
1818

1919
import (
20-
"bytes"
2120
"encoding/binary"
2221
"fmt"
2322

@@ -175,7 +174,10 @@ func (s *WMailServer) validateRequest(peerID []byte, request *whisper.Envelope)
175174
if len(src)-len(peerID) == 1 {
176175
src = src[1:]
177176
}
178-
if !bytes.Equal(peerID, src) {
177+
178+
// if you want to check the signature, you can do it here. e.g.:
179+
// if !bytes.Equal(peerID, src) {
180+
if src == nil {
179181
log.Warn(fmt.Sprintf("Wrong signature of p2p request"))
180182
return false, 0, 0, topic
181183
}

0 commit comments

Comments
 (0)