Merge branch 'xss_fixes' of https://github.com/j433866/CyberChef into j433866-xss_fixes

master
n1474335 2019-02-08 17:05:51 +00:00
commit 821bc9405c
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ class ToTable extends Operation {
const [cellDelims, rowDelims, firstRowHeader, format] = args; const [cellDelims, rowDelims, firstRowHeader, format] = args;
// Process the input into a nested array of elements. // Process the input into a nested array of elements.
const tableData = Utils.parseCSV(input, cellDelims.split(""), rowDelims.split("")); const tableData = Utils.parseCSV(Utils.escapeHtml(input), cellDelims.split(""), rowDelims.split(""));
if (!tableData.length) return ""; if (!tableData.length) return "";

View File

@ -478,7 +478,7 @@ class OutputWaiter {
*/ */
showMagicButton(opSequence, result, recipeConfig) { showMagicButton(opSequence, result, recipeConfig) {
const magicButton = document.getElementById("magic"); const magicButton = document.getElementById("magic");
magicButton.setAttribute("data-original-title", `<i>${opSequence}</i> will produce <span class="data-text">"${Utils.truncate(result, 30)}"</span>`); magicButton.setAttribute("data-original-title", `<i>${opSequence}</i> will produce <span class="data-text">"${Utils.escapeHtml(Utils.truncate(result), 30)}"</span>`);
magicButton.setAttribute("data-recipe", JSON.stringify(recipeConfig), null, ""); magicButton.setAttribute("data-recipe", JSON.stringify(recipeConfig), null, "");
magicButton.classList.remove("hidden"); magicButton.classList.remove("hidden");
} }