diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-05-11 11:52:04 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-05-11 11:56:14 +0200 |
commit | a92028f5cdad089bac597e042656545acc78d86b (patch) | |
tree | ecf0d61be52ba35a1f3d160fb78190473f7480bb /apps | |
parent | 36fc5dc8ae989f0694ca97c9175ee0debbc36142 (diff) | |
download | nextcloud-server-a92028f5cdad089bac597e042656545acc78d86b.tar.gz nextcloud-server-a92028f5cdad089bac597e042656545acc78d86b.zip |
Rename command to drop-legacy-filekey and remove comment about legacy mode.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/encryption/appinfo/info.xml | 2 | ||||
-rw-r--r-- | apps/encryption/composer/composer/autoload_classmap.php | 62 | ||||
-rw-r--r-- | apps/encryption/composer/composer/autoload_static.php | 109 | ||||
-rw-r--r-- | apps/encryption/composer/composer/installed.php | 46 | ||||
-rw-r--r-- | apps/encryption/lib/Command/DropLegacyFileKey.php (renamed from apps/encryption/lib/Command/FixLegacyFileKey.php) | 7 |
5 files changed, 114 insertions, 112 deletions
diff --git a/apps/encryption/appinfo/info.xml b/apps/encryption/appinfo/info.xml index 1018d6ab17a..de7ba7f0783 100644 --- a/apps/encryption/appinfo/info.xml +++ b/apps/encryption/appinfo/info.xml @@ -42,7 +42,7 @@ Please read the documentation to know all implications before you decide to enab <command>OCA\Encryption\Command\ScanLegacyFormat</command> <command>OCA\Encryption\Command\FixEncryptedVersion</command> <command>OCA\Encryption\Command\FixKeyLocation</command> - <command>OCA\Encryption\Command\FixLegacyFileKey</command> + <command>OCA\Encryption\Command\DropLegacyFileKey</command> </commands> <settings> diff --git a/apps/encryption/composer/composer/autoload_classmap.php b/apps/encryption/composer/composer/autoload_classmap.php index 016f2624965..059296338b4 100644 --- a/apps/encryption/composer/composer/autoload_classmap.php +++ b/apps/encryption/composer/composer/autoload_classmap.php @@ -6,35 +6,35 @@ $vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', - 'OCA\\Encryption\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', - 'OCA\\Encryption\\Command\\DisableMasterKey' => $baseDir . '/../lib/Command/DisableMasterKey.php', - 'OCA\\Encryption\\Command\\EnableMasterKey' => $baseDir . '/../lib/Command/EnableMasterKey.php', - 'OCA\\Encryption\\Command\\FixEncryptedVersion' => $baseDir . '/../lib/Command/FixEncryptedVersion.php', - 'OCA\\Encryption\\Command\\FixKeyLocation' => $baseDir . '/../lib/Command/FixKeyLocation.php', - 'OCA\\Encryption\\Command\\FixLegacyFileKey' => $baseDir . '/../lib/Command/FixLegacyFileKey.php', - 'OCA\\Encryption\\Command\\RecoverUser' => $baseDir . '/../lib/Command/RecoverUser.php', - 'OCA\\Encryption\\Command\\ScanLegacyFormat' => $baseDir . '/../lib/Command/ScanLegacyFormat.php', - 'OCA\\Encryption\\Controller\\RecoveryController' => $baseDir . '/../lib/Controller/RecoveryController.php', - 'OCA\\Encryption\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php', - 'OCA\\Encryption\\Controller\\StatusController' => $baseDir . '/../lib/Controller/StatusController.php', - 'OCA\\Encryption\\Crypto\\Crypt' => $baseDir . '/../lib/Crypto/Crypt.php', - 'OCA\\Encryption\\Crypto\\DecryptAll' => $baseDir . '/../lib/Crypto/DecryptAll.php', - 'OCA\\Encryption\\Crypto\\EncryptAll' => $baseDir . '/../lib/Crypto/EncryptAll.php', - 'OCA\\Encryption\\Crypto\\Encryption' => $baseDir . '/../lib/Crypto/Encryption.php', - 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => $baseDir . '/../lib/Exceptions/MultiKeyDecryptException.php', - 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => $baseDir . '/../lib/Exceptions/MultiKeyEncryptException.php', - 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => $baseDir . '/../lib/Exceptions/PrivateKeyMissingException.php', - 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => $baseDir . '/../lib/Exceptions/PublicKeyMissingException.php', - 'OCA\\Encryption\\HookManager' => $baseDir . '/../lib/HookManager.php', - 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => $baseDir . '/../lib/Hooks/Contracts/IHook.php', - 'OCA\\Encryption\\Hooks\\UserHooks' => $baseDir . '/../lib/Hooks/UserHooks.php', - 'OCA\\Encryption\\KeyManager' => $baseDir . '/../lib/KeyManager.php', - 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => $baseDir . '/../lib/Migration/SetMasterKeyStatus.php', - 'OCA\\Encryption\\Recovery' => $baseDir . '/../lib/Recovery.php', - 'OCA\\Encryption\\Session' => $baseDir . '/../lib/Session.php', - 'OCA\\Encryption\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', - 'OCA\\Encryption\\Settings\\Personal' => $baseDir . '/../lib/Settings/Personal.php', - 'OCA\\Encryption\\Users\\Setup' => $baseDir . '/../lib/Users/Setup.php', - 'OCA\\Encryption\\Util' => $baseDir . '/../lib/Util.php', + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', + 'OCA\\Encryption\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', + 'OCA\\Encryption\\Command\\DisableMasterKey' => $baseDir . '/../lib/Command/DisableMasterKey.php', + 'OCA\\Encryption\\Command\\DropLegacyFileKey' => $baseDir . '/../lib/Command/DropLegacyFileKey.php', + 'OCA\\Encryption\\Command\\EnableMasterKey' => $baseDir . '/../lib/Command/EnableMasterKey.php', + 'OCA\\Encryption\\Command\\FixEncryptedVersion' => $baseDir . '/../lib/Command/FixEncryptedVersion.php', + 'OCA\\Encryption\\Command\\FixKeyLocation' => $baseDir . '/../lib/Command/FixKeyLocation.php', + 'OCA\\Encryption\\Command\\RecoverUser' => $baseDir . '/../lib/Command/RecoverUser.php', + 'OCA\\Encryption\\Command\\ScanLegacyFormat' => $baseDir . '/../lib/Command/ScanLegacyFormat.php', + 'OCA\\Encryption\\Controller\\RecoveryController' => $baseDir . '/../lib/Controller/RecoveryController.php', + 'OCA\\Encryption\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php', + 'OCA\\Encryption\\Controller\\StatusController' => $baseDir . '/../lib/Controller/StatusController.php', + 'OCA\\Encryption\\Crypto\\Crypt' => $baseDir . '/../lib/Crypto/Crypt.php', + 'OCA\\Encryption\\Crypto\\DecryptAll' => $baseDir . '/../lib/Crypto/DecryptAll.php', + 'OCA\\Encryption\\Crypto\\EncryptAll' => $baseDir . '/../lib/Crypto/EncryptAll.php', + 'OCA\\Encryption\\Crypto\\Encryption' => $baseDir . '/../lib/Crypto/Encryption.php', + 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => $baseDir . '/../lib/Exceptions/MultiKeyDecryptException.php', + 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => $baseDir . '/../lib/Exceptions/MultiKeyEncryptException.php', + 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => $baseDir . '/../lib/Exceptions/PrivateKeyMissingException.php', + 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => $baseDir . '/../lib/Exceptions/PublicKeyMissingException.php', + 'OCA\\Encryption\\HookManager' => $baseDir . '/../lib/HookManager.php', + 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => $baseDir . '/../lib/Hooks/Contracts/IHook.php', + 'OCA\\Encryption\\Hooks\\UserHooks' => $baseDir . '/../lib/Hooks/UserHooks.php', + 'OCA\\Encryption\\KeyManager' => $baseDir . '/../lib/KeyManager.php', + 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => $baseDir . '/../lib/Migration/SetMasterKeyStatus.php', + 'OCA\\Encryption\\Recovery' => $baseDir . '/../lib/Recovery.php', + 'OCA\\Encryption\\Session' => $baseDir . '/../lib/Session.php', + 'OCA\\Encryption\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', + 'OCA\\Encryption\\Settings\\Personal' => $baseDir . '/../lib/Settings/Personal.php', + 'OCA\\Encryption\\Users\\Setup' => $baseDir . '/../lib/Users/Setup.php', + 'OCA\\Encryption\\Util' => $baseDir . '/../lib/Util.php', ); diff --git a/apps/encryption/composer/composer/autoload_static.php b/apps/encryption/composer/composer/autoload_static.php index 01a4f60f043..6c458eabddd 100644 --- a/apps/encryption/composer/composer/autoload_static.php +++ b/apps/encryption/composer/composer/autoload_static.php @@ -4,60 +4,63 @@ namespace Composer\Autoload; -class ComposerStaticInitEncryption { - public static $prefixLengthsPsr4 = array( - 'O' => - array( - 'OCA\\Encryption\\' => 15, - ), - ); +class ComposerStaticInitEncryption +{ + public static $prefixLengthsPsr4 = array ( + 'O' => + array ( + 'OCA\\Encryption\\' => 15, + ), + ); - public static $prefixDirsPsr4 = array( - 'OCA\\Encryption\\' => - array( - 0 => __DIR__ . '/..' . '/../lib', - ), - ); + public static $prefixDirsPsr4 = array ( + 'OCA\\Encryption\\' => + array ( + 0 => __DIR__ . '/..' . '/../lib', + ), + ); - public static $classMap = array( - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - 'OCA\\Encryption\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', - 'OCA\\Encryption\\Command\\DisableMasterKey' => __DIR__ . '/..' . '/../lib/Command/DisableMasterKey.php', - 'OCA\\Encryption\\Command\\EnableMasterKey' => __DIR__ . '/..' . '/../lib/Command/EnableMasterKey.php', - 'OCA\\Encryption\\Command\\FixEncryptedVersion' => __DIR__ . '/..' . '/../lib/Command/FixEncryptedVersion.php', - 'OCA\\Encryption\\Command\\FixKeyLocation' => __DIR__ . '/..' . '/../lib/Command/FixKeyLocation.php', - 'OCA\\Encryption\\Command\\FixLegacyFileKey' => __DIR__ . '/..' . '/../lib/Command/FixLegacyFileKey.php', - 'OCA\\Encryption\\Command\\RecoverUser' => __DIR__ . '/..' . '/../lib/Command/RecoverUser.php', - 'OCA\\Encryption\\Command\\ScanLegacyFormat' => __DIR__ . '/..' . '/../lib/Command/ScanLegacyFormat.php', - 'OCA\\Encryption\\Controller\\RecoveryController' => __DIR__ . '/..' . '/../lib/Controller/RecoveryController.php', - 'OCA\\Encryption\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php', - 'OCA\\Encryption\\Controller\\StatusController' => __DIR__ . '/..' . '/../lib/Controller/StatusController.php', - 'OCA\\Encryption\\Crypto\\Crypt' => __DIR__ . '/..' . '/../lib/Crypto/Crypt.php', - 'OCA\\Encryption\\Crypto\\DecryptAll' => __DIR__ . '/..' . '/../lib/Crypto/DecryptAll.php', - 'OCA\\Encryption\\Crypto\\EncryptAll' => __DIR__ . '/..' . '/../lib/Crypto/EncryptAll.php', - 'OCA\\Encryption\\Crypto\\Encryption' => __DIR__ . '/..' . '/../lib/Crypto/Encryption.php', - 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => __DIR__ . '/..' . '/../lib/Exceptions/MultiKeyDecryptException.php', - 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => __DIR__ . '/..' . '/../lib/Exceptions/MultiKeyEncryptException.php', - 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => __DIR__ . '/..' . '/../lib/Exceptions/PrivateKeyMissingException.php', - 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => __DIR__ . '/..' . '/../lib/Exceptions/PublicKeyMissingException.php', - 'OCA\\Encryption\\HookManager' => __DIR__ . '/..' . '/../lib/HookManager.php', - 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => __DIR__ . '/..' . '/../lib/Hooks/Contracts/IHook.php', - 'OCA\\Encryption\\Hooks\\UserHooks' => __DIR__ . '/..' . '/../lib/Hooks/UserHooks.php', - 'OCA\\Encryption\\KeyManager' => __DIR__ . '/..' . '/../lib/KeyManager.php', - 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => __DIR__ . '/..' . '/../lib/Migration/SetMasterKeyStatus.php', - 'OCA\\Encryption\\Recovery' => __DIR__ . '/..' . '/../lib/Recovery.php', - 'OCA\\Encryption\\Session' => __DIR__ . '/..' . '/../lib/Session.php', - 'OCA\\Encryption\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', - 'OCA\\Encryption\\Settings\\Personal' => __DIR__ . '/..' . '/../lib/Settings/Personal.php', - 'OCA\\Encryption\\Users\\Setup' => __DIR__ . '/..' . '/../lib/Users/Setup.php', - 'OCA\\Encryption\\Util' => __DIR__ . '/..' . '/../lib/Util.php', - ); + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'OCA\\Encryption\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', + 'OCA\\Encryption\\Command\\DisableMasterKey' => __DIR__ . '/..' . '/../lib/Command/DisableMasterKey.php', + 'OCA\\Encryption\\Command\\DropLegacyFileKey' => __DIR__ . '/..' . '/../lib/Command/DropLegacyFileKey.php', + 'OCA\\Encryption\\Command\\EnableMasterKey' => __DIR__ . '/..' . '/../lib/Command/EnableMasterKey.php', + 'OCA\\Encryption\\Command\\FixEncryptedVersion' => __DIR__ . '/..' . '/../lib/Command/FixEncryptedVersion.php', + 'OCA\\Encryption\\Command\\FixKeyLocation' => __DIR__ . '/..' . '/../lib/Command/FixKeyLocation.php', + 'OCA\\Encryption\\Command\\RecoverUser' => __DIR__ . '/..' . '/../lib/Command/RecoverUser.php', + 'OCA\\Encryption\\Command\\ScanLegacyFormat' => __DIR__ . '/..' . '/../lib/Command/ScanLegacyFormat.php', + 'OCA\\Encryption\\Controller\\RecoveryController' => __DIR__ . '/..' . '/../lib/Controller/RecoveryController.php', + 'OCA\\Encryption\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php', + 'OCA\\Encryption\\Controller\\StatusController' => __DIR__ . '/..' . '/../lib/Controller/StatusController.php', + 'OCA\\Encryption\\Crypto\\Crypt' => __DIR__ . '/..' . '/../lib/Crypto/Crypt.php', + 'OCA\\Encryption\\Crypto\\DecryptAll' => __DIR__ . '/..' . '/../lib/Crypto/DecryptAll.php', + 'OCA\\Encryption\\Crypto\\EncryptAll' => __DIR__ . '/..' . '/../lib/Crypto/EncryptAll.php', + 'OCA\\Encryption\\Crypto\\Encryption' => __DIR__ . '/..' . '/../lib/Crypto/Encryption.php', + 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => __DIR__ . '/..' . '/../lib/Exceptions/MultiKeyDecryptException.php', + 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => __DIR__ . '/..' . '/../lib/Exceptions/MultiKeyEncryptException.php', + 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => __DIR__ . '/..' . '/../lib/Exceptions/PrivateKeyMissingException.php', + 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => __DIR__ . '/..' . '/../lib/Exceptions/PublicKeyMissingException.php', + 'OCA\\Encryption\\HookManager' => __DIR__ . '/..' . '/../lib/HookManager.php', + 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => __DIR__ . '/..' . '/../lib/Hooks/Contracts/IHook.php', + 'OCA\\Encryption\\Hooks\\UserHooks' => __DIR__ . '/..' . '/../lib/Hooks/UserHooks.php', + 'OCA\\Encryption\\KeyManager' => __DIR__ . '/..' . '/../lib/KeyManager.php', + 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => __DIR__ . '/..' . '/../lib/Migration/SetMasterKeyStatus.php', + 'OCA\\Encryption\\Recovery' => __DIR__ . '/..' . '/../lib/Recovery.php', + 'OCA\\Encryption\\Session' => __DIR__ . '/..' . '/../lib/Session.php', + 'OCA\\Encryption\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', + 'OCA\\Encryption\\Settings\\Personal' => __DIR__ . '/..' . '/../lib/Settings/Personal.php', + 'OCA\\Encryption\\Users\\Setup' => __DIR__ . '/..' . '/../lib/Users/Setup.php', + 'OCA\\Encryption\\Util' => __DIR__ . '/..' . '/../lib/Util.php', + ); - public static function getInitializer(ClassLoader $loader) { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitEncryption::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitEncryption::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitEncryption::$classMap; - }, null, ClassLoader::class); - } + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInitEncryption::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitEncryption::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitEncryption::$classMap; + + }, null, ClassLoader::class); + } } diff --git a/apps/encryption/composer/composer/installed.php b/apps/encryption/composer/composer/installed.php index b1af982a210..46be34510db 100644 --- a/apps/encryption/composer/composer/installed.php +++ b/apps/encryption/composer/composer/installed.php @@ -1,25 +1,23 @@ -<?php - -return array( - 'root' => array( - 'name' => '__root__', - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => '527de8ac9d989baf30144e8f9bc0381226d4aee9', - 'type' => 'library', - 'install_path' => __DIR__ . '/../', - 'aliases' => array(), - 'dev' => false, - ), - 'versions' => array( - '__root__' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => '527de8ac9d989baf30144e8f9bc0381226d4aee9', - 'type' => 'library', - 'install_path' => __DIR__ . '/../', - 'aliases' => array(), - 'dev_requirement' => false, - ), - ), +<?php return array( + 'root' => array( + 'name' => '__root__', + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'reference' => 'ffa8d21f37c8ccf968974b6aeb828e3e84287b94', + 'type' => 'library', + 'install_path' => __DIR__ . '/../', + 'aliases' => array(), + 'dev' => false, + ), + 'versions' => array( + '__root__' => array( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'reference' => 'ffa8d21f37c8ccf968974b6aeb828e3e84287b94', + 'type' => 'library', + 'install_path' => __DIR__ . '/../', + 'aliases' => array(), + 'dev_requirement' => false, + ), + ), ); diff --git a/apps/encryption/lib/Command/FixLegacyFileKey.php b/apps/encryption/lib/Command/DropLegacyFileKey.php index 7b0b4ccfb73..acfb7c334ee 100644 --- a/apps/encryption/lib/Command/FixLegacyFileKey.php +++ b/apps/encryption/lib/Command/DropLegacyFileKey.php @@ -36,7 +36,7 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class FixLegacyFileKey extends Command { +class DropLegacyFileKey extends Command { private View $rootView; public function __construct( @@ -50,7 +50,7 @@ class FixLegacyFileKey extends Command { protected function configure(): void { $this - ->setName('encryption:fix-legacy-filekey') + ->setName('encryption:drop-legacy-filekey') ->setDescription('Scan the files for the legacy filekey format using RC4 and get rid of it (if master key is enabled)'); } @@ -74,7 +74,7 @@ class FixLegacyFileKey extends Command { } if ($result) { - $output->writeln('All scanned files are properly encrypted. You can disable the legacy compatibility mode.'); + $output->writeln('All scanned files are properly encrypted.'); return 0; } @@ -139,6 +139,7 @@ class FixLegacyFileKey extends Command { return; } $this->rootView->touch($source, $fileInfo->getMTime()); + $this->rootView->unlink($target); $output->writeln('<info>Migrated ' . $source . '</info>', OutputInterface::VERBOSITY_VERBOSE); } catch (DecryptionFailedException $e) { if ($this->rootView->file_exists($target)) { |