From 578f798cb45eee39232d377e0e28d5fe58b03884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20R=C3=B6hrich?= Date: Thu, 23 Nov 2023 10:16:11 +0100 Subject: [PATCH] fix: ui path validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix validation of the UI application path by removing it. Signed-off-by: Moritz Röhrich --- Makefile | 3 +-- src/backend/config.py | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Makefile b/Makefile index a83af73a..bb1bcf33 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ # limitations under the License. .PHONY: check-ui-backend-env +.DEFAULT_GOAL:=image-build-ui ######################################################################## # Testing cluster @@ -103,5 +104,3 @@ check-ui-backend-env: ifndef S3GW_SERVICE_URL $(error S3GW_SERVICE_URL must be set.) endif - - diff --git a/src/backend/config.py b/src/backend/config.py index 334253fe..ce288590 100644 --- a/src/backend/config.py +++ b/src/backend/config.py @@ -120,12 +120,6 @@ def get_ui_path() -> str: def post_process(key: str, value: str | None) -> str: if value is None or value == "/": return "/" - match = re.fullmatch(r"/?[\w./-]+(?:[\w]+)/?", value) - if match is None: - logger.error( - f"The value of the environment variable {key} is malformed: {value}" # noqa: E501 - ) - raise EnvironMalformedError(key) return value if value.startswith("/") else f"/{value}" path = get_environ_str("S3GW_UI_PATH", cb=post_process)