diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-05-20 15:39:24 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-05-20 15:39:24 +0200 |
commit | 35509528bc10546f11934ab3e965e9de16a6910f (patch) | |
tree | 836370569c1f3f623d816c6592810ee4cbd0c28d | |
parent | 281eeeed4615d15e19901cb622417a4817ee7a49 (diff) |
enforce wire deadline >= refund_deadline in exchange
-rw-r--r-- | src/exchange/taler-exchange-httpd_deposit.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c index cf5142982..08f4d227d 100644 --- a/src/exchange/taler-exchange-httpd_deposit.c +++ b/src/exchange/taler-exchange-httpd_deposit.c @@ -180,6 +180,14 @@ TMH_DEPOSIT_handler_deposit (struct TMH_RequestHandler *rh, if (GNUNET_NO == res) return MHD_YES; /* failure */ + if (deposit.refund_deadline.abs_value_us > deposit.wire_deadline.abs_value_us) + { + GNUNET_break_op (0); + GNUNET_JSON_parse_free (spec); + return TMH_RESPONSE_reply_arg_invalid (connection, + "refund_deadline"); + } + if (GNUNET_YES != TMH_json_validate_wireformat (wire, GNUNET_NO)) |