summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-28 18:14:30 +0200
committerSimon Rettberg2015-09-28 18:14:30 +0200
commitcd0a0a3ca1f7bbda77762dc79ea60e88cc761e79 (patch)
treed978343019cc66f58dc4fe0c25533df68958a676
parentImproved several translations, added help texts, fixed module grouping, layout (diff)
downloadslx-admin-cd0a0a3ca1f7bbda77762dc79ea60e88cc761e79.tar.gz
slx-admin-cd0a0a3ca1f7bbda77762dc79ea60e88cc761e79.tar.xz
slx-admin-cd0a0a3ca1f7bbda77762dc79ea60e88cc761e79.zip
[baseconfig] Mask root password if applicable
-rw-r--r--lang/en/templates/webinterface/passwords.json2
-rw-r--r--modules/baseconfig.inc.php8
2 files changed, 8 insertions, 2 deletions
diff --git a/lang/en/templates/webinterface/passwords.json b/lang/en/templates/webinterface/passwords.json
index c21ccc48..2db88ae2 100644
--- a/lang/en/templates/webinterface/passwords.json
+++ b/lang/en/templates/webinterface/passwords.json
@@ -1,5 +1,5 @@
{
- "lang_description": "Set whether password fields should be masked or not.",
+ "lang_description": "Set whether password fields should be masked or not. The password field of the login page to the web interface is always masked.",
"lang_hidePasswords": "Mask passwords",
"lang_passwordFields": "Password fields",
"lang_save": "Save",
diff --git a/modules/baseconfig.inc.php b/modules/baseconfig.inc.php
index fb18df6b..152e3372 100644
--- a/modules/baseconfig.inc.php
+++ b/modules/baseconfig.inc.php
@@ -114,8 +114,14 @@ class Page_BaseConfig extends Page
}
return $ret . '</select>';
}
+ // Password field guessing
+ if (stripos($validator, 'password') !== false) {
+ $type = Property::getPasswordFieldType();
+ } else {
+ $type = 'text';
+ }
// Fallback: single line input
- return '<input type="text" name="setting[' . $setting . ']" class="form-control" size="30" value="' . $current . '">';
+ return '<input type="' . $type . '" name="setting[' . $setting . ']" class="form-control" size="30" value="' . $current . '">';
}
}