From 6ed1fc5f73fb4a348a846bb483414a0ba75dfa61 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Dec 2015 20:36:05 +0100 Subject: use comma instead of space as we do elsewhere --- src/util/wireformats.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/util/wireformats.c') diff --git a/src/util/wireformats.c b/src/util/wireformats.c index 594eaf42..4e928189 100644 --- a/src/util/wireformats.c +++ b/src/util/wireformats.c @@ -329,12 +329,12 @@ validate_sepa (const json_t *wire) ((json_t *) wire, &error, JSON_STRICT, "{" - "s:s " /* TYPE: sepa */ - "s:s " /* IBAN: iban */ - "s:s " /* name: beneficiary name */ - "s:s " /* BIC: beneficiary bank's BIC */ - "s:i " /* r: random 64-bit integer nounce */ - "s?s " /* address: address of the beneficiary */ + "s:s," /* TYPE: sepa */ + "s:s," /* IBAN: iban */ + "s:s," /* name: beneficiary name */ + "s:s," /* BIC: beneficiary bank's BIC */ + "s:i," /* r: random 64-bit integer nounce */ + "s?s" /* address: address of the beneficiary */ "}", "type", &type, "IBAN", &iban, -- cgit v1.2.3 From 2d6303c698a277c831938c31a029661758ac397c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Dec 2015 20:43:41 +0100 Subject: avoid generating URLs with // in them --- src/mint-lib/mint_api_handle.c | 4 ++++ src/util/wireformats.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/util/wireformats.c') diff --git a/src/mint-lib/mint_api_handle.c b/src/mint-lib/mint_api_handle.c index ef3da60e..0ee24123 100644 --- a/src/mint-lib/mint_api_handle.c +++ b/src/mint-lib/mint_api_handle.c @@ -695,6 +695,10 @@ MAH_path_to_url (struct TALER_MINT_Handle *h, { char *url; + if ( ('/' == path[0]) && + (0 < strlen (h->url)) && + ('/' == h->url[strlen (h->url) - 1]) ) + path++; /* avoid generating URL with "//" from concat */ GNUNET_asprintf (&url, "%s%s", h->url, diff --git a/src/util/wireformats.c b/src/util/wireformats.c index 4e928189..dab7fb92 100644 --- a/src/util/wireformats.c +++ b/src/util/wireformats.c @@ -334,7 +334,7 @@ validate_sepa (const json_t *wire) "s:s," /* name: beneficiary name */ "s:s," /* BIC: beneficiary bank's BIC */ "s:i," /* r: random 64-bit integer nounce */ - "s?s" /* address: address of the beneficiary */ + "s:s" /* address: address of the beneficiary */ "}", "type", &type, "IBAN", &iban, -- cgit v1.2.3