Prevent browsers from filling in username/password on unrelated inputs
authorAlexander Ebert <ebert@woltlab.com>
Wed, 27 May 2020 14:09:01 +0000 (16:09 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 27 May 2020 14:09:01 +0000 (16:09 +0200)
wcfsetup/install/files/acp/templates/textOptionType.tpl
wcfsetup/install/files/acp/templates/userAdd.tpl

index eaee4e5363d849ee1b5f5c94e98d25f208884757..ac502b003196919e3403284ada7f44ffbb687669 100644 (file)
@@ -1 +1 @@
-<input type="{@$inputType}" id="{$option->optionName}" name="values[{$option->optionName}]" value="{$value}"{if $inputClass} class="{@$inputClass}"{/if}{if $inputType == 'password' || $option->disableAutocomplete} autocomplete="off"{/if}>
+<input type="{@$inputType}" id="{$option->optionName}" name="values[{$option->optionName}]" value="{$value}"{if $inputClass} class="{@$inputClass}"{/if}{if $inputType == 'password'} autocomplete="new-password"{elseif $option->disableAutocomplete} autocomplete="off"{/if}>
index 0abc360dfcbea03cc49099a803e3eb9bfec534af..3ca491e1e1a9b8523c355c2aeffff3841f7d3d84 100644 (file)
                                                <dl{if $errorType.password|isset} class="formError"{/if}>
                                                        <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt>
                                                        <dd>
-                                                               <input type="password" id="password" name="password" value="{$password}" class="medium" autocomplete="off">
+                                                               <input type="password" id="password" name="password" value="{$password}" class="medium" autocomplete="new-password">
                                                                {if $errorType.password|isset}
                                                                        <small class="innerError">
                                                                                {if $errorType.password == 'empty'}
                                                <dl{if $errorType.confirmPassword|isset} class="formError"{/if}>
                                                        <dt><label for="confirmPassword">{lang}wcf.user.confirmPassword{/lang}</label></dt>
                                                        <dd>
-                                                               <input type="password" id="confirmPassword" name="confirmPassword" value="{$confirmPassword}" class="medium" autocomplete="off">
+                                                               <input type="password" id="confirmPassword" name="confirmPassword" value="{$confirmPassword}" class="medium" autocomplete="new-password">
                                                                {if $errorType.confirmPassword|isset}
                                                                        <small class="innerError">
                                                                                {lang}wcf.user.confirmPassword.error.{@$errorType.confirmPassword}{/lang}