Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions apps/dav/lib/DAV/CustomPropertiesBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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);
}
Expand Down
Loading