Skip to content

fix(dav): fail propfind for unavailable mounts - #63169

Open
gitedmond wants to merge 2 commits into
nextcloud:masterfrom
gitedmond:fix/propfind-unavailable-storage
Open

fix(dav): fail propfind for unavailable mounts#63169
gitedmond wants to merge 2 commits into
nextcloud:masterfrom
gitedmond:fix/propfind-unavailable-storage

Conversation

@gitedmond

Copy link
Copy Markdown

Summary

When an external mount becomes unavailable, View::getDirectoryContent() currently omits that mount and continues. For WebDAV PROPFIND requests, this can produce a successful 207 Multi-Status response containing an incomplete directory listing. Synchronization clients may interpret the missing mount or its files as server-side deletions.

This adds an opt-in strict directory-listing mode while preserving the existing lenient behavior for other callers. A Files-specific PROPFIND plugin performs strict validation before SabreDAV starts streaming the multistatus response. If an unavailable mount would make the listing incomplete, the request now returns 503 Service Unavailable.

Validation

The original and fixed behavior were reproduced using a live SMB external-storage backend:

  • Unpatched server: returned 207 while omitting the unavailable mount
  • Fixed server: returned 503 without emitting an incomplete multistatus response
  • A Nextcloud desktop client retained its local file during the outage
  • Synchronization completed successfully after the backend recovered

The following checks passed:

  • Full SQLite suite: 18,309 tests and 73,997 assertions; 128 skipped
  • Common external-storage suite: 288 tests and 969 assertions
  • SMB backend suite: 92 tests and 330 assertions
  • Focused filesystem and DAV unit tests
  • PHP lint
  • Coding-style checks
  • Psalm

TODO

  • Review upstream CI results
  • Decide whether a stable-branch backport should be requested

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Screenshots before/after for front-end changes — not applicable; no front-end changes
  • Documentation (manuals or wiki) has been updated or is not required — no user-facing documentation changes required
  • Backports requested where applicable (ex: critical bugfixes)
  • Labels added where applicable (ex: bug/enhancement, 3. to review, feature component)
  • Milestone added for target branch/version (ex: 32.x for stable32)

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Codex using GPT-5.6 sol assisted with issue research, code analysis, implementation, testing, environment setup, reproduction, and validation. The commit records this with an Assisted-by: Codex:GPT-5 trailer.

edmnd and others added 2 commits August 11, 2026 18:59
Assisted-by: Codex:GPT-5
Signed-off-by: Edmond <edmnd@users.noreply.github.com>
@gitedmond
gitedmond marked this pull request as ready for review August 12, 2026 01:06
@gitedmond
gitedmond requested a review from a team as a code owner August 12, 2026 01:06
@gitedmond
gitedmond requested review from leftybournes, provokateurin, salmart-dev and sorbaugh and removed request for a team August 12, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: PROPFIND request returns 207 with empty directory on storage exception

2 participants