taler-typescript-core

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

commit 64d3b96c06b917e85f97d7080bd82c3c6bca1817
parent 8f719a45e93f9c58daabfa144f8c3cf894ffb8e9
Author: Florian Dold <florian@dold.me>
Date:   Sat, 18 Jul 2026 11:57:02 +0200

fix parsing of restore URIs

Diffstat:
Mpackages/taler-util/src/taleruri.ts | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/packages/taler-util/src/taleruri.ts b/packages/taler-util/src/taleruri.ts @@ -824,7 +824,10 @@ function parseRestore( const thisScheme = url === withoutScheme ? scheme : isHttp ? "http" : "https"; - const [hostname, path] = withoutScheme.split("/", 1); + const slashIdx = withoutScheme.indexOf("/"); + const hostname = + slashIdx < 0 ? withoutScheme : withoutScheme.slice(0, slashIdx); + const path = slashIdx < 0 ? "" : withoutScheme.slice(slashIdx + 1); const host = Paytos.parseHostPortPath2(hostname, path, thisScheme)!; providers.push(host); });