[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: Check instance befo
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: Check instance before processing payment. |
Date: |
Tue, 15 Oct 2019 14:50:11 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 4d4d0db Check instance before processing payment.
4d4d0db is described below
commit 4d4d0dbd9365c76496eb0707bf339f82d2461a98
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Oct 15 14:49:18 2019 +0200
Check instance before processing payment.
---
src/backend/taler-merchant-httpd_pay.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/backend/taler-merchant-httpd_pay.c
b/src/backend/taler-merchant-httpd_pay.c
index f3775c2..300ab9e 100644
--- a/src/backend/taler-merchant-httpd_pay.c
+++ b/src/backend/taler-merchant-httpd_pay.c
@@ -1405,6 +1405,19 @@ parse_pay (struct MHD_Connection *connection,
session_id = json_string_value (json_object_get (root,
"session_id"));
+
+ if (0 != memcmp (&merchant_pub,
+ &pc->mi->pubkey,
+ sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)))
+ {
+ TALER_LOG_INFO ("Unknown merchant public key included in payment (usually
wrong instance chosen)\n");
+ TMH_RESPONSE_reply_rc (connection,
+ MHD_HTTP_NOT_FOUND,
+ TALER_EC_PAY_WRONG_INSTANCE,
+ "Payment sent to wrong instance (merchant_pub
unknown to the merchant)");
+ return GNUNET_NO;
+ }
+
if (NULL != session_id)
pc->session_id = GNUNET_strdup (session_id);
pc->order_id = GNUNET_strdup (order_id);
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: Check instance before processing payment.,
gnunet <=