update user.ui key, fix xss vuln

This commit is contained in:
rlx 2016-01-12 10:16:32 +05:30
parent a5295f284d
commit fea89a9837

View file

@ -20,7 +20,10 @@ oml.ui.findForm = function(list) {
values: ui._lists.filter(function(list) { values: ui._lists.filter(function(list) {
return Ox.contains(['library', 'static'], list.type); return Ox.contains(['library', 'static'], list.type);
}).map(function(list) { }).map(function(list) {
return {id: list.id, title: list.title}; return {
id: list.id,
title: Ox.encodeHTMLEntities(list.title)
};
}) })
}]), }]),
list: list ? null : { list: list ? null : {
@ -37,7 +40,7 @@ oml.ui.findForm = function(list) {
id: list.id, id: list.id,
query: data.value query: data.value
} : {}, function(result) { } : {}, function(result) {
if (list || ui.updateAdvancedFindResults) { if (list || ui.updateResults) {
updateResults(); updateResults();
} }
}); });
@ -46,7 +49,7 @@ oml.ui.findForm = function(list) {
.appendTo(that); .appendTo(that);
function updateResults() { function updateResults() {
if (list || ui.updateAdvancedFindResults) { if (list || ui.updateResults) {
Ox.Request.clearCache(); Ox.Request.clearCache();
oml.$ui.list.reloadList(); oml.$ui.list.reloadList();
oml.$ui.filters.forEach(function($filter) { oml.$ui.filters.forEach(function($filter) {