[Koha-bugs] [Bug 24537] Allow IP ranges in ILS-DI:AuthorizedIPs using Net::Netmask

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 1 12:29:05 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24537

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #102172|0                           |1
        is obsolete|                            |

--- Comment #6 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 102213
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102213&action=edit
Bug 24537: Allow IP ranges in ILS-DI:AuthorizedIPs using Net::Netmask

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 at davidnind.com>

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list