Skip to content

Commit

Permalink
Combat Chrome's insanely aggressive user/pass autofilling ಠ_ಠ
Browse files Browse the repository at this point in the history
Chrome now ignores `autocomplete="off"` in <input>, so this hack uses
a hidden, non-named, non-empty input, right before the password field.

see #24364. props azaozz, nacin, bobbingwide, aaroncampbell.

git-svn-id: http://core.svn.wordpress.org/trunk@24552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
markjaquith committed Jul 3, 2013
1 parent 5b8aad1 commit bd94dc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions wp-admin/user-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ function use_ssl_preference($user) {
<tr id="password">
<th><label for="pass1"><?php _e('New Password'); ?></label></th>
<td>
<input class="hidden" value=" " /><!-- #24364 workaround -->
<input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" /> <span class="description"><?php _e("If you would like to change the password type a new one. Otherwise leave this blank."); ?></span>
</td>
</tr>
Expand Down
1 change: 1 addition & 0 deletions wp-admin/user-new.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ function admin_created_user_subject( $text ) {
<tr class="form-field form-required">
<th scope="row"><label for="pass1"><?php _e('Password'); ?> <span class="description"><?php /* translators: password input field */_e('(required)'); ?></span></label></th>
<td>
<input class="hidden" value=" " /><!-- #24364 workaround -->
<input name="pass1" type="password" id="pass1" autocomplete="off" />
</td>
</tr>
Expand Down

0 comments on commit bd94dc6

Please sign in to comment.