Guard against infinite loops with recursive links traversal

pull/6/head
Mickaël Menu 3 years ago
parent 81f3aaa6fa
commit ac545f550a
No known key found for this signature in database
GPG Key ID: 53D73664CD359895

@ -526,6 +526,9 @@ func (d *NoteDAO) findRows(opts note.FinderOpts) (*sql.Rows, error) {
query += fmt.Sprintf(" AND tc.distance < %d", maxDistance)
}
// Guard against infinite loops by limiting the number of recursions.
query += "\n LIMIT 100000"
query += "\n)\n"
}

@ -1,4 +1,5 @@
[note]
filename = "{{slug title}}"
template = "default.md"
[tool]

@ -1,7 +1,5 @@
# Send notes for processing by other programs
<!-- TODO: --color=none -->
A great way to expand `zk` feature set is to explore a wealth of command-line tools available. You can use `zk`'s powerful [searching and filtering](note-filtering.md) capabilities to select notes before delegating further processing to other programs.
## Process file paths

@ -1,7 +1,5 @@
# Styling
<!-- TODO: semantic rules -->
`zk` supports a `{{style}}` [template helper](template.md) to format its output with colors and font decorations.
Usage: `{{style "<rules>" "<text>"}}`

Loading…
Cancel
Save