Skip to content

Conversation

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Aug 26, 2025

Talk integration tests started failing

  Scenario: get room for file no longer shared
    Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100
    And user "participant2" accepts last share
    And user "participant1" deletes last share
    When user "participant1" gets the room for path "welcome.txt" with 404 (v1)

I bisected:

$ git bisect bad
39e2e70084c7aa3899c1c32816321769cb2f4d8f is the first bad commit
commit 39e2e70084c7aa3899c1c32816321769cb2f4d8f (HEAD)
Author: Benjamin Gaussorgues <[email protected]>
Date:   Fri Aug 1 13:05:54 2025 +0200

    feat(mounts): optimize load of mounts by filtering on database side
    
    Signed-off-by: Benjamin Gaussorgues <[email protected]>

 lib/private/Files/Config/UserMountCache.php | 68 ++++++++++++++++++++++++++++++++++++++++++++------------------------
 1 file changed, 44 insertions(+), 24 deletions(-)

nextcloud/server#54197


I logged the accesslist here:

if (!isset($this->accessLists[$fileId])) {
$nodes = $this->rootFolder->getById((int)$fileId);
if (empty($nodes)) {
return [];
}
$node = array_shift($nodes);
$accessList = $this->shareManager->getAccessList($node);
if (!$node->getStorage()->instanceOfStorage(SharedStorage::class)) {
// The file is not a shared file,
// let's check the accesslist for mount points of groupfolders and external storages
$mountsForFile = $this->userMountCache->getMountsForFileId($fileId);
$affectedUserIds = array_map(function (ICachedMountInfo $mount) {
return $mount->getUser()->getUID();
}, $mountsForFile);
$accessList['users'] = array_unique(array_merge($affectedUserIds, $accessList['users']));
}
$this->accessLists[$fileId] = $accessList['users'];
}
return $this->accessLists[$fileId];

It seems it returns the user even though the share was deleted:

{"message":"[{\"users\":[\"participant1\",\"participant2\"],\"remote\":false,\"public\":false,\"mail\":[],\"email\":[]}]"}

If I add a PROPFIND from particiapnt2 before getting the room it fails the request correctly with 404 as it is no longer shared with anyone:
90eda64


I assume correct that this is intended right?
It's basically a proof that the caching is working. Unfortunately this also means that you'd receive activity and other things until your filesystem was setup again?

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@nickvergessen nickvergessen force-pushed the test/noid/check-file-sharing branch from 90eda64 to d641d17 Compare August 27, 2025 10:36
@nickvergessen nickvergessen self-assigned this Aug 27, 2025
@nickvergessen nickvergessen added this to the 🪺 Next Beta (32) milestone Aug 27, 2025
@nickvergessen nickvergessen added the feature: api 🛠️ OCS API for conversations, chats and participants label Aug 27, 2025
@nickvergessen nickvergessen marked this pull request as ready for review August 27, 2025 10:37
@nickvergessen nickvergessen force-pushed the test/noid/check-file-sharing branch from d641d17 to 3d04a58 Compare August 27, 2025 10:48
@nickvergessen nickvergessen merged commit b73293b into main Aug 27, 2025
82 checks passed
@nickvergessen nickvergessen deleted the test/noid/check-file-sharing branch August 27, 2025 11:08
@nickvergessen
Copy link
Member Author

@nickvergessen
Copy link
Member Author

/backport to stable31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review feature: api 🛠️ OCS API for conversations, chats and participants

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants