[Koha-bugs] [Bug 28657] Expand branches.branchip to allow for multiple space separated ip ranges

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 19 18:03:43 CEST 2023


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

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

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

--- Comment #8 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 151484
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151484&action=edit
Bug 28657: expand branches.branchip to allow for multiple ip ranges.

change branches.branchip to a mediumtext, and remove '*' from existing branchip
settings.
Change C4/Auth.pm from a regexp to using in_iprange() to check client address
against branchip.  (in_iprange() doesn't work with '*' in branchip.)
Change in_iprange() to default to false (which is what the POD says it should
do).  Also, have it trim '*' in case someone adds some back later.
Change note in admin/branches.tt under branchip field to reflect changes to
branchip handling.

Test plan:

1. Turn on AutoLocation system preference
2. Change a branches branchip to multiple ip ranges seperated by a space,
   making sure one of the ranges includes your computers address.
3. Log out and try logging in.  The location check will fail.
4. Apply patch.  Restart plack if necessary.
5. Try logging in again.  The location check will succeed.

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