You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Validate SearchConfig identifiers (table/column names) against injection
- Guard FTS5 MATCH against empty query when all tokens are operators
- Validate migration version before PRAGMA interpolation
- Replace Number(row.id) with num() for BigInt consistency + add null check
- Remove non-null assertions in batch tag/attachment fetches
- Add likeEscape() helper and ESCAPE '\' clause across all 7 stores
- Add created_at tie-breaker to epics ORDER BY for stable pagination
- Add missing idx_attachments_project index
if(opts?.filter){conditions.push('(e.title LIKE ? OR e.description LIKE ?)');constlike=`%${opts.filter}%`;params.push(like,like);}
181
+
if(opts?.filter){conditions.push("(e.title LIKE ? ESCAPE '\\' OR e.description LIKE ? ESCAPE '\\')");constlike=`%${likeEscape(opts.filter)}%`;params.push(like,like);}
182
182
if(opts?.tag){
183
183
conditions.push(`EXISTS (
184
184
SELECT 1 FROM edges ed JOIN tags tg ON tg.id = ed.from_id AND tg.project_id = ed.project_id
@@ -189,7 +189,7 @@ export class SqliteEpicsStore implements EpicsStore {
189
189
}
190
190
191
191
constwhere=conditions.join(' AND ');
192
-
constrows=this.db.prepare(`SELECT e.* FROM epics e WHERE ${where} ORDER BY e."order" LIMIT ? OFFSET ?`)
192
+
constrows=this.db.prepare(`SELECT e.* FROM epics e WHERE ${where} ORDER BY e."order", e.created_at LIMIT ? OFFSET ?`)
0 commit comments