Maksim Zayakin
6202062f91
fix: make 007 migration backwards compatible
2024-06-29 21:21:15 +05:00
Davide
014483c65d
Add session hash to access log
2024-04-30 16:22:50 +02:00
Aleksi Häkli
dbd16dd5b0
Update syntax to be compliant with new black version
2024-03-04 20:07:47 +02:00
Aleksi Häkli
92f038e4af
Merge pull request #1169 from Viicos/remove-pkg-resources
...
Remove compatibility with `pkg_resources`
2024-03-04 19:52:32 +02:00
Viicos
ab54d68ee1
Remove compatibility with pkg_resources
2024-02-15 21:39:35 +01:00
Christian Clauss
493789640b
chore(deps): bump black from 23.12.1 to 24.1.0 AGAIN
2024-01-26 21:37:26 +01:00
Aleksi Häkli
38e316ca87
Fix code formatting
2023-12-27 12:40:23 +02:00
Taikono-Himazin
6f2584b440
Add async support to middleware
2023-12-13 13:35:22 +09:00
Aleksi Häkli
2a0fd0cfad
Merge pull request #1138 from p-l-/command-reset-ip-username
...
Add new management command `axes_reset_ip_username`
2023-12-08 19:39:40 +02:00
Pierre Lalet
6e64c62fbf
Add new management command axes_reset_ip_username
2023-11-28 20:37:39 +01:00
Laurent Lasudry
f64c1526d7
Add French translations
2023-11-06 12:35:54 +01:00
Christian Bundy
eb7b703a70
Avoid running data migration on incorrect databases
2023-10-08 22:33:21 +03:00
Maksim Zayakin
4861f3c988
fix: fix TransactionManagementError
2023-09-01 10:50:57 +03:00
Ronny Vedrilla
e9db2d9631
#1093 : "AXES_SENSITIVE_PARAMETERS" now have sensible defaults to follow "privacy-by-design"
2023-07-30 18:59:48 +03:00
Maksim Zayakin
9a54187a65
chore: update docstrings about settings.AXES_COOLOFF_TIME
2023-07-25 19:57:20 +03:00
Kira
370fadad36
add indonesian translation
2023-07-01 00:05:22 +03:00
Pieter Goetschalckx
74f7670b63
Remove unused methods from AxesStandaloneBackend
2023-06-22 11:44:53 +03:00
Davide
deb0e330ad
Add username to admin fieldsets #1073
2023-06-18 14:15:53 +03:00
Ian Fisher
5b235b50ed
Add check for callable settings
2023-06-13 19:15:07 +03:00
Maksim Zayakin
117db49091
feat: add is_admin_request, deprecate is_admin_site
2023-05-14 23:01:58 +03:00
Maksim Zayakin
3cba78a599
refactor: fix qa errors
2023-05-13 14:04:14 +03:00
Maksim Zayakin
0823584b02
refactor: fix prospector errors
2023-05-13 14:04:14 +03:00
Maksim Zayakin
73c4e4501b
chore: adjust types: use list instead of iterables and nested lists instead of tuples
2023-05-13 14:04:14 +03:00
Maksim Zayakin
8d4a0aa052
chore!: pass request and credentials to get_client_parameters
2023-05-13 14:04:14 +03:00
Maksim Zayakin
1e3d41228d
feat!: implement reset_request using get_lockout_parameters
2023-05-13 14:04:14 +03:00
Maksim Zayakin
476d3f52bc
chore: use get_lockout_parameters in handlers
2023-05-13 14:04:14 +03:00
Maksim Zayakin
07539ff3d7
chore!: use AXES_LOCKOUT_PARAMETERS in app init log message
2023-05-13 14:04:14 +03:00
Maksim Zayakin
2df1c1948a
refactor: refactor get_client_parameters
...
* Now accepts request_or_attempt and credentials which are passed to get_lockout_parameters
* Use lockout parameters that consumed from get_lockout_parameters
2023-05-13 14:04:14 +03:00
Maksim Zayakin
59a57386c1
feat: add get_lockout_parameters
...
Accepts request or AccessAttempt and optionally credentials. If AXES_LOCKOUT_PARAMETERS is callable, this function passes request or attempt and credentials to this callable and returns the result.
If AXES_LOCKOUT_PARAMETERS is iterable, returns AXES_LOCKOUT_PARAMETERS.
Otherwise raises TypeError.
2023-05-13 14:04:14 +03:00
Maksim Zayakin
97022a460d
chore!: deprecate params related to lockout parameters resolution
2023-05-13 14:04:14 +03:00
Maksim Zayakin
ffc161e814
feat!: add AXES_LOCKOUT_PARAMETERS flag
...
BREAKING CHANGE: add `AXES_LOCKOUT_PARAMETERS` flag which accepts an iterable of keys or a callable that resolves an iterable.
The key can be a string (represents a single parameter) or an Iterable of strings (represents a combined parameter).
For example, using this parameters
```python
AXES_LOCKOUT_PARAMETERS = [
"ip_address",
("username", "user_agent"),
]
```
axes will block users by IP and/or combination of username and user agent
2023-05-13 14:04:14 +03:00
Maksim Zayakin
9dfea8bf8e
chore: fix inaccuracies in russian locale
2023-05-13 13:53:57 +03:00
Aleksi Häkli
8386f30dbb
Fix type annotations for cache utilities
2023-05-01 21:27:47 +03:00
Aleksi Häkli
c3cfb5150a
Refactor cache backend to use cache.incr method for request tracking
...
The old cache.set method has problems with correctness as well as
performance on higher traffic sites where there are
multiple parallel web servers running at the same time
which can overwrite each others shared cache
2023-05-01 21:27:47 +03:00
Aleksi Häkli
9924077a2a
Rename get_cache_key to get_cache_keys
2023-05-01 21:27:47 +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
Aleksi Häkli
cd950ddfef
Make ipware an optional dependency
...
Relates to #1038
2023-04-28 14:16:44 +03:00
Maksim Zayakin
8294fdf756
feat!: set default response code to 429
2023-04-25 19:42:37 +03:00
ArtemDemidovAramMeem
0e76956a2e
Override log handler when using sensitive parameters. Closes #1010
2023-04-16 19:51:10 +03:00
Maksim Zayakin
c8bfbe603a
use AXES_CLIENT_IP_CALLABLE in get_client_ip_address
2023-03-29 16:35:06 +03:00
Maksim Zayakin
7ae0af2a1e
add AXES_CLIENT_IP_CALLABLE setting
2023-03-29 16:35:06 +03:00
Hasan Ramezani
274c4f7010
Fix black formatting in migrations
2023-03-01 10:36:29 +02:00
Hasan Ramezani
c8f831bb62
Update prospector to 1.8.2
2022-12-03 14:12:51 +02:00
Petr Dlouhý
ce3f2f2c3f
fix get_client_parameters when AXES_USE_USER_AGENT=True
2022-11-24 21:58:57 +02:00
Hasan Ramezani
2b24167dec
Fix black formatting
2022-11-19 10:51:42 +02:00
liampauling
1825f9be4f
add missing db alias to migration 0007
...
closes #932
2022-11-14 18:27:51 +02:00
JensDiemer
ca42b0f7dc
Bugfix #921 cannot import name 'get_distribution'
...
Replace `pkg_resources` with `importlib` solution to fix
https://github.com/jazzband/django-axes/issues/921
Because `importlib.metadata` is new in Python 3.8, fallback to old `setuptools` solution.
2022-11-14 18:25:06 +02:00
Hasan Ramezani
5c7bea2a42
Update mypy to 0.990
2022-11-14 18:22:04 +02: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
e168a9126b
Fix code formatting
2022-07-17 17:19:05 +03:00