Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable29] Fix encryption wrapper not seen by groupfolder cache #3133

Merged
merged 3 commits into from
Aug 28, 2024

Commits on Aug 28, 2024

  1. test: Add E2E tests for moving encrypted files

    These tests should be written as integration tests instead, but for
    practical reasons, as the integration tests have not been setup yet in
    the groupfolders app, they were written as E2E tests.
    
    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and skjnldsv committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    1af5bbd View commit details
    Browse the repository at this point in the history
  2. fix: Fix Encryption wrapper not seen by group folder cache

    Jail wrappers reuse the cache of the wrapped storage even if another
    storage is explicitly given. Due to that, when the cache is got from an
    storage and that storage has a Jail all the wrappers above it are not
    known to the cache, and only those wrapped by the Jail are taken into
    account.
    
    In general that works fine, as in most cases the cache does not need to
    know the details of a storage. However, it needs to know if an
    Encryption wrapper is present in the storage when moving files into it,
    as the file cache explicitly clears the "encrypted" flag when moving a
    file from an encrypted storage to a non encrypted storage.
    
    As the Encryption wrapper of groupfolders was not known to the cache all
    files moved from an encrypted storage to an encrypted groupfolder ended
    wrongly marked as not encrypted.
    
    To solve that now the Jail used by groupfolders does not reuse the inner
    cache when encryption is enabled, and instead passes the given storage.
    This is applied only when encryption is enabled, as reusing the inner
    cache was done as a performance optimization.
    
    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and skjnldsv committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    5b47cbc View commit details
    Browse the repository at this point in the history
  3. chore: Add CacheJail and Jail::rootPath to the stubs

    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and skjnldsv committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    155be22 View commit details
    Browse the repository at this point in the history