summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/Manager.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-12-19 17:15:55 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-12-20 08:52:46 +0100
commit5983c6846249c5fd55b24669a6b2603e90dc5206 (patch)
tree40fa961cadad9a2f71fdbf587d4b5c74a6c06aee /lib/private/Share20/Manager.php
parent084bddf8ae3877eb615faaa87b5240b8e1b8a5d4 (diff)
downloadnextcloud-server-5983c6846249c5fd55b24669a6b2603e90dc5206.tar.gz
nextcloud-server-5983c6846249c5fd55b24669a6b2603e90dc5206.zip
Don't resolve public share token if public sharing is disabled
Otherwise disabling sharing does prevent access to the view controllers but one can still access the shares using the public preview route or the public WebDAV endpoint. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r--lib/private/Share20/Manager.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index cd1d52c3bbf..591d904355d 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1053,6 +1053,10 @@ class Manager implements IManager {
* @throws ShareNotFound
*/
public function getShareByToken($token) {
+ if(!$this->shareApiAllowLinks()) {
+ throw new ShareNotFound();
+ }
+
$share = null;
try {
$provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_LINK);