diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fc44f399..91ba05b8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,7 +9,8 @@ concurrency: jobs: docs: - runs-on: ubuntu-latest + # Python 3.9 is only published for Ubuntu 22.04/24.04; ubuntu-latest is now 26.04. + runs-on: ubuntu-24.04 name: docs steps: - name: Checkout diff --git a/docs/settings.rst b/docs/settings.rst index 9d069fbc..526bc390 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -28,6 +28,7 @@ Disallowed words in SQL queries to prevent destructive actions. # DDL 'ALTER', 'CREATE', + 'CREATE OR REPLACE', 'DROP', 'RENAME', 'TRUNCATE', diff --git a/explorer/app_settings.py b/explorer/app_settings.py index a25a336e..cee07a74 100644 --- a/explorer/app_settings.py +++ b/explorer/app_settings.py @@ -29,6 +29,7 @@ # DDL "ALTER", "CREATE", + "CREATE OR REPLACE", "DROP", "RENAME", "TRUNCATE", diff --git a/explorer/tests/test_utils.py b/explorer/tests/test_utils.py index e3f05523..127579d2 100644 --- a/explorer/tests/test_utils.py +++ b/explorer/tests/test_utils.py @@ -152,6 +152,11 @@ def test_ddl_create(self): passes, words = passes_blacklist(sql) self.assertFalse(passes) + def test_ddl_create_or_replace(self): + sql = "CREATE OR REPLACE VIEW foo AS SELECT 1;" + passes, words = passes_blacklist(sql) + self.assertFalse(passes) + def test_ddl_drop(self): sql = "DROP TABLE films, distributors;" passes, words = passes_blacklist(sql)