enforce wire deadline >= refund_deadline in exchange

This commit is contained in:
Christian Grothoff 2016-05-20 15:39:24 +02:00
parent 281eeeed46
commit 35509528bc

View File

@ -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))