Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webdav): multiple headers check #42025

Closed
wants to merge 1 commit into from

Conversation

datenangebot
Copy link

Summary

Some customers had the issue that public shares can't be opened. They result in a reload loop. This is caused by an unauthenticated dav request. I turns out that the XMLHttpRequest could be set twice and the logic checks for exact one match.

We provided this patch as a quick fix and maybe it's a good idea to bring this to the server to make it more robust besides fixing the main cause.

Customers were on nextcloud 24.0.12.9.

TODO

  • check if useful
  • add backports

Checklist

@datenangebot datenangebot added bug 3. to review Waiting for reviews labels Dec 5, 2023
@datenangebot datenangebot requested review from a team, ArtificialOwl, icewind1991 and sorbaugh and removed request for a team December 5, 2023 08:42
@@ -73,7 +73,8 @@
$filesDropPlugin = new \OCA\DAV\Files\Sharing\FilesDropPlugin();

$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');
$request = \OC::$server->getRequest();

Check notice

Code scanning / Psalm

DeprecatedMethod Note

The method OC\Server::getRequest has been marked as deprecated
@skjnldsv
Copy link
Member

Fixed already

@skjnldsv skjnldsv closed this Feb 24, 2024
@skjnldsv skjnldsv removed the 3. to review Waiting for reviews label Feb 24, 2024
@skjnldsv skjnldsv deleted the fix/dav/webdav-multiple-headers-check branch February 24, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants