From 121dae3d595a90e72ffda06ea8d6c41510213b20 Mon Sep 17 00:00:00 2001 From: Arash Date: Mon, 4 Nov 2024 10:55:31 +0100 Subject: [PATCH] update public name validation to allow upper-case letters --- lib/galaxy/security/validate_user_input.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/security/validate_user_input.py b/lib/galaxy/security/validate_user_input.py index 9e6ed7d4afc3..cf2492c7aff4 100644 --- a/lib/galaxy/security/validate_user_input.py +++ b/lib/galaxy/security/validate_user_input.py @@ -35,8 +35,8 @@ # Public name validity parameters PUBLICNAME_MAX_LEN = 255 -VALID_PUBLICNAME_RE = re.compile(r"^[a-z0-9._\-]+$") -VALID_PUBLICNAME_SUB = re.compile(r"[^a-z0-9._\-]") +VALID_PUBLICNAME_RE = re.compile(r"^[a-zA-Z0-9._\-]+$") +VALID_PUBLICNAME_SUB = re.compile(r"[^a-zA-Z0-9._\-]") FILL_CHAR = "-" # Password validity parameters @@ -67,7 +67,7 @@ def validate_publicname_str(publicname): if len(publicname) > PUBLICNAME_MAX_LEN: return "Public name cannot be more than %d characters in length." % (PUBLICNAME_MAX_LEN) if not (VALID_PUBLICNAME_RE.match(publicname)): - return "Public name must contain only lower-case letters, numbers, '.', '_' and '-'." + return "Public name must contain only letters, numbers, '.', '_' and '-'." return ""