Bugzilla – Attachment 152067 Details for
Bug 33343
Password fields should have auto-completion off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33343: Catch more cases and correctly use new-password hint
Bug-33343-Catch-more-cases-and-correctly-use-new-p.patch (text/plain), 10.53 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-06-06 19:17:27 UTC
(
hide
)
Description:
Bug 33343: Catch more cases and correctly use new-password hint
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-06-06 19:17:27 UTC
Size:
10.53 KB
patch
obsolete
>From 0b14da6e45f99e6dc725eba56ff8c9d91b50b742 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 22 May 2023 15:54:14 +0100 >Subject: [PATCH] Bug 33343: Catch more cases and correctly use new-password > hint > >I believe where we're allowing a user to set a new password instead of >using autocomplete="off" we should be hinting to the brownser that it's >a new password box with autocompelte="new-password". > >I also correct a couple of missing instances.. Honestly, I'm not sure >how much this helps these days as most browsers offer to save passwords >regardless. > >See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../prog/en/modules/admin/smtp_servers.tt | 10 +++++----- > .../prog/en/modules/members/member-password.tt | 4 ++-- > .../opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 4 ++-- > .../opac-tmpl/bootstrap/en/modules/opac-passwd.tt | 8 ++++---- > .../bootstrap/en/modules/opac-reset-password.tt | 6 +++--- > 5 files changed, 16 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt >index 7fdb5624a7a..206f53950a4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt >@@ -112,11 +112,11 @@ > </li> > <li> > <label for="smtp_user_name">User name: </label> >- <input type="text" name="smtp_user_name" id="smtp_user_name" size="60" /> >+ <input type="text" name="smtp_user_name" id="smtp_user_name" size="60" autocomplete="off" /> > </li> > <li> > <label for="smtp_password">Password: </label> >- <input type="password" name="smtp_password" id="smtp_password" size="60" /> >+ <input type="password" name="smtp_password" id="smtp_password" size="60" autocomplete="off" /> > </li> > <li> > <label for="smtp_debug_mode">Debug mode: </label> >@@ -191,14 +191,14 @@ > </li> > <li> > <label for="smtp_user_name">User name: </label> >- <input type="text" name="smtp_user_name" id="smtp_user_name" size="60" value="[%- smtp_server.user_name | html -%]"/> >+ <input type="text" name="smtp_user_name" id="smtp_user_name" size="60" value="[%- smtp_server.user_name | html -%]" autocomplete="off" /> > </li> > <li> > <label for="smtp_password">Password: </label> > [% IF smtp_server.password %] >- <input type="password" name="smtp_password" id="smtp_password" size="60" value="****"/> >+ <input type="password" name="smtp_password" id="smtp_password" size="60" value="****" autocomplete="off"/> > [% ELSE %] >- <input type="password" name="smtp_password" id="smtp_password" size="60" value=""/> >+ <input type="password" name="smtp_password" id="smtp_password" size="60" value="" autocomplete="off"/> > [% END %] > </li> > <li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >index 86808308578..261611a1d8f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >@@ -88,11 +88,11 @@ > [% END %] > <li> > <label for="newpassword">New password:</label> >- <input name="newpassword" id="newpassword" type="password" size="20" /> >+ <input name="newpassword" id="newpassword" type="password" size="20" autocomplete="new-password" /> > </li> > <li> > <label for="newpassword2">Confirm new password:</label> >- <input name="newpassword2" id="newpassword2" type="password" size="20" /> >+ <input name="newpassword2" id="newpassword2" type="password" size="20" autocomplete="new-password" /> > </li> > </ol> > <div class="hint">Koha cannot display existing passwords. Leave the field blank to leave password unchanged.</div> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index e30eadcb09c..89a9e841e0b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -925,11 +925,11 @@ > > <ol> > <li><label for="password" class="[% required.password | html %]">Password:</label> >- <input type="password" name="borrower_password" id="password" class="[% required.password | html %]" autocomplete="off" /> >+ <input type="password" name="borrower_password" id="password" class="[% required.password | html %]" autocomplete="new-password" /> > <div class="required_label [% required.password | html %]">Required</div> > </li> > <li><label for="password2" class="[% required.password | html %]">Confirm password:</label> >- <input type="password" name="borrower_password2" id="password2" autocomplete="off" /> >+ <input type="password" name="borrower_password2" id="password2" autocomplete="new-password" /> > <div class="required_label [% required.password | html %]">Required</div> > </li> > </ol> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt >index 5b0ab95dd54..8f08befe98e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt >@@ -64,7 +64,7 @@ > > [% IF logged_in_user.category.effective_change_password %] > [% IF ( Ask_data ) %] >- <form action="/cgi-bin/koha/opac-passwd.pl" name="mainform" id="mainform" method="post" autocomplete="off"> >+ <form action="/cgi-bin/koha/opac-passwd.pl" name="mainform" id="mainform" method="post"> > <legend class="sr-only">Change your password</legend> > <fieldset> > [% IF ( logged_in_user.category.effective_require_strong_password ) %] >@@ -74,15 +74,15 @@ > [% END %] > <div class="form-group"> > <label for="Oldkey">Current password:</label> >- <input class="form-control focus" type="password" id="Oldkey" size="25" name="Oldkey" autocomplete="off" /> >+ <input class="form-control focus" type="password" id="Oldkey" size="25" name="Oldkey" autocomplete="current-password" /> > </div> > <div class="form-group"> > <label for="Newkey">New password:</label> >- <input class="form-control" type="password" id="Newkey" size="25" name="Newkey" autocomplete="off" /> >+ <input class="form-control" type="password" id="Newkey" size="25" name="Newkey" autocomplete="new-password" /> > </div> > <div class="form-group"> > <label for="Confirm">Re-type new password:</label> >- <input class="form-control" type="password" id="Confirm" size="25" name="Confirm" autocomplete="off" /> >+ <input class="form-control" type="password" id="Confirm" size="25" name="Confirm" autocomplete="new-password" /> > </div> > </fieldset> > <fieldset class="action"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt >index 4aa2070b466..440fdac4571 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt >@@ -84,15 +84,15 @@ > </div> > <div class="form-group"> > <label for="currentpassword">Current password:</label> >- <input class="form-control" autocomplete="off" type="password" size="25" id="currentpassword" name="currentpassword" /> >+ <input class="form-control" autocomplete="current-password" type="password" size="25" id="currentpassword" name="currentpassword" /> > </div> > <div class="form-group"> > <label for="newpassword">New password:</label> >- <input class="form-control" autocomplete="off" type="password" size="25" id="newpassword" name="newpassword" /> >+ <input class="form-control" autocomplete="new-password" type="password" size="25" id="newpassword" name="newpassword" /> > </div> > <div class="form-group"> > <label for="confirmpassword">Confirm new password:</label> >- <input class="form-control" autocomplete="off" type="password" size="25" id="confirmpassword" name="confirmpassword" /> >+ <input class="form-control" autocomplete="new-password" type="password" size="25" id="confirmpassword" name="confirmpassword" /> > </div> > <fieldset class="action"> > <input type="submit" value="Update password" class="btn btn-primary" /> >-- >2.41.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33343
:
149107
|
151532
|
151533
|
151544
|
151545
|
152066
| 152067