Browse Source

bip21: fail bip21 uri if unsupported req-* parameter is present. fixes #8781

master
Sander van Grieken 2 years ago
parent
commit
0b7fa9cd99
No known key found for this signature in database
GPG Key ID: 9BCF8209EA402EBA
  1. 3
      electrum/bip21.py

3
electrum/bip21.py

@ -43,6 +43,9 @@ def parse_bip21_URI(uri: str) -> dict:
for k, v in pq.items():
if len(v) != 1:
raise InvalidBitcoinURI(f'Duplicate Key: {repr(k)}')
if k.startswith('req-'):
# we have no support for any req-* query parameters
raise InvalidBitcoinURI(f'Unsupported Key: {repr(k)}')
out = {k: v[0] for k, v in pq.items()}
if address:

Loading…
Cancel
Save