mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
whisper: verification bug fixed
This commit is contained in:
parent
0a7e128811
commit
3e358132fa
1 changed files with 3 additions and 0 deletions
|
|
@ -171,6 +171,9 @@ func (s *WMailServer) validateRequest(peerID []byte, request *whisper.Envelope)
|
||||||
}
|
}
|
||||||
|
|
||||||
src := crypto.FromECDSAPub(decrypted.Src)
|
src := crypto.FromECDSAPub(decrypted.Src)
|
||||||
|
if len(src)-len(peerID) == 1 {
|
||||||
|
src = src[1:]
|
||||||
|
}
|
||||||
if !bytes.Equal(peerID, src) {
|
if !bytes.Equal(peerID, src) {
|
||||||
glog.V(logger.Warn).Infof("Wrong signature of p2p request")
|
glog.V(logger.Warn).Infof("Wrong signature of p2p request")
|
||||||
return false, 0, 0, topic
|
return false, 0, 0, topic
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue