Commit graph

150 commits

Author SHA1 Message Date
Dashgin
d90dfa8db7 added test for remove_prefix method 2023-02-21 11:01:20 -05:00
Dashgin
428968b238 Bugfix strip_keys method (returns wrong response method when there is string containing in key_list) 2023-02-21 11:01:20 -05:00
Ken Cochrane
ac36751561 bump version to 0.9.6 2022-11-29 08:21:40 -05:00
djmore4
afa2066ba0 Add pragma: no cover comments even though some of this stuff is covered... 2022-11-13 11:09:53 -05:00
djmore4
374971bfc5 Remove incorrect tests 2022-11-13 11:09:53 -05:00
djmore4
5139005106 Fix test name and correct logic in data.py 2022-11-13 11:09:53 -05:00
djmore4
359ee90082 I think we're finally done here 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
de1c876b99 Using assertEquals and an exception to test where the logic is going wrong 2022-11-13 11:09:53 -05:00
djmore4
717d44aa7d Update README further and make another adjustment to the tests 2022-11-13 11:09:53 -05:00
djmore4
1bf9d6e7d1 Refactor once again 2022-11-13 11:09:53 -05:00
djmore4
a280c90bc0 Refactor once again 2022-11-13 11:09:53 -05:00
djmore4
7121db4b0f another different approach 2022-11-13 11:09:53 -05:00
djmore4
be523281ab Hopefully this clears up the issues in the tests 2022-11-13 11:09:53 -05:00
djmore4
2d288b247a Try some new things 2022-11-13 11:09:53 -05:00
djmore4
bbe7687abd Added changes and fixed small bug 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
cbh
bb122f24b9 add username option to redis config 2022-06-06 13:15:55 +03:00
Jona Andersen
0b96c53245 Bump to 0.9.4 2022-05-01 16:09:52 -04:00
Jona Andersen
44ecbee250 Strip port number from IP address in X-Forwarded-For 2022-05-01 14:22:28 -04:00
Hasan Ramezani
fdf37feb54 Drop Django 2.2 support 2022-04-13 17:46:42 +03:00
Hasan Ramezani
7c544d1cf8 Drop Django 3.1 support. 2021-12-16 16:40:44 -05:00
Williams Mendez
c8a2586892 Define AppConfig.default_auto_field to match the initial migration
This patch removes a warning but also prevents creating migrations in projects
where DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField".
2021-12-13 21:00:46 +01:00
Hasan Ramezani
55ab5c6961 Replace assertEquals with assertEqual. 2021-10-13 21:47:34 +03:30
Ryan Bales
e5edaf3b5d bugfix for IP backdoor to DEFENDER_LOCK_OUT_BY_IP_AND_USERNAME 2021-08-01 15:19:34 -04:00
Ken Cochrane
5d625dd273 release version 0.9.1 2021-07-18 09:31:51 -04:00
Jonathan Willitts
5f5b34d50e Fix failing tests to work with Django (4.0) main dev branch 2021-04-29 06:50:36 -04:00
Ken Cochrane
d413e60847 released version 0.9.0 2021-04-25 19:36:10 -04:00
Jannis Leidel
b4a5f886d4
Migrate to GitHub Actions. (#174)
* Add GitHub Actions test workflow.

* Add release workflow.

* Remove Travis cruft and update changelog.

* Fix deps.

* Remove Celery version restriction.

* Relax installation requirements a bit.

* Update README.rst

* Update tox.ini
2020-12-21 14:18:53 +01:00
Hasan Ramezani
9a322c4729 Add support for Python 3.9 2020-11-27 16:32:46 +01:00
Hasan Ramezani
cc06ab33fd Drop support Django < 2.2 and add support for Django > 3 2020-11-27 16:32:46 +01:00
Hasan Ramezani
5e6e52fcbb Drop Python2.7 support. 2020-11-23 17:30:46 +01:00
Hasan Ramezani
1f9b3dec7c Fix version. 2020-11-23 09:08:40 +01:00
Jorge
7124e4b156 make password quote optional in the funciton signature 2020-10-27 12:35:39 -03:00
Ivan Pereira
6354df0a8a
dynamic load celery (#163) 2020-09-04 15:11:19 -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
Ken Cochrane
8daa2d168d Added changes for release 0.7.0 2020-02-23 15:23:52 -05:00
David Nugent
cb59d1c481 Fixes for django 3.0+
As python 2i is no longer supported, stub reference to python_2_unicode_compatible
2020-02-23 14:25:15 -05:00
Jannis Leidel
ed857f7481
Run lints and other checks. (#149) 2019-11-25 11:11:57 +01:00
Jannis Leidel
68d0b41ee5
Use setuptools-scm. 2019-11-24 15:14:12 +01: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
horida
ce95906488 send user/ip blocked signal only once 2019-09-16 08:47:35 -04:00
horida
fcfa88d679 Add unblock signals 2019-09-08 10:05:04 -04:00
Chris Ledet
7ca76bb975 Add and test support for Django 2.2 2019-05-30 08:34:42 -04:00
fr0mhell
7400a4945f Feature update Python and Django versions (#126)
* remove Python 3.3
* remove Django 1.8-1.10
* add Celery v4
* update travis config
* update admin URL
* replace MIDDLEWARE_CLASSES with MIDDLEWARE
2019-01-29 07:50:02 -05: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
Jaimie Imrie
066dd238c8 Added ssl option when instantiating StrictRedis (#120) 2018-04-10 18:57:45 -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
William Boman
b546224372 send signals when blocking username or ip (#114) 2018-04-10 09:21:37 -04:00
Ken Cochrane
fcfcd53076
Move mockredis to test requirements. replaces #115 (#119)
Signed-off-by: Ken Cochrane <KenCochrane@gmail.com>
2018-02-20 09:34:14 -05:00