Skip to content

Commit 6d8ca83

Browse files
authored
Merge pull request #1414 from pulp/patchback/backports/3.12/52c60bc9a809521e462b8f5545b1e1b03910bd67/pr-1412
[PR #1412/52c60bc9 backport][3.12] [3.19] Autoescape data when rendering simple detail html
2 parents 37acdc1 + 8119068 commit 6d8ca83

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed quoting mistake in simple html detail pages that can lead to a possible XSS attack.

‎pulp_python/app/utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,6 @@ def write_simple_index(project_names, streamed=False):
316316

317317
def write_simple_detail(project_name, project_packages, streamed=False):
318318
"""Writes the simple detail page of a package."""
319-
detail = Template(simple_detail_template)
319+
detail = Template(simple_detail_template, autoescape=True)
320320
context = {"project_name": project_name, "project_packages": project_packages}
321321
return detail.stream(**context) if streamed else detail.render(**context)

0 commit comments

Comments
 (0)