Files
codeql/python/ql/test/experimental/query-tests/Security/CWE-074-TemplateInjection/ChevronSsti.py
Rasmus Wriedt Larsen 33f8998c2e Python: Minor fix in test
2023-08-18 10:19:44 +02:00

25 lines
418 B
Python

from flask import Flask, request
import chevron
app = Flask(__name__)
@app.route('/other')
def a():
template = request.args.get('template')
return chevron.render(template, {"key": "value"})
@app.route('/other2')
def b():
template = request.args.get('template')
args = {
'template': template,
'data': {
'key': 'value'
}
}
return chevron.render(**args)