1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

defs: check that backend URIs use https

This commit is contained in:
Pavol Rusnak 2018-10-27 01:23:49 +02:00
parent a87dd7cd38
commit efba885f6e
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 4 additions and 1 deletions

View File

@ -33,7 +33,7 @@
"min_address_length": 27, "min_address_length": 27,
"max_address_length": 34, "max_address_length": 34,
"bitcore": [ "bitcore": [
"http://live.pesetacoin.info" "https://live.pesetacoin.info"
], ],
"blockbook": [], "blockbook": [],
"cooldown": 100 "cooldown": 100

View File

@ -177,6 +177,9 @@ def validate_btc(coin):
errors.append("max address length must not be smaller than min address length") errors.append("max address length must not be smaller than min address length")
for bc in coin["bitcore"] + coin["blockbook"]: for bc in coin["bitcore"] + coin["blockbook"]:
if not bc.startswith("https://"):
errors.append("make sure URLs start with https://")
if bc.endswith("/"): if bc.endswith("/"):
errors.append("make sure URLs don't end with '/'") errors.append("make sure URLs don't end with '/'")