taler-typescript-core

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

commit 0f068e22bd239e7e18ff314b06014033c0096503
parent 50207a52c0e6478c2a97343766a6f815ae39d2fd
Author: Florian Jung <flo@windfis.ch>
Date:   Sat, 21 Feb 2026 00:24:58 +0100

fix broken URL validation regexp

Now accepts domains which follow the RFC1035 rules, with one modification that
underscores are additionally allowed whereever hyphens are.

Fixes a bug where one-letter-labels like this.is.a.bank.com were incorrectly rejected.

Diffstat:
Mpackages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx b/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx @@ -118,7 +118,7 @@ function validateEthereum_path1( * bank.com/path/subpath/ */ const DOMAIN_REGEX = - /^[a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9-_](?:\.[a-zA-Z0-9-_]{2,})*(:[0-9]+)?(\/[a-zA-Z0-9-.]+)*\/?$/; + /^[a-zA-Z](?:[a-zA-Z0-9-_]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z](?:[a-zA-Z0-9-_]{0,61}[a-zA-Z0-9])?)*(:[0-9]+)?(\/[a-zA-Z0-9-.]+)*\/?$/; function validateTalerBank_path1( addr: string,