]> git.ipfire.org Git - pbs.git/commitdiff
web: Fail if template variables are not defined
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Jan 2025 14:55:12 +0000 (14:55 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Jan 2025 14:55:12 +0000 (14:55 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/base.py

index df79677bac872d155e3a28ec2ed84de800f865cd..959ddf7f1f908c2b0963b9a9d837a07c4b01d9ee 100644 (file)
@@ -251,6 +251,9 @@ class BaseHandler(tornado.web.RequestHandler):
                        # Automatically escape
                        autoescape   = True,
 
+                       # Fail if we are trying to access undefined variables
+                       undefined    = jinja2.StrictUndefined,
+
                        # Enable asyncio
                        enable_async = True,