From cd0a0a3ca1f7bbda77762dc79ea60e88cc761e79 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 28 Sep 2015 18:14:30 +0200 Subject: [baseconfig] Mask root password if applicable --- lang/en/templates/webinterface/passwords.json | 2 +- modules/baseconfig.inc.php | 8 +++++++- 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 . ''; } + // Password field guessing + if (stripos($validator, 'password') !== false) { + $type = Property::getPasswordFieldType(); + } else { + $type = 'text'; + } // Fallback: single line input - return ''; + return ''; } } -- cgit v1.2.3-55-g7522