David Cook
cede9bbe43
This patch uses Net::Netmask to match IPs from ILS-DI:AuthorizedIPs against $ENV{REMOTE_USER}. By using Net::Netmask, we can use addresses in a variety of formats. This includes 127.0.0.1, 192.168.1.0/24, 10.0.0, and so on. To Test: 1. Apply the patch 2. Empty the 'ILS-DI:AuthorizedIPs' system preference 3. Send a request to '/cgi-bin/koha/ilsdi.pl?service=LookupPatron&id=1&id_type=cardnumber' 3b. Note that the request is successful 4. Set the 'ILS-DI:AuthorizedIPs' system preference to a subnet including your IP address (e.g. 192.168.1.0/24) 5. Send a request to '/cgi-bin/koha/ilsdi.pl?service=LookupPatron&id=1&id_type=cardnumber' 5b. Note that the request is successful 6. Set the 'ILS-DI:AuthorizedIPs' system preference to a subnet that doesn't include your IP address (e.g. 1.1.1) 7. Send a request to '/cgi-bin/koha/ilsdi.pl?service=LookupPatron&id=1&id_type=cardnumber' 7b. Note that your request is refused 8. Try a variety of permutations including bad values (e.g. 192.168.1.) or multiple values (e.g. 10.0.0.0/8,192.168.1.0/24) or multiple values including a mix of good and bad values Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> |
||
---|---|---|
.. | ||
clubs | ||
errors | ||
external/overdrive | ||
rss | ||
sci | ||
sco | ||
svc | ||
ilsdi.pl | ||
maintenance.pl | ||
oai.pl | ||
opac-account-pay-paypal-return.pl | ||
opac-account-pay-return.pl | ||
opac-account-pay.pl | ||
opac-account.pl | ||
opac-addbybiblionumber.pl | ||
opac-alert-subscribe.pl | ||
opac-article-request-cancel.pl | ||
opac-authorities-home.pl | ||
opac-authoritiesdetail.pl | ||
opac-basket.pl | ||
opac-blocked.pl | ||
opac-browse.pl | ||
opac-browser.pl | ||
opac-changelanguage.pl | ||
opac-course-details.pl | ||
opac-course-reserves.pl | ||
opac-detail.pl | ||
opac-discharge.pl | ||
opac-downloadcart.pl | ||
opac-downloadshelf.pl | ||
opac-export.pl | ||
opac-ics.pl | ||
opac-idref.pl | ||
opac-illrequests.pl | ||
opac-image.pl | ||
opac-imageviewer.pl | ||
opac-ISBDdetail.pl | ||
opac-issue-note.pl | ||
opac-main.pl | ||
opac-MARCdetail.pl | ||
opac-memberentry.pl | ||
opac-messaging.pl | ||
opac-modrequest-suspend.pl | ||
opac-modrequest.pl | ||
opac-mymessages.pl | ||
opac-news-rss.pl | ||
opac-overdrive-search.pl | ||
opac-passwd.pl | ||
opac-password-recovery.pl | ||
opac-patron-consent.pl | ||
opac-patron-image.pl | ||
opac-privacy.pl | ||
opac-ratings-ajax.pl | ||
opac-ratings.pl | ||
opac-readingrecord.pl | ||
opac-recordedbooks-search.pl | ||
opac-registration-verify.pl | ||
opac-renew.pl | ||
opac-request-article.pl | ||
opac-reserve.pl | ||
opac-restrictedpage.pl | ||
opac-retrieve-file.pl | ||
opac-review.pl | ||
opac-routing-lists.pl | ||
opac-search-history.pl | ||
opac-search.pl | ||
opac-sendbasket.pl | ||
opac-sendshelf.pl | ||
opac-serial-issues.pl | ||
opac-shareshelf.pl | ||
opac-shelves.pl | ||
opac-showmarc.pl | ||
opac-showreviews.pl | ||
opac-suggestions.pl | ||
opac-tags.pl | ||
opac-tags_subject.pl | ||
opac-topissues.pl | ||
opac-user.pl | ||
tracklinks.pl | ||
unapi |