1
0

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

This commit is contained in:
Sander van Grieken
2024-01-04 12:34:17 +01:00
parent 88058df409
commit 0b7fa9cd99

View File

@@ -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: