mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-17 08:57:55 +00:00
Limit memory usage in templates
This commit is contained in:
@@ -12,6 +12,7 @@ const (
|
||||
loopExecutionLimit = 10_000 // Limit the number of loop executions to prevent execution from taking too long
|
||||
stringLengthLimit = 100_000 // Limit the length of strings to prevent memory issues
|
||||
sliceSizeLimit = 10_000 // Limit the size of slices to prevent memory issues
|
||||
indentSpacesLimit = 100 // Limit indentation width to prevent memory issues; indent allocates spaces*lines bytes
|
||||
)
|
||||
|
||||
// TxtFuncMap produces the function map.
|
||||
|
||||
Reference in New Issue
Block a user