[Koha-bugs] [Bug 24538] REMOTE_USER set to undef if koha_trusted_proxies contains invalid value

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 19 13:13:09 CET 2020


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

--- Comment #7 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 99245
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99245&action=edit
Bug 24538: Handle Net::Netmask parser errors

This patch switches from the new() to new2() constructor,
which will return an undef value when it fails to parse a value.

This patch warns on parser failures, but otherwise silently drops
the invalid value, and returns objects for any valid input it can parse.
This way one mistake won't disable the whole feature.

To test:
1. Run the unit test t/Koha/Middlware/RealIP.t

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

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


More information about the Koha-bugs mailing list