Commit graph

27 commits

Author SHA1 Message Date
Mounir Messelmeni
04fd39fa57 Enhance get_lockout_response to support original_response parameter 2025-12-19 21:19:03 +02:00
Bruno Alla
b54019fa0f Change AXES_COOLOFF_TIME callable to take exactly 1 argument 2024-10-02 20:15:31 +03:00
Bruno Alla
510c8d18f5 feat: pass the request to get dynamic cool off period 2024-10-02 20:15:31 +03:00
Bruno Alla
2fb4c81243 feat: pass username to AXES_COOLOFF_TIME callback
If the AXES_COOLOFF_TIME is a callable or path to a callable taking
an argument, pass the username to it.

This should enable users to customize the cool off to be user dependant,
and possibly implement a growing cool-off time:

- First lockout cools off after 5 mins
- Second one after 10 mins
- etc...
2024-10-02 20:15:31 +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
ebe1b74925 test: fix duplicate test names in AxesCoolOffTestCase 2023-07-25 19:57:20 +03:00
Maksim Zayakin
c66bb1fb2b test: add new client parameters tests 2023-05-13 14:04:14 +03:00
Maksim Zayakin
166c431b25 test: add callable AXES_LOCKOUT_PARAMETERS test cases and tests with wrong lockout parameters 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
7ee8573939 test: use AXES_LOCKOUT_PARAMETERS in helpers test 2023-05-13 14:04:14 +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
cd950ddfef Make ipware an optional dependency
Relates to #1038
2023-04-28 14:16:44 +03:00
Maksim Zayakin
5fb675b588 test: change status 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
791cce011d add ClientIpAddressTestCase 2023-03-29 16:35:06 +03:00
Petr Dlouhý
f2d3009279 add user_agent test, fix get_client_parameters tests 2022-11-24 21:58:57 +02:00
Aleksi Häkli
4490013111 Migrate MD5 hashing to SHA256
Continue using MD5 hashing in Axes test settings
as it offers better performance for test runs
without compromising security for users
2022-05-16 10:41:07 +03:00
Hasan Ramezani
dc98a7b2e3 Allow float values for AXES_COOLOFF_TIME(#868). 2022-04-13 17:51:10 +03:00
Hasan Ramezani
e4e88e01a3 Fix #845 -- Rename test functions 2022-03-02 17:12:45 +02:00
sarahboyce
403076ef51 feat(helpers): update get_client_str to accept request object
Use case: include more info about the user in the client_str.
username is already included in the arguments but that would require a separate DB call.
https://github.com/jazzband/django-axes/issues/782
2021-09-02 17:40:05 +03:00
phil-bell
2368a7af38 adding test for different http response code 2021-08-19 16:02:32 +03:00
smtydn
1a8d96e242 Add AXES_CLIENT_STR_CALLABLE setting 2021-05-19 20:54:57 +03:00
Michael O'Connor
170dacc112 Integrate AXS_SENSITIVE_PARAMETERS functionality with AXES_PASSWORD_FORM_FIELD 2021-05-03 17:10:45 +03:00
Michael O'Connor
f54c4f095b Add option to cleanse sensitive GET and POST params in database handler 2021-05-03 17:10:45 +03:00
Aleksi Häkli
b6b26e492f Optimize imports as part of cleanup round 2021-01-07 18:23:33 +02:00
Aleksi Häkli
5d042aa105 Clean up test structure
Move old test_utils content to test_helpers
to better correlate with current submodule naming
2021-01-07 18:23:33 +02:00
Aleksi Häkli
a5045f62fe Move tests outside project source folder 2021-01-07 18:23:33 +02:00
Renamed from axes/tests/test_helpers.py (Browse further)