taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 27188c177c578ce7c163b2d78f576be5577e79fa
parent 093dd8f7cb83a2d0b4baae56adbb1c4c35cf46f6
Author: Florian Dold <florian@dold.me>
Date:   Sat, 18 Jul 2026 11:47:37 +0200

util: properly encode URL params

Diffstat:
Mpackages/taler-util/src/http-client/exchange-client.ts | 15+++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/packages/taler-util/src/http-client/exchange-client.ts b/packages/taler-util/src/http-client/exchange-client.ts @@ -920,13 +920,16 @@ export class TalerExchangeHttpClient { state: string, code: string, ) { - const resp = await this.fetch( - `kyc-proof/${provider}?state=${state}&code=${code}`, - { - method: "GET", - redirect: "manual", - }, + const url = new URL( + `kyc-proof/${encodeURIComponent(provider)}`, + this.baseUrl, ); + url.searchParams.set("state", state); + url.searchParams.set("code", code); + const resp = await this.fetch(url.href, { + method: "GET", + redirect: "manual", + }); switch (resp.status) { case HttpStatusCode.SeeOther: