Merge branch 'ent-10032-contrasena-de-replicacion-de-bbdd-no-se-encripta-en-bbdd' into 'develop'

Ent 10032 contrasena de replicacion de bbdd no se encripta en bbdd

See merge request artica/pandorafms!5418
This commit is contained in:
Daniel Rodriguez 2023-01-31 16:25:59 +00:00
commit a96f3afdc2
1 changed files with 7 additions and 3 deletions

View File

@ -67,7 +67,7 @@ function config_create_value($token, $value)
*
* @return boolean True if success. False on failure.
*/
function config_update_value($token, $value, $noticed=false)
function config_update_value($token, $value, $noticed=false, $password=false)
{
global $config;
// Include functions_io to can call __() function.
@ -91,7 +91,11 @@ function config_update_value($token, $value, $noticed=false)
if (isset($config[$token]) === false) {
$config[$token] = $value;
return (bool) config_create_value($token, io_safe_input($value));
if (($password === false)) {
return (bool) config_create_value($token, io_safe_input($value));
} else {
return (bool) config_create_value($token, io_input_password($value));
}
}
// If it has not changed.
@ -104,7 +108,7 @@ function config_update_value($token, $value, $noticed=false)
$result = db_process_sql_update(
'tconfig',
['value' => io_safe_input($value)],
['value' => ($password === false) ? io_safe_input($value) : io_input_password($value)],
['token' => $token]
);