Commit Graph

1505 Commits

Author SHA1 Message Date
Unrud
f14e1de071 Add multifilesystem_nolock storage 2021-12-09 16:55:46 +01:00
Unrud
e629e9a2e1 Require argument for --config command-line option 2021-11-14 23:31:00 +01:00
Unrud
98b49ac2b6 Optional argument for boolean command-line options 2021-11-14 23:30:59 +01:00
Unrud
08e789d993 Support backend specific options and HTTP headers via command-line 2021-11-14 23:30:59 +01:00
Unrud
b23aa4629c Refactor command line argument parser 2021-11-14 23:30:58 +01:00
Unrud
dba6338968 Rename opposite to opposite_aliases 2021-11-10 22:16:30 +01:00
Unrud
7c9c873b13 Don't modify DEFAULT_CONFIG_SCHEMA 2021-11-10 22:14:51 +01:00
Jochen Sprickerhof
f72b344981 Add py.typed to mark as having typing information
According to PEP 561.
2021-10-16 17:38:41 +02:00
Unrud
f921e48648 Remove unused variable 2021-09-27 17:22:37 +02:00
Unrud
60f25bf19a Type hints for tests 2021-09-26 22:24:45 +02:00
Unrud
698ae875ce Type hints for multifilesystem 2021-09-26 22:24:45 +02:00
Unrud
cecb17df03 More type hints 2021-09-26 22:24:45 +02:00
Unrud
73e42f8101 Enable static type checking 2021-09-26 22:24:45 +02:00
Unrud
34bec01c9b Fail when test file can't be read 2021-05-14 00:07:09 +02:00
Michael Stilkerich
398e93e215 Fix is-not-defined filter in addressbook-query report 2021-03-23 00:49:22 +01:00
Tim Gates
21099f2240
docs: fix simple typo, errornous -> erroneous (#1126)
* docs: fix simple typo, errornous -> erroneous

There is a small typo in radicale/storage/__init__.py.

Should read `erroneous` rather than `errornous`.

* Update __init__.py
2021-03-23 00:48:25 +01:00
Unrud
5333751e45 Allow float for server->timeout setting 2020-10-25 20:32:32 +01:00
Unrud
742a067171 Disallow abbreviated arguments 2020-10-23 22:26:28 +02:00
Unrud
2aafcd5df5 Use renameat2 on Linux for atomic exchanging of files 2020-10-23 21:37:45 +02:00
Unrud
f05251bd01 Improve error messages for locking problems on Windows 2020-10-23 21:20:16 +02:00
Unrud
b4c76c94ad Cancel mkcalendar request on error 2020-10-11 19:20:20 +02:00
Unrud
4d4b040b81 Improve sanitization of collection properties 2020-10-11 19:20:20 +02:00
Unrud
9909454761 Fix matching of date property 2020-10-06 07:31:29 +02:00
Unrud
0e8949ff71 Internal server: Shutdown server via socket 2020-10-04 14:40:52 +02:00
Unrud
c8b31637ef Improve log messages 2020-10-04 14:40:52 +02:00
Unrud
b14889e170 Workaround: defusedxml messes up subsequent imports of ElementTree
See https://github.com/tiran/defusedxml/issues/54
2020-10-04 10:15:16 +02:00
Unrud
0b3e4204a5 Cosmetics 2020-10-04 10:14:57 +02:00
Unrud
18f21e26d5 Improve log message 2020-10-04 05:40:46 +02:00
Unrud
a9804dd550 Don't use assertion for expected error 2020-10-04 05:39:58 +02:00
Unrud
7096ab74e8 Don't modify global constants 2020-10-04 05:38:58 +02:00
Unrud
d48bacc8e3 Improve log messages
Log failed login attempts with remote host as warning (closes #1104)
Add component UID to log message about invalid recurrence rules (reference #602)
Use "forwarded for" instead of "forwarded by" for remote host
2020-09-26 22:08:23 +02:00
Unrud
ca27156605 More tests
for PROPPATCH, PROPFIND, MKCALENDAR and MKCOL
2020-09-26 22:08:22 +02:00
Unrud
10dafde32d Allow multiple <D:set> and <D:remove> elements and consider order 2020-09-26 22:08:22 +02:00
Unrud
1fe011020b Single <D:propstat> element in PROPPATCH response
Instead of multiple elements with the same status
2020-09-26 22:08:21 +02:00
Unrud
7642d72919 Improve variable names 2020-09-26 22:08:21 +02:00
Unrud
a3ca887a37 Fix exceptions raised by decode_request 2020-09-14 21:20:39 +02:00
Unrud
0ce90d6b34 Extract read*_request_body methods 2020-09-14 21:19:48 +02:00
Unrud
42ad18bc84 Rename _write_xml_content to _xml_response 2020-09-14 21:17:18 +02:00
Unrud
80e8750c8a Add more tests 2020-09-14 18:54:02 +02:00
Tom Hacohen
d3bb19800c
Web: add support for the POST HTTP method. (#1097)
* Web: add support for the POST HTTP method.

This patch adds support for POST in addition to the already supported GET.

This is needed for implementing more complex web modules that also
support configuration modifications and advanced queries.

* Base web: return METHOD_NOT_ALLOWED when method isn't implemenetd.

Co-authored-by: Unrud <Unrud@users.noreply.github.com>
2020-09-14 18:17:45 +02:00
Unrud
6091bd46a3 Respond 405 for unsupported methods instead of server error 2020-09-12 20:23:45 +02:00
Unrud
2851525e15 Try to kill child processes of storage hook 2020-08-31 14:11:42 +02:00
Unrud
1e011e7011 Start storage hook in own process group
Prevents terminals from sending SIGINT etc.
2020-08-31 14:11:42 +02:00
Unrud
d4af2cd1a6 Kill storage hook on error 2020-08-31 14:11:42 +02:00
Unrud
30c9c55358 Exit immediately after cleanup when signal is received
Waiting for clients introduces the risk that we exceed some timeout (e.g. from systemd) and get killed instead.
2020-08-31 14:11:42 +02:00
Unrud
46c39b28d6 Make shutdown_socket optional 2020-08-31 13:54:47 +02:00
Unrud
b98cd98c4c Fix internal server on FreeBSD 2020-08-18 22:51:35 +02:00
Unrud
1edfb16143 Fix isort test
Was broken by isort>=5
2020-07-23 18:42:43 +02:00
Unrud
f780853d8f Fix internal server on OpenBSD
On OpenBSD closed sockets are handled as exceptional conditions.
Fixes #1062
2020-06-06 21:08:14 +02:00
Unrud
e0247f8f92 Cosmetics 2020-05-24 13:41:08 +02:00
Unrud
7ed5122636 Use 403 response for supported-report and valid-sync-token errors
Some clients don't handle 409
2020-05-24 13:32:24 +02:00
Unrud
e63a6e0c85 Cosmetics 2020-05-24 13:31:14 +02:00
Unrud
d3b90506f5 Add tests for conflicting UIDs and overwriting of items 2020-05-24 13:19:29 +02:00
Unrud
b9bb017edf Test current-user-principal prop authentication workaround 2020-05-24 13:19:29 +02:00
Unrud
6ec63ccc9b Handle missing IPv6 support by the kernel
This is different from disabled IPv6.

Fixes #1050
2020-05-24 10:11:40 +02:00
Unrud
83c02a64b9 Shorter web interface title 2020-05-22 16:34:48 +02:00
Unrud
3be9a22a91 Fix XML error messages
Fixes #825
2020-05-22 16:34:02 +02:00
Unrud
8740357eb2 Remove useless constant 2020-05-19 17:04:40 +02:00
Unrud
150dd0c4cd Trim all (ASCII) whitespace characters 2020-05-19 07:06:44 +02:00
Unrud
593f9b688c Remove unnecessary string trimming 2020-05-19 06:48:12 +02:00
Unrud
d26ee9e7ed Revert "Use secure RNG for auth delay"
This reverts commit 7b79c00ae2.
2020-05-17 01:43:52 +02:00
Unrud
4d632a97f3 Use secure RNG for UIDs
Closes #766
2020-05-15 23:34:31 +02:00
Unrud
630d49b7cf Fix file permissions in storage folder
Closes #1024
2020-05-15 21:54:10 +02:00
Unrud
63e00ca677 Direct creation of files for batch uploads 2020-05-15 21:54:10 +02:00
Unrud
7b79c00ae2 Use secure RNG for auth delay 2020-05-15 21:54:09 +02:00
Unrud
2b60f8ca2a Don't save password in session storage 2020-05-03 21:00:48 +02:00
Unrud
3c778ef95e Cosmetics 2020-04-28 21:56:13 +02:00
Unrud
8de3a234c4 Escape all occurrences not only the first 2020-04-28 14:11:35 +02:00
Unrud
7f2d5cea62 New right "i": Only allowing HTTP method GET 2020-04-22 19:20:42 +02:00
Unrud
9bd852ba5e Remove duplicated code 2020-04-22 19:20:36 +02:00
Unrud
d73a308294 Cosmetics 2020-04-22 19:20:30 +02:00
Unrud
d5f5eeeddf from_file rights: Replace config parser interpolation 2020-04-22 19:20:24 +02:00
Unrud
aef58bd55c Minimize accesses to rights backend 2020-04-22 19:20:07 +02:00
Unrud
f6a3a19680 Simplify Rights plugin interface 2020-04-09 22:02:03 +02:00
Unrud
8ca01a4989 Fix integrated server on android 2020-04-09 22:01:55 +02:00
Unrud
9c622b57d5 Allow callable in configuration for plugin.type
Example:

```python3
\# Load default configuration
my_config = config.load()

\# Pass a class directly
my_config.update({"auth": {"type": MyAuth}})

\# Pass an object directly
my_rights = MyRights()
my_config.update({"rights": {"type": lambda config: my_rights}})

app = Application(my_config)
````
2020-04-09 22:01:35 +02:00
Unrud
bd71c04973 Use correct delimiter 2020-02-20 18:29:08 +01:00
Unrud
f46a3e3d24 Fix test on MacOS (3) 2020-02-20 11:27:26 +01:00
Unrud
ee984b49d4 Fix test on MacOS (2) 2020-02-20 10:55:00 +01:00
Unrud
363dd79833 Fix test on MacOS 2020-02-20 10:42:50 +01:00
Unrud
d3b632e123 Remove unused code 2020-02-20 10:41:33 +01:00
Unrud
8890a4c030 Handle disabled IPv6 support and workaround for PyPy 2020-02-20 07:57:39 +01:00
Unrud
9603aa3496 Tests: Replace gunicorn with waitress (works on Windows too) 2020-02-20 07:57:39 +01:00
Unrud
941bb157cc Cosmetic changes 2020-02-19 10:01:39 +01:00
Unrud
d8f1565f5b Remove journald support 2020-02-19 09:50:45 +01:00
Unrud
6b46b01fcb Include time in log messages 2020-02-19 09:50:40 +01:00
Unrud
180e96b332 Move internal options to other sections 2020-02-19 09:50:36 +01:00
Unrud
8e3465b5d4 Specify option type in _allow_extra 2020-02-19 09:50:30 +01:00
Unrud
5371be2b39 Mark internal configuration options and sections with underscore 2020-02-19 09:50:27 +01:00
Unrud
0bda1f4c16 Improve error messages 2020-02-19 09:50:25 +01:00
Unrud
66fabbead9 Use socket pairs to communicate with client threads 2020-02-19 09:50:19 +01:00
Unrud
698980d7be Remove forking support
* Third-party plugins have to be fork-safe
* Not supported on Windows
2020-02-19 09:50:02 +01:00
Unrud
3b99d64935 Cosmetic changes 2020-02-19 09:50:00 +01:00
Unrud
cc22927353 Bind sockets for IPv4 and IPv6 2020-02-19 09:49:56 +01:00
Unrud
36483670d4 Refactor: Remove class attributes and subclassing 2020-02-19 09:49:44 +01:00
Unrud
a872b633fb Refactor: Remove method Configuration.log_config_sources 2020-02-19 09:48:42 +01:00
Unrud
11ea3cc7a4 Remove settings for TLS protocol and ciphers
Use the recommended default settings instead.
2020-02-19 09:48:38 +01:00
Unrud
4a43b17840 Remove reverse DNS lookup
It wasn't working for years because the functionality was removed from http.server.
Nobody complained.
2020-02-19 09:48:34 +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