diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index 1f34c23c8dc..57d288dfb4c 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -365,7 +365,12 @@ foreach ($configfileparameters as $key => $value)
print '
'.$newkey.' | ';
// Value
print "";
- if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i', '*', ${$newkey});
+ if ($newkey == 'dolibarr_main_db_pass') {
+ if (empty($dolibarr_main_prod)) {
+ print '';
+ }
+ print '**********';
+ }
elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/', ${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
elseif ($newkey == 'dolibarr_main_document_root_alt') {
$tmparray = explode(',', ${$newkey});
@@ -458,7 +463,16 @@ if ($resql)
print ' | ';
print '| '.$obj->name.' | '."\n";
- print ''.dol_escape_htmltag($obj->value).' | '."\n";
+ print '';
+ if (preg_match('/(_pass|password|_pw|_key|securekey|serverkey|secret\d?|p12key|exportkey|_PW_[a-z]+|token)$/i', $obj->name)) {
+ if (empty($dolibarr_main_prod)) {
+ print '';
+ }
+ print '**********';
+ } else {
+ print dol_escape_htmltag($obj->value);
+ }
+ print ' | '."\n";
if (empty($conf->multicompany->enabled) || !$user->entity) print ''.$obj->entity.' | '."\n"; // If superadmin or multicompany disabled
print "
\n";