summaryrefslogtreecommitdiffstats
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 12:03:25 +0200
commit36bd4b7ddee48fcbb442c8c03955114608dee1b1 (patch)
tree48692604717ba9bbc6ea77333fa8a742ecbf8261
parente95184ee258d4d089f7edeae12fd5d465d03d620 (diff)
downloadnextcloud-server-36bd4b7ddee48fcbb442c8c03955114608dee1b1.tar.gz
nextcloud-server-36bd4b7ddee48fcbb442c8c03955114608dee1b1.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>
-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 82a93c446e2..470e4c53c5c 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -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 {