Skip to content

Commit 07af6d0

Browse files
committed
fix: check sql only contain read operation #814
1 parent bf56c3e commit 07af6d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/apps/db/db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def exec_sql(ds: CoreDatasource | AssistantOutDsSchema, sql: str, origin_column=
468468
while sql.endswith(';'):
469469
sql = sql[:-1]
470470
# check execute sql only contain read operations
471-
if not check_sql_read(sql):
471+
if not check_sql_read(sql, ds):
472472
raise ValueError(f"SQL can only contain read operations")
473473

474474
db = DB.get_db(ds.type)

0 commit comments

Comments
 (0)