commit e5af9b9dde8b665de212fec99d49e1ce72956a7d
parent f73a545e0a126d33427184b699d3e0dfb97f4204
Author: Florian Dold <dold@taler.net>
Date: Thu, 3 Sep 2026 15:47:37 +0200
wallet-core: treat an odd token domain entry as no match
An entry that is not a domain name is chosen by the issuing merchant
and must not break every later payment referencing the family.
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/packages/taler-wallet-core/src/tokenSelection.ts b/packages/taler-wallet-core/src/tokenSelection.ts
@@ -158,7 +158,11 @@ export function verifyTokenMerchant(
);
for (let domain of domains) {
domain = domain.toLowerCase();
- if (!regex.test(domain)) throw new Error("assertion failed");
+ if (!regex.test(domain)) {
+ // The issuer chose the entry; an entry that is not a domain name
+ // simply matches nothing.
+ continue;
+ }
if (matchesTokenDomain(domain, merchantDomain)) {
warning = false;
break;