Skip to content

Handle missing cached share mounts - #63501

Open
Sudaisib wants to merge 2 commits into
nextcloud:masterfrom
Sudaisib:fix/62545-missing-share-mount
Open

Handle missing cached share mounts#63501
Sudaisib wants to merge 2 commits into
nextcloud:masterfrom
Sudaisib:fix/62545-missing-share-mount

Conversation

@Sudaisib

@Sudaisib Sudaisib commented Aug 23, 2026

Copy link
Copy Markdown

Fixes #62545

Summary

CleanupShareTarget can encounter a missing recipient mount-cache entry while repairing a share target. The previous code dereferenced the missing entry before updating the target, causing the repair to fail. This change treats the cached mount as optional and only rewrites the cache when the entry exists, allowing the repair to continue safely.

Validation

  • PHP syntax and formatting checks passed locally.
    • The focused database-backed PHPUnit test could not be run in this environment because the required Nextcloud test services were unavailable.

Checklist

  • Code is properly formatted
  • - [x] Commit includes the required sign-off
  • - [ ] Focused regression test will be added to this branch in the next commit

Fixes nextcloud#62545 by making CleanupShareTarget tolerate a missing recipient mount-cache entry during repair. The repair now skips cache removal when no cached mount exists and continues updating the share target.

Signed-off-by: Oladosu Ibrahim <oladosuibrahim1999@gmail.com>
@Sudaisib
Sudaisib requested a review from a team as a code owner August 23, 2026 04:09
@Sudaisib
Sudaisib requested review from Altahrim, icewind1991, provokateurin and salmart-dev and removed request for a team August 23, 2026 04:09
Add focused coverage for repairing a share target when the recipient’s old mount-cache entry is missing, ensuring the repair completes without dereferencing a null mount.

Signed-off-by: Oladosu Ibrahim <oladosuibrahim1999@gmail.com>
@susnux susnux added bug 3. to review Waiting for reviews labels Aug 23, 2026
@susnux susnux added this to the Nextcloud 35 milestone Aug 23, 2026
@skjnldsv skjnldsv mentioned this pull request Aug 25, 2026
@joshtrichards joshtrichards added the community pull requests from community label Aug 29, 2026
@joshtrichards

Copy link
Copy Markdown
Member

#63495 + tests?

Target issues #63494 and #62545

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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.)

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.

[Bug]: PHP Warning: Cannot modify header information - headers already sent in sabre/http Sapi.php during PROPFIND requests on .nomedia

4 participants