[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: -add missing currency check
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: -add missing currency check |
Date: |
Wed, 21 Jul 2021 18:01:19 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 9f4283e6 -add missing currency check
9f4283e6 is described below
commit 9f4283e61b44f33351f979dea74a1bd73cb50e82
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Jul 21 18:01:17 2021 +0200
-add missing currency check
---
...r-merchant-httpd_private-post-reserves-ID-authorize-tip.c | 12 ++++++++++++
src/testing/test_merchant_api.c | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git
a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
index f66499be..73afdfba 100644
--- a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
+++ b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
@@ -69,6 +69,18 @@ authorize_tip (const struct TMH_RequestHandler *rh,
: MHD_NO;
}
}
+
+ if (0 !=
+ strcasecmp (amount.currency,
+ TMH_currency))
+ {
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_CONFLICT,
+ TALER_EC_GENERIC_CURRENCY_MISMATCH,
+ TMH_currency);
+ }
+
TMH_db->preflight (TMH_db->cls);
ec = TMH_db->authorize_tip (TMH_db->cls,
hc->instance->settings.id,
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c
index 047582b0..6695c844 100644
--- a/src/testing/test_merchant_api.c
+++ b/src/testing/test_merchant_api.c
@@ -153,7 +153,7 @@ const char *order_1_forgets_3[] = {
* @param label label to use for the command.
*/
static struct TALER_TESTING_Command
-cmd_exec_wirewatch (char *label)
+cmd_exec_wirewatch (const char *label)
{
return TALER_TESTING_cmd_exec_wirewatch (label, CONFIG_FILE);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: -add missing currency check,
gnunet <=