Bug 33343: Make use of the 'autocomplete=off' attribute on password fields

This patch adds 'autocomplete=off' to all password type fields in the OPAC

To test:
1. Apply the patch
2. Visit http://master/cgi-bin/koha/opac-main.pl
3. Inspect the page
    --> Confirm html shows autocomplete off on the password field
4. Click on Log in (without filling any field)
5. Repeat step 3
    --> Confirm html shows autocomplete off on the password field
6. Set 'PatronSelfRegistration' system preference to 'Allow' and PatronSelfRegistrationDefaultCategory to 'Board'
7. Visit http://master/cgi-bin/koha/opac-memberentry.pl
9. Repeat step 3
    --> Confirm html shows autocomplete off on the password field
10. Connect to the OPAC
11. Click on Change password
11. Repeat step 3
    --> Confirm html shows autocomplete off on the password field
12. Set 'EnableExpiredPasswordReset' system preference to 'Enable'
13. Visit http://master/cgi-bin/koha/opac-reset-password.pl
14. Repeat step 3
    --> Confirm html shows autocomplete off on the password field

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Hammat Wele 2023-04-03 21:04:28 +00:00 committed by Tomas Cohen Arazi
parent d78bbbeddd
commit 292c0ea24d
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
7 changed files with 15 additions and 15 deletions

View file

@ -11,7 +11,7 @@
<div class="modal-body">
<fieldset class="brief">
<label for="ODpassword">Password:</label>
<input type="password" name="ODpassword" id="ODpassword" value="" />
<input type="password" name="ODpassword" id="ODpassword" value="" autocomplete="off" />
</fieldset>
</div>
<div class="modal-footer">

View file

@ -224,11 +224,11 @@
[% END %]
<div class="form-group">
<label for="userid">Login:</label>
<input class="form-control" type="text" size="25" id="userid" name="userid" />
<input class="form-control" type="text" size="25" id="userid" name="userid" autocomplete="off" />
</div>
<div class="form-group">
<label for="password">Password:</label>
<input class="form-control" type="password" size="25" id="password" name="password" />
<input class="form-control" type="password" size="25" id="password" name="password" autocomplete="off" />
</div>
<fieldset class="action">
<input type="submit" value="Log in" class="btn btn-primary" />

View file

@ -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 %]" />
<input type="password" name="borrower_password" id="password" class="[% required.password | html %]" autocomplete="off" />
<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" />
<input type="password" name="borrower_password2" id="password2" autocomplete="off" />
<div class="required_label [% required.password | html %]">Required</div>
</li>
</ol>

View file

@ -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" />
<input class="form-control focus" type="password" id="Oldkey" size="25" name="Oldkey" autocomplete="off" />
</div>
<div class="form-group">
<label for="Newkey">New password:</label>
<input class="form-control" type="password" id="Newkey" size="25" name="Newkey" />
<input class="form-control" type="password" id="Newkey" size="25" name="Newkey" autocomplete="off" />
</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" />
<input class="form-control" type="password" id="Confirm" size="25" name="Confirm" autocomplete="off" />
</div>
</fieldset>
<fieldset class="action">

View file

@ -152,12 +152,12 @@
[% END %]
<div class="form-group">
<label for="newPassword">New password:</label>
<input class="form-control" type="password" id="newPassword" size="40" name="newPassword" />
<input class="form-control" type="password" id="newPassword" size="40" name="newPassword" autocomplete="off" />
</div>
<div class="form-group">
<label for="repeatPassword">Confirm new password:</label>
<input class="form-control" type="password" id="repeatPassword" size="40" name="repeatPassword" />
<input class="form-control" type="password" id="repeatPassword" size="40" name="repeatPassword" autocomplete="off" />
</div>
<fieldset class="action">

View file

@ -88,15 +88,15 @@
<legend>Log in to your account:</legend>
<label for="userid">Login:</label>
[% IF Koha.Preference('PatronSelfRegistrationPrefillForm') %]
<input class="form-control" type="text" id="userid" size="10" name="userid" value="[% borrower.userid | html %]" />
<input class="form-control" type="text" id="userid" size="10" name="userid" value="[% borrower.userid | html %]" autocomplete="off" />
[% ELSE %]
<input class="form-control" type="text" id="userid" size="10" name="userid" value="" />
<input class="form-control" type="text" id="userid" size="10" name="userid" value="" autocomplete="off" />
[% END %]
<label for="password">Password:</label>
[% IF Koha.Preference('PatronSelfRegistrationPrefillForm') %]
<input class="form-control" type="password" id="password" size="10" name="password" value="[% password_cleartext | html %]" />
<input class="form-control" type="password" id="password" size="10" name="password" value="[% password_cleartext | html %]" autocomplete="off" />
[% ELSE %]
<input class="form-control" type="password" id="password" size="10" name="password" value="" />
<input class="form-control" type="password" id="password" size="10" name="password" value="" autocomplete="off" />
[% END %]
<fieldset class="action">
<input type="submit" value="Log in" class="btn btn-primary" />

View file

@ -80,7 +80,7 @@
<fieldset class="brief">
<div class="form-group">
<label for="userid">Login:</label>
<input class="form-control" type="text" size="25" id="userid" name="userid" />
<input class="form-control" autocomplete="off" type="text" size="25" id="userid" name="userid" />
</div>
<div class="form-group">
<label for="currentpassword">Current password:</label>