sqlalchemy / mako

Mako Templates for Python
https://www.makotemplates.org
MIT License
353 stars 60 forks source link

second lexer reg memory use issue #367

Closed zzzeek closed 1 year ago

zzzeek commented 1 year ago
>>> from mako.lexer import Lexer
>>> template = '<%def name="foo()"> this is a def. </%' + ' ' * 10000
>>> Lexer(template).parse()
sqla-tester commented 1 year ago

Mike Bayer has proposed a fix for this issue in the main branch:

replace "dot" with "set not containing whitespace" https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/4091