|
|
|
@ -96,7 +96,7 @@ preg_match('/(^files\/\w+)/i', substr($requestUri, strlen($baseuri)), $match);
|
|
|
|
|
$baseuri = $baseuri . $match[0];
|
|
|
|
|
|
|
|
|
|
$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function (\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin, $filesDropPlugin) {
|
|
|
|
|
$isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest');
|
|
|
|
|
$isAjax = in_array('XMLHttpRequest', explode(',', $_SERVER['HTTP_X_REQUESTED_WITH'] ?? ''));
|
|
|
|
|
$federatedShareProvider = \OCP\Server::get(FederatedShareProvider::class);
|
|
|
|
|
if ($federatedShareProvider->isOutgoingServer2serverShareEnabled() === false && !$isAjax) {
|
|
|
|
|
// this is what is thrown when trying to access a non-existing share
|
|
|
|
|