diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-11-25 15:04:44 +0900 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-11-25 15:04:44 +0900 |
commit | 9a4407f7a58af8cfe208436152fa32233a5ca0b3 (patch) | |
tree | aeef9137133ab3bc3e0fd545b9b428f17e0286c5 /src/lib/exchange_api_reserves_history.c | |
parent | baa070d19cda046cb0349e85a9a8aabcd9f52661 (diff) | |
download | exchange-9a4407f7a58af8cfe208436152fa32233a5ca0b3.tar.gz exchange-9a4407f7a58af8cfe208436152fa32233a5ca0b3.tar.bz2 exchange-9a4407f7a58af8cfe208436152fa32233a5ca0b3.zip |
more strict spec parsers for payto URIs, Web URLs, and AML decision states
Diffstat (limited to 'src/lib/exchange_api_reserves_history.c')
-rw-r--r-- | src/lib/exchange_api_reserves_history.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/exchange_api_reserves_history.c b/src/lib/exchange_api_reserves_history.c index 7b8eb95e6..0654ad837 100644 --- a/src/lib/exchange_api_reserves_history.c +++ b/src/lib/exchange_api_reserves_history.c @@ -148,7 +148,7 @@ parse_credit (struct TALER_EXCHANGE_ReserveHistoryEntry *rh, struct HistoryParseContext *uc, const json_t *transaction) { - const char *wire_url; + const char *wire_uri; uint64_t wire_reference; struct GNUNET_TIME_Timestamp timestamp; struct GNUNET_JSON_Specification withdraw_spec[] = { @@ -156,8 +156,8 @@ parse_credit (struct TALER_EXCHANGE_ReserveHistoryEntry *rh, &wire_reference), GNUNET_JSON_spec_timestamp ("timestamp", ×tamp), - GNUNET_JSON_spec_string ("sender_account_url", - &wire_url), + TALER_JSON_spec_payto_uri ("sender_account_url", + &wire_uri), GNUNET_JSON_spec_end () }; @@ -179,7 +179,7 @@ parse_credit (struct TALER_EXCHANGE_ReserveHistoryEntry *rh, GNUNET_break_op (0); return GNUNET_SYSERR; } - rh->details.in_details.sender_url = GNUNET_strdup (wire_url); + rh->details.in_details.sender_url = GNUNET_strdup (wire_uri); rh->details.in_details.wire_reference = wire_reference; rh->details.in_details.timestamp = timestamp; return GNUNET_OK; @@ -379,7 +379,7 @@ parse_closing (struct TALER_EXCHANGE_ReserveHistoryEntry *rh, { const struct TALER_EXCHANGE_Keys *key_state; struct GNUNET_JSON_Specification closing_spec[] = { - GNUNET_JSON_spec_string ( + TALER_JSON_spec_payto_uri ( "receiver_account_details", &rh->details.close_details.receiver_account_details), GNUNET_JSON_spec_fixed_auto ("wtid", |