Commit graph

162 commits

Author SHA1 Message Date
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
b583f6f54f Add combined username & ip tests 2015-04-21 15:22:29 -07:00
Alex White
793720a189 Handle evaluating combined IP and username lockouts based on settings 2015-04-21 15:22:17 -07:00
Alex White
c8da36cadb Add boolean to allow locking out by username & ip address combined 2015-04-21 15:21:29 -07:00
Ken Cochrane
a99bcdfc63 renamed the file to the correct name 2015-03-24 15:27:57 -04:00
Ken Cochrane
fb095e4ca9 cleaned up some landscape.io warnings 2015-03-20 11:09:45 -04:00
Ken Cochrane
8ef0420b23 added management command 2015-03-20 10:10:07 -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
389ae2d91f locked down the defender views 2015-01-29 08:22:29 -05:00
Ken Cochrane
d0a23a71ba updated lockout.html template 2015-01-29 08:15:38 -05:00
Ken Cochrane
130f696a7e added new context variable to lockout template 2015-01-29 08:10:19 -05:00
Ken Cochrane
b50b05f1d2 Merge branch 'master' into new-admin 2015-01-28 20:21:41 -05:00
Ken Cochrane
12698d7d54 finished working on the defender admin, cleaned some stuff up, added some notes and screenshots 2015-01-28 20:19:16 -05:00
Ken Cochrane
db3eea99cc initial commit, adding admin pages to manage blocked users 2015-01-27 18:06:56 -05:00
Ken Cochrane
a6eb683ea1 more cleanup 2015-01-26 10:56:25 -05:00
Ken Cochrane
333fb2d8ec cleaned up a little remove the ViewDecoratorMiddleware 2015-01-25 22:48:02 -05:00
Marcus Martins
95eac511eb Provide helper TestCases to be used with Defender
Provide TransactionTestCase and TestCase that clear the
defender cache between runs.
2015-01-12 13:28:33 -08:00
Marcus Martins
103e29a437 Add compatibility for python 2.6 2015-01-12 09:53:40 -08: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
Marcus Martins
d72e32cfc1 Allow redis connections to be mocked outside tests
Use a mocked instance of redis outside tests so we can use it
on django projects.
2015-01-08 12:56:33 -08:00
Marcus Martins
345077725d Add support for migrations under South and Django 1.7 2015-01-05 18:40:29 -08:00
Marcus Martins
43d91ef694 Fix tests for Django 1.7 2015-01-05 17:47:57 -08:00
Marcus Martins
0454bf741a Adding unicode support for python3 2015-01-05 17:20:24 -08:00
Ken Cochrane
8f8682c48f fixed issue with python3 2015-01-03 16:50:51 -05:00
Ken Cochrane
92c378bf68 Add Celery option for writing to database 2015-01-03 16:33:51 -05:00
Ken Cochrane
1c56b279cd missing file in last commit 2015-01-03 11:11:08 -05:00
Ken Cochrane
a7bc8c0d55 added landscape.io and some fixes it found 2015-01-03 11:09:30 -05:00
Ken Cochrane
7e32eacd97 moved a config out of middleware into config and also updated README 2015-01-03 10:34:19 -05:00
Joffrey F
48d45a0367 Use pipelines for atomic transactions 2015-01-02 16:09:24 -08:00
Ken Cochrane
95e8ccf088 Merge pull request #10 from shin-/master
Admin and middleware tests
2015-01-02 18:54:13 -05:00
Joffrey F
59fed5fc8a python3 fix 2015-01-02 15:31:09 -08:00
Joffrey F
1b63b657a1 test_get_view for 100% coverage 2015-01-02 15:29:26 -08:00
Joffrey F
465e45a124 Admin and middleware tests 2015-01-02 15:15:34 -08:00
Ken Cochrane
649cc33c68 Merge pull request #9 from shin-/master
Improved utils coverage
2015-01-02 16:38:06 -05:00
Joffrey F
08bb7d12fb Fixed get_user_attempts() and unit tests 2015-01-02 13:26:43 -08:00
Ken Cochrane
34060b1eb1 added one more unit test, and added a coverage ignore to a line 2015-01-02 16:10:12 -05:00
Joffrey F
a6ac9a1e67 Improved utils coverage 2015-01-02 13:09:31 -08:00
Ken Cochrane
6f0f5c26f2 added more unit tests 2015-01-02 16:02:09 -05:00
Ken Cochrane
e0393bb2eb added unit test for custom lockout template 2015-01-02 15:43:38 -05:00
Joffrey F
70fa41ff0d Ensure we don't break when cooloff time is 0 ('permanent' lock) 2015-01-02 12:12:57 -08:00
Joffrey F
6e4e450dce Fixed redis mocking in tests 2015-01-02 11:27:29 -08:00
Ken Cochrane
aa934d7af4 improvements to coverage, and added pypy3 testing 2015-01-01 13:50:19 -05:00
Ken Cochrane
98f3a3c776 minor cleanup 2015-01-01 13:40:05 -05:00
Ken Cochrane
84e4105ae5 removed the extra print statments 2015-01-01 12:58:09 -05:00
Ken Cochrane
a8e721dd3d more refactoring and unit tests 2015-01-01 12:51:46 -05:00
Ken Cochrane
4fdd0c6af8 make it redis backend configurable by test settings 2015-01-01 11:37:20 -05:00
Ken Cochrane
4558642f78 switch to real redis for travis 2015-01-01 11:31:28 -05:00
Ken Cochrane
8a3d7a57ac more refactor and unit tests 2014-12-31 20:29:17 -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
Ken Cochrane
15fd65f06b made the readme more complete 2014-12-31 12:32:56 -05:00
Ken Cochrane
2ee602b9dd fixed unit tests 2014-12-31 12:19:06 -05:00
Ken Cochrane
6786499ba1 first pass at some unit tests, still not working 2014-12-30 20:17:15 -05:00
Ken Cochrane
859bc4a25d initial checkin 2014-09-23 17:31:17 -07:00