Closed alariva closed 5 years ago
As per my understanding, guarding that if $ip
is an actual filepath, false
could be returned straight away thus avoiding further pass of an aknowledged-invalid IP to inet_pton()
later on.
https://github.com/antonioribeiro/firewall/blob/master/src/Support/IpAddress.php#L68
Hi, great tool here. :)
I'm getting the following exception reported every time my whitelist is evaluated:
E_WARNING: inet_pton(): Unrecognized address /path/to/whitelist.txt
Actual file path was changed for obvious reason.
The whitelisted IPs seem to work ok, meaning that I can ask the status with
$whitelisted = Firewall::isWhitelisted('10.17.12.1');
However, it looks like the exception is triggered before getting to the actual file contents. As far as I understand, this looks like usual behavior, so, would it be possible to avoid the continuous (false alarm) exception to be triggered?
My
config/firewall.php
is like:And the whitelisted contents are all valid IPv4 entries. Actually, these are the contents.
Using
L5.4
and packagev2.1.0
Thanks very much!