prevent // from appearing in payto URIs

This commit is contained in:
Christian Grothoff 2019-08-17 21:35:03 +02:00
parent 8f7388042c
commit cbf6281ca2
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -986,9 +986,17 @@ TALER_TESTING_make_wire_details (unsigned long long account_no,
{
char *payto;
json_t *ret;
int ends_slash;
if (0 < strlen (bank_url))
ends_slash = '/' == bank_url[strlen(bank_url)-1];
else
ends_slash = 0;
GNUNET_asprintf (&payto,
"payto://x-taler-bank/%s/%llu",
(ends_slash)
? "payto://x-taler-bank/%s%llu"
: "payto://x-taler-bank/%s/%llu",
bank_url,
account_no);
ret = json_pack ("{s:s, s:s}",