summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2016-12-22 11:57:05 +0100
committerGitHub <noreply@github.com>2016-12-22 11:57:05 +0100
commit3453f4e97ca5ea73da7241fb1b0767bf956350fd (patch)
tree351736d7218c0bab2d3bfdf44ebba4151419f585 /lib
parent998f235474c542e2e4a1ad16cc91bcf62a6ec84e (diff)
parent9d3de74b2ddbbca73825888035d7ff3d2c82b110 (diff)
downloadnextcloud-server-3453f4e97ca5ea73da7241fb1b0767bf956350fd.tar.gz
nextcloud-server-3453f4e97ca5ea73da7241fb1b0767bf956350fd.zip
Merge pull request #2761 from nextcloud/dont-resolve-shares-if-public-sharing-is-disabled
Don't resolve public share token if public sharing is disabled
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index cd1d52c3bbf..6eab5e05a2f 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1055,8 +1055,10 @@ class Manager implements IManager {
public function getShareByToken($token) {
$share = null;
try {
- $provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_LINK);
- $share = $provider->getShareByToken($token);
+ if($this->shareApiAllowLinks()) {
+ $provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_LINK);
+ $share = $provider->getShareByToken($token);
+ }
} catch (ProviderException $e) {
} catch (ShareNotFound $e) {
}
@@ -1072,7 +1074,7 @@ class Manager implements IManager {
}
}
- // If it is not a link share try to fetch a federated share by token
+ // If it is not a link share try to fetch a mail share by token
if ($share === null && $this->shareProviderExists(\OCP\Share::SHARE_TYPE_EMAIL)) {
try {
$provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_EMAIL);