summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-08-17 21:35:03 +0200
committerChristian Grothoff <christian@grothoff.org>2019-08-17 21:35:03 +0200
commitcbf6281ca2c4ee0fd77eda4a6d943e3a60a21e0e (patch)
tree02af89ec2c786837f908f6f35cb394088622c76e
parent8f7388042c433049b2b49c306caa80378e635c4d (diff)
downloadexchange-cbf6281ca2c4ee0fd77eda4a6d943e3a60a21e0e.tar.gz
exchange-cbf6281ca2c4ee0fd77eda4a6d943e3a60a21e0e.tar.bz2
exchange-cbf6281ca2c4ee0fd77eda4a6d943e3a60a21e0e.zip
prevent // from appearing in payto URIs
-rw-r--r--src/lib/testing_api_helpers.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/testing_api_helpers.c b/src/lib/testing_api_helpers.c
index fd06d3ce..0f2575d9 100644
--- a/src/lib/testing_api_helpers.c
+++ b/src/lib/testing_api_helpers.c
@@ -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}",