diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php index 0577f8e838..246d5b0290 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php @@ -35,12 +35,12 @@ $use_agent = get_parameter ('use_agent'); $snmp_community = (string) get_parameter ('snmp_community', 'public'); $snmp_version = get_parameter('snmp_version', '1'); $server_to_exec = get_parameter('server_to_exec', 0); -$snmp3_auth_user = get_parameter('snmp3_auth_user'); +$snmp3_auth_user = io_safe_output(get_parameter('snmp3_auth_user')); $snmp3_security_level = get_parameter('snmp3_security_level'); $snmp3_auth_method = get_parameter('snmp3_auth_method'); -$snmp3_auth_pass = get_parameter('snmp3_auth_pass'); +$snmp3_auth_pass = io_safe_output(get_parameter('snmp3_auth_pass')); $snmp3_privacy_method = get_parameter('snmp3_privacy_method'); -$snmp3_privacy_pass = get_parameter('snmp3_privacy_pass'); +$snmp3_privacy_pass = io_safe_output(get_parameter('snmp3_privacy_pass')); $tcp_port = (string) get_parameter ('tcp_port'); //See if id_agente is set (either POST or GET, otherwise -1 diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php index f422f1ea40..fbd1e842ed 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php @@ -32,12 +32,12 @@ $use_agent = get_parameter ('use_agent'); $snmp_community = (string) get_parameter ('snmp_community', 'public'); $server_to_exec = get_parameter('server_to_exec', 0); $snmp_version = get_parameter('snmp_version', '1'); -$snmp3_auth_user = get_parameter('snmp3_auth_user'); +$snmp3_auth_user = io_safe_output(get_parameter('snmp3_auth_user')); $snmp3_security_level = get_parameter('snmp3_security_level'); $snmp3_auth_method = get_parameter('snmp3_auth_method'); -$snmp3_auth_pass = get_parameter('snmp3_auth_pass'); +$snmp3_auth_pass = io_safe_output(get_parameter('snmp3_auth_pass')); $snmp3_privacy_method = get_parameter('snmp3_privacy_method'); -$snmp3_privacy_pass = get_parameter('snmp3_privacy_pass'); +$snmp3_privacy_pass = io_safe_output(get_parameter('snmp3_privacy_pass')); $tcp_port = (string) get_parameter ('tcp_port'); //See if id_agente is set (either POST or GET, otherwise -1 diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index e2739aee29..921296545d 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -111,12 +111,12 @@ if (is_ajax ()) { else $snmp_community = (string) get_parameter ('snmp_community'); $snmp_version = get_parameter('snmp_version'); - $snmp3_auth_user = get_parameter('snmp3_auth_user'); + $snmp3_auth_user = io_safe_output(get_parameter('snmp3_auth_user')); $snmp3_security_level = get_parameter('snmp3_security_level'); $snmp3_auth_method = get_parameter('snmp3_auth_method'); - $snmp3_auth_pass = get_parameter('snmp3_auth_pass'); + $snmp3_auth_pass = io_safe_output(get_parameter('snmp3_auth_pass')); $snmp3_privacy_method = get_parameter('snmp3_privacy_method'); - $snmp3_privacy_pass = get_parameter('snmp3_privacy_pass'); + $snmp3_privacy_pass = io_safe_output(get_parameter('snmp3_privacy_pass')); $snmp_port = get_parameter('snmp_port'); $snmpwalk = get_snmpwalk($ip_target, $snmp_version, $snmp_community, diff --git a/pandora_console/godmode/agentes/module_manager_editor_network.php b/pandora_console/godmode/agentes/module_manager_editor_network.php index 24d0105d42..b640243cfe 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_network.php +++ b/pandora_console/godmode/agentes/module_manager_editor_network.php @@ -398,12 +398,12 @@ function snmpBrowserWindow () { $('#text-target_ip').val($('#text-ip_target').val()); $('#text-community').val($('#text-snmp_community').val()); $('#snmp_browser_version').val($('#snmp_version').val()); - $('#snmp3_browser_auth_user').val($('#snmp3_auth_user').val()); + $('#text-snmp3_browser_auth_user').val($('#text-snmp3_auth_user').val()); $('#snmp3_browser_security_level').val($('#snmp3_security_level').val()); $('#snmp3_browser_auth_method').val($('#snmp3_auth_method').val()); - $('#snmp3_browser_auth_pass').val($('#snmp3_auth_pass').val()); + $('#password-snmp3_browser_auth_pass').val($('#password-snmp3_auth_pass').val()); $('#snmp3_browser_privacy_method').val($('#snmp3_privacy_method').val()); - $('#snmp3_browser_privacy_pass').val($('#snmp3_privacy_pass').val()); + $('#password-snmp3_browser_privacy_pass').val($('#password-snmp3_privacy_pass').val()); $("#snmp_browser_container").show().dialog ({ title: '', diff --git a/pandora_console/godmode/modules/manage_network_components.php b/pandora_console/godmode/modules/manage_network_components.php index ec448f0cf4..e2f3cdab26 100644 --- a/pandora_console/godmode/modules/manage_network_components.php +++ b/pandora_console/godmode/modules/manage_network_components.php @@ -129,7 +129,7 @@ else { } $snmp_version = (string) get_parameter('snmp_version'); -$snmp3_auth_user = (string) get_parameter('snmp3_auth_user'); +$snmp3_auth_user = (string) io_safe_output(get_parameter('snmp3_auth_user')); $snmp3_auth_pass = io_input_password((string) get_parameter('snmp3_auth_pass')); $snmp3_auth_method = (string) get_parameter('snmp3_auth_method'); $snmp3_privacy_method = (string) get_parameter('snmp3_privacy_method'); diff --git a/pandora_console/include/ajax/snmp_browser.ajax.php b/pandora_console/include/ajax/snmp_browser.ajax.php index 3376245093..63053e1919 100644 --- a/pandora_console/include/ajax/snmp_browser.ajax.php +++ b/pandora_console/include/ajax/snmp_browser.ajax.php @@ -25,12 +25,12 @@ if(is_ajax()){ $target_ip = (string) get_parameter ("target_ip", ''); $community = (string) get_parameter ("community", ''); $snmp_version = (string) get_parameter ("snmp_browser_version", ''); - $snmp3_auth_user = get_parameter('snmp3_browser_auth_user'); + $snmp3_auth_user = io_safe_output(get_parameter('snmp3_browser_auth_user')); $snmp3_security_level = get_parameter('snmp3_browser_security_level'); $snmp3_auth_method = get_parameter('snmp3_browser_auth_method'); - $snmp3_auth_pass = get_parameter('snmp3_browser_auth_pass'); + $snmp3_auth_pass = io_safe_output(get_parameter('snmp3_browser_auth_pass')); $snmp3_privacy_method = get_parameter('snmp3_browser_privacy_method'); - $snmp3_privacy_pass = get_parameter('snmp3_browser_privacy_pass'); + $snmp3_privacy_pass = io_safe_output(get_parameter('snmp3_browser_privacy_pass')); $targets_oids = get_parameter ("oids", ""); $targets_oids = explode(",", $targets_oids); diff --git a/pandora_console/include/javascript/pandora_snmp_browser.js b/pandora_console/include/javascript/pandora_snmp_browser.js index 12f2f62296..fd202ad4dc 100644 --- a/pandora_console/include/javascript/pandora_snmp_browser.js +++ b/pandora_console/include/javascript/pandora_snmp_browser.js @@ -29,25 +29,25 @@ function snmpBrowse () { var ajax_url = $('#hidden-ajax_url').val(); // Prepare the AJAX call - var params = [ - "target_ip=" + target_ip, - "community=" + community, - "starting_oid=" + starting_oid, - "snmp_browser_version=" + snmp_version, - "server_to_exec=" + server_to_exec, - "snmp3_browser_auth_user=" + snmp3_auth_user, - "snmp3_browser_security_level=" + snmp3_security_level, - "snmp3_browser_auth_method=" + snmp3_auth_method, - "snmp3_browser_auth_pass=" + snmp3_auth_pass, - "snmp3_browser_privacy_method=" + snmp3_privacy_method, - "snmp3_browser_privacy_pass=" + snmp3_privacy_pass, - "action=" + "snmptree", - "page=operation/snmpconsole/snmp_browser" - ]; + + var params = {}; + params["target_ip"] = target_ip; + params["community"] = community; + params["starting_oid"] = starting_oid; + params["snmp_browser_version"] = snmp_version; + params["server_to_exec"] = server_to_exec; + params["snmp3_browser_auth_user"] = snmp3_auth_user; + params["snmp3_browser_security_level"] = snmp3_security_level; + params["snmp3_browser_auth_method"] = snmp3_auth_method; + params["snmp3_browser_auth_pass"] = snmp3_auth_pass; + params["snmp3_browser_privacy_method"] = snmp3_privacy_method; + params["snmp3_browser_privacy_pass"] = snmp3_privacy_pass; + params["action"] = "snmptree"; + params["page"] = "operation/snmpconsole/snmp_browser"; // Browse! jQuery.ajax ({ - data: params.join ("&"), + data: params, type: 'POST', url: action= ajax_url, async: true, diff --git a/pandora_console/operation/snmpconsole/snmp_browser.php b/pandora_console/operation/snmpconsole/snmp_browser.php index 0a8204208e..3f005cf063 100644 --- a/pandora_console/operation/snmpconsole/snmp_browser.php +++ b/pandora_console/operation/snmpconsole/snmp_browser.php @@ -28,12 +28,12 @@ if (is_ajax()) { $community = (string) get_parameter ("community", ''); $snmp_version = (string) get_parameter ("snmp_browser_version", ''); $server_to_exec = (int) get_parameter ("server_to_exec", 0); - $snmp3_auth_user = get_parameter('snmp3_browser_auth_user'); + $snmp3_auth_user = io_safe_output(get_parameter('snmp3_browser_auth_user')); $snmp3_security_level = get_parameter('snmp3_browser_security_level'); $snmp3_auth_method = get_parameter('snmp3_browser_auth_method'); - $snmp3_auth_pass = get_parameter('snmp3_browser_auth_pass'); + $snmp3_auth_pass = io_safe_output(get_parameter('snmp3_browser_auth_pass')); $snmp3_privacy_method = get_parameter('snmp3_browser_privacy_method'); - $snmp3_privacy_pass = get_parameter('snmp3_browser_privacy_pass'); + $snmp3_privacy_pass = io_safe_output(get_parameter('snmp3_browser_privacy_pass')); // SNMP browser if ($action == "snmptree") {