diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-04-04 11:33:05 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-04-04 11:33:05 +0200 |
commit | d6cda3f2a6644dfab6694780de5c6556ed9f4dd9 (patch) | |
tree | adaa6c301d3217399df5245d40072cb59bf21a76 /apps/files_sharing | |
parent | b90b73df6f0fb3ad70787ea2c6d698cb712955c7 (diff) | |
download | nextcloud-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.php | 2 |
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 { |