aminghadersohi commented on code in PR #37411:
URL: https://github.com/apache/superset/pull/37411#discussion_r2757495133
##########
superset/sql_lab.py:
##########
@@ -411,6 +412,13 @@ def execute_sql_statements( # noqa: C901
):
raise SupersetDisallowedSQLFunctionException(disallowed_functions)
+ disallowed_tables = app.config["DISALLOWED_SQL_TABLES"].get(
+ db_engine_spec.engine,
+ set(),
+ )
+ if disallowed_tables and
parsed_script.check_tables_present(disallowed_tables):
+ raise SupersetDisallowedSQLTableException(disallowed_tables)
Review Comment:
Fixed — `sql_lab.py` now computes the intersection of configured disallowed
tables and tables actually present in the query, so the error message only
reports the matched tables. This matches the behavior in
`SQLExecutor._check_disallowed_tables`.
--
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]