summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_common.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-05 21:54:11 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-05 21:54:11 +0200
commit54e63f01df85ee0470493c6d0de29576ce3371c4 (patch)
tree174ef13378081c4845a9f0adc52bcac97674aff2 /src/lib/exchange_api_common.c
parent6de49ea2c02e311e5f5366005bd3497a9bb25187 (diff)
downloadexchange-54e63f01df85ee0470493c6d0de29576ce3371c4.tar.gz
exchange-54e63f01df85ee0470493c6d0de29576ce3371c4.tar.bz2
exchange-54e63f01df85ee0470493c6d0de29576ce3371c4.zip
fix #6408: make sure all timestamps are always rounded when they arrive over JSON, or 400 the requester; similarly don't tolerate anything else as client
Diffstat (limited to 'src/lib/exchange_api_common.c')
-rw-r--r--src/lib/exchange_api_common.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index e7e87487..52c0e20a 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -109,8 +109,8 @@ TALER_EXCHANGE_parse_reserve_history (
GNUNET_JSON_spec_varsize ("wire_reference",
&wire_reference,
&wire_reference_size),
- GNUNET_JSON_spec_absolute_time ("timestamp",
- &timestamp),
+ TALER_JSON_spec_absolute_time ("timestamp",
+ &timestamp),
GNUNET_JSON_spec_string ("sender_account_url",
&wire_url),
GNUNET_JSON_spec_end ()
@@ -256,8 +256,8 @@ TALER_EXCHANGE_parse_reserve_history (
&rh->details.recoup_details.exchange_sig),
GNUNET_JSON_spec_fixed_auto ("exchange_pub",
&rh->details.recoup_details.exchange_pub),
- GNUNET_JSON_spec_absolute_time_nbo ("timestamp",
- &pc.timestamp),
+ TALER_JSON_spec_absolute_time_nbo ("timestamp",
+ &pc.timestamp),
GNUNET_JSON_spec_end ()
};
@@ -328,8 +328,8 @@ TALER_EXCHANGE_parse_reserve_history (
&rh->details.close_details.exchange_pub),
TALER_JSON_spec_amount_nbo ("closing_fee",
&rcc.closing_fee),
- GNUNET_JSON_spec_absolute_time_nbo ("timestamp",
- &rcc.timestamp),
+ TALER_JSON_spec_absolute_time_nbo ("timestamp",
+ &rcc.timestamp),
GNUNET_JSON_spec_end ()
};
@@ -523,10 +523,10 @@ TALER_EXCHANGE_verify_coin_history (
&dr.h_contract_terms),
GNUNET_JSON_spec_fixed_auto ("h_wire",
&dr.h_wire),
- GNUNET_JSON_spec_absolute_time_nbo ("timestamp",
- &dr.wallet_timestamp),
- GNUNET_JSON_spec_absolute_time_nbo ("refund_deadline",
- &dr.refund_deadline),
+ TALER_JSON_spec_absolute_time_nbo ("timestamp",
+ &dr.wallet_timestamp),
+ TALER_JSON_spec_absolute_time_nbo ("refund_deadline",
+ &dr.refund_deadline),
TALER_JSON_spec_amount_nbo ("deposit_fee",
&dr.deposit_fee),
GNUNET_JSON_spec_fixed_auto ("merchant_pub",
@@ -709,8 +709,8 @@ TALER_EXCHANGE_verify_coin_history (
&exchange_pub),
GNUNET_JSON_spec_fixed_auto ("reserve_pub",
&pc.reserve_pub),
- GNUNET_JSON_spec_absolute_time_nbo ("timestamp",
- &pc.timestamp),
+ TALER_JSON_spec_absolute_time_nbo ("timestamp",
+ &pc.timestamp),
GNUNET_JSON_spec_end ()
};