gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: fix crash


From: gnunet
Subject: [taler-exchange] branch master updated: fix crash
Date: Mon, 20 Jan 2020 11:46:46 +0100

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 be0a52f2 fix crash
be0a52f2 is described below

commit be0a52f23cb22b15f93b1903a25a609e4c02745b
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jan 20 11:46:44 2020 +0100

    fix crash
---
 src/exchange/test_taler_exchange_httpd.conf   | 14 ++++++++++++++
 src/exchange/test_taler_exchange_httpd.sh     | 12 +++++++++++-
 src/exchange/test_taler_exchange_httpd_afl.sh |  2 +-
 src/mhd/mhd_legal.c                           |  2 ++
 4 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/src/exchange/test_taler_exchange_httpd.conf 
b/src/exchange/test_taler_exchange_httpd.conf
index 75da2cf9..15392735 100644
--- a/src/exchange/test_taler_exchange_httpd.conf
+++ b/src/exchange/test_taler_exchange_httpd.conf
@@ -8,6 +8,20 @@ CURRENCY = EUR
 CURRENCY_ROUND_UNIT = EUR:0.01
 
 [exchange]
+
+# Directory with our terms of service.
+TERMS_DIR = ../../contrib/tos
+
+# Etag / filename for the terms of service.
+TERMS_ETAG = 0
+
+
+# Directory with our privacy policy.
+PRIVACY_DIR = ../../contrib/pp
+
+# Etag / filename for the privacy policy.
+PRIVACY_ETAG = 0
+
 # MAX_REQUESTS = 2
 # how long is one signkey valid?
 SIGNKEY_DURATION = 4 weeks
diff --git a/src/exchange/test_taler_exchange_httpd.sh 
b/src/exchange/test_taler_exchange_httpd.sh
index a6de7787..895b8b1d 100755
--- a/src/exchange/test_taler_exchange_httpd.sh
+++ b/src/exchange/test_taler_exchange_httpd.sh
@@ -57,9 +57,19 @@ echo " DONE"
 echo -n "Running tests ..."
 # We read the JSON snippets to POST from test_taler_exchange_httpd.post
 cat test_taler_exchange_httpd.post | grep -v ^\# | awk '{ print "curl -d \47"  
$2 "\47 http://localhost:8081"; $1 }' | bash &> /dev/null
-
+echo -n .
 # We read the JSON snippets to GET from test_taler_exchange_httpd.get
 cat test_taler_exchange_httpd.get | grep -v ^\# | awk '{ print "curl 
http://localhost:8081"; $1 }' | bash &> /dev/null
+echo -n .
+# Also try them with various headers: Language
+cat test_taler_exchange_httpd.get | grep -v ^\# | awk '{ print "curl -H 
\"Accept-Language: fr,en;q=0.4,de\" http://localhost:8081"; $1 }' | bash &> 
/dev/null
+echo -n .
+# Also try them with various headers: Accept encoding (wildcard #1)
+cat test_taler_exchange_httpd.get | grep -v ^\# | awk '{ print "curl -H 
\"Accept: text/*\" http://localhost:8081"; $1 }' | bash &> /dev/null
+echo -n .
+# Also try them with various headers: Accept encoding (wildcard #2)
+cat test_taler_exchange_httpd.get | grep -v ^\# | awk '{ print "curl -H 
\"Accept: */html\" http://localhost:8081"; $1 }' | bash &> /dev/null
+bash
 
 echo " DONE"
 # $! is the last backgrounded process, hence the exchange
diff --git a/src/exchange/test_taler_exchange_httpd_afl.sh 
b/src/exchange/test_taler_exchange_httpd_afl.sh
index cab70722..84c4a326 100755
--- a/src/exchange/test_taler_exchange_httpd_afl.sh
+++ b/src/exchange/test_taler_exchange_httpd_afl.sh
@@ -36,7 +36,7 @@ unset XDG_DATA_HOME
 unset XDG_CONFIG_HOME
 PREFIX=
 # Uncomment this line to run with valgrind...
-PREFIX="valgrind --leak-check=yes --track-fds=yes --error-exitcode=1 
--log-file=valgrind.%p"
+#PREFIX="valgrind --leak-check=yes --track-fds=yes --error-exitcode=1 
--log-file=valgrind.%p"
 # Setup keys.
 taler-exchange-keyup -c test_taler_exchange_httpd.conf
 # Setup database (just to be sure)
diff --git a/src/mhd/mhd_legal.c b/src/mhd/mhd_legal.c
index e0fb0b29..fac97412 100644
--- a/src/mhd/mhd_legal.c
+++ b/src/mhd/mhd_legal.c
@@ -484,6 +484,8 @@ load_language (struct TALER_MHD_Legal *legal,
                    path,
                    lang);
   d = opendir (dname);
+  if (NULL == d)
+    return;
   for (struct dirent *de = readdir (d);
        NULL != de;
        de = readdir (d))

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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