mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge pull request #2324 from cbxcvl/fix/renderer-redos
fix(renderer): remove ambiguous \s* from _BLOCK_RE to prevent ReDoS
This commit is contained in:
@@ -138,7 +138,7 @@ class TemplateRenderer:
|
||||
COLOR_ARG_FILTERS = {"blend", "harmonize"}
|
||||
|
||||
# Regex for block delimiters: <* ... *>
|
||||
_BLOCK_RE = re.compile(r'<\*\s*(.*?)\s*\*>', re.DOTALL)
|
||||
_BLOCK_RE = re.compile(r'<\*(.*?)\*>', re.DOTALL)
|
||||
|
||||
# Regex for expression tags: {{ ... }}
|
||||
_EXPR_RE = re.compile(r"\{\{([^}\n]+?)\}\}")
|
||||
|
||||
Reference in New Issue
Block a user