[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 22:45:51 CET 2020


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

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

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

--- Comment #9 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 99284
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99284&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>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

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


More information about the Koha-bugs mailing list