From cdeab486970ccb8c716499610f927a6e8eb14457 Mon Sep 17 00:00:00 2001 From: Francisco Arceo Date: Tue, 16 Jul 2024 14:47:00 -0400 Subject: [PATCH] revert: Revert "fix: Avoid XSS attack from Jinjin2's Environment()." (#4357) Revert "fix: Avoid XSS attack from Jinjin2's Environment(). (#4355)" This reverts commit 40270e754660d0a8f57cc8a3bbfb1e1e346c3d86. --- .../offline_stores/contrib/postgres_offline_store/postgres.py | 4 +--- sdk/python/feast/infra/offline_stores/offline_utils.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py b/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py index c3bbfd97bc..c4740a960e 100644 --- a/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py +++ b/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py @@ -365,9 +365,7 @@ def build_point_in_time_query( full_feature_names: bool = False, ) -> str: """Build point-in-time query between each feature view table and the entity dataframe for PostgreSQL""" - template = Environment(autoescape=True, loader=BaseLoader()).from_string( - source=query_template - ) + template = Environment(loader=BaseLoader()).from_string(source=query_template) final_output_feature_names = list(entity_df_columns) final_output_feature_names.extend( diff --git a/sdk/python/feast/infra/offline_stores/offline_utils.py b/sdk/python/feast/infra/offline_stores/offline_utils.py index 6036ba5472..2d4fa268e4 100644 --- a/sdk/python/feast/infra/offline_stores/offline_utils.py +++ b/sdk/python/feast/infra/offline_stores/offline_utils.py @@ -186,9 +186,7 @@ def build_point_in_time_query( full_feature_names: bool = False, ) -> str: """Build point-in-time query between each feature view table and the entity dataframe for Bigquery and Redshift""" - template = Environment(autoescape=True, loader=BaseLoader()).from_string( - source=query_template - ) + template = Environment(loader=BaseLoader()).from_string(source=query_template) final_output_feature_names = list(entity_df_columns) final_output_feature_names.extend(