Skip to content

Commit 22c2331

Browse files
committed
fix use of parameters arg in Cursor.execute
There is still a problem - we don't sanitize these inputs even though users would assume that we do
1 parent 4e26ebb commit 22c2331

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

wherobots/db/cursor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ def execute(self, operation: str, parameters: Dict[str, Any] = None) -> None:
8080
self.__rowcount = -1
8181
self.__description = None
8282

83-
sql = (
84-
operation.replace("{", "{{").replace("}", "}}").format(**(parameters or {}))
85-
)
83+
sql = operation.format(**(parameters or {}))
8684
self.__current_execution_id = self.__exec_fn(sql, self.__on_execution_result)
8785

8886
def executemany(

0 commit comments

Comments
 (0)