Merge pull request #9070 from nextcloud/bugfix/9028/guessing_without_target_is_useles

When formatting a share node an Empty target is invalid
This commit is contained in:
Morris Jobke 2018-04-04 11:56:33 +02:00 committed by GitHub
commit 18676a8ee2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,7 +154,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 {