Skip to content

Commit

Permalink
Escape user entered input to avoid HTML injection. This fixes Netflix…
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Jun 8, 2017
1 parent ea14be2 commit a938284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hystrix-dashboard/src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

streams.push(s);
$('#streams').html('<table>' + _.reduce(streams, function(html, s) {
return html + '<tr><td>' + s.name + '</td><td>' + s.stream + '</td> <td><a href="#" onclick="removeStream(this);">Remove</a></td> </tr>';
return html + '<tr><td>' + _.escape(s.name) + '</td><td>' + _.escape(s.stream) + '</td> <td><a href="#" onclick="removeStream(this);">Remove</a></td> </tr>';
}, '') + '</table>');

$('#message').html("");
Expand Down

0 comments on commit a938284

Please sign in to comment.