[
https://issues.apache.org/jira/browse/FREEMARKER-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17711267#comment-17711267
]
Dániel Dékány commented on FREEMARKER-215:
------------------------------------------
Oh, I see it finished with parse exception since then... Not sure how many
minutes it was. So, yeah, will have to figure out if we can prevent it to try
so many combinations before it's proven that the template is in valid. Can be
potentially difficult... Reminds me the problem with with regular expressions,
where practically infinite matching time can only be prevented if you severally
limit the language.
> a specially constructed ftl will cause freemarker hang
> ------------------------------------------------------
>
> Key: FREEMARKER-215
> URL: https://issues.apache.org/jira/browse/FREEMARKER-215
> Project: Apache Freemarker
> Issue Type: Bug
> Components: engine
> Affects Versions: 2.3.31
> Reporter: dwadw
> Priority: Major
> Attachments: file1.ftl
>
>
> A specially constructed ftl will cause freemarker hang and the program will
> never stop.
> Configuration config = new Configuration();
> TemplateLoader templateLoader = new FileTemplateLoader(new
> File("/tmp/"));
> config.setTemplateLoader(templateLoader);
> Template template = config.getTemplate("file1.ftl");
> See file1.ftl in attachment.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)