From 07af6d0066f9fc389f4d7b980cae4e91bd6545e9 Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 29 Jan 2026 14:44:58 +0800 Subject: [PATCH] fix: check sql only contain read operation #814 --- backend/apps/db/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/db/db.py b/backend/apps/db/db.py index 2002ee62..239b5101 100644 --- a/backend/apps/db/db.py +++ b/backend/apps/db/db.py @@ -468,7 +468,7 @@ def exec_sql(ds: CoreDatasource | AssistantOutDsSchema, sql: str, origin_column= while sql.endswith(';'): sql = sql[:-1] # check execute sql only contain read operations - if not check_sql_read(sql): + if not check_sql_read(sql, ds): raise ValueError(f"SQL can only contain read operations") db = DB.get_db(ds.type)