ledger: check keypath format for getxpub

This commit is contained in:
Gregory Sanders 2019-02-19 10:17:22 -05:00
parent c5524d60cc
commit 6e1e9aaacf

View File

@ -78,6 +78,8 @@ class LedgerClient(HardwareWalletClient):
# Retrieves the public key at the specified BIP 32 derivation path
@ledger_exception
def get_pubkey_at_path(self, path):
if not check_keypath(path):
raise BadArgumentError("Invalid keypath")
path = path[2:]
path = path.replace('h', '\'')
path = path.replace('H', '\'')