diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4c8dc204d6..fa6b01baf1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-07-02 Sergio Martin + + * include/functions_api.php: Changed the way of encode + data configuration in create/update config form API + 2013-07-02 Miguel de Dios * include/functions_networkmap.php, diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 32bc69ed81..8ae99cbd6e 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -3359,8 +3359,8 @@ function api_set_update_plugin_module_policy($id, $thrash1, $other, $thrash3) { * @return string 0 when success, -1 when error, -2 if already exist */ function api_set_add_module_in_conf($id_agent, $module_name, $configuration_data, $thrash3) { - $new_configuration_data = base64_decode($configuration_data['data']); - + $new_configuration_data = io_safe_output(urldecode($configuration_data['data'])); + // Check if exist a current module with the same name in the conf file $old_configuration_data = config_agents_get_module_from_conf($id_agent, io_safe_output($module_name)); @@ -3448,7 +3448,7 @@ function api_set_delete_module_in_conf($id_agent, $module_name, $thrash2, $thras * @return string 0 when success, 1 when no changes, -1 when error, -2 if doesnt exist */ function api_set_update_module_in_conf($id_agent, $module_name, $configuration_data_serialized, $thrash3) { - $new_configuration_data = base64_decode($configuration_data_serialized['data']); + $new_configuration_data = io_safe_output(urldecode($configuration_data_serialized['data'])); // Get current configuration $old_configuration_data = config_agents_get_module_from_conf($id_agent, io_safe_output($module_name));