Search - User list
Full Version: anti flooding mechanism...
Root » Feature requests » anti flooding mechanism...
1
jedie
see also: http://djangobb.org/ticket/95 and

Think there is no anti flooding mechanism in DjangoBB, now. Isn't it?

btw. In PyLucid i have a simple ban function. The Principe is simple: I add logging entries and if in a defined time too many entries, the IP address would be added to the ban model. This model would be used in the middleware to ban…

Models:
* https://github.com/jedie/PyLucid/blob/master/pylucid_project/apps/pylucid/models/ip_ban_list.py
* https://github.com/jedie/PyLucid/blob/master/pylucid_project/apps/pylucid/models/log.py

middleware:
* https://github.com/jedie/PyLucid/blob/master/pylucid_project/middlewares/ip_ban.py

e.g. the search view used:
LogEntry.objects.request_limit()

view code here:
https://github.com/jedie/PyLucid/blob/master/pylucid_project/pylucid_plugins/search/views.py#L202

request_limit() code here:
https://github.com/jedie/PyLucid/blob/master/pylucid_project/apps/pylucid/models/log.py#L67


If some interest in this, i will cut out the code into a separate app and contribute it. I would like to add it as a separated app to django-tools in the past: https://github.com/jedie/django-tools

Maybe it make sence to use the cache system and not a model for this.
slav0nic
now exist only Ban model and middleware but i do not remember is it work B))

what about request_limit i mostly like something as @throttle decorator in piston: https://bitbucket.org/jespern/django-piston/src/7c90898072ce/piston/utils.py#cl-108 , logging to DB is not good idea imho (why not counting request in cache like this done in piston?)
+ time limits must exists as djangobb setting
jedie
Yes using the cache is a very good idea!

Maybe i will add this into django-tools and use it in PyLucid.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB