mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch 'ent-12630-guardia-15143-problemas-con-cifrado-de-contrasenas-smtp' into 'develop'
Ent 12630 guardia 15143 problemas con cifrado de contrasenas smtp See merge request artica/pandorafms!6753
This commit is contained in:
commit
d3f931703b
@ -6359,8 +6359,8 @@ function send_test_email(
|
|||||||
$params['email_smtpPort']
|
$params['email_smtpPort']
|
||||||
);
|
);
|
||||||
|
|
||||||
$transport->setUsername($params['email_username']);
|
$transport->setUsername(io_safe_output($params['email_username']));
|
||||||
$transport->setPassword($params['email_password']);
|
$transport->setPassword(io_output_password($params['email_password']));
|
||||||
|
|
||||||
if ($params['email_encryption']) {
|
if ($params['email_encryption']) {
|
||||||
$transport->setEncryption($params['email_encryption']);
|
$transport->setEncryption($params['email_encryption']);
|
||||||
|
@ -92,6 +92,8 @@ function config_update_value($token, $value, $noticed=false, $password=false)
|
|||||||
|
|
||||||
if (isset($config[$token]) === false) {
|
if (isset($config[$token]) === false) {
|
||||||
$config[$token] = $value;
|
$config[$token] = $value;
|
||||||
|
$value = io_safe_output($value);
|
||||||
|
|
||||||
if (($password === false)) {
|
if (($password === false)) {
|
||||||
return (bool) config_create_value($token, io_safe_input($value));
|
return (bool) config_create_value($token, io_safe_input($value));
|
||||||
} else {
|
} else {
|
||||||
@ -205,7 +207,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('Chromium config directory');
|
$error_update[] = __('Chromium config directory');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_update_value('loginhash_pwd', io_input_password((string) get_parameter('loginhash_pwd')), true) === false) {
|
if (config_update_value('loginhash_pwd', (string) get_parameter('loginhash_pwd'), true, true) === false) {
|
||||||
$error_update[] = __('Auto login (hash) password');
|
$error_update[] = __('Auto login (hash) password');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,7 +251,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('IP list with API access');
|
$error_update[] = __('IP list with API access');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_update_value('api_password', io_input_password(get_parameter('api_password')), true) === false) {
|
if (config_update_value('api_password', get_parameter('api_password'), true, true) === false) {
|
||||||
$error_update[] = __('API password');
|
$error_update[] = __('API password');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,7 +441,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('Email user');
|
$error_update[] = __('Email user');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_update_value('email_password', io_input_password(get_parameter('email_password')), true) === false) {
|
if (config_update_value('email_password', get_parameter('email_password'), true, true) === false) {
|
||||||
$error_update[] = __('Email password');
|
$error_update[] = __('Email password');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -483,7 +485,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('Replication DB user');
|
$error_update[] = __('Replication DB user');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_update_value('replication_dbpass', io_input_password((string) get_parameter('replication_dbpass')), true) === false) {
|
if (config_update_value('replication_dbpass', (string) get_parameter('replication_dbpass'), true, true) === false) {
|
||||||
$error_update[] = __('Replication DB password');
|
$error_update[] = __('Replication DB password');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -708,7 +710,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('Admin LDAP login');
|
$error_update[] = __('Admin LDAP login');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_update_value('ldap_admin_pass', io_input_password(get_parameter('ldap_admin_pass')), true) === false) {
|
if (config_update_value('ldap_admin_pass', get_parameter('ldap_admin_pass'), true, true) === false) {
|
||||||
$error_update[] = __('Admin LDAP password');
|
$error_update[] = __('Admin LDAP password');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -744,7 +746,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('Admin secondary LDAP login');
|
$error_update[] = __('Admin secondary LDAP login');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_update_value('ldap_admin_pass_secondary', io_input_password(get_parameter('ldap_admin_pass_secondary')), true) === false) {
|
if (config_update_value('ldap_admin_pass_secondary', get_parameter('ldap_admin_pass_secondary'), true, true) === false) {
|
||||||
$error_update[] = __('Admin secondary LDAP password');
|
$error_update[] = __('Admin secondary LDAP password');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -792,7 +794,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('User');
|
$error_update[] = __('User');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_update_value('rpandora_pass', io_input_password(get_parameter('rpandora_pass')), true) === false) {
|
if (config_update_value('rpandora_pass', get_parameter('rpandora_pass'), true, true) === false) {
|
||||||
$error_update[] = __('Password');
|
$error_update[] = __('Password');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1764,7 +1766,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('Database user');
|
$error_update[] = __('Database user');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_update_value('history_db_pass', io_input_password(get_parameter('history_db_pass')), true) === false) {
|
if (config_update_value('history_db_pass', get_parameter('history_db_pass'), true, true) === false) {
|
||||||
$error_update[] = __('Database password');
|
$error_update[] = __('Database password');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1912,7 +1914,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('eHorus user');
|
$error_update[] = __('eHorus user');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_update_value('ehorus_pass', io_input_password((string) get_parameter('ehorus_pass', $config['ehorus_pass'])), true) === false) {
|
if (config_update_value('ehorus_pass', (string) get_parameter('ehorus_pass', $config['ehorus_pass']), true, true) === false) {
|
||||||
$error_update[] = __('eHorus password');
|
$error_update[] = __('eHorus password');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1942,7 +1944,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('Enable Pandora ITSM');
|
$error_update[] = __('Enable Pandora ITSM');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_update_value('ITSM_token', io_input_password((string) get_parameter('ITSM_token', $config['ITSM_token'])), true) === false) {
|
if (config_update_value('ITSM_token', (string) get_parameter('ITSM_token', $config['ITSM_token']), true, true) === false) {
|
||||||
$error_update[] = __('Pandora ITSM token');
|
$error_update[] = __('Pandora ITSM token');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2198,7 +2200,7 @@ function config_process_config()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($config['loginhash_pwd'])) {
|
if (!isset($config['loginhash_pwd'])) {
|
||||||
config_update_value('loginhash_pwd', io_input_password((rand(0, 1000) * rand(0, 1000)).'pandorahash'));
|
config_update_value('loginhash_pwd', (rand(0, 1000) * rand(0, 1000)).'pandorahash', false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($config['trap2agent'])) {
|
if (!isset($config['trap2agent'])) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user