aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-10 17:25:14 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-10 17:25:14 +0100
commit10613f7265ea9f47ff8f7d96b2f1b86288dee29f (patch)
treec4b4d85f38ed427bd80523dc70e20bc527f242a4 /apps/files_versions
parent5c89cf9565d4c08984af10d39cc4aff0a6cac147 (diff)
parent1b9e291913c93d4f7a96743c93c845e853a4c143 (diff)
downloadnextcloud-server-10613f7265ea9f47ff8f7d96b2f1b86288dee29f.tar.gz
nextcloud-server-10613f7265ea9f47ff8f7d96b2f1b86288dee29f.zip
Merge pull request #22273 from owncloud/versions-fixpathasrecipient
Fix versions path as share recipient when different than owner path
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/ajax/getVersions.php5
-rw-r--r--apps/files_versions/js/versioncollection.js3
2 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_versions/ajax/getVersions.php b/apps/files_versions/ajax/getVersions.php
index 1953a55d13d..7d704c14618 100644
--- a/apps/files_versions/ajax/getVersions.php
+++ b/apps/files_versions/ajax/getVersions.php
@@ -41,6 +41,11 @@ if( $versions ) {
$versions = array_slice($versions, $start, $count);
+ // remove owner path from request to not disclose it to the recipient
+ foreach ($versions as $version) {
+ unset($version['path']);
+ }
+
\OCP\JSON::success(array('data' => array('versions' => $versions, 'endReached' => $endReached)));
} else {
diff --git a/apps/files_versions/js/versioncollection.js b/apps/files_versions/js/versioncollection.js
index 176f8e7529c..fdb12bae0a9 100644
--- a/apps/files_versions/js/versioncollection.js
+++ b/apps/files_versions/js/versioncollection.js
@@ -73,12 +73,13 @@
},
parse: function(result) {
+ var fullPath = this._fileInfo.getFullPath();
var results = _.map(result.data.versions, function(version) {
var revision = parseInt(version.version, 10);
return {
id: revision,
name: version.name,
- fullPath: version.path,
+ fullPath: fullPath,
timestamp: revision,
size: version.size
};