]> git.koha-community.org Git - koha.git/commit
Bug 8515 - OPAC password change does not obey OpacPasswordChange
authorOwen Leonard <oleonard@myacpl.org>
Fri, 2 Nov 2012 16:40:08 +0000 (12:40 -0400)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 25 Nov 2012 23:30:14 +0000 (18:30 -0500)
commit85c4cd4712026a554817564dcd7fea70a27ad0e1
tree19b1475b564adbc0715c3d95eb249d51a3456b6d
parenteb27e4084d21f18e4ed8abeacdfc0538c58760d6
Bug 8515 - OPAC password change does not obey OpacPasswordChange

The OPAC change password template enforces the OpacPasswordChange
preference by preventing the form from appearing. However, the
script doesn't contain any check for OpacPasswordChange so it is
vulnerable to someone submitting data to it by some other means.

This patch adds a check for OpacPasswordChange to the script and
revises the template logic in order to show the right warning
in all circumstances.

To test, turn off OpacPasswordChange and navigate manually to
opac-passwd.pl. You should see a warning that you can't change
your password.

Turn on OpacPasswordChange load the change password page and
save the page to your desktop. Turn off OpacPasswordChange and
submit a password change via the saved page. Without the patch
this would result in a password change. After the patch it
should not.

Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed bug and made sure patch fixes it.
Passes all tests and perlcritic.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-passwd.tt
opac/opac-passwd.pl