Skip to content

Commit ef7ff16

Browse files
committed
fix: codeql columns thing
1 parent ff0f02c commit ef7ff16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

application/storage/db/repositories/user_tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ def update(self, tool_id: str, user_id: str, fields: dict) -> bool:
182182
set_clauses: list[str] = []
183183
params: dict = {"id": tool_id, "user_id": user_id}
184184
for col, val in filtered.items():
185+
if col not in _ALLOWED_COLUMNS:
186+
raise ValueError(f"disallowed column: {col!r}")
185187
if col in _JSONB_COLUMNS:
186188
set_clauses.append(f"{col} = CAST(:{col} AS jsonb)")
187189
params[col] = _encode_jsonb(val)

0 commit comments

Comments
 (0)