mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch 'ent-3277-Error_al_guardar_password_en_chequeos_wmi' into 'develop'
Fixed WMI passwords when encrypted See merge request artica/pandorafms!2164 Former-commit-id: 7c2aeffb2849a3539569b2706b4ca613e1c632a8
This commit is contained in:
commit
c0dd81cab5
@ -47,7 +47,7 @@ if ($create_network_from_module) {
|
|||||||
$id_module_group = $data_module['id_module_group'];
|
$id_module_group = $data_module['id_module_group'];
|
||||||
$id_plugin = $data_module['id_plugin'];
|
$id_plugin = $data_module['id_plugin'];
|
||||||
$plugin_user = $data_module['plugin_user'];
|
$plugin_user = $data_module['plugin_user'];
|
||||||
$plugin_pass = $data_module['plugin_pass'];
|
$plugin_pass = io_output_password($data_module['plugin_pass']);
|
||||||
$plugin_parameter = $data_module['plugin_parameter'];
|
$plugin_parameter = $data_module['plugin_parameter'];
|
||||||
$macros = $data_module['macros'];
|
$macros = $data_module['macros'];
|
||||||
$max_timeout = $data_module['max_timeout'];
|
$max_timeout = $data_module['max_timeout'];
|
||||||
@ -104,7 +104,7 @@ if (isset($id)) {
|
|||||||
$id_group = $component['id_group'];
|
$id_group = $component['id_group'];
|
||||||
$id_plugin = $component['id_plugin'];
|
$id_plugin = $component['id_plugin'];
|
||||||
$plugin_user = $component['plugin_user'];
|
$plugin_user = $component['plugin_user'];
|
||||||
$plugin_pass = $component['plugin_pass'];
|
$plugin_pass = io_output_password($component['plugin_pass']);
|
||||||
$plugin_parameter = $component['plugin_parameter'];
|
$plugin_parameter = $component['plugin_parameter'];
|
||||||
$macros = $component['macros'];
|
$macros = $component['macros'];
|
||||||
$max_timeout = $component['max_timeout'];
|
$max_timeout = $component['max_timeout'];
|
||||||
@ -140,10 +140,10 @@ if (isset($id)) {
|
|||||||
// New support for snmp v3
|
// New support for snmp v3
|
||||||
$snmp_version = $component['tcp_send'];
|
$snmp_version = $component['tcp_send'];
|
||||||
$snmp3_auth_user = $component['plugin_user'];
|
$snmp3_auth_user = $component['plugin_user'];
|
||||||
$snmp3_auth_pass = $component['plugin_pass'];
|
$snmp3_auth_pass = io_output_password($component['plugin_pass']);
|
||||||
$snmp3_auth_method = $component['plugin_parameter'];
|
$snmp3_auth_method = $component['plugin_parameter'];
|
||||||
$snmp3_privacy_method = $component['custom_string_1'];
|
$snmp3_privacy_method = $component['custom_string_1'];
|
||||||
$snmp3_privacy_pass = $component['custom_string_2'];
|
$snmp3_privacy_pass = io_output_password($component['custom_string_2']);
|
||||||
$snmp3_security_level = $component['custom_string_3'];
|
$snmp3_security_level = $component['custom_string_3'];
|
||||||
}
|
}
|
||||||
} else if (isset($new_component) && $new_component && !$create_network_from_snmp_browser) {
|
} else if (isset($new_component) && $new_component && !$create_network_from_snmp_browser) {
|
||||||
|
@ -541,7 +541,7 @@ function io_input_password($password)
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
enterprise_include_once('include/functions_crypto.php');
|
enterprise_include_once('include/functions_crypto.php');
|
||||||
$ciphertext = enterprise_hook('openssl_encrypt_decrypt', ['encrypt', $password]);
|
$ciphertext = enterprise_hook('openssl_encrypt_decrypt', ['encrypt', io_safe_output($password)]);
|
||||||
if ($ciphertext === ENTERPRISE_NOT_HOOK) {
|
if ($ciphertext === ENTERPRISE_NOT_HOOK) {
|
||||||
return $password;
|
return $password;
|
||||||
}
|
}
|
||||||
@ -563,7 +563,7 @@ function io_output_password($password)
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
enterprise_include_once('include/functions_crypto.php');
|
enterprise_include_once('include/functions_crypto.php');
|
||||||
$plaintext = enterprise_hook('openssl_encrypt_decrypt', ['decrypt', $password]);
|
$plaintext = enterprise_hook('openssl_encrypt_decrypt', ['decrypt', io_safe_output($password)]);
|
||||||
if ($plaintext === ENTERPRISE_NOT_HOOK) {
|
if ($plaintext === ENTERPRISE_NOT_HOOK) {
|
||||||
return $password;
|
return $password;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user