Skip to content

Commit

Permalink
Merge pull request #1488 from dmchaledev/vuln_render_fix
Browse files Browse the repository at this point in the history
#1476-#1480-#1487 Fix, setting fallback for Nuclei variable and fixing JS errors in Vulnerabilities page
  • Loading branch information
yogeshojha authored Feb 24, 2025
2 parents 32633d4 + 2ae822b commit f2f4058
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion web/reNgine/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3671,7 +3671,7 @@ def parse_nuclei_result(line):
'type': line['type'],
'severity': NUCLEI_SEVERITY_MAP[line['info'].get('severity', 'unknown')],
'template': line['template'],
'template_url': line['template-url'],
'template_url': line.get('template-url', []),
'template_id': line['template-id'],
'description': line['info'].get('description', ''),
'matcher_name': line.get('matcher-name', ''),
Expand Down
6 changes: 3 additions & 3 deletions web/startScan/templates/startScan/detail_scan.html
Original file line number Diff line number Diff line change
Expand Up @@ -1752,18 +1752,18 @@ <h4 class="header-title mb-0"><span id="endpoint_change_count"><span class="spin
const encodedURLData = htmlEncode(data);

if (data.toLowerCase().startsWith('http')) {
return `<a href="${encodedData}"
return `<a href="${encodedURLData}"
target="_blank"
rel="noopener noreferrer"
class="text-danger">
${split_into_lines(encodedData, 150)}
${split_into_lines(encodedURLData, 150)}
</a>`;
}
}
return htmlEncode(data || '');
},
"targets": 11,
}
},
{
"render": function ( data, type, row ) {
if (data){
Expand Down
6 changes: 3 additions & 3 deletions web/startScan/templates/startScan/vulnerabilities.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,18 +199,18 @@
const encodedURLData = htmlEncode(data);

if (data.toLowerCase().startsWith('http')) {
return `<a href="${encodedData}"
return `<a href="${encodedURLData}"
target="_blank"
rel="noopener noreferrer"
class="text-danger">
${split_into_lines(encodedData, 150)}
${split_into_lines(encodedURLData, 150)}
</a>`;
}
}
return htmlEncode(data || '');
},
"targets": 11,
}
},
{
"render": function ( data, type, row ) {
if (data){
Expand Down
6 changes: 3 additions & 3 deletions web/targetApp/templates/target/summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -1512,18 +1512,18 @@ <h4 class="header-title mb-0"><span id="technologies-count"><span class="spinner
const encodedURLData = htmlEncode(data);

if (data.toLowerCase().startsWith('http')) {
return `<a href="${encodedData}"
return `<a href="${encodedURLData}"
target="_blank"
rel="noopener noreferrer"
class="text-danger">
${split_into_lines(encodedData, 150)}
${split_into_lines(encodedURLData, 150)}
</a>`;
}
}
return htmlEncode(data || '');
},
"targets": 11,
}
},
{
"render": function(data, type, row) {
if (data) {
Expand Down

0 comments on commit f2f4058

Please sign in to comment.