From 886aff04f8a6a6a22fb56ab6f9de592e8c07e8ec Mon Sep 17 00:00:00 2001 From: Greg Merritt Date: Thu, 7 Mar 2024 13:41:50 -0800 Subject: [PATCH] Leading and trailing blank space are now removed from user gs:// url input before being sent to gcp --- hartsfield/api/datahub_archive_url_fetch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hartsfield/api/datahub_archive_url_fetch.py b/hartsfield/api/datahub_archive_url_fetch.py index 5c49462..a8d0c60 100644 --- a/hartsfield/api/datahub_archive_url_fetch.py +++ b/hartsfield/api/datahub_archive_url_fetch.py @@ -51,6 +51,7 @@ def fetch_url_direct(): params = request.get_json() gs_source_url = params.get('gs_source_url') + gs_source_url = gs_source_url.strip() if not re.match(r'gs://.{3,}/.+', gs_source_url): error_message = 'The submitted data \"' + gs_source_url + '\" is not a valid gs_source_url.' v = {'response': error_message, 'status': 'error'}