diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n/cs.js | 1 | ||||
-rw-r--r-- | lib/l10n/cs.json | 1 | ||||
-rw-r--r-- | lib/l10n/nl.js | 1 | ||||
-rw-r--r-- | lib/l10n/nl.json | 1 | ||||
-rw-r--r-- | lib/private/Files/Cache/CacheEntry.php | 2 | ||||
-rw-r--r-- | lib/private/Files/FileInfo.php | 4 | ||||
-rw-r--r-- | lib/private/Files/ObjectStore/ObjectStoreStorage.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 2 | ||||
-rw-r--r-- | lib/private/Server.php | 4 |
9 files changed, 12 insertions, 6 deletions
diff --git a/lib/l10n/cs.js b/lib/l10n/cs.js index 422c9e0cee5..deeb3f3b996 100644 --- a/lib/l10n/cs.js +++ b/lib/l10n/cs.js @@ -156,6 +156,7 @@ OC.L10N.register( "%1$s shared »%2$s« with you." : "%1$s vám nasdílel(a) „%2$s“.", "Click the button below to open it." : "Pro otevření klikněte na tlačítko níže.", "The requested share does not exist anymore" : "Požadované sdílení už neexistuje", + "The requested share comes from a disabled user" : "Požadované sdílení pochází od vypnutého uživatelského účtu", "The user was not created because the user limit has been reached. Check your notifications to learn more." : "Uživatel nebyl vytvořen protože bylo dosaženo limitu počtu uživatelů. Více se dozvíte v upozorněních.", "Could not find category \"%s\"" : "Nedaří se nalézt kategorii „%s“", "Sunday" : "neděle", diff --git a/lib/l10n/cs.json b/lib/l10n/cs.json index 164c56f7e47..0fa73b1568e 100644 --- a/lib/l10n/cs.json +++ b/lib/l10n/cs.json @@ -154,6 +154,7 @@ "%1$s shared »%2$s« with you." : "%1$s vám nasdílel(a) „%2$s“.", "Click the button below to open it." : "Pro otevření klikněte na tlačítko níže.", "The requested share does not exist anymore" : "Požadované sdílení už neexistuje", + "The requested share comes from a disabled user" : "Požadované sdílení pochází od vypnutého uživatelského účtu", "The user was not created because the user limit has been reached. Check your notifications to learn more." : "Uživatel nebyl vytvořen protože bylo dosaženo limitu počtu uživatelů. Více se dozvíte v upozorněních.", "Could not find category \"%s\"" : "Nedaří se nalézt kategorii „%s“", "Sunday" : "neděle", diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js index 068552cebb0..5aa59620e0c 100644 --- a/lib/l10n/nl.js +++ b/lib/l10n/nl.js @@ -94,6 +94,7 @@ OC.L10N.register( "Appearance and accessibility" : "Weergave en toegankelijkheid", "Apps" : "Apps", "Personal settings" : "Persoonlijke instellingen", + "Administration settings" : "Beheerder instellingen", "Settings" : "Instellingen", "Log out" : "Uitloggen", "Users" : "Gebruikers", diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json index a7c9066de3a..c4ab53ebcd1 100644 --- a/lib/l10n/nl.json +++ b/lib/l10n/nl.json @@ -92,6 +92,7 @@ "Appearance and accessibility" : "Weergave en toegankelijkheid", "Apps" : "Apps", "Personal settings" : "Persoonlijke instellingen", + "Administration settings" : "Beheerder instellingen", "Settings" : "Instellingen", "Log out" : "Uitloggen", "Users" : "Gebruikers", diff --git a/lib/private/Files/Cache/CacheEntry.php b/lib/private/Files/Cache/CacheEntry.php index ce9df2823c8..d1a64552fd1 100644 --- a/lib/private/Files/Cache/CacheEntry.php +++ b/lib/private/Files/Cache/CacheEntry.php @@ -134,7 +134,7 @@ class CacheEntry implements ICacheEntry { } public function getUnencryptedSize(): int { - if (isset($this->data['unencrypted_size']) && $this->data['unencrypted_size'] > 0) { + if ($this->data['encrypted'] && isset($this->data['unencrypted_size']) && $this->data['unencrypted_size'] > 0) { return $this->data['unencrypted_size']; } else { return $this->data['size'] ?? 0; diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php index c0a5bf1b92b..7800074460b 100644 --- a/lib/private/Files/FileInfo.php +++ b/lib/private/Files/FileInfo.php @@ -207,7 +207,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { if ($includeMounts) { $this->updateEntryfromSubMounts(); - if (isset($this->data['unencrypted_size']) && $this->data['unencrypted_size'] > 0) { + if ($this->isEncrypted() && isset($this->data['unencrypted_size']) && $this->data['unencrypted_size'] > 0) { return $this->data['unencrypted_size']; } else { return isset($this->data['size']) ? 0 + $this->data['size'] : 0; @@ -229,7 +229,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { * @return bool */ public function isEncrypted() { - return $this->data['encrypted']; + return $this->data['encrypted'] ?? false; } /** diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index d918bd98729..4dceee9a58b 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -559,6 +559,8 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil } if ($exists) { + // Always update the unencrypted size, for encryption the Encryption wrapper will update this afterwards anyways + $stat['unencrypted_size'] = $stat['size']; $this->getCache()->update($fileId, $stat); } else { if (!$this->validateWrites || $this->objectStore->objectExists($urn)) { diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index d559454fcb7..7ce4338256f 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -1071,7 +1071,7 @@ class Encryption extends Wrapper { // object store, stores the size after write and doesn't update this during scan // manually store the unencrypted size - if ($result && $this->getWrapperStorage()->instanceOfStorage(ObjectStoreStorage::class)) { + if ($result && $this->getWrapperStorage()->instanceOfStorage(ObjectStoreStorage::class) && $this->shouldEncrypt($path)) { $this->getCache()->put($path, ['unencrypted_size' => $count]); } diff --git a/lib/private/Server.php b/lib/private/Server.php index cd2dab27cbf..ba8b18f9a05 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -786,8 +786,8 @@ class Server extends ServerContainer implements IServerContainer { $this->registerDeprecatedAlias('Search', ISearch::class); $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { - $cacheFactory = $c->get(ICacheFactory::class); - if ($cacheFactory->isAvailable()) { + $config = $c->get(\OCP\IConfig::class); + if (ltrim($config->getSystemValueString('memcache.distributed', ''), '\\') === \OC\Memcache\Redis::class) { $backend = new \OC\Security\RateLimiting\Backend\MemoryCacheBackend( $c->get(AllConfig::class), $this->get(ICacheFactory::class), |