Skip to content

Commit e433884

Browse files
authored
Merge pull request #2032 from maxberger/master
Move CSP to config and update changelog
2 parents fdd7f78 + 19d471a commit e433884

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@
33
## 3.7.0.dev
44

55
* Feature: collection sharing by map or token incl. management API and WebUI extension
6+
* Feature: share address book collection as birthday calendar
67
* Add: [auth] oauth2: allow custom client_id and client_secret (optional)
78
* Cleanup: deprecate config option 'ldap_use_ssl' for good
9+
* Cleanup: WebUI is now split into smaller javascript files
10+
* Cleanup: WebUI is now fit for strict content security policy
11+
* Cleanup: WebUI: Simplfied Caching and Navigation internally
12+
* Cleanup: WebUI: Unified error handling
13+
* Cleanup: Added integration test for verification of end-to-end behavior of WebUI
814
* Performance: improve `path_to_filesystem()`
915
* Performance: preload access rights from file
1016
* Add: [server] delay_on_error option
1117
* Add: [logging] limit_content option
18+
* Add: [headers] Content-Security-Policy is now set to be strict on new configs
1219

1320
## 3.6.1
1421

config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,9 @@
431431
# Additional HTTP headers
432432
#Access-Control-Allow-Origin = *
433433

434+
# Set CSP to disallow execution of unknown javascript
435+
# This may become the default in future versions, override if you need a different CSP.
436+
Content-Security-Policy = default-src 'self'; object-src 'none'
434437

435438
[hook]
436439

integ_tests/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ def start_radicale_server(tmp_path: pathlib.Path) -> Generator[str, Any, None]:
5353
htpasswd_filename = {user_path}
5454
[web]
5555
type = internal
56+
[headers]
57+
Content-Security-Policy = default-src 'self'; object-src 'none'
5658
[sharing]
5759
type = csv
5860
collection_by_map = true

radicale/httputils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ def _serve_traversable(
200200
os.path.splitext(traversable.name)[1].lower(), FALLBACK_MIMETYPE)
201201
headers = {
202202
"Content-Type": content_type,
203-
"Content-Security-Policy": "default-src 'self'; object-src 'none'"
204203
}
205204
if isinstance(traversable, pathlib.Path):
206205
headers["Last-Modified"] = time.strftime(

0 commit comments

Comments
 (0)