Skip to content

Commit

Permalink
security fix: Cross-site Scripting (XSS) using Bloodhound
Browse files Browse the repository at this point in the history
  • Loading branch information
MaKyOtOx committed Nov 9, 2021
1 parent d2bbea1 commit 5199074
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/templates/add-asset-group.html
Expand Up @@ -145,7 +145,7 @@
return '<div class="noitems"> No items found</div>';
},
suggestion: function(data) {
return '<div>' + data.value + ' - '+ data.name + '</div>';
return '<div>' + encodeURIComponent(data.value) + ' - '+ encodeURIComponent(data.name) + '</div>';
}
}
}).bind("typeahead:selected", function(e, datum, name) {
Expand Down
2 changes: 1 addition & 1 deletion assets/templates/edit-asset-group.html
Expand Up @@ -174,7 +174,7 @@ <h4 class="modal-title" id="myModalLabel">Delete Asset Group</h4>
return '<div class="noitems"> No items found</div>';
},
suggestion: function(data) {
return '<div>' + data.value + ' - '+ data.name + '</div>';
return '<div>' + encodeURIComponent(data.value) + ' - '+ encodeURIComponent(data.name) + '</div>';
}
}
}).bind("typeahead:selected", function(e, datum, name) {
Expand Down
6 changes: 3 additions & 3 deletions scans/templates/add-scan-definition.html
Expand Up @@ -394,11 +394,11 @@
},
suggestion: function(data) {
if (data.format == "asset"){
return '<div>' + data.value + ' - '+ data.name + '</div>';
return '<div>' + encodeURIComponent(data.value) + ' - '+ encodeURIComponent(data.name) + '</div>';
} else if (data.format == "taggroup"){
return '<div> [Tags] ' + data.value + ' - '+ data.name + '</div>';
return '<div> [Tags] ' + encodeURIComponent(data.value) + ' - '+ encodeURIComponent(data.name) + '</div>';
}else {
return '<div> [Group] ' + data.value + ' - '+ data.name + '</div>';
return '<div> [Group] ' + encodeURIComponent(data.value) + ' - '+ encodeURIComponent(data.name) + '</div>';
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions scans/templates/edit-scan-definition.html
Expand Up @@ -470,9 +470,9 @@
},
suggestion: function(data) {
if (data.format == "asset"){
return '<div>' + data.value + ' - '+ data.name + '</div>';
return '<div>' + encodeURIComponent(data.value) + ' - '+ encodeURIComponent(data.name) + '</div>';
} else {
return '<div> [Group] ' + data.value + ' - '+ data.name + '</div>';
return '<div> [Group] ' + encodeURIComponent(data.value) + ' - '+ encodeURIComponent(data.name) + '</div>';
}
}
}
Expand Down

0 comments on commit 5199074

Please sign in to comment.