NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
fix: use parameterized query in get_face_ids to prevent SQL injection (#22500)
ryzendigoaea91a91d5b9
diff --git a/frigate/embeddings/__init__.py b/frigate/embeddings/__init__.pyindex 0a854fcfad..5e14d0d8c3 100644--- a/frigate/embeddings/__init__.py+++ b/frigate/embeddings/__init__.py@@ -205,14 +205,14 @@ class EmbeddingsContext:)def get_face_ids(self, name: str) -> list[str]:- sql_query = f"""+ sql_query = """SELECTidFROM vec_descriptions- WHERE id LIKE '%{name}%'+ WHERE id LIKE ?"""- return self.db.execute_sql(sql_query).fetchall()+ return self.db.execute_sql(sql_query, (f"%{name}%",)).fetchall()def reprocess_face(self, face_file: str) -> dict[str, Any]:return self.requestor.send_data(