diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index 5fac0b17dff27..b9126b9b39f3b 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -85,6 +85,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 * @@ -275,6 +284,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); }