From 211d157b92d815ca48e519f2e30a47fb3f6f0a8b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 31 Jan 2026 10:45:33 -0700 Subject: [PATCH] Only show the masked password if there is a password defined. --- core/default_settings/default_settings.php | 2 +- core/domain_settings/domain_settings.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/default_settings/default_settings.php b/core/default_settings/default_settings.php index 159e59a2be..1f986c4ef5 100644 --- a/core/default_settings/default_settings.php +++ b/core/default_settings/default_settings.php @@ -518,7 +518,7 @@ echo " [...]\n"; } else if ($subcategory == 'password' || (substr_count($subcategory, '_password') > 0 && $subcategory != 'input_text_font_password') || substr_count($subcategory, '_key') > 0 || substr_count($subcategory, '_secret') > 0) { - echo " ".str_repeat('*', 10); //use the same number of characters to mask the password length + echo " ".str_repeat('*', empty($row['default_setting_value']) ? 0 : 10); //use the same number of characters to mask the password length } else if ($category == 'theme' && $subcategory == 'button_icons' && $name == 'text') { echo " ".$text['option-button_icons_'.$row['default_setting_value']]."\n"; diff --git a/core/domain_settings/domain_settings.php b/core/domain_settings/domain_settings.php index 13ed5d5a85..2f31b7ec82 100644 --- a/core/domain_settings/domain_settings.php +++ b/core/domain_settings/domain_settings.php @@ -314,7 +314,7 @@ echo " ".$text['label-'.escape($row['domain_setting_value'])]; } else if ($subcategory == 'password' || (substr_count($subcategory, '_password') > 0 && $subcategory != 'input_text_font_password') || substr_count($subcategory, '_key') || substr_count($subcategory, '_secret') > 0) { - echo " ".str_repeat('*', strlen(escape($row['domain_setting_value']))); + echo " ".str_repeat('*', empty($row['domain_setting_value']) ? 0 : 10); //use the same number of characters to mask the password length } else if ($category == 'theme' && $subcategory == 'button_icons' && $name == 'text') { echo " ".$text['option-button_icons_'.$row['domain_setting_value']]."\n";