Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when deleting blocked ip without clearing logs #23

Closed
lucabartoli opened this issue Aug 20, 2020 · 1 comment
Closed

Issues when deleting blocked ip without clearing logs #23

lucabartoli opened this issue Aug 20, 2020 · 1 comment

Comments

@lucabartoli
Copy link

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

@denisdulici
Copy link
Member

Feel free to send a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants