Remove path from versions response

The path attribute contains the path relative to the owner's home
folder, not the one from the recipient, which is useless for the client
and needlessly discloses the owner's original path.

The requested already has access to the full path of the file, so no
need to add it to the response.
This commit is contained in:
Vincent Petry 2016-02-10 13:38:38 +01:00
parent 9a2c517ca8
commit a6f997ddae

View file

@ -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 {