Commit graph

24 commits

Author SHA1 Message Date
djmore4
afa2066ba0 Add pragma: no cover comments even though some of this stuff is covered... 2022-11-13 11:09:53 -05:00
djmore4
b9b067472c Whoops, they worked I guess. Let's see if they still do or we need more changes. Also improve coverage 2022-11-13 11:09:53 -05:00
djmore4
177f2ecce8 Add new config options and update logic/tests to account for them 2022-11-13 11:09:53 -05:00
Jonathan Willitts
5f5b34d50e Fix failing tests to work with Django (4.0) main dev branch 2021-04-29 06:50:36 -04:00
calmkart
71312eb841
FIX: support for special character in redis password(such like '@') (#155)
* FIX: if special character in redis password, we can set DEFENDER_REDIS_PASSWORD_QUOTE to True, and use quote password

* MOD:add test cases with password_quota = True
2020-03-13 08:13:54 -04:00
Aleksi Häkli
a1d526f318
PEP8 formatting (#147)
Run black with Python 2.7 as target version
to unify the code styling and make it more
linter and style guide compliant
2019-11-15 20:22:14 +02:00
Andrei Baryshnikov
3031deb761 Add possibility to use custom utils.get_username_from_request function (#122)
* Add `DEFENDER_GET_USERNAME_FROM_REQUEST_PATH` setting

This setting allow to override default `get_username_from_request`
function.

* Add `get_username` argument to `watch_login`

To be able to propagate this argument to other utils functions calls

* Minor code-style fixes

* Add example of use of `DEFENDER_GET_USERNAME_FROM_REQUEST_PATH` setting

* Update docs
2018-05-29 10:32:08 -04:00
William Boman
250c4d5388 add 2 new setting variables for more granular failure limit control (#113) 2018-04-10 09:22:51 -04:00
Ken Cochrane
4d9adc35c2 Cleanup the code to remove lint warnings (#87)
* Cleanup the code to remove lint warnings

Signed-off-by: Ken Cochrane <kencochrane@gmail.com>

* Fixed typo

Signed-off-by: Ken Cochrane <kencochrane@gmail.com>
2017-06-28 17:09:44 -04:00
Francisco Rivera
d2b712eade Taking redis client from django.core.cache (#82)
* new setting that point to an already configured redis client

* taking redis client from django cache setting

* adding informative exception

* dropping django 1.6 support

* dropping django 1.7 support

* adding tests

* removing old coverage stuff + pep8 fixes

* ups, wrong package

* supporting multiple backends

* adding documentation

* dropping python 2.6 support
2017-06-24 19:17:15 -04:00
Jakub Kuszneruk
cd0a22c1c5 [#70] get username from request is more flexible
- Every function which loads username from request has the optional paramter: get_username
piggyback:
- removed redefinition of USERNAME_FORM_FIELD from defender.config
2017-03-10 20:04:45 +01:00
Karimov Dmitriy
d85752970b Add DEFENDER_DISABLE_USERNAME_LOCKOUT 2016-06-20 09:20:47 +05: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
Alex White
319027c1e6 Fix line length meet PEP8 2015-04-21 16:24:01 -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
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
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
a6eb683ea1 more cleanup 2015-01-26 10:56:25 -05:00
Ken Cochrane
92c378bf68 Add Celery option for writing to database 2015-01-03 16:33:51 -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
Ken Cochrane
34060b1eb1 added one more unit test, and added a coverage ignore to a line 2015-01-02 16:10:12 -05:00
Ken Cochrane
6f0f5c26f2 added more unit tests 2015-01-02 16:02:09 -05:00
Ken Cochrane
a8e721dd3d more refactoring and unit tests 2015-01-01 12:51:46 -05:00