summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-04-04 11:33:05 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-04-04 11:33:05 +0200
commitd6cda3f2a6644dfab6694780de5c6556ed9f4dd9 (patch)
treeadaa6c301d3217399df5245d40072cb59bf21a76 /apps/files_sharing
parentb90b73df6f0fb3ad70787ea2c6d698cb712955c7 (diff)
downloadnextcloud-server-d6cda3f2a6644dfab6694780de5c6556ed9f4dd9.tar.gz
nextcloud-server-d6cda3f2a6644dfab6694780de5c6556ed9f4dd9.zip
When formatting a share node an Empty target is invalid
Fixes #9028 For federated shares the share table holds no target information (since it is on the other server). So when a node is actually invalid and not found we should not display it anymore in the shared with sections etc and thus throw the proper exceptions. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 1390eedf26e..595e21825f3 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -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 {