From 5a635e8436c07bed511ba6d7d7f2669f2d1bbdde Mon Sep 17 00:00:00 2001 From: aaronsw Date: Mon, 20 Jun 2011 18:41:52 -0700 Subject: [PATCH] Add a warning for Jython users who don't get to see if their code is safe. --- web/template.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/template.py b/web/template.py index 472627bd..6c79c05b 100644 --- a/web/template.py +++ b/web/template.py @@ -923,6 +923,9 @@ def get_source_line(filename, lineno): import compiler ast = compiler.parse(code) SafeVisitor().walk(ast, filename) + else: + import warnings + warnings.warn("SECURITY ISSUE: You are using Jython, which does not support checking templates for safety. Your templates can execute arbitrary code.") return compiled_code