Only show the masked password if there is a password defined.

This commit is contained in:
FusionPBX
2026-01-31 10:45:33 -07:00
committed by GitHub
parent fbfc80d629
commit 211d157b92
2 changed files with 2 additions and 2 deletions

View File

@@ -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";

View File

@@ -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";