Skip to content

Commit 44cc9dd

Browse files
committed
Python: Add TurboGears templating example
1 parent b526421 commit 44cc9dd

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

python/ql/test/library-tests/web/turbogears/Controller.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
| test.py:13:5:13:50 | Function ok_validated |
33
| test.py:18:5:18:57 | Function partially_validated |
44
| test.py:22:5:22:51 | Function not_validated |
5+
| test.py:26:5:26:28 | Function with_template |

python/ql/test/library-tests/web/turbogears/Sinks.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
| test.py:14 | BinaryExpr | externally controlled string |
33
| test.py:19 | BinaryExpr | externally controlled string |
44
| test.py:23 | BinaryExpr | externally controlled string |
5+
| test.py:27 | Dict | {externally controlled string} |

python/ql/test/library-tests/web/turbogears/test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ def partially_validated(self, a=None, b=None, *args):
2121
@expose()
2222
def not_validated(self, a=None, b=None, *args):
2323
return 'Values: %s, %s, %s' % (a, b, args)
24+
25+
@expose("<template_path>")
26+
def with_template(self):
27+
return {'template_var': 'foo'}

0 commit comments

Comments
 (0)