From 6d6883b343f2b0223d617e2555b865674c8bad6a Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 17 Feb 2022 22:23:44 +0100 Subject: [PATCH] [SECURITY] Fix stored XSS in question errors --- src/pretix/static/pretixpresale/js/ui/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pretix/static/pretixpresale/js/ui/main.js b/src/pretix/static/pretixpresale/js/ui/main.js index c27f5760e1..13232fa259 100644 --- a/src/pretix/static/pretixpresale/js/ui/main.js +++ b/src/pretix/static/pretixpresale/js/ui/main.js @@ -219,7 +219,10 @@ $(function () { // multi-input fields have a role=group with aria-labelledby var label = this.hasAttribute("aria-labelledby") ? $("#" + this.getAttribute("aria-labelledby")) : $("[for="+target.attr("id")+"]"); - content.append("
  • " + label.get(0).childNodes[0].nodeValue + ": "+desc.text()+"
  • "); + var $li = $("
  • "); + $li.text(": " + desc.text()) + $li.prepend($("").attr("href", "#" + target.attr("id")).text(label.get(0).childNodes[0].nodeValue)) + content.append($li); }); $(this).append(content); });