From 69cb70a5ae93ee9fcbab7a834fbcd30f75e4a370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20F=C3=ABdorov?= Date: Mon, 20 Jan 2025 17:13:58 +0100 Subject: [PATCH] :bug: Fix issue where users can import tokens with invalid characters (#5623) --- common/src/app/common/types/token.cljc | 3 ++- frontend/src/app/main/ui/workspace/tokens/form.cljs | 5 ++--- frontend/translations/en.po | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/common/src/app/common/types/token.cljc b/common/src/app/common/types/token.cljc index 7794b45e1..6afa458fc 100644 --- a/common/src/app/common/types/token.cljc +++ b/common/src/app/common/types/token.cljc @@ -59,7 +59,8 @@ [t] (token-types t)) -(def token-name-ref :string) +(def token-name-ref + [:and :string [:re #"^(?!\$)([a-zA-Z0-9-$]+\.?)*(?