From 7723fb222f53cd148373e289e1587d2455a736e3 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sat, 14 Mar 2026 07:26:48 +0100 Subject: [PATCH] sharing: silently discard unsupported properties on overlay --- radicale/sharing/__init__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/radicale/sharing/__init__.py b/radicale/sharing/__init__.py index fafaf369..b9e0bd67 100644 --- a/radicale/sharing/__init__.py +++ b/radicale/sharing/__init__.py @@ -382,10 +382,19 @@ class BaseSharing: def sharing_collection_update(self, ShareType: str, PathOrToken: str, OwnerOrUser: str, Properties: dict) -> None: """ returning dict with PathMapped, Owner, Permissions or None if not found""" logger.info("Sharing/collection/update: ShareType=%r PathOrToken=%r OwnerOrUser=%r", ShareType, PathOrToken, OwnerOrUser) + # Filter properies for permitted ones + properties_filtered: dict = {} + for prop in Properties: + if prop in OVERLAY_PROPERTIES_WHITELIST: + properties_filtered[prop] = Properties[prop] + else: + if logger.isEnabledFor(logging.DEBUG): + logger.debug("TRACE/sharing/collection_update: silent discard unsupported property: %r", prop) + self.database_update_sharing(ShareType=ShareType, PathOrToken=PathOrToken, OwnerOrUser=OwnerOrUser, - Properties=Properties) + Properties=properties_filtered) # *** internal sharing functions *** # resolves a token "path" to a share