gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: -fix #6986


From: gnunet
Subject: [taler-exchange] branch master updated: -fix #6986
Date: Sat, 07 Aug 2021 19:31:51 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new c7aac576 -fix #6986
c7aac576 is described below

commit c7aac576491b4b66eadeb9c60269192115f3b0b7
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Aug 7 19:31:49 2021 +0200

    -fix #6986
---
 src/exchange/taler-exchange-httpd_deposit.c | 31 +++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/src/exchange/taler-exchange-httpd_deposit.c 
b/src/exchange/taler-exchange-httpd_deposit.c
index 398b3785..5ea48c20 100644
--- a/src/exchange/taler-exchange-httpd_deposit.c
+++ b/src/exchange/taler-exchange-httpd_deposit.c
@@ -376,6 +376,37 @@ TEH_handler_deposit (struct MHD_Connection *connection,
       return MHD_YES; /* failure */
     }
   }
+  /* validate merchant's wire details (as far as we can) */
+  {
+    char *payto;
+    char *emsg;
+
+    payto = TALER_JSON_wire_to_payto (wire);
+    if (NULL == payto)
+    {
+      GNUNET_break_op (0);
+      GNUNET_JSON_parse_free (spec);
+      return TALER_MHD_reply_with_error (connection,
+                                         MHD_HTTP_BAD_REQUEST,
+                                         TALER_EC_GENERIC_PARAMETER_MALFORMED,
+                                         "wire");
+    }
+    emsg = TALER_payto_validate (payto);
+    GNUNET_free (payto);
+    if (NULL != emsg)
+    {
+      MHD_RESULT ret;
+
+      GNUNET_break_op (0);
+      GNUNET_JSON_parse_free (spec);
+      ret = TALER_MHD_reply_with_error (connection,
+                                        MHD_HTTP_BAD_REQUEST,
+                                        TALER_EC_GENERIC_PARAMETER_MALFORMED,
+                                        emsg);
+      GNUNET_free (emsg);
+      return ret;
+    }
+  }
   deposit.receiver_wire_account = wire;
   if (deposit.refund_deadline.abs_value_us > 
deposit.wire_deadline.abs_value_us)
   {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]