Commit Graph

79 Commits

Author SHA1 Message Date
Peter Bieringer
9137f5bca4 test: add cases for user/path value check 2026-04-23 06:13:31 +02:00
Peter Bieringer
93a4d9390c add various test cases for filesystems 2026-04-19 11:58:59 +02:00
Henning Schild
6690e9e3ca radicale/utils: drop bcrypt compat check
We now support passlib and bcrypt5 so the test can be dropped.

Related-to: #1980
Signed-off-by: Henning Schild <henning@hennsch.de>
2026-04-14 19:13:44 +02:00
Henning Schild
7b5c0304bb radicale/tests: use BCRYPT_MAX_PWLEN from auth.htpasswd
Do not define the magic value twice, instead reuse the value from the
auth code also in the related tests.

Signed-off-by: Henning Schild <henning@hennsch.de>
2026-04-14 18:55:05 +02:00
Henning Schild
eb49553b20 test/auth: add another bcrypt max len test
This time the other way around just to be extra sure. Radicale currently
does not ever call bcrypt.hashpw, let alone with an overlong password.

Related-to: #1896
Signed-off-by: Henning Schild <henning@hennsch.de>
2026-04-14 18:21:38 +02:00
Henning Schild
e77a1c5187 test/auth: add bcrypt max len test
The maximum password length of bcrypt is 72 chars, any longer password
will create the same hash. Some password/hashing lib combinations
truncate for us, for others we might catch exceptions. So test all that
to make sure we can handle all combinations.

Related-to: #1896
Signed-off-by: Henning Schild <henning@hennsch.de>
2026-04-14 18:21:38 +02:00
Henning Schild
f65754e0da test/auth: fix bcrypt autodetect test
Was not using "autodetect" as intended.

Signed-off-by: Henning Schild <henning@hennsch.de>
2026-04-14 14:14:38 +02:00
Peter Bieringer
49db75dae8 delay and sharing/token: align+fix 2026-04-02 13:11:24 +02:00
Peter Bieringer
d81dfa8547 auth/test: check auth_delay on failed login 2026-03-29 14:52:41 +02:00
Peter Bieringer
b07fc395cf code: cosmetics 2026-03-29 14:52:41 +02:00
Peter Bieringer
4b49910dfc test/auth: add support for optional delay 2026-03-29 14:52:41 +02:00
Peter Bieringer
7fd6cde1fe disable delay for some tests 2026-03-07 16:22:29 +01:00
Peter Bieringer
373ffaed2e add htpasswd test cases for SHA256/512 with explicit rounds 2026-01-08 05:38:21 +01:00
Peter Bieringer
f676dd7621 cosmetics 2026-01-06 17:41:35 +01:00
Peter Bieringer
3eb5f32d3d update copyright year 2026-01-06 17:34:43 +01:00
Peter Bieringer
27eedc098d skip bcrypt tests if not usable 2026-01-06 17:34:26 +01:00
Peter Bieringer
bf8619a41c add support for http_remote_user 2025-11-15 15:32:13 +01:00
Johannes Berg
256ca59aaf auth: clean up remote IP parameter/documentation
Make the remote IP parameter more generic and make it an enum
determining the source instead of a boolean. Also fix the
changelog entry.

Both as requested, I managed to miss those comments previously.
2025-09-09 20:25:49 +02:00
Johannes Berg
b5a1ea911d auth: dovecot: pass remote IP (rip=) to auth server
If known, let the auth server know where the client came
from, using REMOTE_ADDR or, optionally/configurably, the
X-Remote-Addr header value (which is needed when running
behind a trusted proxy.)

Addresses #1859.
2025-09-09 12:10:00 +02:00
Peter Bieringer
7b49bab471 argon2: make isort happy 2025-04-29 19:41:48 +02:00
Peter Bieringer
631f1596ae argon2: make flake8 happy 2025-04-29 19:39:15 +02:00
Peter Bieringer
be54c8067f argon2: testcases 2025-04-29 19:18:54 +02:00
Peter Bieringer
9f0385fd67 add some autodetect cases, add 2 additional bcrypt algo 2025-03-09 08:51:20 +01:00
Peter Bieringer
f6b5cb8a1e make flake8 happy 2025-02-18 06:14:59 +01:00
Peter Bieringer
3914735ec0 skip bcrypt related tests if module is missing 2025-02-18 06:13:39 +01:00
Peter Bieringer
48a634af9f check whether bcrypt module is available 2025-02-18 06:13:19 +01:00
Peter Bieringer
3763f28ae4 tox fixes 2025-01-01 17:36:15 +01:00
Peter Bieringer
5d48ba5d1e add test cases 2025-01-01 17:28:09 +01:00
Peter Bieringer
3ebe51a4cb Add: option [auth] uc_username for uppercase conversion (similar to existing lc_username) 2024-12-14 09:25:36 +01:00
Jean-Denis Girard
c6cc7f3486 Skip Dovecot auth tests on Windows (try again...) 2024-10-31 09:28:35 -10:00
Jean-Denis Girard
652e768650 Skip Dovecot auth tests on Windows 2024-10-31 06:36:47 -10:00
Jean-Denis Girard
f25a5fbc79 Rebase galaxy4public patch on top of bf4f5834 2024-10-30 10:33:10 -10:00
Peter Bieringer
13b1aaed39 add auth/strip_domain option 2024-07-18 06:50:29 +02:00
Peter Bieringer
f117fd06af add missing test for auth/lc_username 2024-07-18 06:49:10 +02:00
Peter Bieringer
d8cbe0e206 extend copyright 2024-06-07 06:46:16 +02:00
Peter Bieringer
5dd27d3c80 add support for auth.type=denyall 2024-06-07 06:45:39 +02:00
Peter Bieringer
36285143ce fix for incomplete https://github.com/Kozea/Radicale/pull/1425 and test 2024-03-12 07:38:40 +01:00
Unrud
5aa2f59b38 Always test bcrypt 2022-07-03 12:56:24 +02:00
Unrud
4b5165dc42 Extract method configure 2021-12-10 20:54:04 +01:00
Unrud
bbaf0ebd8c Change name in file header 2021-12-09 16:55:46 +01:00
Unrud
60f25bf19a Type hints for tests 2021-09-26 22:24:45 +02:00
Unrud
cecb17df03 More type hints 2021-09-26 22:24:45 +02:00
Unrud
1edfb16143 Fix isort test
Was broken by isort>=5
2020-07-23 18:42:43 +02:00
Unrud
9bd852ba5e Remove duplicated code 2020-04-22 19:20:36 +02:00
Unrud
180e96b332 Move internal options to other sections 2020-02-19 09:50:36 +01:00
Unrud
5371be2b39 Mark internal configuration options and sections with underscore 2020-02-19 09:50:27 +01:00
Unrud
db7587c593 Cosmetic changes 2020-01-21 19:40:02 +01:00
Unrud
fc180266d5 Improve tests
- Parse and verify XML responses
- Extract methods for common requests
2020-01-20 09:47:51 +01:00
Unrud
562d3aacec Add unicode support to htpasswd 2020-01-19 21:07:54 +01:00
Unrud
6108d8d759 Remove unsecure methods from htpasswd and make md5 default 2020-01-19 21:07:54 +01:00