do not use illegal '+' in payment target type

This commit is contained in:
Florian Dold 2022-08-16 13:55:17 +02:00
parent ab7266fc1c
commit 1e2fdea5a9
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 5 additions and 5 deletions

View File

@ -480,7 +480,7 @@ TEH_handler_purses_merge (
"payto://taler-reserve/",
strlen ("payto://taler-reserve/"))) &&
(0 != strncmp (pcc.payto_uri,
"payto://taler-reserve+http/",
"payto://taler-reserve-http/",
strlen ("payto://taler-reserve+http/"))) )
{
GNUNET_break_op (0);
@ -491,12 +491,12 @@ TEH_handler_purses_merge (
"payto_uri");
}
http = (0 == strncmp (pcc.payto_uri,
"payto://taler-reserve+http/",
strlen ("payto://taler-reserve+http/")));
"payto://taler-reserve-http/",
strlen ("payto://taler-reserve-http/")));
{
const char *host = &pcc.payto_uri[http
? strlen ("payto://taler-reserve+http/")
? strlen ("payto://taler-reserve-http/")
: strlen ("payto://taler-reserve/")];
const char *slash = strchr (host,
'/');

View File

@ -310,7 +310,7 @@ TALER_reserve_make_payto (const char *exchange_url,
/* exchange_url includes trailing '/' */
GNUNET_asprintf (&reserve_url,
"payto://%s/%s%s",
is_http ? "taler-reserve+http" : "taler-reserve",
is_http ? "taler-reserve-http" : "taler-reserve",
exchange_url,
pub_str);
return reserve_url;