From 0db891d33236f8752c047e3aadda788e0e732b5e Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Thu, 24 Jan 2013 12:19:24 -0500 Subject: [PATCH] send functionality should properly handle bad address version numbers or high stream numbers --- bitmessagemain.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bitmessagemain.py b/bitmessagemain.py index c1ab7043..51c8b210 100644 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -3377,6 +3377,12 @@ class MyForm(QtGui.QMainWindow): self.statusBar().showMessage('Error: The address '+ toAddress+ ' contains invalid characters. Please check it.') if status == 'versiontoohigh': self.statusBar().showMessage('Error: The address version in '+ toAddress+ ' is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever.') + if addressVersionNumber > 2 or addressVersionNumber == 0: + QMessageBox.about(self, "Address version number", "Concerning the address "+toAddress+", Bitmessage cannot understand address version numbers of "+addressVersionNumber+". Perhaps upgrade Bitmessage to the latest version.") + continue + if streamNumber > 1 or streamNumber == 0: + QMessageBox.about(self, "Stream number", "Concerning the address "+toAddress+", Bitmessage cannot handle stream numbers of "+addressVersionNumber+". Perhaps upgrade Bitmessage to the latest version.") + continue elif fromAddress == '': self.statusBar().showMessage('Error: You must specify a From address. If you don''t have one, go to the ''Your Identities'' tab.') else: