Skip to content

Commit fcadd6f

Browse files
committed
fix(encryption): Focus on home mount points
Signed-off-by: Stephen Cuppett <[email protected]>
1 parent 1a81edd commit fcadd6f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/private/Encryption/EncryptionWrapper.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
namespace OC\Encryption;
99

1010
use OC\Files\Filesystem;
11+
use OC\Files\Mount\HomeMountPoint;
1112
use OC\Files\Storage\Wrapper\Encryption;
1213
use OC\Files\View;
1314
use OC\Memcache\ArrayCache;
@@ -74,12 +75,15 @@ public function wrapStorage(string $mountPoint, IStorage $storage, IMountPoint $
7475
return $storage;
7576
}
7677

77-
// For root mount point, check encryptHomeStorage setting
78-
// This allows encryption of primary object storage (S3, Swift, etc.)
78+
// Root mount point handling: skip encryption wrapper
7979
if ($mountPoint === '/') {
80-
if (\OC::$server->getConfig()->getAppValue('encryption', 'encryptHomeStorage', '1') !== '1') {
81-
return $storage;
82-
}
80+
return $storage;
81+
}
82+
83+
// Skip encryption for home mounts if encryptHomeStorage is disabled
84+
if ($mount instanceof HomeMountPoint &&
85+
\OC::$server->getConfig()->getAppValue('encryption', 'encryptHomeStorage', '1') !== '1') {
86+
return $storage;
8387
}
8488
}
8589

0 commit comments

Comments
 (0)