diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-13 10:01:57 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-13 10:01:57 +0100 |
commit | 6404213457fbb9ddd089d556d95d841e21754ff8 (patch) | |
tree | 5bdeb05297016b09b5e769a60f5f5211d4710e58 /src/mint/taler-mint-httpd_deposit.c | |
parent | 968e4aa68f4185d24466bb3ba8bfaba8d9c27ef1 (diff) | |
download | exchange-6404213457fbb9ddd089d556d95d841e21754ff8.tar.gz exchange-6404213457fbb9ddd089d556d95d841e21754ff8.tar.bz2 exchange-6404213457fbb9ddd089d556d95d841e21754ff8.zip |
use wire validation routine
Diffstat (limited to 'src/mint/taler-mint-httpd_deposit.c')
-rw-r--r-- | src/mint/taler-mint-httpd_deposit.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mint/taler-mint-httpd_deposit.c b/src/mint/taler-mint-httpd_deposit.c index 84bcd5ba2..915a7389c 100644 --- a/src/mint/taler-mint-httpd_deposit.c +++ b/src/mint/taler-mint-httpd_deposit.c @@ -145,7 +145,14 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, return MHD_NO; /* hard failure */ if (GNUNET_NO == res) return MHD_YES; /* failure */ - /* FIXME: check that "wire" is formatted correctly */ + if (GNUNET_YES != + TALER_JSON_validate_wireformat (expected_wire_format, + wire)) + { + TALER_MINT_release_parsed_data (spec); + return TALER_MINT_reply_arg_invalid (connection, + "wire"); + } if (NULL == (wire_enc = json_dumps (wire, JSON_COMPACT | JSON_SORT_KEYS))) { LOG_WARNING ("Failed to parse JSON wire format specification for /deposit request\n"); |