mirror of
https://github.com/nextcloud/server.git
synced 2026-05-19 16:39:59 -04:00
Merge pull request #16631 from nextcloud/backport/16624/stable15
[stable15] Make sure we only fetch the file by id for the actual owner
This commit is contained in:
commit
c8e6a3520c
1 changed files with 1 additions and 1 deletions
|
|
@ -183,7 +183,7 @@ class Storage {
|
|||
$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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue