[Bug 20023] New: Password recovery should be case insensitive
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Bug ID: 20023 Summary: Password recovery should be case insensitive Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Authentication Assignee: koha-bugs@lists.koha-community.org Reporter: philippe.blouin@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: dpavlin@rot13.org When entering an email (or arguably, a userid) to recover the password, a user should not have to know or remember the casing of the given email. Quick exercise for a quick solution led to no results. $search_results = [ Koha::Patrons->search( { -or => { email => $email, emailpro => $email, B_email => $email } } ) ]; Using search_like is not available, and using email => { 'like', $email} does not lead to the intended result. Here's hoping a similarly simple fix exists. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #1 from Blou <philippe.blouin@inlibro.com> --- Created attachment 79037 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79037&action=edit Bug 20023: Password recovery using email should be case insensitive When entering an email to recover the password, a user should not have to know or remember the casing of the given email. Test 0) enable OpacResetPassword 1) On the OPAC, click "Forgot your password" 2) Enter your email address as in your user account BUT WITH A DIFFERENT CASING 3) Submit. This will fail. 4) Apply the patch, redo with success. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #2 from Blou <philippe.blouin@inlibro.com> --- I added a small modif to clean some warnings in the logs, while at it. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Dilan Johnpullé <dilan@calyx.net.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dilan@calyx.net.au --- Comment #3 from Dilan Johnpullé <dilan@calyx.net.au> --- Created attachment 79070 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79070&action=edit Internal server error at opac-password-recovery.pl after applying patch After applying the patch, opac-password-recovery.pl resolves at a screen complaining of an internal server error. Restarting plack, apache and memcached does not resolve this. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79037|0 |1 is obsolete| | --- Comment #4 from Blou <philippe.blouin@inlibro.com> --- Created attachment 79086 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79086&action=edit Bug 20023: Password recovery using email should be case insensitive When entering an email to recover the password, a user should not have to know or remember the casing of the given email. Test 0) enable OpacResetPassword 1) On the OPAC, click "Forgot your password" 2) Enter your email address as in your user account BUT WITH A DIFFERENT CASING 3) Submit. This will fail. 4) Apply the patch, redo with success. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #5 from Blou <philippe.blouin@inlibro.com> --- Sorry about that. :( Now fixed. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79086|0 |1 is obsolete| | --- Comment #6 from Michal Denar <black23@gmail.com> --- Created attachment 79125 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79125&action=edit Bug 20023: Password recovery using email should be case insensitive When entering an email to recover the password, a user should not have to know or remember the casing of the given email. Test 0) enable OpacResetPassword 1) On the OPAC, click "Forgot your password" 2) Enter your email address as in your user account BUT WITH A DIFFERENT CASING 3) Submit. This will fail. 4) Apply the patch, redo with success. Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |philippe.blouin@inlibro.com |ity.org | CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79125|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 79201 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79201&action=edit Bug 20023: Password recovery using email should be case insensitive When entering an email to recover the password, a user should not have to know or remember the casing of the given email. Test 0) enable OpacResetPassword 1) On the OPAC, click "Forgot your password" 2) Enter your email address as in your user account BUT WITH A DIFFERENT CASING 3) Submit. This will fail. 4) Apply the patch, redo with success. Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 79202 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79202&action=edit Bug 20023: (QA follow-up) Tiny simplification Remove empty emails from the list rightaway (incl. all spaces). Would be tempted to lc the params->{email} at the start btw.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79201|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 79203 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79203&action=edit Bug 20023: Password recovery using email should be case insensitive When entering an email to recover the password, a user should not have to know or remember the casing of the given email. Test 0) enable OpacResetPassword 1) On the OPAC, click "Forgot your password" 2) Enter your email address as in your user account BUT WITH A DIFFERENT CASING 3) Submit. This will fail. 4) Apply the patch, redo with success. Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79202|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 79204 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79204&action=edit Bug 20023: (QA follow-up) Tiny simplification Remove empty emails from the list rightaway (incl. all spaces). Would be tempted to lc the params->{email} at the start btw.. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 79204 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79204 Bug 20023: (QA follow-up) Tiny simplification Review of attachment 79204: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20023&attachment=79204) ----------------------------------------------------------------- ::: opac/opac-password-recovery.pl @@ +73,4 @@
$errMultipleAccountsForEmail = 1; } elsif ( $borrower = $search_results->next() ) { # One matching borrower + my @emails = grep { $_ && !/^\s+$/ } ( $borrower->email, $borrower->emailpro, $borrower->B_email );
Not sure this is simplification :) @@ +77,2 @@
+ my $firstNonEmptyEmail = @emails ? $emails[0] : undef;
So simplify it, really :) my $firstNonEmptyEmail = shift @emails; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Staying sharp, Joubu. Great. I removed the regex for spaces. It wasn't there before and you can't save three spaces as an email address anymore. Using the shift too. So simple :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79204|0 |1 is obsolete| | --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 79270 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79270&action=edit Bug 20023: (QA follow-up) Tiny simplification Remove empty emails from the list rightaway (incl. all spaces). Would be tempted to lc the params->{email} at the start btw.. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79270|0 |1 is obsolete| | --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 79271 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79271&action=edit Bug 20023: (QA follow-up) Tiny simplification Remove empty emails from the list rightaway. Would be tempted to lc the params->{email} at the start btw.. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED --- Comment #17 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The tiny follow-up broke password recovery on 17.11 (haven't tested on other versions yet. Reverting fixes the problem. The problem: No matter what you enter, no matching account will be found, even if the email address and all data are entered correctly. The simplification here is almost as long as the original patch, I feel it was not good to push this as a QA follow-up without more testing. (Sorry) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #18)
The tiny follow-up broke password recovery on 17.11 (haven't tested on other versions yet. Reverting fixes the problem.
The problem: No matter what you enter, no matching account will be found, even if the email address and all data are entered correctly.
The simplification here is almost as long as the original patch, I feel it was not good to push this as a QA follow-up without more testing. (Sorry)
Will have a look -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21771 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21771 [Bug 21771] Password recovery is broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #18)
The tiny follow-up broke password recovery on 17.11 (haven't tested on other versions yet. Reverting fixes the problem.
Works on current master. Looking further. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #21 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #20)
(In reply to Katrin Fischer from comment #18)
The tiny follow-up broke password recovery on 17.11 (haven't tested on other versions yet. Reverting fixes the problem.
Works on current master. Looking further.
Hmm. Userid works but email might not.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We were testing with email. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #23 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Found the cause. How stupid! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #24 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Not to blame anyone. But replacing my $firstNonEmptyEmail = @emails ? $emails[0] : undef; by the shift @emails obviously was not so smart after all. Because we still test @emails later on ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #25 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Patch forthcoming -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #26 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Marcel, can you attach the fix on bug 21771? It's already a bug in released versions, so it will be more clear for release notes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #27 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 81985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81985&action=edit Bug 20023: (Follow-up) Revert the shift statement Obviously you should never shift an items from an array if you need that item later on :) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested with entering userid as well as entering email.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #28 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Attention RM and Rmaints : Please pick LAST follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #29 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #26)
Hi Marcel, can you attach the fix on bug 21771? It's already a bug in released versions, so it will be more clear for release notes.
OK -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81985|0 |1 is obsolete| | --- Comment #30 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Comment on attachment 81985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81985 Bug 20023: (Follow-up) Revert the shift statement Moved to 21771 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Passed QA |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 --- Comment #31 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Sorry for all confusion people. But fixed ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26904 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org