Cheetah's #unless and #echo tags are safe, and should be permitted even when
safe_templating is enforced. Add them to the whitelist of enabled directives.
---

Our local kickstarts and snippets use these tags, and broke when we upgraded
to 2.0.9 recently. I'm not entirely clear about what base to use for patches
these days, but this commit is on top of today's stable. It can also be pulled
from:

    git://github.com/icomfort/cobbler.git add-safe-template-tags

 cobbler/template_api.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/cobbler/template_api.py b/cobbler/template_api.py
index 1a478da..9076727 100644
--- a/cobbler/template_api.py
+++ b/cobbler/template_api.py
@@ -78,11 +78,13 @@ class CobblerCompiler(Cheetah.Compiler.ModuleCompiler):
             'if',
             'elif',
             'else',
+            'unless',
             'def',
             'block',
             'end',
             'for',
             'include',
+            'echo',
             'set',
             'snippet',
             'errorcatcher',
-- 
1.7.3.2

_______________________________________________
cobbler-devel mailing list
cobbler-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel

Reply via email to