mirror of
https://github.com/mickael-menu/zk
synced 2024-11-07 15:20:21 +00:00
Guard against infinite loops with recursive links traversal
This commit is contained in:
parent
81f3aaa6fa
commit
ac545f550a
@ -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…
Reference in New Issue
Block a user