From ab752e95910fe5a077be9e4807b2d8536ce3fc70 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 19 Apr 2020 22:31:00 +0200 Subject: also validate merchant IBANs before signing --- src/json/json_wire.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/json') diff --git a/src/json/json_wire.c b/src/json/json_wire.c index 8fd99ab6d..f05808194 100644 --- a/src/json/json_wire.c +++ b/src/json/json_wire.c @@ -414,6 +414,11 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s, GNUNET_break_op (0); return GNUNET_SYSERR; } + if (GNUNET_SYSERR == validate_payto (payto_uri)) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } TALER_merchant_wire_signature_hash (payto_uri, salt, hc); @@ -430,9 +435,9 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s, * @return #GNUNET_OK if signature is valid */ int -TALER_JSON_exchange_wire_signature_check (const json_t *wire_s, - const struct - TALER_MasterPublicKeyP *master_pub) +TALER_JSON_exchange_wire_signature_check ( + const json_t *wire_s, + const struct TALER_MasterPublicKeyP *master_pub) { const char *payto_uri; struct TALER_MasterSignatureP master_sig; @@ -471,9 +476,9 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s, * @return NULL if @a payto_uri is malformed */ json_t * -TALER_JSON_exchange_wire_signature_make (const char *payto_uri, - const struct - TALER_MasterPrivateKeyP *master_priv) +TALER_JSON_exchange_wire_signature_make ( + const char *payto_uri, + const struct TALER_MasterPrivateKeyP *master_priv) { struct TALER_MasterSignatureP master_sig; -- cgit v1.2.3