TWiki::Templates::readTemplate() calls _readTemplateFile(), which cleanses the template name. So far, a slash (/) is subject for cleansing -- slashes in a template name are removed. This makes it impossible to use a web.topic of a subweb as a template. This is a problem. For example,
TWiki:Plugins/CommentPlugin
cannot use a comment template in a subweb.
So a template name needs to allow /.
In doing so, there is a bit of concern of an arbitrary file is accessed with a template name containing
../
.
So I put a line to replace two or more consecutive dots with one dot.
I was tempted to make / and . interchangeable in a template name.
But if I do so,
%TMPL:INCLUDE{"view.pattern.tmpl"}%
stops working, hence I abandoned the idea.
--
TWiki:Main/HideyoImazu
- 2016-04-12