From f21864f16ddb9be042e765b3c350ab7f34252b78 Mon Sep 17 00:00:00 2001 From: ElJeffe Date: Mon, 24 Jan 2022 20:43:39 -0500 Subject: [PATCH] Fix flag details xss --- static/js/pages/admin/view/statistics.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static/js/pages/admin/view/statistics.js b/static/js/pages/admin/view/statistics.js index d8b48868..d6fe7796 100644 --- a/static/js/pages/admin/view/statistics.js +++ b/static/js/pages/admin/view/statistics.js @@ -18,9 +18,11 @@ function getStatDetails(obj, uuid) { var table = ""; if (value.length > 0) { for (i=0; i < value.length; i++) { - table += "" + value[i].name + ""; + let tkn = $('
').html(value[i].token); + let nm = $('
').html(value[i].name); + table += "" + nm.text() + ""; if (value[i].token !== undefined) { - table += "" + value[i].token + ""; + table += "" + tkn.text() + ""; } if (value[i].price !== undefined) { table += "" + value[i].price + ""; @@ -31,7 +33,7 @@ function getStatDetails(obj, uuid) { if (key == "attempts") { table += ""; table += "Accept Answer"; }