login page

40 views
Skip to first unread message

aliane abdelouahab

unread,
Jul 25, 2012, 10:14:46 AM7/25/12
to Tornado Web Server
hi,
how to force the user to stay 5 minutes after 3 failed attempts? or
ban him if the requests are from robots?

Phil Whelan

unread,
Jul 25, 2012, 11:51:13 AM7/25/12
to python-...@googlegroups.com
On Wed, Jul 25, 2012 at 7:14 AM, aliane abdelouahab <alabde...@gmail.com> wrote:
how to force the user to stay 5 minutes after 3 failed attempts? or
ban him if the requests are from robots?

I think this is not Tornado specific.

You'll probably want to store something in your database to count the number of failed attempts, clear the count on successful login, save the last failed login time and disallow login if attempts == 3 and last_attempt_time > time.time() - 5*60.

Managing requests from robots might be a bit harder. I think you might mean "bots". "Robots" generally come from search engines and will not attempt to fill-in forms and login to your site. "bots", on the other hand, are usually malicious and will do everything they can to appear like a regular user.

Phil

aliane abdelouahab

unread,
Jul 25, 2012, 7:32:57 PM7/25/12
to Tornado Web Server
wow! so there is a trick under the hood :'(
thank you for this, i'll try to find a good trick :D

On 25 juil, 16:51, Phil Whelan <phil...@gmail.com> wrote:
> On Wed, Jul 25, 2012 at 7:14 AM, aliane abdelouahab <alabdeloua...@gmail.com
Reply all
Reply to author
Forward
0 new messages