mirror of
https://github.com/nextcloud/server.git
synced 2025-08-20 13:53:39 +00:00
Merge pull request #51365 from nextcloud/fix/dav/publicremote-share-token-pattern
fix(dav): Fix share token pattern for base uri extraction
This commit is contained in:
@ -77,7 +77,7 @@ $filesDropPlugin = new FilesDropPlugin();
|
|||||||
|
|
||||||
// Define root url with /public.php/dav/files/TOKEN
|
// Define root url with /public.php/dav/files/TOKEN
|
||||||
/** @var string $baseuri defined in public.php */
|
/** @var string $baseuri defined in public.php */
|
||||||
preg_match('/(^files\/\w+)/i', substr($requestUri, strlen($baseuri)), $match);
|
preg_match('/(^files\/[a-z0-9-]+)/i', substr($requestUri, strlen($baseuri)), $match);
|
||||||
$baseuri = $baseuri . $match[0];
|
$baseuri = $baseuri . $match[0];
|
||||||
|
|
||||||
$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function (\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin, $filesDropPlugin) {
|
$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function (\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin, $filesDropPlugin) {
|
||||||
|
Reference in New Issue
Block a user