gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: -improve error handling


From: gnunet
Subject: [taler-exchange] branch master updated: -improve error handling
Date: Sat, 21 May 2022 01:39:36 +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 81ad77b8 -improve error handling
81ad77b8 is described below

commit 81ad77b8dc6a90129ece7ef2c391aca83632d53a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat May 21 01:39:34 2022 +0200

    -improve error handling
---
 src/bank-lib/fakebank.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index f468c989..db30851d 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -1440,6 +1440,15 @@ handle_admin_add_incoming (struct TALER_FAKEBANK_Handle 
*h,
         NULL);
     }
     debit = TALER_xtalerbank_account_from_payto (debit_account);
+    if (NULL == debit)
+    {
+      GNUNET_break_op (0);
+      return TALER_MHD_reply_with_error (
+        connection,
+        MHD_HTTP_BAD_REQUEST,
+        TALER_EC_GENERIC_PAYTO_URI_MALFORMED,
+        debit_account);
+    }
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Receiving incoming wire transfer: %s->%s, subject: %s, 
amount: %s\n",
                 debit,
@@ -1560,6 +1569,15 @@ handle_transfer (struct TALER_FAKEBANK_Handle *h,
       int ret;
 
       credit = TALER_xtalerbank_account_from_payto (credit_account);
+      if (NULL == credit)
+      {
+        GNUNET_break_op (0);
+        return TALER_MHD_reply_with_error (
+          connection,
+          MHD_HTTP_BAD_REQUEST,
+          TALER_EC_GENERIC_PAYTO_URI_MALFORMED,
+          credit_account);
+      }
       ret = make_transfer (h,
                            account,
                            credit,
@@ -1649,7 +1667,7 @@ struct HistoryArgs
   uint64_t account_number;
 
   /**
-   * Index of the starting transaction.
+   * Index of the starting transaction, exclusive (!).
    */
   uint64_t start_idx;
 

-- 
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]