summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-05-20 14:28:45 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-05-20 14:28:45 +0200
commit1a67e5cdc3242433225b6b8c08b7664f47c78255 (patch)
treeb3c1ca6a24a741329bf895a5660d0cf6ea4c981e /apps
parent7386257676cff4648f4e71d05cdabff75578e947 (diff)
parentf2a900e04ce80e259930341167a3c4575ea76275 (diff)
downloadnextcloud-server-1a67e5cdc3242433225b6b8c08b7664f47c78255.tar.gz
nextcloud-server-1a67e5cdc3242433225b6b8c08b7664f47c78255.zip
Merge pull request #16465 from owncloud/s2s-returnpropererrorwhenpublicwebdavdisabled
Return 401 when accessing public webdav and s2s is disabled
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/publicwebdav.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_sharing/publicwebdav.php b/apps/files_sharing/publicwebdav.php
index c2a16e933b3..b70274e6bc0 100644
--- a/apps/files_sharing/publicwebdav.php
+++ b/apps/files_sharing/publicwebdav.php
@@ -24,10 +24,6 @@
*
*/
-if (OCA\Files_Sharing\Helper::isOutgoingServer2serverShareEnabled() === false) {
- return false;
-}
-
// load needed apps
$RUNTIME_APPTYPES = array('filesystem', 'authentication', 'logging');
@@ -56,6 +52,11 @@ $server->addPlugin(new \OC\Connector\Sabre\ExceptionLoggerPlugin('webdav', \OC::
// wait with registering these until auth is handled and the filesystem is setup
$server->on('beforeMethod', function () use ($server, $objectTree, $authBackend) {
+ if (OCA\Files_Sharing\Helper::isOutgoingServer2serverShareEnabled() === false) {
+ // this is what is thrown when trying to access a non-existing share
+ throw new \Sabre\DAV\Exception\NotAuthenticated();
+ }
+
$share = $authBackend->getShare();
$rootShare = \OCP\Share::resolveReShare($share);
$owner = $rootShare['uid_owner'];