﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26536	Stack overflow in template rendering when using django.template.loaders.cached.Loader	Anders Roos	nobody	"If you have two template files with the same name except one is prefixed with a dash '-' where one is including the other, you will get a stack overflow. 

For example if the main template named {{{example.html}}} looks like this:
{{{
{% include '-example.html' %}
}}}

This bug is in django.template.loaders.cached.Loader and only happens if it is used.

I believe the bug is caused by the strip('-') when building the cache key at {{{django/template/loaders/cached.py:103}}} (in {{{Loader.cache_key}}}):
{{{
    return (""%s-%s-%s"" % (template_name, skip_prefix, dirs_prefix)).strip('-')
}}}
"	Bug	closed	Template system	1.9	Release blocker	fixed			Ready for checkin	1	0	0	0	0	0
