Skip to content
Snippets Groups Projects
Commit 580a9610 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #17601 from owncloud/publicwebdav-allowajaxwhendisabled

Allow ajax requests on public webdav interface
parents 037cce7f c8a6fea1
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment