Commit graph

31 commits

Author SHA1 Message Date
Karimov Dmitriy
d85752970b Add DEFENDER_DISABLE_USERNAME_LOCKOUT 2016-06-20 09:20:47 +05:00
Alex White
9209f0579f Fix DataError on login
A watched login failure causes a 500 saving a 256 character long username into the login attempts.  Conditionally slice it to fit AccessAttempt
2016-05-11 14:07:50 -07:00
Vladimir Bolshakov
23a690395c Use render shortcut instead of render_to_response. 2016-02-01 19:09:28 +03:00
bc Wong
f9047162d4 Add helpers that do not assume how to retrieve username
The `is_already_locked` method assumes how the username is stored in the
request. This patch adds helpers that don't to allow for more flexible
implementation.
2016-01-24 09:41:43 -08:00
Ken Cochrane
6b91730722 cleanup the boolean logic around is_already_locked() 2015-10-23 15:00:56 -04:00
Ken Cochrane
cc45409078 fixed pep8 issues 2015-10-21 16:44:12 -04:00
Ken Cochrane
64c5684c12 Added so that you can disable IP lockouts if you want 2015-10-21 16:33:08 -04:00
nephridium
a3207d582a Add tests for utils get_blocked_ips() and get_blocked_usernames() 2015-06-29 18:33:33 +08:00
nephridium
67ebb8edff Make key_list read from redis Python 3 compatible
Converts from bytes to string using .decode('utf-8')
2015-06-26 22:17:50 +08:00
Alex White
319027c1e6 Fix line length meet PEP8 2015-04-21 16:24:01 -07:00
Alex White
793720a189 Handle evaluating combined IP and username lockouts based on settings 2015-04-21 15:22:17 -07:00
Ken Cochrane
fb095e4ca9 cleaned up some landscape.io warnings 2015-03-20 11:09:45 -04:00
Ken Cochrane
47d6a71825 fixed issues #15 #35 and #36, added way to clean up access attempt table, as well as an option to not login attempts. Also speed up django admin pages 2015-03-20 10:09:39 -04:00
Ken Cochrane
ea7a8cde06 bumped the django versions on travis, and added a fix to get_ip() 2015-02-25 10:03:05 -05:00
Ken Cochrane
fd4f58a20c took marcus's advice and used the built in django validator 2015-02-24 22:02:06 -05:00
Ken Cochrane
2f6afbdb6e added ipv6 addresses to the test, and updated the ipv6 regex to something that worked better 2015-02-24 21:52:10 -05:00
Ken Cochrane
9c50d8e833 added fixes for issue #32, hopefully this closes the security hole that @mmetince found 2015-02-24 18:16:08 -05:00
Ken Cochrane
88c388ec42 add a fix so that we don't block an empty IP or username 2015-02-01 10:17:10 -05:00
Ken Cochrane
87945f97ee fixing an issue @jlhawn found, we should only block if we are over the limit 2015-01-29 20:02:35 -05:00
Ken Cochrane
130f696a7e added new context variable to lockout template 2015-01-29 08:10:19 -05:00
Ken Cochrane
db3eea99cc initial commit, adding admin pages to manage blocked users 2015-01-27 18:06:56 -05:00
Marcus Martins
351148b239 refactor is_already_locked and add better test coverage
Simplify the is_already_locked code and make sure
that we're testing that code better.
2015-01-12 09:42:38 -08:00
Ken Cochrane
92c378bf68 Add Celery option for writing to database 2015-01-03 16:33:51 -05:00
Ken Cochrane
a7bc8c0d55 added landscape.io and some fixes it found 2015-01-03 11:09:30 -05:00
Joffrey F
48d45a0367 Use pipelines for atomic transactions 2015-01-02 16:09:24 -08:00
Joffrey F
08bb7d12fb Fixed get_user_attempts() and unit tests 2015-01-02 13:26:43 -08:00
Joffrey F
70fa41ff0d Ensure we don't break when cooloff time is 0 ('permanent' lock) 2015-01-02 12:12:57 -08:00
Ken Cochrane
a8e721dd3d more refactoring and unit tests 2015-01-01 12:51:46 -05:00
Ken Cochrane
09f29131a4 more refactoring and added a unit test 2014-12-31 19:44:21 -05:00
Ken Cochrane
15e6a40e0a more refactoring to clean up the code 2014-12-31 19:27:18 -05:00
Ken Cochrane
cf136033a1 refactored the code a little, and updated readme to include missing config 2014-12-31 17:00:45 -05:00