Unrud
c296dfd497
Warning instead of error when base prefix ends with '/'
...
Workaround for #1210
2022-01-26 22:08:22 +01:00
Unrud
785659aa26
Redirect …/.well-known/{caldav,carddav} to /
...
Closes #1200
2022-01-26 22:08:22 +01:00
Unrud
e5187f3704
Verify that base_prefix starts with '/'
2022-01-22 00:35:30 +01:00
Unrud
5bc2d8f919
Error if SCRIPT_NAME ends with '/'
2022-01-22 00:11:12 +01:00
Unrud
27cc79d029
Improve log message
2022-01-22 00:11:12 +01:00
Unrud
a4e0e21e86
Drop body for HEAD requests last
2022-01-22 00:11:12 +01:00
Unrud
77a3ea7529
Only redirect to sanitized path under /web
2022-01-18 22:47:39 +01:00
Unrud
9e9f2bb780
Extract httputils.redirect
2022-01-18 22:47:39 +01:00
Unrud
113eeec847
Re-use variable
2022-01-18 22:47:39 +01:00
Unrud
2a29ad6a17
Set Content-Length for HEAD requests
2022-01-18 22:44:32 +01:00
Unrud
a26dcf3188
Redirect GET and HEAD requests to sanitized path
2022-01-18 22:44:32 +01:00
Unrud
2b8befa5db
Don't sanitize WSGI script name
2022-01-18 22:44:32 +01:00
Unrud
6ff0be84e4
Change name in file header
2021-12-20 21:21:21 +01:00
Unrud
d686df694e
Remove unused variable
2021-12-20 21:21:20 +01:00
Unrud
c93d7b8715
More type hints
2021-12-20 21:21:20 +01:00
Unrud
23a2989b77
Enable static type checking
2021-12-20 21:21:20 +01:00
Unrud
d807fc7ff2
Workaround: defusedxml messes up subsequent imports of ElementTree
...
See https://github.com/tiran/defusedxml/issues/54
2021-12-20 21:21:20 +01:00
Unrud
fe796a6b7c
Cosmetics
2021-12-20 21:21:20 +01:00
Unrud
c89cd67065
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
2021-12-20 21:18:32 +01:00
Unrud
6f3a95245f
Extract read*_request_body methods
2020-09-14 21:31:00 +02:00
Unrud
5aef41e691
Rename _write_xml_content to _xml_response
2020-09-14 21:31:00 +02:00
Tom Hacohen
09b021f33e
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 21:31:00 +02:00
Unrud
2dc7acda17
Respond 405 for unsupported methods instead of server error
2020-09-14 21:31:00 +02:00
Unrud
6a29233737
Cosmetics
2020-05-24 13:42:56 +02:00
Unrud
ada9fa1cce
Remove useless constant
2020-05-19 17:06:26 +02:00
Unrud
d26ee9e7ed
Revert "Use secure RNG for auth delay"
...
This reverts commit 7b79c00ae2
.
2020-05-17 01:43:52 +02:00
Unrud
7b79c00ae2
Use secure RNG for auth delay
2020-05-15 21:54:09 +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
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
d3776e55fb
Rework XML helpers functions
...
- Merge make_tag, tag_from_clark and tag_from_human into make_clark and make_human
- Don't use RegEx for parsing
2020-01-19 21:07:54 +01:00
Unrud
e11661ff3e
Protect against XML DOS attacks
...
Only XML content from authenticated users is parsed.
2020-01-19 21:07:54 +01:00
Unrud
e07df9fd1d
Prefix internal attributes with underscore
2020-01-19 21:07:54 +01:00
Unrud
0fb02cd026
Cosmetic changes (pylint)
2020-01-17 12:59:14 +01:00
Unrud
1453c0b72c
Mark attributes for internal use with underscore
2020-01-14 06:19:11 +01:00
Unrud
2e4924a0da
Improve documentation
2020-01-13 15:51:10 +01:00
Unrud
88a0af8ba1
Improve documentation
2020-01-12 23:32:28 +01:00
Unrud
6202257fc2
Fix variable naming to conform with PEP-8
...
Originally proposed by @ZipFile in #998
2020-01-12 23:32:28 +01:00
Unrud
b7590f8c84
Rework configuration
2019-06-17 04:18:09 +02:00
Unrud
63e6d091b9
Update copyright
2019-06-17 04:13:24 +02:00
Unrud
14b46c04bf
Create configuration for isort
2019-06-15 09:01:55 +02:00
Braxton Plaxco
27185f7291
Get python3 ./setup.py test
to pass cleanly
...
~ B'ezrat Hashem ~
2019-06-15 08:49:05 +02:00
Unrud
9c802e0f57
skip ambiguous isort modules
2018-09-05 11:37:18 +02:00
Unrud
5e0a387ed9
remove whitespace before email
2018-09-04 03:33:47 +02:00
Unrud
5429f5c1a9
assert sanitized and stripped paths
2018-08-28 16:19:50 +02:00
Unrud
8869b34470
refactor
2018-08-28 16:19:43 +02:00