diff --git a/web/api/views.py b/web/api/views.py index ec3b5460a..8bcf46a84 100644 --- a/web/api/views.py +++ b/web/api/views.py @@ -2140,6 +2140,9 @@ def get_queryset(self): if gf_tag: endpoints = endpoints.filter(matched_gf_patterns__icontains=gf_tag) + if target_id: + endpoints = endpoints.filter(target_domain__id=target_id) + if subdomain_id: endpoints = endpoints.filter(subdomain__id=subdomain_id) diff --git a/web/startScan/static/startScan/js/detail_scan.js b/web/startScan/static/startScan/js/detail_scan.js index f5b790da8..1e3314c6e 100644 --- a/web/startScan/static/startScan/js/detail_scan.js +++ b/web/startScan/static/startScan/js/detail_scan.js @@ -933,7 +933,7 @@ function get_vulnerability_modal(scan_id=null, severity=null, subdomain_id=null, } -function get_endpoint_modal(scan_id, subdomain_id, subdomain_name){ +function get_endpoint_modal(project, scan_id, subdomain_id, subdomain_name){ // This function will display a xl modal with datatable for displaying endpoints // associated with the subdomain $('#xl-modal-title').empty(); @@ -941,10 +941,10 @@ function get_endpoint_modal(scan_id, subdomain_id, subdomain_name){ $('#xl-modal-footer').empty(); if (scan_id) { - url = `/api/listEndpoints/?scan_id=${scan_id}&subdomain_id=${subdomain_id}&format=json` + url = `/api/listEndpoints/?project=${project}&scan_id=${scan_id}&subdomain_id=${subdomain_id}&format=json` } else{ - url = `/api/listEndpoints/?subdomain_id=${subdomain_id}&format=json` + url = `/api/listEndpoints/?project=${project}&subdomain_id=${subdomain_id}&format=json` } Swal.fire({ diff --git a/web/startScan/templates/startScan/detail_scan.html b/web/startScan/templates/startScan/detail_scan.html index 2e3dc6471..4a80d23ed 100644 --- a/web/startScan/templates/startScan/detail_scan.html +++ b/web/startScan/templates/startScan/detail_scan.html @@ -2214,7 +2214,7 @@