Skip to content

Commit 2e84f76

Browse files
authored
Added autocomplete attribute to known password fields (#2700)
1 parent f733f1e commit 2e84f76

File tree

28 files changed

+66
-44
lines changed

28 files changed

+66
-44
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,6 +1351,15 @@
13511351
"contributions": [
13521352
"code"
13531353
]
1354+
},
1355+
{
1356+
"login": "rfeese",
1357+
"name": "Roger Feese",
1358+
"avatar_url": "https://avatars.githubusercontent.com/u/7074181?v=4",
1359+
"profile": "https://github.com/rfeese",
1360+
"contributions": [
1361+
"code"
1362+
]
13541363
}
13551364
],
13561365
"contributorsPerLine": 7

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
450450
<tr>
451451
<td align="center"><a href="https://github.com/eneiasramos"><img src="https://avatars.githubusercontent.com/u/2862728?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Enéias Ramos de Melo</b></sub></a></td>
452452
<td align="center"><a href="https://github.com/discountscott"><img src="https://avatars.githubusercontent.com/u/5454596?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Scott Moore</b></sub></a></td>
453+
<td align="center"><a href="https://github.com/rfeese"><img src="https://avatars.githubusercontent.com/u/7074181?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Roger Feese</b></sub></a></td>
453454
</tr>
454455
</table>
455456

app/design/frontend/base/default/template/checkout/onepage/billing.phtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@
159159
name="billing[customer_password]"
160160
id="billing:customer_password"
161161
title="<?php echo Mage::helper('core')->quoteEscape($this->__('Password')) ?>"
162-
class="input-text required-entry validate-password min-pass-length-<?php echo $minPasswordLength ?>" />
162+
class="input-text required-entry validate-password min-pass-length-<?php echo $minPasswordLength ?>"
163+
autocomplete="off" />
163164
<p class="form-instructions">
164165
<?php echo Mage::helper('customer')->__('The minimum password length is %s', $minPasswordLength) ?>
165166
</p>
@@ -168,7 +169,7 @@
168169
<div class="field">
169170
<label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
170171
<div class="input-box">
171-
<input type="password" name="billing[confirm_password]" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Confirm Password')) ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
172+
<input type="password" name="billing[confirm_password]" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Confirm Password')) ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" autocomplete="off" />
172173
</div>
173174
</div>
174175
</li>

app/design/frontend/base/default/template/checkout/onepage/login.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<li>
7575
<label for="login-password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
7676
<div class="input-box">
77-
<input type="password" class="input-text required-entry" id="login-password" name="login[password]" />
77+
<input type="password" class="input-text required-entry" id="login-password" name="login[password]" autocomplete="off" />
7878
</div>
7979
</li>
8080
<?php echo $this->getChildHtml('form.additional.info'); ?>

app/design/frontend/base/default/template/customer/form/changepassword.phtml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<li>
3030
<label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label>
3131
<div class="input-box">
32-
<input type="password" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Current Password')) ?>" class="input-text required-entry" name="current_password" id="current_password" />
32+
<input type="password" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Current Password')) ?>" class="input-text required-entry" name="current_password" id="current_password" autocomplete="off" />
3333
</div>
3434
</li>
3535
<li class="fields">
@@ -41,7 +41,8 @@
4141
title="<?php echo Mage::helper('core')->quoteEscape($this->__('New Password')) ?>"
4242
class="input-text required-entry validate-password min-pass-length-<?php echo $minPasswordLength ?>"
4343
name="password"
44-
id="password" />
44+
id="password"
45+
autocomplete="new-password" />
4546
<p class="form-instructions">
4647
<?php echo Mage::helper('customer')->__('The minimum password length is %s', $minPasswordLength) ?>
4748
</p>
@@ -50,7 +51,7 @@
5051
<div class="field">
5152
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label>
5253
<div class="input-box">
53-
<input type="password" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Confirm New Password')) ?>" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" />
54+
<input type="password" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Confirm New Password')) ?>" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" autocomplete="new-password" />
5455
</div>
5556
</div>
5657
</li>

