Merge pull request from GHSA-w9mf-83w3-fv49

* escape the output of the ui-select2

fixes XSS issue

* removed ES6 Destructuring assignment

* Update themes/src/main/resources/theme/base/admin/resources/js/services.js

Co-authored-by: Jon Koops <jonkoops@gmail.com>

Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Co-authored-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Bruno Oliveira da Silva 2022-09-08 05:43:43 -03:00 committed by GitHub
parent f2b02f19e6
commit 84576ffc0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -957,15 +957,11 @@ function clientSelectControl($scope, realm, Client) {
delay: 500, delay: 500,
allowClear: true, allowClear: true,
query: function (query) { query: function (query) {
var data = {results: []};
Client.query({realm: realm, search: true, clientId: query.term.trim(), max: 20}, function(response) { Client.query({realm: realm, search: true, clientId: query.term.trim(), max: 20}, function(response) {
data.results = response; query.callback({ results: response.map(function (client) {
query.callback(data); return { id: client.id, text: client.clientId }
});
}); });
},
formatResult: function(object, container, query) {
object.text = object.clientId;
return object.clientId;
} }
}; };
} }