Skip to content

Commit

Permalink
Merge pull request #16624 from nextcloud/bugfix/noid/versions-fetch-o…
Browse files Browse the repository at this point in the history
…wner-only

Make sure we only fetch the file by id for the actual owner
  • Loading branch information
rullzer committed Aug 1, 2019
2 parents a0a43de + e26187c commit 8e59132
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_versions/lib/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public static function store($filename) {
$eventDispatcher = \OC::$server->getEventDispatcher();
$fileInfo = $files_view->getFileInfo($filename);
$id = $fileInfo->getId();
$nodes = \OC::$server->getRootFolder()->getById($id);
$nodes = \OC::$server->getRootFolder()->getUserFolder($uid)->getById($id);
foreach ($nodes as $node) {
$event = new CreateVersionEvent($node);
$eventDispatcher->dispatch('OCA\Files_Versions::createVersion', $event);
Expand Down

0 comments on commit 8e59132

Please sign in to comment.