Security, Use the same number of characters for the masked password (#7198)

* security set display asterisks to constant number
Harder to guess when length is also hidden
This commit is contained in:
frytimo 2024-12-12 13:03:21 -04:00 committed by GitHub
parent 8feb150dba
commit 075cc4824a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -530,7 +530,7 @@
echo " [...]\n"; echo " [...]\n";
} }
else if ($subcategory == 'password' || substr_count($subcategory, '_password') > 0 || substr_count($subcategory, '_key') > 0 || substr_count($subcategory, '_secret') > 0) { else if ($subcategory == 'password' || substr_count($subcategory, '_password') > 0 || substr_count($subcategory, '_key') > 0 || substr_count($subcategory, '_secret') > 0) {
echo " ".str_repeat('*', strlen($row['default_setting_value'] ?? '')); echo " ".str_repeat('*', 10); //use the same number of characters to mask the password length
} }
else if ($category == 'theme' && $subcategory == 'button_icons' && $name == 'text') { else if ($category == 'theme' && $subcategory == 'button_icons' && $name == 'text') {
echo " ".$text['option-button_icons_'.$row['default_setting_value']]."\n"; echo " ".$text['option-button_icons_'.$row['default_setting_value']]."\n";