if (app('firewall')->isBeingAttacked()) {
return app('firewall')->responseToAttack();
}
But with some attacks we got a exception like InvalidArgumentException: The value ""{${print(9347655345-4954366)}}"" is not a valid IP address. in /../vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php:175
We surround it with
try {
// Check if user is attacking server
if (app('firewall')->isBeingAttacked()) {
return app('firewall')->responseToAttack();
}
} catch (InvalidArgumentException) {
return app('firewall')->responseToAttack();
}
But than we got an error exception like ErrorException: Trying to access array offset on value of type null in /.../vendor/pragmarx/firewall/src/Support/AttackBlocker.php:272
I replaced the catch return with an abort() now, but is there a better way to handle this?
In our laravel application we added this:
But with some attacks we got a exception like
InvalidArgumentException: The value ""{${print(9347655345-4954366)}}"" is not a valid IP address. in /../vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php:175
We surround it with
But than we got an error exception like
ErrorException: Trying to access array offset on value of type null in /.../vendor/pragmarx/firewall/src/Support/AttackBlocker.php:272
I replaced the catch return with an
abort()
now, but is there a better way to handle this?