Merge pull request #51715 from nextcloud/allowUnderCustLink

fix(dav): Allow underscores on custom links
This commit is contained in:
Kate 2025-04-07 09:48:15 +02:00 committed by GitHub
commit a42563f9ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,7 +77,7 @@ $filesDropPlugin = new FilesDropPlugin();
// Define root url with /public.php/dav/files/TOKEN
/** @var string $baseuri defined in public.php */
preg_match('/(^files\/[a-z0-9-]+)/i', substr($requestUri, strlen($baseuri)), $match);
preg_match('/(^files\/[a-z0-9-_]+)/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) {