Compare commits

...

1 Commits

Author SHA1 Message Date
CodeRabbit AI
15e4023ced Fix SQL injection vulnerability in cleanup-template.ts 2025-03-10 15:36:37 -07:00

View File

@@ -370,7 +370,8 @@ async function getCategoryTemplates() {
const templates = {};
const notes = await db.all<db.DbNote>(
`SELECT * FROM notes WHERE lower(note) like '%${TEMPLATE_PREFIX}%'`,
`SELECT * FROM notes WHERE lower(note) like ?`,
[`%${TEMPLATE_PREFIX}%`]
);
for (let n = 0; n < notes.length; n++) {