electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 011ccc6e54440c2746830e544c2cbb96b7617670
parent df02269bcfdb2cfc5794a230795995b7b89120e9
Author: ThomasV <thomasv@electrum.org>
Date:   Fri,  4 Dec 2015 12:01:13 +0100

kivy: sanitize inputs

Diffstat:
Mgui/kivy/uix/screens.py | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -207,11 +207,15 @@ class SendScreen(CScreen): def do_send(self): address = str(self.screen.address) - amount = self.app.get_amount(self.screen.amount) - message = unicode(self.screen.message) - if not bitcoin.is_address(self.address): + if not bitcoin.is_address(address): self.app.show_error(_('Invalid Bitcoin Address') + ':\n' + address) return + try: + amount = self.app.get_amount(self.screen.amount) + except: + self.app.show_error(_('Invalid amount') + ':\n' + self.screen.amount) + return + message = unicode(self.screen.message) fee = None outputs = [('address', address, amount)] self.app.password_dialog(self.send_tx, (outputs, fee, message))