aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-20 15:39:24 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-20 15:39:24 +0200
commit35509528bc10546f11934ab3e965e9de16a6910f (patch)
tree836370569c1f3f623d816c6592810ee4cbd0c28d
parent281eeeed4615d15e19901cb622417a4817ee7a49 (diff)
enforce wire deadline >= refund_deadline in exchange
-rw-r--r--src/exchange/taler-exchange-httpd_deposit.c8
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))