betodealmeida commented on code in PR #33564:
URL: https://github.com/apache/superset/pull/33564#discussion_r2114061782
##########
superset/db_engine_specs/base.py:
##########
@@ -1767,14 +1767,6 @@ def execute( # pylint: disable=unused-argument
:param kwargs: kwargs to be passed to cursor.execute()
:return:
"""
- if not cls.allows_sql_comments:
- query = sql_parse.strip_comments_from_sql(query, engine=cls.engine)
- disallowed_functions =
current_app.config["DISALLOWED_SQL_FUNCTIONS"].get(
- cls.engine, set()
- )
- if sql_parse.check_sql_functions_exist(query, disallowed_functions,
cls.engine):
- raise DisallowedSQLFunction(disallowed_functions)
-
Review Comment:
I moved this logic to the caller, to prevent DB engine specs from defining
their own `execute` methods that skip this validation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]