moloch-- / RootTheBox

A Game of Hackers (CTF Scoreboard & Game Manager)
http://root-the-box.com/
Apache License 2.0
908 stars 292 forks source link

Automatic Ban Feature Issue #592

Open hnaung opened 11 months ago

hnaung commented 11 months ago

Hello there,

I've encountered an issue related to the 'Automatic Ban' feature. After enabling this feature, I am experiencing the 'Authentication Failure: Your IP address is currently banned - Contact Admin' issue. It was supposed to ban the client's IP address after 5 login failures because I set the threshold to '5'. However, I'm receiving the above error message after only 2 failed attempts, and the problem seems inconsistent. It doesn't occur in all cases; some players are randomly affected. Any suggestions or solutions to fix this issue would be greatly appreciated. Thank you!

Screenshot 2023-09-29 at 1 47 42 PM

eljeffeg commented 11 months ago

I'd make sure your x-headers are set to True. Perhaps it thinks everyone is coming from the same IP. I'll double check the code though.

hnaung commented 11 months ago

Thank you for your reply. After I set 'x-headers' to true, the player login keeps logging out when they move to another tab.

eljeffeg commented 11 months ago

No idea what would cause that. Another tab should have no effect on the session unless you're in incognito mode. Maybe restart RootTheBox.