From eb5d9cd90a232f010ab20181ae0fb3cdac354eec Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Mon, 9 Jun 2014 16:17:00 -0300 Subject: [PATCH] fix bad message from peer on walletId type --- js/models/core/Wallet.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 970567a5f..202cdff91 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -131,8 +131,10 @@ Wallet.prototype._handleTxProposals = function(senderId, data, isInbound) { }; Wallet.prototype._handleData = function(senderId, data, isInbound) { + // TODO check message signature - if (this.id !== data.walletId) { + + if (data.type !== 'walletId' && this.id !== data.walletId) { this.emit('badMessage', senderId); this.log('badMessage FROM:', senderId); //TODO return;