Skip to content

Commit

Permalink
Fix device dependency xss
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant committed Nov 4, 2024
1 parent 338fa74 commit 8edf7ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/views/map/device-dependency.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ function deviceSort(a,b) {
network_nodes.update(this_dev);
} else {
network_nodes.add([this_dev]);
$("#highlight_node").append("<option value='" + device_id + "' id='highlight-device-" + device_id + "'>" + device["sname"] + "</option>")
var highlight_option = document.createElement("option");
highlight_option.value = device_id;
highlight_option.id = "highlight-device-" + device_id;
highlight_option.textContent = device["sname"];
document.getElementById("highlight_node").appendChild(highlight_option);
}
$.each( device["parents"], function( parent_idx, parent_id ) {
link_id = device_id + "." + parent_id;
Expand Down

0 comments on commit 8edf7ad

Please sign in to comment.