app/design/frontend/base/default/template/customer/form/edit.phtml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<div class="input-box">
5555
<!-- This is a dummy hidden field to trick firefox from auto filling the password -->
5656
<input type="text" class="input-text no-display" name="dummy" id="dummy" />
57-
<input type="password" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Current Password')) ?>" class="input-text required-entry" name="current_password" id="current_password" />
57+
<input type="password" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Current Password')) ?>" class="input-text required-entry" name="current_password" id="current_password" autocomplete="off" />
5858
</div>
5959
</li>
6060
<li class="control">
@@ -74,7 +74,8 @@
7474
title="<?php echo Mage::helper('core')->quoteEscape($this->__('New Password')) ?>"
7575
class="input-text required-entry validate-password min-pass-length-<?php echo $minPasswordLength ?>"
7676
name="password"
77-
id="password" />
77+
id="password"
78+
autocomplete="new-password" />
7879
<p class="form-instructions">
7980
<?php echo $this->__('The minimum password length is %s', $minPasswordLength) ?>
8081
</p>
@@ -83,7 +84,7 @@
8384
<div class="field">
8485
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label>
8586
<div class="input-box">
86-
<input type="password" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Confirm New Password')) ?>" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" />
87+
<input type="password" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Confirm New Password')) ?>" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" autocomplete="new-password" />
8788
</div>
8889
</div>
8990
</li>

app/design/frontend/base/default/template/customer/form/login.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<li>
5757
<label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
5858
<div class="input-box">
59-
<input type="password" name="login[password]" class="input-text required-entry validate-password min-pass-length-5" id="pass" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Password')) ?>" />
59+
<input type="password" name="login[password]" class="input-text required-entry validate-password min-pass-length-5" id="pass" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Password')) ?>" autocomplete="off" />
6060
</div>
6161
</li>
6262
<?php echo $this->getChildHtml('form.additional.info'); ?>

app/design/frontend/base/default/template/customer/form/mini.login.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<?php echo $this->getBlockHtml('formkey') ?>
3434
<div class="block-content">
3535
<label for="mini-login"><?php echo $this->__('Email:') ?></label><input type="text" name="login[username]" id="mini-login" class="input-text" />
36-
<label for="mini-password"><?php echo $this->__('Password:') ?></label><input type="password" name="login[password]" id="mini-password" class="input-text" />
36+
<label for="mini-password"><?php echo $this->__('Password:') ?></label><input type="password" name="login[password]" id="mini-password" class="input-text" autocomplete="off" />
3737
<div class="actions">
3838
<button type="submit" class="button"><span><span><?php echo $this->__('Login') ?></span></span></button>
3939
</div>
4040
</div>
4141
</form>
4242
</div>
43-
<?php endif ?>
43+
<?php endif ?>

app/design/frontend/base/default/template/customer/form/register.phtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@
161161
name="password"
162162
id="password"
163163
title="<?php echo Mage::helper('core')->quoteEscape($this->__('Password')) ?>"
164-
class="input-text required-entry validate-password min-pass-length-<?php echo $minPasswordLength ?>" />
164+
class="input-text required-entry validate-password min-pass-length-<?php echo $minPasswordLength ?>"
165+
autocomplete="off" />
165166
<p class="form-instructions">
166167
<?php echo $this->__('The minimum password length is %s', $minPasswordLength) ?>
167168
</p>
@@ -170,7 +171,7 @@
170171
<div class="field">
171172
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
172173
<div class="input-box">
173-
<input type="password" name="confirmation" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Confirm Password')) ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
174+
<input type="password" name="confirmation" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Confirm Password')) ?>" id="confirmation" class="input-text required-entry validate-cpassword" autocomplete="off" />
174175
</div>
175176
</div>
176177
</li>

app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
<input type="password"
3434
class="input-text required-entry validate-password min-pass-length-<?php echo $minPasswordLength; ?>"
3535
name="password"
36-
id="password" />
36+
id="password"
37+
autocomplete="off" />
3738
<p class="form-instructions">
3839
<?php echo Mage::helper('customer')->__('The minimum password length is %s', $minPasswordLength); ?>
3940
</p>
@@ -42,7 +43,7 @@
4243
<div class="field">
4344
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password'); ?></label>
4445
<div class="input-box">
45-
<input type="password" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" />
46+
<input type="password" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" autocomplete="off "/>
4647
</div>
4748
</div>
4849
</li>

0 commit comments

Comments
 (0)