1
0

Bitcoin URL Handling

Update Bitcoin URL handling to reject URLs with duplicate keys

issue: #649
This commit is contained in:
Michael Wozniak
2014-04-11 20:20:52 -04:00
parent 9df44b8476
commit 8874242fa7
2 changed files with 30 additions and 23 deletions

View File

@@ -948,7 +948,11 @@ class ElectrumWindow(QMainWindow):
def set_url(self, url):
address, amount, label, message, signature, identity, url = util.parse_url(url)
try:
address, amount, label, message, signature, identity, url = util.parse_url(url)
except Exception:
QMessageBox.warning(self, _('Error'), _('Invalid bitcoin URL'), _('OK'))
return
try:
if amount and self.base_unit() == 'mBTC': amount = str( 1000* Decimal(amount))