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
This commit is contained in:
Roeland Jago Douma 2018-04-11 00:36:07 +02:00 committed by GitHub
commit 656df69cf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ class ShareAPIController extends OCSController {
if (empty($nodes)) {
// fallback to guessing the path
$node = $userFolder->get($share->getTarget());
if ($node === null) {
if ($node === null || $share->getTarget() === '') {
throw new NotFoundException();
}
} else {