summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-01-30 12:25:49 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-01-30 21:56:32 +0100
commitf924a6d7d940bc625a4c0cf58a7953137e1cb3c4 (patch)
tree663e08ce18614c498991473892d4e26dbfad9ed0 /apps
parentc30e958dacf69a1a55c19362ac3f575ad7fb227e (diff)
downloadnextcloud-server-f924a6d7d940bc625a4c0cf58a7953137e1cb3c4.tar.gz
nextcloud-server-f924a6d7d940bc625a4c0cf58a7953137e1cb3c4.zip
Only handle encrypted property on folders
Exposing the encrypted property is required for E2E. However, there is no need to expose this on files as then it is server side encryption (which the clients don't care about). Better to not confuse the output. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index a3a0893259b..f36ebe5636c 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -339,11 +339,6 @@ class FilesPlugin extends ServerPlugin {
}
});
- $propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function() use ($node) {
- $result = $node->getFileInfo()->isEncrypted() ? '1' : '0';
- return $result;
- });
-
$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
return json_encode($this->previewManager->isAvailable($node->getFileInfo()));
});
@@ -392,6 +387,10 @@ class FilesPlugin extends ServerPlugin {
$propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) {
return $node->getSize();
});
+
+ $propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function() use ($node) {
+ return $node->getFileInfo()->isEncrypted() ? '1' : '0';
+ });
}
}