Message ID | 20190705020703.6656-2-dja@axtens.net |
---|---|
State | Accepted |
Headers | show |
Series | XSS in Patchwork - CVE-2019-13122 | expand |
diff --git a/patchwork/templatetags/patch.py b/patchwork/templatetags/patch.py index ea5a71de362f..757f873b6043 100644 --- a/patchwork/templatetags/patch.py +++ b/patchwork/templatetags/patch.py @@ -5,6 +5,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later from django import template +from django.utils.html import escape from django.utils.safestring import mark_safe from django.template.defaultfilters import stringfilter @@ -64,4 +65,4 @@ def patch_checks(patch): @register.filter @stringfilter def msgid(value): - return mark_safe(value.strip('<>')) + return escape(value.strip('<>'))