akaunting / laravel-firewall

Web Application Firewall (WAF) package for Laravel

Home Page:https://akaunting.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues when deleting blocked ip without clearing logs

lucabartoli opened this issue · comments

If someone unblock an ip without clearing all logs, the block counter doesn't work anymore, as it checks for neq only.
This could also lead to some issues created by many concurrent requests (not tested).
I think it's simply safer to check for "less than" instead of "not equal to".

https://github.com/akaunting/firewall/blob/2a20b4fd2bb388f498a8e1e82878ac6be6dfa1f0/src/Listeners/BlockIp.php#L27-L27

Feel free to send a PR.