diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-29 13:21:50 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-29 13:21:50 +0200 |
commit | 580a961020fb8b7cbfc499b0808dfeca90039cdb (patch) | |
tree | 98304547be2dba047d0dd07328c06c4c4f589813 /apps | |
parent | 037cce7f0580485a2e6fffaa0a7d529e0db5779c (diff) | |
parent | c8a6fea1b476dae8953a36540d49e00865f5d807 (diff) | |
download | nextcloud-server-580a961020fb8b7cbfc499b0808dfeca90039cdb.tar.gz nextcloud-server-580a961020fb8b7cbfc499b0808dfeca90039cdb.zip |
Merge pull request #17601 from owncloud/publicwebdav-allowajaxwhendisabled
Allow ajax requests on public webdav interface
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/publicwebdav.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_sharing/publicwebdav.php b/apps/files_sharing/publicwebdav.php index 773a15c888e..fbf9d22cf76 100644 --- a/apps/files_sharing/publicwebdav.php +++ b/apps/files_sharing/publicwebdav.php @@ -46,7 +46,8 @@ $serverFactory = new \OC\Connector\Sabre\ServerFactory( $requestUri = \OC::$server->getRequest()->getRequestUri(); $server = $serverFactory->createServer($baseuri, $requestUri, $authBackend, function () use ($authBackend) { - if (OCA\Files_Sharing\Helper::isOutgoingServer2serverShareEnabled() === false) { + $isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest'); + if (OCA\Files_Sharing\Helper::isOutgoingServer2serverShareEnabled() === false && !$isAjax) { // this is what is thrown when trying to access a non-existing share throw new \Sabre\DAV\Exception\NotAuthenticated(); } |