fix(dav): fail propfind for unavailable mounts - #63169
Conversation
Assisted-by: Codex:GPT-5 Signed-off-by: Edmond <edmnd@users.noreply.github.com>
|
Could you try #63435 if this also fixes your issue? It's quite a bit simpler |
The approach in #63435 is much simpler and cleanly fixes the late 404 case. I tested both PR heads using a Depth: 1 PROPFIND request with an unavailable child mount. #63435 still returned 207, while #63169 returned 503. It looks like getNodeForPath() validates the requested parent, but the unavailable child mount can still be silently omitted during directory enumeration. So it does not appear to cover the full incomplete-listing case from #63117. That said, if you think the narrower fix in #63435 is sufficient, I’m happy to defer to your judgment. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
When an external mount becomes unavailable,
View::getDirectoryContent()currently omits that mount and continues. For WebDAVPROPFINDrequests, this can produce a successful207 Multi-Statusresponse 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:
207while omitting the unavailable mount503without emitting an incomplete multistatus responseThe following checks passed:
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)
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-5trailer.