# HG changeset patch # User Brian Neal # Date 1322924821 0 # Node ID 2c2df85451124f3762e49ee2ef2db248304a9acb # Parent 9d096ceab0c0b4c4022d191fceb38de57b69f142 Changed the lockout time on logins to 2 minutes. diff -r 9d096ceab0c0 -r 2c2df8545112 gpp/accounts/views.py --- a/gpp/accounts/views.py Sat Dec 03 03:25:04 2011 +0000 +++ b/gpp/accounts/views.py Sat Dec 03 15:07:01 2011 +0000 @@ -87,7 +87,8 @@ ####################################################################### -@rate_limit(count=10, interval=datetime.timedelta(minutes=1)) +@rate_limit(count=10, interval=datetime.timedelta(minutes=1), + lockout=datetime.timedelta(minutes=2)) def login_ajax(request): """ This view function handles a login via AJAX. diff -r 9d096ceab0c0 -r 2c2df8545112 gpp/antispam/__init__.py --- a/gpp/antispam/__init__.py Sat Dec 03 03:25:04 2011 +0000 +++ b/gpp/antispam/__init__.py Sat Dec 03 15:07:01 2011 +0000 @@ -1,3 +1,5 @@ +import datetime + from django.contrib.auth import views as auth_views from antispam.decorators import rate_limit @@ -8,4 +10,4 @@ "then we apologize; your account will be restored shortly.") # Install rate limiting on auth login -auth_views.login = rate_limit()(auth_views.login) +auth_views.login = rate_limit(lockout=datetime.timedelta(minutes=2))(auth_views.login)