Set autocomplete=new-password for auth forms around the GUI. Implements #9864

This commit is contained in:
jim-p 2019-10-30 13:26:15 -04:00
parent 1ab01fee07
commit 659a8a26d1
15 changed files with 48 additions and 23 deletions

View File

@ -75,6 +75,7 @@ class Form_Section extends Form_Element
}
$input->setType("password");
$input->setAttribute('autocomplete', 'new-password');
$group->add($input);
$confirm = clone $input;
$confirm->setName($confirm->getName() . "_confirm");

View File

@ -100,7 +100,7 @@ $section->addInput(new Form_Input(
'*Username',
'text',
$pconfig['username'],
['placeholder' => 'Username']
['placeholder' => 'Username', 'autocomplete' => 'new-password']
));
$section->addInput(new Form_Input(
@ -108,7 +108,7 @@ $section->addInput(new Form_Input(
'*Password',
'password',
$pconfig['password'],
['placeholder' => 'Password']
['placeholder' => 'Password', 'autocomplete' => 'new-password']
));
$form->add($section);

View File

@ -2715,7 +2715,8 @@ $section->addInput(new Form_Input(
'ppp_username',
'Username',
'text',
$pconfig['ppp_username']
$pconfig['ppp_username'],
['autocomplete' => 'new-password']
));
$section->addPassword(new Form_Input(
@ -2782,7 +2783,8 @@ $section->addInput(new Form_Input(
'pppoe_username',
'*Username',
'text',
$pconfig['pppoe_username']
$pconfig['pppoe_username'],
['autocomplete' => 'new-password']
));
$section->addPassword(new Form_Input(
@ -2907,7 +2909,8 @@ $section->addInput(new Form_Input(
'pptp_username',
'*Username',
'text',
$pconfig['pptp_username']
$pconfig['pptp_username'],
['autocomplete' => 'new-password']
));
$section->addPassword(new Form_Input(

View File

@ -565,7 +565,8 @@ $section->addInput(new Form_Input(
'username',
$username_label,
'text',
$pconfig['username']
$pconfig['username'],
['autocomplete' => 'new-password']
));
$section->addPassword(new Form_Input(

View File

@ -540,7 +540,8 @@ $section->addInput(new Form_Input(
'vouchersyncusername',
'Voucher sync username',
'text',
$pconfig['vouchersyncusername']
$pconfig['vouchersyncusername'],
['autocomplete' => 'new-password']
))->setHelp('This is the username of the master voucher nodes webConfigurator.');
$section->addPassword(new Form_Input(

View File

@ -139,7 +139,8 @@ $section->addInput(new Form_Input(
'username',
'User name',
'text',
$pconfig['username']
$pconfig['username'],
['autocomplete' => 'new-password']
));
$section->addPassword(new Form_Input(

View File

@ -366,7 +366,8 @@ $section->addInput(new Form_Input(
'username',
'Username',
'text',
$pconfig['username']
$pconfig['username'],
['autocomplete' => 'new-password']
))->setHelp('Username is required for all types except Namecheap, FreeDNS, FreeDNS-v6, DigitalOcean, Linode and Custom Entries.%1$s' .
'Azure: Enter your Azure AD application ID%1$s' .
'DNS Made Easy: Dynamic DNS ID%1$s' .

View File

@ -495,14 +495,16 @@ if ($usernames != "") {
'username' . $counter,
null,
'text',
$user
$user,
['autocomplete' => 'new-password']
))->setHelp($numrows == $counter ? 'Username':null);
$group->add(new Form_Input(
'password' . $counter,
null,
'password',
$passwd
$passwd,
['autocomplete' => 'new-password']
))->setHelp($numrows == $counter ? 'Password':null);
$group->add(new Form_IpAddress(

View File

@ -376,7 +376,8 @@ $section->addInput(new Form_Input(
'proxyuser',
'Proxy Username',
'text',
$pconfig['proxyuser']
$pconfig['proxyuser'],
['autocomplete' => 'new-password']
))->setHelp('Username for authentication to proxy server. Optional, '.
'leave blank to not use authentication.');

View File

@ -279,14 +279,15 @@ $section->addInput(new Form_Input(
'Notification E-Mail auth username (optional)',
'text',
$pconfig['smtpusername'],
['autocomplete' => 'off']
['autocomplete' => 'new-password']
))->setHelp('Enter the e-mail address username for SMTP authentication.');
$section->addPassword(new Form_Input(
'smtppassword',
'Notification E-Mail auth password',
'password',
$pconfig['smtppassword']
$pconfig['smtppassword'],
['autocomplete' => 'new-password']
))->setHelp('Enter the e-mail account password for SMTP authentication.');
$section->addInput(new Form_Select(

View File

@ -163,7 +163,8 @@ $section->addInput(new Form_Input(
'username',
'Remote System Username',
'text',
$pconfig['username']
$pconfig['username'],
['autocomplete' => 'new-password']
))->setHelp('Enter the webConfigurator username of the system entered above for synchronizing the configuration.%1$s' .
'Do not use the Synchronize Config to IP and username option on backup cluster members!', '<br />');

View File

@ -784,7 +784,8 @@ if ($act == "new" || $act == "edit" || $input_errors):
'usernamefld',
'*Username',
'text',
$pconfig['usernamefld']
$pconfig['usernamefld'],
['autocomplete' => 'new-password']
));
if ($ro) {
@ -808,12 +809,16 @@ if ($act == "new" || $act == "edit" || $input_errors):
$group->add(new Form_Input(
'passwordfld1',
'Password',
'password'
'password',
null,
['autocomplete' => 'new-password']
));
$group->add(new Form_Input(
'passwordfld2',
'Confirm Password',
'password'
'password',
null,
['autocomplete' => 'new-password']
));
$section->add($group);

View File

@ -110,13 +110,17 @@ $section = new Form_Section('Update Password');
$section->addInput(new Form_Input(
'passwordfld1',
'*Password',
'password'
'password',
null,
['autocomplete' => 'new-password']
));
$section->addInput(new Form_Input(
'passwordfld2',
'*Confirmation',
'password'
'password',
null,
['autocomplete' => 'new-password']
))->setHelp('Select a new password');
$form->add($section);

View File

@ -151,7 +151,8 @@ $section->addInput(new Form_Input(
'usernamefld',
'*Username',
'text',
$pconfig['usernamefld']
$pconfig['usernamefld'],
['autocomplete' => 'new-password']
));
$pwd = new Form_Input(

View File

@ -626,7 +626,8 @@ if ($act=="new" || $act=="edit"):
'proxy_user',
'Username',
'text',
$pconfig['proxy_user']
$pconfig['proxy_user'],
['autocomplete' => 'new-password']
));
$section->addPassword(new Form_Input(
@ -651,7 +652,8 @@ if ($act=="new" || $act=="edit"):
'auth_user',
'Username',
'text',
$pconfig['auth_user']
$pconfig['auth_user'],
['autocomplete' => 'new-password']
))->setHelp('Leave empty when no user name is needed');
$section->addPassword(new Form_Input(