Skip to content

Commit de3e751

Browse files
authored
Merge pull request #1411 from jobselko/patchback/backports/3.11/2dc23555c2f2d71f5fc2e370c26653abd5fb8eca/pr-1404
[3.11] Validate and autoescape data when rendering html
2 parents cf0b6d2 + dc7e82e commit de3e751

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎CHANGES/+simple_html_xss.bugfix‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed quoting mistake in simple html index pages that can lead to a possible XSS attack given a carefully crafted package name. CVE-2026-103871

‎pulp_python/app/utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def find_artifact():
303303

304304
def write_simple_index(project_names, streamed=False):
305305
"""Writes the simple index."""
306-
simple = Template(simple_index_template)
306+
simple = Template(simple_index_template, autoescape=True)
307307
context = {"projects": ((x, canonicalize_name(x)) for x in project_names)}
308308
return simple.stream(**context) if streamed else simple.render(**context)
309309

0 commit comments

Comments
 (0)