From 00ab593b47e730191ac2dc9c39691f33fab7dccd Mon Sep 17 00:00:00 2001 From: Yogesh Ojha Date: Tue, 31 Aug 2021 22:21:29 +0530 Subject: [PATCH] Fixed XSS reported on Huntr by @gergelykis --- .../static/targetApp/js/target_summary.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/web/targetApp/static/targetApp/js/target_summary.js b/web/targetApp/static/targetApp/js/target_summary.js index 7d7a9712f..307a35a8a 100644 --- a/web/targetApp/static/targetApp/js/target_summary.js +++ b/web/targetApp/static/targetApp/js/target_summary.js @@ -68,13 +68,13 @@ function get_recon_notes(target_id){ $(`#todo_list_${target_id}`).append(`
@@ -91,6 +91,21 @@ function get_recon_notes(target_id){ }); } +function get_task_details(todo_id){ + $('#exampleModal').modal('show'); + $('.modal-text').empty(); $('#modal-footer').empty(); + $('.modal-text').append(``); + $.getJSON(`/api/listTodoNotes/?todo_id=${todo_id}&format=json`, function(data) { + $('.modal-text').empty(); $('#modal-footer').empty(); + note = data['notes'][0]; + subdomain_name = ''; + if (note['subdomain_name']) { + subdomain_name = 'Subdomain: ' + note['subdomain_name'] + '
'; + } + $('.modal-title').html(`${split(htmlEncode(note['title']), 80)}`); + $('#modal-text-content').append(`

${subdomain_name} ${htmlEncode(note['description'])}

`); + }); +} function get_interesting_subdomains(target_id){ var interesting_subdomain_table = $('#interesting_subdomains').DataTable({