Skip to content

Commit 656df69

Browse files
authored
Merge pull request #9073 from nextcloud/backport/9070/guessing_without_target_is_useles-13
[stable13] When formatting a share node an Empty target is invalid
2 parents 6209a66 + 36bd4b7 commit 656df69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ protected function formatShare(\OCP\Share\IShare $share, Node $recipientNode = n
147147
if (empty($nodes)) {
148148
// fallback to guessing the path
149149
$node = $userFolder->get($share->getTarget());
150-
if ($node === null) {
150+
if ($node === null || $share->getTarget() === '') {
151151
throw new NotFoundException();
152152
}
153153
} else {

0 commit comments

Comments
 (0)