Koha-clms/opac
Fridolin Somers e9b9e15106 Bug 26904: OPAC password recovery allows regexp in email
When using OPAC password recovery form, opac/opac-password-recovery.pl :
if one provides correct login and an email, there is a check that this email is one of patron's.

This check uses RegExp with case insensitive :
  if ( $email && !( any { /^$email$/i } @emails ) )

This is a security issue since one can simply enter '.*'.
Severity is normal because the login must be a correct.

I propose to use simple string compare with lowercase to be case insensitive.

Test plan :
1) Don't apply patch
2) Enable system preference 'OpacResetPassword'
3) Go to 'OPAC > Log in to your account > Forgot your password?'
4) Enter an existing userid or cardnumber and '.*' in 'Email'
5) The password recovery is created ! (check table 'borrower_password_recovery')
6) Apply patch
7) Enter an existing userid or cardnumber and '.*' in 'Email'
8) You get the message 'No account was found with the provided information.'
9) Enter an existing userid or cardnumber and in 'Email' the corresponding email but with different case
10) The password recovery is created (check table 'borrower_password_recovery')

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Backport to 19.05.x:
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-23 15:50:23 +01:00
..
clubs Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
errors Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
external/overdrive bug_16034 Koha::ExternalContent::OverDrive - a wrapper around WebService::ILS::Overdrive::Patron 2017-02-21 19:58:20 +00:00
rss
…
sci Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
sco Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
svc Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
ilsdi.pl Bug 23156: Add pagination to checkouts in ILS-DI GetPatronInfo service 2019-07-25 13:31:30 +02:00
maintenance.pl Bug 17989: Include full path logic in _get_template_file 2017-11-01 13:10:17 -03:00
oai.pl
…
opac-ISBDdetail.pl Bug 23248: (QA follow-up) Consolidate 404s 2019-07-25 15:41:01 +02:00
opac-MARCdetail.pl Bug 5103: Refactor the code to avoid repetition 2020-04-10 15:51:50 +00:00
opac-account-pay-paypal-return.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-account-pay-return.pl Bug 19173: Make OPAC online payments pluggable 2017-09-19 14:15:52 -03:00
opac-account-pay.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-account.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-addbybiblionumber.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-alert-subscribe.pl Bug 22542: Force back button to display personal data 2019-05-02 13:43:48 +00:00
opac-article-request-cancel.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-authorities-home.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-authoritiesdetail.pl Bug 21871: (QA follow-up) C4::Biblio qw(GetMarcUrls) 2019-01-30 12:12:21 +00:00
opac-basket.pl Bug 23530: Fix cart showing only hidden items 2019-09-09 10:17:35 +02:00
opac-blocked.pl
…
opac-browser.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-changelanguage.pl Bug 21299: (QA follow-up) Rename module and subroutine 2018-11-07 21:52:17 +00:00
opac-course-details.pl
…
opac-course-reserves.pl
…
opac-detail.pl Bug 14419: [19.05.x] (squashed) Expanding facets (Show more) performs a new search 2020-01-10 20:41:36 +00:00
opac-discharge.pl Bug 23723: using exit inside eval to stop sending output to browser doesn't work under plack 2019-11-08 15:23:58 +01:00
opac-downloadcart.pl Bug 17842: Simplify the code 2020-06-19 03:22:46 +02:00
opac-downloadshelf.pl Bug 14385: Squash of a lot of patches rebased 2018-11-02 10:33:12 +00:00
opac-export.pl Bug 22075: Fix encoding problem with RIS export in OPAC 2019-04-11 11:47:17 +00:00
opac-ics.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-idref.pl Bug 19640: fix OPAC IdRef webservice display 2017-12-07 09:37:09 -03:00
opac-illrequests.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-image.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-imageviewer.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-issue-note.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-main.pl Bug 22318: Example implementation: OpacNavRight system preference 2019-04-18 10:47:03 +00:00
opac-memberentry.pl Bug 25769: Patron self modification triggers change request for date of birth to null 2020-07-22 19:30:39 +02:00
opac-messaging.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-modrequest-suspend.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-modrequest.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-mymessages.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-news-rss.pl
…
opac-overdrive-search.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-passwd.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-password-recovery.pl Bug 26904: OPAC password recovery allows regexp in email 2020-11-23 15:50:23 +01:00
opac-patron-consent.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-patron-image.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-privacy.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-ratings-ajax.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-ratings.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-readingrecord.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-recordedbooks-search.pl Bug 17602: Fix few minor QA issues 2018-10-01 13:56:56 +00:00
opac-registration-verify.pl Bug 23253: Fix OpacNavRight for self reg by email 2019-08-28 15:24:30 +02:00
opac-renew.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-request-article.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-reserve.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-restrictedpage.pl
…
opac-retrieve-file.pl Bug 17501: Move getCategories and httpheaders from Upload.pm 2017-01-20 14:20:05 +00:00
opac-review.pl Bug 21986: Do not escape quotation marks when cataloguing 2018-12-14 13:33:28 +00:00
opac-routing-lists.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-search-history.pl Bug 12497: Fix OPAC search history reachable by URL even when disabled 2017-12-07 10:09:52 -03:00
opac-search.pl Bug 11994: OpenSearch plugins needs to be delivered with Content-Type application/opensearchdescription+xml 2020-07-24 01:39:52 +02:00
opac-sendbasket.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-sendshelf.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-serial-issues.pl Bug 23126: Display multi-line entries in subscrpitions correctly 2019-07-25 13:36:46 +02:00
opac-shareshelf.pl Bug 22542: Force back button to display personal data 2019-05-02 13:43:48 +00:00
opac-shelves.pl Bug 25982: OPAC shelves RSS link output is xml 2020-09-20 12:24:12 +02:00
opac-showmarc.pl Bug 25009: Avoid leakages in opac-showmarc.pl 2020-04-22 19:58:52 +00:00
opac-showreviews.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-suggestions.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac-tags.pl Bug 23276: Do not display tag if pref TagsEnabled is off 2020-07-03 00:45:52 +02:00
opac-tags_subject.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-topissues.pl Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00
opac-user.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
tracklinks.pl Bug 23836: exit after output_error 2019-11-22 10:35:06 +00:00
unapi Bug 19991: use Modern::Perl in OPAC perl scripts 2018-08-30 13:40:32 +00:00