avoid generating URLs with // in them

This commit is contained in:
Christian Grothoff 2015-12-19 20:43:41 +01:00
parent bd44a3ee4c
commit 2d6303c698
2 changed files with 5 additions and 1 deletions

View File

@ -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,

View File

@ -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,