mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Merge branch 'ent-7887-Vulnerabilidad-xss-en-operaciones-masivas-de-módulos' into 'develop'
Ent 7887 vulnerabilidad xss en operaciones masivas de módulos See merge request artica/pandorafms!4365
This commit is contained in:
commit
3be8971360
@ -404,7 +404,8 @@ $(document).ready (function () {
|
|||||||
"get_agent_modules_json" : 1,
|
"get_agent_modules_json" : 1,
|
||||||
"get_id_and_name" : 1,
|
"get_id_and_name" : 1,
|
||||||
"disabled" : 0,
|
"disabled" : 0,
|
||||||
"id_agent" : id_agent
|
"id_agent" : id_agent,
|
||||||
|
"safe_name": 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
var tags_to_search = $('#tags').val();
|
var tags_to_search = $('#tags').val();
|
||||||
@ -434,7 +435,7 @@ $(document).ready (function () {
|
|||||||
jQuery.each (data, function (i, val) {
|
jQuery.each (data, function (i, val) {
|
||||||
option = $("<option></option>")
|
option = $("<option></option>")
|
||||||
.attr ("value", val["id_agente_modulo"])
|
.attr ("value", val["id_agente_modulo"])
|
||||||
.append (val["nombre"]);
|
.append (val["safe_name"]);
|
||||||
$("#target_modules").append (option);
|
$("#target_modules").append (option);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -685,7 +685,8 @@ $(document).ready (function () {
|
|||||||
"get_agent_modules_json" : 1,
|
"get_agent_modules_json" : 1,
|
||||||
"get_distinct_name" : 1,
|
"get_distinct_name" : 1,
|
||||||
"indexed" : 0,
|
"indexed" : 0,
|
||||||
"privilege" : "AW"
|
"privilege" : "AW",
|
||||||
|
"safe_name": 1
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.value != '0')
|
if (this.value != '0')
|
||||||
@ -712,7 +713,7 @@ $(document).ready (function () {
|
|||||||
jQuery.each (data, function (id, value) {
|
jQuery.each (data, function (id, value) {
|
||||||
option = $("<option></option>")
|
option = $("<option></option>")
|
||||||
.attr("value", value["nombre"])
|
.attr("value", value["nombre"])
|
||||||
.html(value["nombre"]);
|
.html(value["safe_name"]);
|
||||||
$("#module_name").append (option);
|
$("#module_name").append (option);
|
||||||
});
|
});
|
||||||
hideSpinner();
|
hideSpinner();
|
||||||
|
@ -1326,7 +1326,8 @@ $(document).ready (function () {
|
|||||||
"page" : "operation/agentes/ver_agente",
|
"page" : "operation/agentes/ver_agente",
|
||||||
"get_agent_modules_json" : 1,
|
"get_agent_modules_json" : 1,
|
||||||
"get_distinct_name" : 1,
|
"get_distinct_name" : 1,
|
||||||
"indexed" : 0
|
"indexed" : 0,
|
||||||
|
"safe_name" : 1
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.value != '0')
|
if (this.value != '0')
|
||||||
@ -1346,12 +1347,12 @@ $(document).ready (function () {
|
|||||||
showSpinner();
|
showSpinner();
|
||||||
$("tr#delete_table-edit1, tr#delete_table-edit0, tr#delete_table-edit2").hide ();
|
$("tr#delete_table-edit1, tr#delete_table-edit0, tr#delete_table-edit2").hide ();
|
||||||
$("#module_name").attr ("disabled", "disabled")
|
$("#module_name").attr ("disabled", "disabled")
|
||||||
$("#module_name option[value!=0]").remove ();
|
$("#module_name option[value!=0]").remove();
|
||||||
jQuery.post ("ajax.php",
|
jQuery.post ("ajax.php",
|
||||||
params,
|
params,
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
jQuery.each (data, function (id, value) {
|
jQuery.each (data, function (id, value) {
|
||||||
option = $("<option></option>").attr ("value", value["nombre"]).html (value["nombre"]);
|
option = $("<option></option>").attr("value", value["nombre"]).html(value["safe_name"]);
|
||||||
$("#module_name").append (option);
|
$("#module_name").append (option);
|
||||||
});
|
});
|
||||||
hideSpinner();
|
hideSpinner();
|
||||||
|
@ -887,6 +887,8 @@ if (is_ajax()) {
|
|||||||
|
|
||||||
$tags = (array) get_parameter('tags', []);
|
$tags = (array) get_parameter('tags', []);
|
||||||
|
|
||||||
|
$safe_name = (bool) get_parameter('safe_name', false);
|
||||||
|
|
||||||
// Filter.
|
// Filter.
|
||||||
$filter = [];
|
$filter = [];
|
||||||
if ($disabled !== -1) {
|
if ($disabled !== -1) {
|
||||||
@ -1024,6 +1026,9 @@ if (is_ajax()) {
|
|||||||
|
|
||||||
foreach ($agent_modules as $key => $module) {
|
foreach ($agent_modules as $key => $module) {
|
||||||
$agent_modules[$key]['nombre'] = io_safe_output($module['nombre']);
|
$agent_modules[$key]['nombre'] = io_safe_output($module['nombre']);
|
||||||
|
if ($safe_name == true) {
|
||||||
|
$agent_modules[$key]['safe_name'] = $module['nombre'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$get_order_json = (bool) get_parameter('get_order_json', false);
|
$get_order_json = (bool) get_parameter('get_order_json', false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user