@@ -40,147 +40,147 @@ |
||
40 | 40 | use Symfony\Component\Console\Output\OutputInterface; |
41 | 41 | |
42 | 42 | class FixKeyLocation extends Command { |
43 | - private IUserManager $userManager; |
|
44 | - private IUserMountCache $userMountCache; |
|
45 | - private Util $encryptionUtil; |
|
46 | - private IRootFolder $rootFolder; |
|
47 | - private string $keyRootDirectory; |
|
48 | - private View $rootView; |
|
49 | - |
|
50 | - public function __construct(IUserManager $userManager, IUserMountCache $userMountCache, Util $encryptionUtil, IRootFolder $rootFolder) { |
|
51 | - $this->userManager = $userManager; |
|
52 | - $this->userMountCache = $userMountCache; |
|
53 | - $this->encryptionUtil = $encryptionUtil; |
|
54 | - $this->rootFolder = $rootFolder; |
|
55 | - $this->keyRootDirectory = rtrim($this->encryptionUtil->getKeyStorageRoot(), '/'); |
|
56 | - $this->rootView = new View(); |
|
57 | - |
|
58 | - parent::__construct(); |
|
59 | - } |
|
60 | - |
|
61 | - |
|
62 | - protected function configure(): void { |
|
63 | - parent::configure(); |
|
64 | - |
|
65 | - $this |
|
66 | - ->setName('encryption:fix-key-location') |
|
67 | - ->setDescription('Fix the location of encryption keys for external storage') |
|
68 | - ->addOption('dry-run', null, InputOption::VALUE_NONE, "Only list files that require key migration, don't try to perform any migration") |
|
69 | - ->addArgument('user', InputArgument::REQUIRED, "User id to fix the key locations for"); |
|
70 | - } |
|
71 | - |
|
72 | - protected function execute(InputInterface $input, OutputInterface $output): int { |
|
73 | - $dryRun = $input->getOption('dry-run'); |
|
74 | - $userId = $input->getArgument('user'); |
|
75 | - $user = $this->userManager->get($userId); |
|
76 | - if (!$user) { |
|
77 | - $output->writeln("<error>User $userId not found</error>"); |
|
78 | - return 1; |
|
79 | - } |
|
80 | - |
|
81 | - \OC_Util::setupFS($user->getUID()); |
|
82 | - |
|
83 | - $mounts = $this->getSystemMountsForUser($user); |
|
84 | - foreach ($mounts as $mount) { |
|
85 | - $mountRootFolder = $this->rootFolder->get($mount->getMountPoint()); |
|
86 | - if (!$mountRootFolder instanceof Folder) { |
|
87 | - $output->writeln("<error>System wide mount point is not a directory, skipping: " . $mount->getMountPoint() . "</error>"); |
|
88 | - continue; |
|
89 | - } |
|
90 | - |
|
91 | - $files = $this->getAllFiles($mountRootFolder); |
|
92 | - foreach ($files as $file) { |
|
93 | - if ($this->isKeyStoredForUser($user, $file)) { |
|
94 | - if ($dryRun) { |
|
95 | - $output->writeln("<info>" . $file->getPath() . "</info> needs migration"); |
|
96 | - } else { |
|
97 | - $output->write("Migrating key for <info>" . $file->getPath() . "</info> "); |
|
98 | - if ($this->copyKeyAndValidate($user, $file)) { |
|
99 | - $output->writeln("<info>✓</info>"); |
|
100 | - } else { |
|
101 | - $output->writeln("<fg=red>❌</>"); |
|
102 | - $output->writeln(" Failed to validate key for <error>" . $file->getPath() . "</error>, key will not be migrated"); |
|
103 | - } |
|
104 | - } |
|
105 | - } |
|
106 | - } |
|
107 | - } |
|
108 | - |
|
109 | - return 0; |
|
110 | - } |
|
111 | - |
|
112 | - /** |
|
113 | - * @param IUser $user |
|
114 | - * @return ICachedMountInfo[] |
|
115 | - */ |
|
116 | - private function getSystemMountsForUser(IUser $user): array { |
|
117 | - return array_filter($this->userMountCache->getMountsForUser($user), function(ICachedMountInfo $mount) use ($user) { |
|
118 | - $mountPoint = substr($mount->getMountPoint(), strlen($user->getUID() . '/')); |
|
119 | - return $this->encryptionUtil->isSystemWideMountPoint($mountPoint, $user->getUID()); |
|
120 | - }); |
|
121 | - } |
|
122 | - |
|
123 | - /** |
|
124 | - * @param Folder $folder |
|
125 | - * @return \Generator<File> |
|
126 | - */ |
|
127 | - private function getAllFiles(Folder $folder) { |
|
128 | - foreach ($folder->getDirectoryListing() as $child) { |
|
129 | - if ($child instanceof Folder) { |
|
130 | - yield from $this->getAllFiles($child); |
|
131 | - } else { |
|
132 | - yield $child; |
|
133 | - } |
|
134 | - } |
|
135 | - } |
|
136 | - |
|
137 | - /** |
|
138 | - * Check if the key for a file is stored in the user's keystore and not the system one |
|
139 | - * |
|
140 | - * @param IUser $user |
|
141 | - * @param Node $node |
|
142 | - * @return bool |
|
143 | - */ |
|
144 | - private function isKeyStoredForUser(IUser $user, Node $node): bool { |
|
145 | - $path = trim(substr($node->getPath(), strlen($user->getUID()) + 1), '/'); |
|
146 | - $systemKeyPath = $this->keyRootDirectory . '/files_encryption/keys/' . $path . '/'; |
|
147 | - $userKeyPath = $this->keyRootDirectory . '/' . $user->getUID() . '/files_encryption/keys/' . $path . '/'; |
|
148 | - |
|
149 | - // this uses View instead of the RootFolder because the keys might not be in the cache |
|
150 | - $systemKeyExists = $this->rootView->file_exists($systemKeyPath); |
|
151 | - $userKeyExists = $this->rootView->file_exists($userKeyPath); |
|
152 | - return $userKeyExists && !$systemKeyExists; |
|
153 | - } |
|
154 | - |
|
155 | - /** |
|
156 | - * Check that the user key stored for a file can decrypt the file |
|
157 | - * |
|
158 | - * @param IUser $user |
|
159 | - * @param File $node |
|
160 | - * @return bool |
|
161 | - */ |
|
162 | - private function copyKeyAndValidate(IUser $user, File $node): bool { |
|
163 | - $path = trim(substr($node->getPath(), strlen($user->getUID()) + 1), '/'); |
|
164 | - $systemKeyPath = $this->keyRootDirectory . '/files_encryption/keys/' . $path . '/'; |
|
165 | - $userKeyPath = $this->keyRootDirectory . '/' . $user->getUID() . '/files_encryption/keys/' . $path . '/'; |
|
166 | - |
|
167 | - $this->rootView->copy($userKeyPath, $systemKeyPath); |
|
168 | - try { |
|
169 | - // check that the copied key is valid |
|
170 | - $fh = $node->fopen('r'); |
|
171 | - // read a single chunk |
|
172 | - $data = fread($fh, 8192); |
|
173 | - if ($data === false) { |
|
174 | - throw new \Exception("Read failed"); |
|
175 | - } |
|
176 | - |
|
177 | - // cleanup wrong key location |
|
178 | - $this->rootView->rmdir($userKeyPath); |
|
179 | - return true; |
|
180 | - } catch (\Exception $e) { |
|
181 | - // remove the copied key if we know it's invalid |
|
182 | - $this->rootView->rmdir($systemKeyPath); |
|
183 | - return false; |
|
184 | - } |
|
185 | - } |
|
43 | + private IUserManager $userManager; |
|
44 | + private IUserMountCache $userMountCache; |
|
45 | + private Util $encryptionUtil; |
|
46 | + private IRootFolder $rootFolder; |
|
47 | + private string $keyRootDirectory; |
|
48 | + private View $rootView; |
|
49 | + |
|
50 | + public function __construct(IUserManager $userManager, IUserMountCache $userMountCache, Util $encryptionUtil, IRootFolder $rootFolder) { |
|
51 | + $this->userManager = $userManager; |
|
52 | + $this->userMountCache = $userMountCache; |
|
53 | + $this->encryptionUtil = $encryptionUtil; |
|
54 | + $this->rootFolder = $rootFolder; |
|
55 | + $this->keyRootDirectory = rtrim($this->encryptionUtil->getKeyStorageRoot(), '/'); |
|
56 | + $this->rootView = new View(); |
|
57 | + |
|
58 | + parent::__construct(); |
|
59 | + } |
|
60 | + |
|
61 | + |
|
62 | + protected function configure(): void { |
|
63 | + parent::configure(); |
|
64 | + |
|
65 | + $this |
|
66 | + ->setName('encryption:fix-key-location') |
|
67 | + ->setDescription('Fix the location of encryption keys for external storage') |
|
68 | + ->addOption('dry-run', null, InputOption::VALUE_NONE, "Only list files that require key migration, don't try to perform any migration") |
|
69 | + ->addArgument('user', InputArgument::REQUIRED, "User id to fix the key locations for"); |
|
70 | + } |
|
71 | + |
|
72 | + protected function execute(InputInterface $input, OutputInterface $output): int { |
|
73 | + $dryRun = $input->getOption('dry-run'); |
|
74 | + $userId = $input->getArgument('user'); |
|
75 | + $user = $this->userManager->get($userId); |
|
76 | + if (!$user) { |
|
77 | + $output->writeln("<error>User $userId not found</error>"); |
|
78 | + return 1; |
|
79 | + } |
|
80 | + |
|
81 | + \OC_Util::setupFS($user->getUID()); |
|
82 | + |
|
83 | + $mounts = $this->getSystemMountsForUser($user); |
|
84 | + foreach ($mounts as $mount) { |
|
85 | + $mountRootFolder = $this->rootFolder->get($mount->getMountPoint()); |
|
86 | + if (!$mountRootFolder instanceof Folder) { |
|
87 | + $output->writeln("<error>System wide mount point is not a directory, skipping: " . $mount->getMountPoint() . "</error>"); |
|
88 | + continue; |
|
89 | + } |
|
90 | + |
|
91 | + $files = $this->getAllFiles($mountRootFolder); |
|
92 | + foreach ($files as $file) { |
|
93 | + if ($this->isKeyStoredForUser($user, $file)) { |
|
94 | + if ($dryRun) { |
|
95 | + $output->writeln("<info>" . $file->getPath() . "</info> needs migration"); |
|
96 | + } else { |
|
97 | + $output->write("Migrating key for <info>" . $file->getPath() . "</info> "); |
|
98 | + if ($this->copyKeyAndValidate($user, $file)) { |
|
99 | + $output->writeln("<info>✓</info>"); |
|
100 | + } else { |
|
101 | + $output->writeln("<fg=red>❌</>"); |
|
102 | + $output->writeln(" Failed to validate key for <error>" . $file->getPath() . "</error>, key will not be migrated"); |
|
103 | + } |
|
104 | + } |
|
105 | + } |
|
106 | + } |
|
107 | + } |
|
108 | + |
|
109 | + return 0; |
|
110 | + } |
|
111 | + |
|
112 | + /** |
|
113 | + * @param IUser $user |
|
114 | + * @return ICachedMountInfo[] |
|
115 | + */ |
|
116 | + private function getSystemMountsForUser(IUser $user): array { |
|
117 | + return array_filter($this->userMountCache->getMountsForUser($user), function(ICachedMountInfo $mount) use ($user) { |
|
118 | + $mountPoint = substr($mount->getMountPoint(), strlen($user->getUID() . '/')); |
|
119 | + return $this->encryptionUtil->isSystemWideMountPoint($mountPoint, $user->getUID()); |
|
120 | + }); |
|
121 | + } |
|
122 | + |
|
123 | + /** |
|
124 | + * @param Folder $folder |
|
125 | + * @return \Generator<File> |
|
126 | + */ |
|
127 | + private function getAllFiles(Folder $folder) { |
|
128 | + foreach ($folder->getDirectoryListing() as $child) { |
|
129 | + if ($child instanceof Folder) { |
|
130 | + yield from $this->getAllFiles($child); |
|
131 | + } else { |
|
132 | + yield $child; |
|
133 | + } |
|
134 | + } |
|
135 | + } |
|
136 | + |
|
137 | + /** |
|
138 | + * Check if the key for a file is stored in the user's keystore and not the system one |
|
139 | + * |
|
140 | + * @param IUser $user |
|
141 | + * @param Node $node |
|
142 | + * @return bool |
|
143 | + */ |
|
144 | + private function isKeyStoredForUser(IUser $user, Node $node): bool { |
|
145 | + $path = trim(substr($node->getPath(), strlen($user->getUID()) + 1), '/'); |
|
146 | + $systemKeyPath = $this->keyRootDirectory . '/files_encryption/keys/' . $path . '/'; |
|
147 | + $userKeyPath = $this->keyRootDirectory . '/' . $user->getUID() . '/files_encryption/keys/' . $path . '/'; |
|
148 | + |
|
149 | + // this uses View instead of the RootFolder because the keys might not be in the cache |
|
150 | + $systemKeyExists = $this->rootView->file_exists($systemKeyPath); |
|
151 | + $userKeyExists = $this->rootView->file_exists($userKeyPath); |
|
152 | + return $userKeyExists && !$systemKeyExists; |
|
153 | + } |
|
154 | + |
|
155 | + /** |
|
156 | + * Check that the user key stored for a file can decrypt the file |
|
157 | + * |
|
158 | + * @param IUser $user |
|
159 | + * @param File $node |
|
160 | + * @return bool |
|
161 | + */ |
|
162 | + private function copyKeyAndValidate(IUser $user, File $node): bool { |
|
163 | + $path = trim(substr($node->getPath(), strlen($user->getUID()) + 1), '/'); |
|
164 | + $systemKeyPath = $this->keyRootDirectory . '/files_encryption/keys/' . $path . '/'; |
|
165 | + $userKeyPath = $this->keyRootDirectory . '/' . $user->getUID() . '/files_encryption/keys/' . $path . '/'; |
|
166 | + |
|
167 | + $this->rootView->copy($userKeyPath, $systemKeyPath); |
|
168 | + try { |
|
169 | + // check that the copied key is valid |
|
170 | + $fh = $node->fopen('r'); |
|
171 | + // read a single chunk |
|
172 | + $data = fread($fh, 8192); |
|
173 | + if ($data === false) { |
|
174 | + throw new \Exception("Read failed"); |
|
175 | + } |
|
176 | + |
|
177 | + // cleanup wrong key location |
|
178 | + $this->rootView->rmdir($userKeyPath); |
|
179 | + return true; |
|
180 | + } catch (\Exception $e) { |
|
181 | + // remove the copied key if we know it's invalid |
|
182 | + $this->rootView->rmdir($systemKeyPath); |
|
183 | + return false; |
|
184 | + } |
|
185 | + } |
|
186 | 186 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | foreach ($mounts as $mount) { |
85 | 85 | $mountRootFolder = $this->rootFolder->get($mount->getMountPoint()); |
86 | 86 | if (!$mountRootFolder instanceof Folder) { |
87 | - $output->writeln("<error>System wide mount point is not a directory, skipping: " . $mount->getMountPoint() . "</error>"); |
|
87 | + $output->writeln("<error>System wide mount point is not a directory, skipping: ".$mount->getMountPoint()."</error>"); |
|
88 | 88 | continue; |
89 | 89 | } |
90 | 90 | |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | foreach ($files as $file) { |
93 | 93 | if ($this->isKeyStoredForUser($user, $file)) { |
94 | 94 | if ($dryRun) { |
95 | - $output->writeln("<info>" . $file->getPath() . "</info> needs migration"); |
|
95 | + $output->writeln("<info>".$file->getPath()."</info> needs migration"); |
|
96 | 96 | } else { |
97 | - $output->write("Migrating key for <info>" . $file->getPath() . "</info> "); |
|
97 | + $output->write("Migrating key for <info>".$file->getPath()."</info> "); |
|
98 | 98 | if ($this->copyKeyAndValidate($user, $file)) { |
99 | 99 | $output->writeln("<info>✓</info>"); |
100 | 100 | } else { |
101 | 101 | $output->writeln("<fg=red>❌</>"); |
102 | - $output->writeln(" Failed to validate key for <error>" . $file->getPath() . "</error>, key will not be migrated"); |
|
102 | + $output->writeln(" Failed to validate key for <error>".$file->getPath()."</error>, key will not be migrated"); |
|
103 | 103 | } |
104 | 104 | } |
105 | 105 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | private function getSystemMountsForUser(IUser $user): array { |
117 | 117 | return array_filter($this->userMountCache->getMountsForUser($user), function(ICachedMountInfo $mount) use ($user) { |
118 | - $mountPoint = substr($mount->getMountPoint(), strlen($user->getUID() . '/')); |
|
118 | + $mountPoint = substr($mount->getMountPoint(), strlen($user->getUID().'/')); |
|
119 | 119 | return $this->encryptionUtil->isSystemWideMountPoint($mountPoint, $user->getUID()); |
120 | 120 | }); |
121 | 121 | } |
@@ -143,8 +143,8 @@ discard block |
||
143 | 143 | */ |
144 | 144 | private function isKeyStoredForUser(IUser $user, Node $node): bool { |
145 | 145 | $path = trim(substr($node->getPath(), strlen($user->getUID()) + 1), '/'); |
146 | - $systemKeyPath = $this->keyRootDirectory . '/files_encryption/keys/' . $path . '/'; |
|
147 | - $userKeyPath = $this->keyRootDirectory . '/' . $user->getUID() . '/files_encryption/keys/' . $path . '/'; |
|
146 | + $systemKeyPath = $this->keyRootDirectory.'/files_encryption/keys/'.$path.'/'; |
|
147 | + $userKeyPath = $this->keyRootDirectory.'/'.$user->getUID().'/files_encryption/keys/'.$path.'/'; |
|
148 | 148 | |
149 | 149 | // this uses View instead of the RootFolder because the keys might not be in the cache |
150 | 150 | $systemKeyExists = $this->rootView->file_exists($systemKeyPath); |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | */ |
162 | 162 | private function copyKeyAndValidate(IUser $user, File $node): bool { |
163 | 163 | $path = trim(substr($node->getPath(), strlen($user->getUID()) + 1), '/'); |
164 | - $systemKeyPath = $this->keyRootDirectory . '/files_encryption/keys/' . $path . '/'; |
|
165 | - $userKeyPath = $this->keyRootDirectory . '/' . $user->getUID() . '/files_encryption/keys/' . $path . '/'; |
|
164 | + $systemKeyPath = $this->keyRootDirectory.'/files_encryption/keys/'.$path.'/'; |
|
165 | + $userKeyPath = $this->keyRootDirectory.'/'.$user->getUID().'/files_encryption/keys/'.$path.'/'; |
|
166 | 166 | |
167 | 167 | $this->rootView->copy($userKeyPath, $systemKeyPath); |
168 | 168 | try { |
@@ -6,56 +6,56 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitEncryption |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\Encryption\\' => 15, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\Encryption\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
25 | - 'OCA\\Encryption\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
26 | - 'OCA\\Encryption\\Command\\DisableMasterKey' => __DIR__ . '/..' . '/../lib/Command/DisableMasterKey.php', |
|
27 | - 'OCA\\Encryption\\Command\\EnableMasterKey' => __DIR__ . '/..' . '/../lib/Command/EnableMasterKey.php', |
|
28 | - 'OCA\\Encryption\\Command\\FixEncryptedVersion' => __DIR__ . '/..' . '/../lib/Command/FixEncryptedVersion.php', |
|
29 | - 'OCA\\Encryption\\Command\\FixKeyLocation' => __DIR__ . '/..' . '/../lib/Command/FixKeyLocation.php', |
|
30 | - 'OCA\\Encryption\\Command\\RecoverUser' => __DIR__ . '/..' . '/../lib/Command/RecoverUser.php', |
|
31 | - 'OCA\\Encryption\\Command\\ScanLegacyFormat' => __DIR__ . '/..' . '/../lib/Command/ScanLegacyFormat.php', |
|
32 | - 'OCA\\Encryption\\Controller\\RecoveryController' => __DIR__ . '/..' . '/../lib/Controller/RecoveryController.php', |
|
33 | - 'OCA\\Encryption\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php', |
|
34 | - 'OCA\\Encryption\\Controller\\StatusController' => __DIR__ . '/..' . '/../lib/Controller/StatusController.php', |
|
35 | - 'OCA\\Encryption\\Crypto\\Crypt' => __DIR__ . '/..' . '/../lib/Crypto/Crypt.php', |
|
36 | - 'OCA\\Encryption\\Crypto\\DecryptAll' => __DIR__ . '/..' . '/../lib/Crypto/DecryptAll.php', |
|
37 | - 'OCA\\Encryption\\Crypto\\EncryptAll' => __DIR__ . '/..' . '/../lib/Crypto/EncryptAll.php', |
|
38 | - 'OCA\\Encryption\\Crypto\\Encryption' => __DIR__ . '/..' . '/../lib/Crypto/Encryption.php', |
|
39 | - 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => __DIR__ . '/..' . '/../lib/Exceptions/MultiKeyDecryptException.php', |
|
40 | - 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => __DIR__ . '/..' . '/../lib/Exceptions/MultiKeyEncryptException.php', |
|
41 | - 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => __DIR__ . '/..' . '/../lib/Exceptions/PrivateKeyMissingException.php', |
|
42 | - 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => __DIR__ . '/..' . '/../lib/Exceptions/PublicKeyMissingException.php', |
|
43 | - 'OCA\\Encryption\\HookManager' => __DIR__ . '/..' . '/../lib/HookManager.php', |
|
44 | - 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => __DIR__ . '/..' . '/../lib/Hooks/Contracts/IHook.php', |
|
45 | - 'OCA\\Encryption\\Hooks\\UserHooks' => __DIR__ . '/..' . '/../lib/Hooks/UserHooks.php', |
|
46 | - 'OCA\\Encryption\\KeyManager' => __DIR__ . '/..' . '/../lib/KeyManager.php', |
|
47 | - 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => __DIR__ . '/..' . '/../lib/Migration/SetMasterKeyStatus.php', |
|
48 | - 'OCA\\Encryption\\Recovery' => __DIR__ . '/..' . '/../lib/Recovery.php', |
|
49 | - 'OCA\\Encryption\\Session' => __DIR__ . '/..' . '/../lib/Session.php', |
|
50 | - 'OCA\\Encryption\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
51 | - 'OCA\\Encryption\\Settings\\Personal' => __DIR__ . '/..' . '/../lib/Settings/Personal.php', |
|
52 | - 'OCA\\Encryption\\Users\\Setup' => __DIR__ . '/..' . '/../lib/Users/Setup.php', |
|
53 | - 'OCA\\Encryption\\Util' => __DIR__ . '/..' . '/../lib/Util.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
25 | + 'OCA\\Encryption\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
26 | + 'OCA\\Encryption\\Command\\DisableMasterKey' => __DIR__.'/..'.'/../lib/Command/DisableMasterKey.php', |
|
27 | + 'OCA\\Encryption\\Command\\EnableMasterKey' => __DIR__.'/..'.'/../lib/Command/EnableMasterKey.php', |
|
28 | + 'OCA\\Encryption\\Command\\FixEncryptedVersion' => __DIR__.'/..'.'/../lib/Command/FixEncryptedVersion.php', |
|
29 | + 'OCA\\Encryption\\Command\\FixKeyLocation' => __DIR__.'/..'.'/../lib/Command/FixKeyLocation.php', |
|
30 | + 'OCA\\Encryption\\Command\\RecoverUser' => __DIR__.'/..'.'/../lib/Command/RecoverUser.php', |
|
31 | + 'OCA\\Encryption\\Command\\ScanLegacyFormat' => __DIR__.'/..'.'/../lib/Command/ScanLegacyFormat.php', |
|
32 | + 'OCA\\Encryption\\Controller\\RecoveryController' => __DIR__.'/..'.'/../lib/Controller/RecoveryController.php', |
|
33 | + 'OCA\\Encryption\\Controller\\SettingsController' => __DIR__.'/..'.'/../lib/Controller/SettingsController.php', |
|
34 | + 'OCA\\Encryption\\Controller\\StatusController' => __DIR__.'/..'.'/../lib/Controller/StatusController.php', |
|
35 | + 'OCA\\Encryption\\Crypto\\Crypt' => __DIR__.'/..'.'/../lib/Crypto/Crypt.php', |
|
36 | + 'OCA\\Encryption\\Crypto\\DecryptAll' => __DIR__.'/..'.'/../lib/Crypto/DecryptAll.php', |
|
37 | + 'OCA\\Encryption\\Crypto\\EncryptAll' => __DIR__.'/..'.'/../lib/Crypto/EncryptAll.php', |
|
38 | + 'OCA\\Encryption\\Crypto\\Encryption' => __DIR__.'/..'.'/../lib/Crypto/Encryption.php', |
|
39 | + 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => __DIR__.'/..'.'/../lib/Exceptions/MultiKeyDecryptException.php', |
|
40 | + 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => __DIR__.'/..'.'/../lib/Exceptions/MultiKeyEncryptException.php', |
|
41 | + 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => __DIR__.'/..'.'/../lib/Exceptions/PrivateKeyMissingException.php', |
|
42 | + 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => __DIR__.'/..'.'/../lib/Exceptions/PublicKeyMissingException.php', |
|
43 | + 'OCA\\Encryption\\HookManager' => __DIR__.'/..'.'/../lib/HookManager.php', |
|
44 | + 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => __DIR__.'/..'.'/../lib/Hooks/Contracts/IHook.php', |
|
45 | + 'OCA\\Encryption\\Hooks\\UserHooks' => __DIR__.'/..'.'/../lib/Hooks/UserHooks.php', |
|
46 | + 'OCA\\Encryption\\KeyManager' => __DIR__.'/..'.'/../lib/KeyManager.php', |
|
47 | + 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => __DIR__.'/..'.'/../lib/Migration/SetMasterKeyStatus.php', |
|
48 | + 'OCA\\Encryption\\Recovery' => __DIR__.'/..'.'/../lib/Recovery.php', |
|
49 | + 'OCA\\Encryption\\Session' => __DIR__.'/..'.'/../lib/Session.php', |
|
50 | + 'OCA\\Encryption\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
51 | + 'OCA\\Encryption\\Settings\\Personal' => __DIR__.'/..'.'/../lib/Settings/Personal.php', |
|
52 | + 'OCA\\Encryption\\Users\\Setup' => __DIR__.'/..'.'/../lib/Users/Setup.php', |
|
53 | + 'OCA\\Encryption\\Util' => __DIR__.'/..'.'/../lib/Util.php', |
|
54 | 54 | ); |
55 | 55 | |
56 | 56 | public static function getInitializer(ClassLoader $loader) |
57 | 57 | { |
58 | - return \Closure::bind(function () use ($loader) { |
|
58 | + return \Closure::bind(function() use ($loader) { |
|
59 | 59 | $loader->prefixLengthsPsr4 = ComposerStaticInitEncryption::$prefixLengthsPsr4; |
60 | 60 | $loader->prefixDirsPsr4 = ComposerStaticInitEncryption::$prefixDirsPsr4; |
61 | 61 | $loader->classMap = ComposerStaticInitEncryption::$classMap; |
@@ -6,34 +6,34 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
10 | - 'OCA\\Encryption\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
11 | - 'OCA\\Encryption\\Command\\DisableMasterKey' => $baseDir . '/../lib/Command/DisableMasterKey.php', |
|
12 | - 'OCA\\Encryption\\Command\\EnableMasterKey' => $baseDir . '/../lib/Command/EnableMasterKey.php', |
|
13 | - 'OCA\\Encryption\\Command\\FixEncryptedVersion' => $baseDir . '/../lib/Command/FixEncryptedVersion.php', |
|
14 | - 'OCA\\Encryption\\Command\\FixKeyLocation' => $baseDir . '/../lib/Command/FixKeyLocation.php', |
|
15 | - 'OCA\\Encryption\\Command\\RecoverUser' => $baseDir . '/../lib/Command/RecoverUser.php', |
|
16 | - 'OCA\\Encryption\\Command\\ScanLegacyFormat' => $baseDir . '/../lib/Command/ScanLegacyFormat.php', |
|
17 | - 'OCA\\Encryption\\Controller\\RecoveryController' => $baseDir . '/../lib/Controller/RecoveryController.php', |
|
18 | - 'OCA\\Encryption\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php', |
|
19 | - 'OCA\\Encryption\\Controller\\StatusController' => $baseDir . '/../lib/Controller/StatusController.php', |
|
20 | - 'OCA\\Encryption\\Crypto\\Crypt' => $baseDir . '/../lib/Crypto/Crypt.php', |
|
21 | - 'OCA\\Encryption\\Crypto\\DecryptAll' => $baseDir . '/../lib/Crypto/DecryptAll.php', |
|
22 | - 'OCA\\Encryption\\Crypto\\EncryptAll' => $baseDir . '/../lib/Crypto/EncryptAll.php', |
|
23 | - 'OCA\\Encryption\\Crypto\\Encryption' => $baseDir . '/../lib/Crypto/Encryption.php', |
|
24 | - 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => $baseDir . '/../lib/Exceptions/MultiKeyDecryptException.php', |
|
25 | - 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => $baseDir . '/../lib/Exceptions/MultiKeyEncryptException.php', |
|
26 | - 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => $baseDir . '/../lib/Exceptions/PrivateKeyMissingException.php', |
|
27 | - 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => $baseDir . '/../lib/Exceptions/PublicKeyMissingException.php', |
|
28 | - 'OCA\\Encryption\\HookManager' => $baseDir . '/../lib/HookManager.php', |
|
29 | - 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => $baseDir . '/../lib/Hooks/Contracts/IHook.php', |
|
30 | - 'OCA\\Encryption\\Hooks\\UserHooks' => $baseDir . '/../lib/Hooks/UserHooks.php', |
|
31 | - 'OCA\\Encryption\\KeyManager' => $baseDir . '/../lib/KeyManager.php', |
|
32 | - 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => $baseDir . '/../lib/Migration/SetMasterKeyStatus.php', |
|
33 | - 'OCA\\Encryption\\Recovery' => $baseDir . '/../lib/Recovery.php', |
|
34 | - 'OCA\\Encryption\\Session' => $baseDir . '/../lib/Session.php', |
|
35 | - 'OCA\\Encryption\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
36 | - 'OCA\\Encryption\\Settings\\Personal' => $baseDir . '/../lib/Settings/Personal.php', |
|
37 | - 'OCA\\Encryption\\Users\\Setup' => $baseDir . '/../lib/Users/Setup.php', |
|
38 | - 'OCA\\Encryption\\Util' => $baseDir . '/../lib/Util.php', |
|
9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
10 | + 'OCA\\Encryption\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
11 | + 'OCA\\Encryption\\Command\\DisableMasterKey' => $baseDir.'/../lib/Command/DisableMasterKey.php', |
|
12 | + 'OCA\\Encryption\\Command\\EnableMasterKey' => $baseDir.'/../lib/Command/EnableMasterKey.php', |
|
13 | + 'OCA\\Encryption\\Command\\FixEncryptedVersion' => $baseDir.'/../lib/Command/FixEncryptedVersion.php', |
|
14 | + 'OCA\\Encryption\\Command\\FixKeyLocation' => $baseDir.'/../lib/Command/FixKeyLocation.php', |
|
15 | + 'OCA\\Encryption\\Command\\RecoverUser' => $baseDir.'/../lib/Command/RecoverUser.php', |
|
16 | + 'OCA\\Encryption\\Command\\ScanLegacyFormat' => $baseDir.'/../lib/Command/ScanLegacyFormat.php', |
|
17 | + 'OCA\\Encryption\\Controller\\RecoveryController' => $baseDir.'/../lib/Controller/RecoveryController.php', |
|
18 | + 'OCA\\Encryption\\Controller\\SettingsController' => $baseDir.'/../lib/Controller/SettingsController.php', |
|
19 | + 'OCA\\Encryption\\Controller\\StatusController' => $baseDir.'/../lib/Controller/StatusController.php', |
|
20 | + 'OCA\\Encryption\\Crypto\\Crypt' => $baseDir.'/../lib/Crypto/Crypt.php', |
|
21 | + 'OCA\\Encryption\\Crypto\\DecryptAll' => $baseDir.'/../lib/Crypto/DecryptAll.php', |
|
22 | + 'OCA\\Encryption\\Crypto\\EncryptAll' => $baseDir.'/../lib/Crypto/EncryptAll.php', |
|
23 | + 'OCA\\Encryption\\Crypto\\Encryption' => $baseDir.'/../lib/Crypto/Encryption.php', |
|
24 | + 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => $baseDir.'/../lib/Exceptions/MultiKeyDecryptException.php', |
|
25 | + 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => $baseDir.'/../lib/Exceptions/MultiKeyEncryptException.php', |
|
26 | + 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => $baseDir.'/../lib/Exceptions/PrivateKeyMissingException.php', |
|
27 | + 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => $baseDir.'/../lib/Exceptions/PublicKeyMissingException.php', |
|
28 | + 'OCA\\Encryption\\HookManager' => $baseDir.'/../lib/HookManager.php', |
|
29 | + 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => $baseDir.'/../lib/Hooks/Contracts/IHook.php', |
|
30 | + 'OCA\\Encryption\\Hooks\\UserHooks' => $baseDir.'/../lib/Hooks/UserHooks.php', |
|
31 | + 'OCA\\Encryption\\KeyManager' => $baseDir.'/../lib/KeyManager.php', |
|
32 | + 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => $baseDir.'/../lib/Migration/SetMasterKeyStatus.php', |
|
33 | + 'OCA\\Encryption\\Recovery' => $baseDir.'/../lib/Recovery.php', |
|
34 | + 'OCA\\Encryption\\Session' => $baseDir.'/../lib/Session.php', |
|
35 | + 'OCA\\Encryption\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
36 | + 'OCA\\Encryption\\Settings\\Personal' => $baseDir.'/../lib/Settings/Personal.php', |
|
37 | + 'OCA\\Encryption\\Users\\Setup' => $baseDir.'/../lib/Users/Setup.php', |
|
38 | + 'OCA\\Encryption\\Util' => $baseDir.'/../lib/Util.php', |
|
39 | 39 | ); |