diff --git a/internal/store/notes.go b/internal/store/notes.go index 8f11f75..bb0d245 100644 --- a/internal/store/notes.go +++ b/internal/store/notes.go @@ -157,7 +157,7 @@ func (s *Store) ListPublicNotes(page, pageSize int, tag string) ([]Note, int, er args := []any{} if tag != "" { // json_each 参数化过滤,无拼接注入面。 - where += ` AND EXISTS (SELECT 1 FROM json_each(notes.tags) je WHERE je.value = ?)` + where += ` AND EXISTS (SELECT 1 FROM json_each(n.tags) je WHERE je.value = ?)` args = append(args, tag) } var total int