From 24935f93ee72e74114a33fdcc8b29506f6fd2e65 Mon Sep 17 00:00:00 2001 From: JollyDevelopment Date: Tue, 21 Jan 2025 09:06:56 -0500 Subject: [PATCH] Fix: regex escape pattern --- app/admin/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/routes.py b/app/admin/routes.py index 2a58375c..28bdb4af 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -338,7 +338,7 @@ def admin_federation(): remote_url = remote_scan_form.remote_url.data # test to make sure its a valid fqdn - regex_pattern = '^(https:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$' + regex_pattern = '^(https:\\/\\/)(?=.{1,255}$)((.{1,63}\\.){1,127}(?![0-9]*$)[a-z0-9-]+\\.?)$' result = re.match(regex_pattern, remote_url) if result is None: flash(_(f'{remote_url} does not appear to be a valid url. Make sure input is in the form "https://server-name.tld" without trailing slashes or paths.'))