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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

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

2 participants