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:
parent
9a2c517ca8
commit
a6f997ddae
1 changed files with 5 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue