nyx/tests/fixtures/ssti/python/safe_render_template_var.py

9 lines
332 B
Python
Raw Permalink Normal View History

2026-05-07 01:29:31 -04:00
# Safe-template-var: Flask `render_template("file.html", **vars)`. The
# first arg is a *file path* (constant), variables carry user input but
# never become template source. Must NOT fire SSTI.
from flask import render_template, request
def handler():
return render_template("greeting.html", name=request.args.get("name"))