fix: [security] Fix to stored XSS

- as reported by David Heise
pull/4939/head
mokaddem 2019-07-27 10:40:19 +02:00
parent c951228ebc
commit 26bedd8a68
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 4 additions and 1 deletions

View File

@ -2183,7 +2183,10 @@ eventGraph.update_scope();
dataHandler.fetch_data_and_update(true, function() {
var $select = $('#network-typeahead');
dataHandler.get_typeaheadData_search().forEach(function(element) {
$select.append('<option value="' + element + '">' + element + '</option>');
var $option = $('<option></option>');
$option.text(element);
$option.attr('value', $option.text());
$select.append($option);
});
$('#network-typeahead').chosen(chosen_options).on('change', function(evt, params) {
var value = params.selected;