diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index 8be2af9da8062..d9e3572ce60a9 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -89,6 +89,15 @@ class CustomPropertiesBackend implements BackendInterface { '{http://owncloud.org/ns}enabled', ]; + /** + * Allowed properties for the dav namespace, all other properties in the namespace are ignored + * + * @var string[] + */ + private const ALLOWED_DAV_PROPERTIES = [ + '{DAV:}displayname', + ]; + /** * Properties set by one user, readable by all others * @@ -279,6 +288,12 @@ private function isPropertyAllowed(string $property): bool { if (in_array($property, self::IGNORED_PROPERTIES)) { return false; } + if (str_starts_with($property, '{http://open-collaboration-services.org/ns}')) { + return false; + } + if (str_starts_with($property, '{DAV:}')) { + return in_array($property, self::ALLOWED_DAV_PROPERTIES); + } if (str_starts_with($property, '{http://owncloud.org/ns}') || str_starts_with($property, '{http://nextcloud.org/ns}')) { return in_array($property, self::ALLOWED_NC_PROPERTIES); }