How to limit time of failed login attempt in specific period with TG2?

2 views
Skip to first unread message

Victor

unread,
Jul 3, 2009, 5:00:26 AM7/3/09
to TurboGears
Hi,
How can I limit time of failed login attempt in specific period with
TurboGears2? For example, If a ip got 10 time failed attempt within an
hour, the system will ban the ip for whatever hours I like, how can I
achieve this with TG2?

Thanks.
Victor Lin.

Lukasz Szybalski

unread,
Jul 6, 2009, 9:59:35 AM7/6/09
to turbo...@googlegroups.com

You could probably keep track of the ip address in some logging table,
and modify the login page to check the ip address for failed logins
before it trys to login the person.

some logging table:
ip address
failed attempts
last attempt
lock expires

Lucas

Reply all
Reply to author
Forward
0 new messages