From 1d3490a27870772c68eb9409cfebcee318ad2ec0 Mon Sep 17 00:00:00 2001 From: Tomas Susanka Date: Sat, 26 May 2018 18:17:04 +0200 Subject: [PATCH] stellar: account check --- src/apps/stellar/sign_tx.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apps/stellar/sign_tx.py b/src/apps/stellar/sign_tx.py index 19c90d39b1..6b7f5422da 100644 --- a/src/apps/stellar/sign_tx.py +++ b/src/apps/stellar/sign_tx.py @@ -44,6 +44,8 @@ async def sign_tx(ctx, msg): node = await seed.derive_node(ctx, msg.address_n, STELLAR_CURVE) pubkey = seed.remove_ed25519_public_key_prefix(node.public_key()) write_pubkey(w, pubkey) + if msg.source_account != pubkey: + raise ValueError('Stellar: source account does not match address_n') write_uint32(w, msg.fee) write_uint64(w, msg.sequence_number)