mirror of
https://github.com/apache/superset.git
synced 2026-09-01 13:01:33 +00:00
fix: escape SQL identifiers in db engine spec prequeries and metadata queries (#39840)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
a06e6ea19b
commit
2e7a2b1f2d
@@ -147,6 +147,9 @@ def test_get_prequeries(mocker: MockerFixture) -> None:
|
||||
|
||||
assert spec.get_prequeries(database) == []
|
||||
assert spec.get_prequeries(database, schema="test") == ['set search_path = "test"']
|
||||
assert spec.get_prequeries(database, schema='evil"; SELECT 1--') == [
|
||||
'set search_path = "evil""; SELECT 1--"'
|
||||
]
|
||||
|
||||
|
||||
def test_get_default_schema_for_query(mocker: MockerFixture) -> None:
|
||||
|
||||
Reference in New Issue
Block a user