summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2020-01-03 20:01:09 +0100
committerMarcel Hellkamp <marc@gsites.de>2020-01-03 20:06:49 +0100
commit332215b2b1b3de5a321ba9f3497777fc93662893 (patch)
tree9fef42c0b10ee41ff92a0d0a66dc67f208225fa8
parentaaee93a5b1dfc78cb9119797df5c766a53872c5b (diff)
downloadbottle-332215b2b1b3de5a321ba9f3497777fc93662893.tar.gz
fix #1155: Catastrophic backtracking issue in template parser.
Related to #1194
-rwxr-xr-xbottle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bottle.py b/bottle.py
index 10d5443..df867c1 100755
--- a/bottle.py
+++ b/bottle.py
@@ -4074,7 +4074,7 @@ class StplParser(object):
# Match the start tokens of code areas in a template
_re_split = r'''(?m)^[ \t]*(\\?)((%(line_start)s)|(%(block_start)s))'''
# Match inline statements (may contain python strings)
- _re_inl = r'''%%(inline_start)s((?:%s|[^'"\n]+?)*?)%%(inline_end)s''' % _re_inl
+ _re_inl = r'''%%(inline_start)s((?:%s|[^'"\n])*?)%%(inline_end)s''' % _re_inl
# add the flag in front of the regexp to avoid Deprecation warning (see Issue #949)
# verbose and dot-matches-newline mode