Commit graph

25 commits

Author SHA1 Message Date
rodrigo.nogueira
546cf4df0c style: apply black formatting to axes/checks.py 2026-02-22 01:54:33 -03:00
rodrigo.nogueira
7eef2f14b3 feat: introduce progressive lockout tiers for dynamic cool-off periods based on failure count. 2026-02-22 01:09:57 -03:00
Aleksi Häkli
4b77eb69ee Run black autoformatting 2026-02-11 22:14:31 +02:00
rodrigo.nogueira
95a8043341 Fix AttributeError when optional settings are undefined
Fixes #1328
- Add None as default value in axes_conf_check
- Add test coverage for missing settings scenario
2026-02-06 20:19:42 +02:00
shayan taki
3f6e773f7d Add security check (W006) for missing ip_address in lockout params 2025-12-19 21:13:43 +02:00
Ian Fisher
5b235b50ed Add check for callable settings 2023-06-13 19:15:07 +03:00
Maksim Zayakin
97022a460d chore!: deprecate params related to lockout parameters resolution 2023-05-13 14:04:14 +03:00
Aleksi Häkli
31249a5947 Update django-ipware configuration flags to new AXES_IPWARE_ prefixes
Use explicit new AXES_IPWARE_ referencing configuration flag names
in place of the old plain implicit AXES_ name prefixes
2023-04-28 14:16:44 +03:00
Simon Kern
5590419f81 Use new backend base class in checks
In 5c4bca6cb6 a new backend  base class was introduced. However the check and its corresponding tests still reference the old base class, thus triggering a warning on setups using the new backend base class.

resolves #907
2022-08-18 16:32:00 +03:00
Aleksi Häkli
4cac338138 Add AXES_LOGGER deprecation notice to checks 2020-09-27 17:08:01 +03:00
Aleksi Häkli
93bb73552e
Upgrade CI tooling to use automatic code formatting 2019-09-28 19:28:17 +03:00
Aleksi Häkli
4113fc57d9
Handler import and module loading errors in checks 2019-07-09 12:54:55 +02:00
Adam Johnson
fa83253056 Don't trigger axes.W003 for subclasses of AxesBackend
The [usage documentation](https://django-axes.readthedocs.io/en/latest/3_usage.html) advises to create subclass of `AxesBackend` to ignore the lack of `request` if necessary. I've done this in a project using `django-oauth-toolkit`, which doesn't pass `request` (though it should as per [this PR](https://github.com/jazzband/django-oauth-toolkit/pull/643)).

This meant that the axes.W003 check was being triggered, so I've fixed it to check for subclasses of `AxesBackend` as well as the class itself.
2019-07-09 12:10:26 +02:00
Aleksi Häkli
5107e8df37
Improve check for deprecated flags
Checking with getattr(object, name, [default]) provides
false positivies for flags that have their value set to None.
Checking with try: getattr(object, name) always produces
correct check values if a flag is defined in project settings.
Default values for flags are defined in the Axes default settings
so this should not alter any existing behaviour.
2019-06-02 13:41:29 +03:00
Aleksi Häkli
47ae68b0c0 Deprecate AXES_DISABLE_SUCCESS_ACCESS_LOG flag
Fixes #446
2019-05-25 20:45:21 +03:00
Aleksi Häkli
d0b21d3803 Use term warning instead of error in check module code 2019-05-25 20:45:21 +03:00
Aleksi Häkli
c34a2daa1b
Improve check structure and types
Django core uses warnings and mostly no objects in checks
Adopting the same style for check readability purposes
2019-05-01 15:23:16 +03:00
Aleksi Häkli
d5096a6464 Add checks for django-axes configuration flags 2019-05-01 14:30:21 +03:00
Aleksi Häkli
7f9f98cedb
Fix invalid error code format for Axes
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-03-13 15:48:40 +02:00
Aleksi Häkli
8b3c5e7b5a
Refactor cache checks
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 21:05:18 +02:00
Aleksi Häkli
677d4c48f4
Improve documentation
- Add information on handlers
- Document configuration options and precedences
- Restructure documentation for better readability

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 17:04:03 +02:00
Aleksi Häkli
1ab8d89869
Fix bug in missing cache backends
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 16:45:56 +02:00
Aleksi Häkli
19f84c5daa
Clean up and unify imports
- Use consistent alphabetical import ordering across files
- Use axes.conf.settings for internally loading settings

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-10 22:06:04 +02:00
Aleksi Häkli
030810df79
Drop Python 2.7 and Python 3.4 support
Fixes #395

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-07 17:28:26 +02:00
Aleksi Häkli
9c328713e7
Use Django checks for cache configuration
Fixes #383

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:28 +02:00