@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $container = $this->getContainer(); |
| 131 | 131 | |
| 132 | 132 | $container->registerService('Crypt', |
| 133 | - function (IAppContainer $c) { |
|
| 133 | + function(IAppContainer $c) { |
|
| 134 | 134 | $server = $c->getServer(); |
| 135 | 135 | return new Crypt($server->getLogger(), |
| 136 | 136 | $server->getUserSession(), |
@@ -139,14 +139,14 @@ discard block |
||
| 139 | 139 | }); |
| 140 | 140 | |
| 141 | 141 | $container->registerService('Session', |
| 142 | - function (IAppContainer $c) { |
|
| 142 | + function(IAppContainer $c) { |
|
| 143 | 143 | $server = $c->getServer(); |
| 144 | 144 | return new Session($server->getSession()); |
| 145 | 145 | } |
| 146 | 146 | ); |
| 147 | 147 | |
| 148 | 148 | $container->registerService('KeyManager', |
| 149 | - function (IAppContainer $c) { |
|
| 149 | + function(IAppContainer $c) { |
|
| 150 | 150 | $server = $c->getServer(); |
| 151 | 151 | |
| 152 | 152 | return new KeyManager($server->getEncryptionKeyStorage(), |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | }); |
| 161 | 161 | |
| 162 | 162 | $container->registerService('Recovery', |
| 163 | - function (IAppContainer $c) { |
|
| 163 | + function(IAppContainer $c) { |
|
| 164 | 164 | $server = $c->getServer(); |
| 165 | 165 | |
| 166 | 166 | return new Recovery( |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | new View()); |
| 175 | 175 | }); |
| 176 | 176 | |
| 177 | - $container->registerService('RecoveryController', function (IAppContainer $c) { |
|
| 177 | + $container->registerService('RecoveryController', function(IAppContainer $c) { |
|
| 178 | 178 | $server = $c->getServer(); |
| 179 | 179 | return new RecoveryController( |
| 180 | 180 | $c->getAppName(), |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $c->query('Recovery')); |
| 185 | 185 | }); |
| 186 | 186 | |
| 187 | - $container->registerService('StatusController', function (IAppContainer $c) { |
|
| 187 | + $container->registerService('StatusController', function(IAppContainer $c) { |
|
| 188 | 188 | $server = $c->getServer(); |
| 189 | 189 | return new StatusController( |
| 190 | 190 | $c->getAppName(), |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | ); |
| 196 | 196 | }); |
| 197 | 197 | |
| 198 | - $container->registerService('SettingsController', function (IAppContainer $c) { |
|
| 198 | + $container->registerService('SettingsController', function(IAppContainer $c) { |
|
| 199 | 199 | $server = $c->getServer(); |
| 200 | 200 | return new SettingsController( |
| 201 | 201 | $c->getAppName(), |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | }); |
| 213 | 213 | |
| 214 | 214 | $container->registerService('UserSetup', |
| 215 | - function (IAppContainer $c) { |
|
| 215 | + function(IAppContainer $c) { |
|
| 216 | 216 | $server = $c->getServer(); |
| 217 | 217 | return new Setup($server->getLogger(), |
| 218 | 218 | $server->getUserSession(), |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | }); |
| 222 | 222 | |
| 223 | 223 | $container->registerService('Util', |
| 224 | - function (IAppContainer $c) { |
|
| 224 | + function(IAppContainer $c) { |
|
| 225 | 225 | $server = $c->getServer(); |
| 226 | 226 | |
| 227 | 227 | return new Util( |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | }); |
| 235 | 235 | |
| 236 | 236 | $container->registerService('EncryptAll', |
| 237 | - function (IAppContainer $c) { |
|
| 237 | + function(IAppContainer $c) { |
|
| 238 | 238 | $server = $c->getServer(); |
| 239 | 239 | return new EncryptAll( |
| 240 | 240 | $c->query('UserSetup'), |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | ); |
| 253 | 253 | |
| 254 | 254 | $container->registerService('DecryptAll', |
| 255 | - function (IAppContainer $c) { |
|
| 255 | + function(IAppContainer $c) { |
|
| 256 | 256 | return new DecryptAll( |
| 257 | 257 | $c->query('Util'), |
| 258 | 258 | $c->query('KeyManager'), |
@@ -72,28 +72,28 @@ |
||
| 72 | 72 | |
| 73 | 73 | $status = 'error'; |
| 74 | 74 | $message = 'no valid init status'; |
| 75 | - switch( $this->session->getStatus()) { |
|
| 75 | + switch ($this->session->getStatus()) { |
|
| 76 | 76 | case Session::INIT_EXECUTED: |
| 77 | 77 | $status = 'interactionNeeded'; |
| 78 | - $message = (string)$this->l->t( |
|
| 78 | + $message = (string) $this->l->t( |
|
| 79 | 79 | 'Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files.' |
| 80 | 80 | ); |
| 81 | 81 | break; |
| 82 | 82 | case Session::NOT_INITIALIZED: |
| 83 | 83 | $status = 'interactionNeeded'; |
| 84 | 84 | if ($this->encryptionManager->isEnabled()) { |
| 85 | - $message = (string)$this->l->t( |
|
| 85 | + $message = (string) $this->l->t( |
|
| 86 | 86 | 'Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again.' |
| 87 | 87 | ); |
| 88 | 88 | } else { |
| 89 | - $message = (string)$this->l->t( |
|
| 89 | + $message = (string) $this->l->t( |
|
| 90 | 90 | 'Please enable server side encryption in the admin settings in order to use the encryption module.' |
| 91 | 91 | ); |
| 92 | 92 | } |
| 93 | 93 | break; |
| 94 | 94 | case Session::INIT_SUCCESSFUL: |
| 95 | 95 | $status = 'success'; |
| 96 | - $message = (string)$this->l->t('Encryption app is enabled and ready'); |
|
| 96 | + $message = (string) $this->l->t('Encryption app is enabled and ready'); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | return new DataResponse( |
@@ -6,29 +6,29 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'OCA\\Encryption\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
| 10 | - 'OCA\\Encryption\\Command\\DisableMasterKey' => $baseDir . '/../lib/Command/DisableMasterKey.php', |
|
| 11 | - 'OCA\\Encryption\\Command\\EnableMasterKey' => $baseDir . '/../lib/Command/EnableMasterKey.php', |
|
| 12 | - 'OCA\\Encryption\\Controller\\RecoveryController' => $baseDir . '/../lib/Controller/RecoveryController.php', |
|
| 13 | - 'OCA\\Encryption\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php', |
|
| 14 | - 'OCA\\Encryption\\Controller\\StatusController' => $baseDir . '/../lib/Controller/StatusController.php', |
|
| 15 | - 'OCA\\Encryption\\Crypto\\Crypt' => $baseDir . '/../lib/Crypto/Crypt.php', |
|
| 16 | - 'OCA\\Encryption\\Crypto\\DecryptAll' => $baseDir . '/../lib/Crypto/DecryptAll.php', |
|
| 17 | - 'OCA\\Encryption\\Crypto\\EncryptAll' => $baseDir . '/../lib/Crypto/EncryptAll.php', |
|
| 18 | - 'OCA\\Encryption\\Crypto\\Encryption' => $baseDir . '/../lib/Crypto/Encryption.php', |
|
| 19 | - 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => $baseDir . '/../lib/Exceptions/MultiKeyDecryptException.php', |
|
| 20 | - 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => $baseDir . '/../lib/Exceptions/MultiKeyEncryptException.php', |
|
| 21 | - 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => $baseDir . '/../lib/Exceptions/PrivateKeyMissingException.php', |
|
| 22 | - 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => $baseDir . '/../lib/Exceptions/PublicKeyMissingException.php', |
|
| 23 | - 'OCA\\Encryption\\HookManager' => $baseDir . '/../lib/HookManager.php', |
|
| 24 | - 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => $baseDir . '/../lib/Hooks/Contracts/IHook.php', |
|
| 25 | - 'OCA\\Encryption\\Hooks\\UserHooks' => $baseDir . '/../lib/Hooks/UserHooks.php', |
|
| 26 | - 'OCA\\Encryption\\KeyManager' => $baseDir . '/../lib/KeyManager.php', |
|
| 27 | - 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => $baseDir . '/../lib/Migration/SetMasterKeyStatus.php', |
|
| 28 | - 'OCA\\Encryption\\Recovery' => $baseDir . '/../lib/Recovery.php', |
|
| 29 | - 'OCA\\Encryption\\Session' => $baseDir . '/../lib/Session.php', |
|
| 30 | - 'OCA\\Encryption\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
| 31 | - 'OCA\\Encryption\\Settings\\Personal' => $baseDir . '/../lib/Settings/Personal.php', |
|
| 32 | - 'OCA\\Encryption\\Users\\Setup' => $baseDir . '/../lib/Users/Setup.php', |
|
| 33 | - 'OCA\\Encryption\\Util' => $baseDir . '/../lib/Util.php', |
|
| 9 | + 'OCA\\Encryption\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
| 10 | + 'OCA\\Encryption\\Command\\DisableMasterKey' => $baseDir.'/../lib/Command/DisableMasterKey.php', |
|
| 11 | + 'OCA\\Encryption\\Command\\EnableMasterKey' => $baseDir.'/../lib/Command/EnableMasterKey.php', |
|
| 12 | + 'OCA\\Encryption\\Controller\\RecoveryController' => $baseDir.'/../lib/Controller/RecoveryController.php', |
|
| 13 | + 'OCA\\Encryption\\Controller\\SettingsController' => $baseDir.'/../lib/Controller/SettingsController.php', |
|
| 14 | + 'OCA\\Encryption\\Controller\\StatusController' => $baseDir.'/../lib/Controller/StatusController.php', |
|
| 15 | + 'OCA\\Encryption\\Crypto\\Crypt' => $baseDir.'/../lib/Crypto/Crypt.php', |
|
| 16 | + 'OCA\\Encryption\\Crypto\\DecryptAll' => $baseDir.'/../lib/Crypto/DecryptAll.php', |
|
| 17 | + 'OCA\\Encryption\\Crypto\\EncryptAll' => $baseDir.'/../lib/Crypto/EncryptAll.php', |
|
| 18 | + 'OCA\\Encryption\\Crypto\\Encryption' => $baseDir.'/../lib/Crypto/Encryption.php', |
|
| 19 | + 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => $baseDir.'/../lib/Exceptions/MultiKeyDecryptException.php', |
|
| 20 | + 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => $baseDir.'/../lib/Exceptions/MultiKeyEncryptException.php', |
|
| 21 | + 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => $baseDir.'/../lib/Exceptions/PrivateKeyMissingException.php', |
|
| 22 | + 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => $baseDir.'/../lib/Exceptions/PublicKeyMissingException.php', |
|
| 23 | + 'OCA\\Encryption\\HookManager' => $baseDir.'/../lib/HookManager.php', |
|
| 24 | + 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => $baseDir.'/../lib/Hooks/Contracts/IHook.php', |
|
| 25 | + 'OCA\\Encryption\\Hooks\\UserHooks' => $baseDir.'/../lib/Hooks/UserHooks.php', |
|
| 26 | + 'OCA\\Encryption\\KeyManager' => $baseDir.'/../lib/KeyManager.php', |
|
| 27 | + 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => $baseDir.'/../lib/Migration/SetMasterKeyStatus.php', |
|
| 28 | + 'OCA\\Encryption\\Recovery' => $baseDir.'/../lib/Recovery.php', |
|
| 29 | + 'OCA\\Encryption\\Session' => $baseDir.'/../lib/Session.php', |
|
| 30 | + 'OCA\\Encryption\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
| 31 | + 'OCA\\Encryption\\Settings\\Personal' => $baseDir.'/../lib/Settings/Personal.php', |
|
| 32 | + 'OCA\\Encryption\\Users\\Setup' => $baseDir.'/../lib/Users/Setup.php', |
|
| 33 | + 'OCA\\Encryption\\Util' => $baseDir.'/../lib/Util.php', |
|
| 34 | 34 | ); |
@@ -6,51 +6,51 @@ |
||
| 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 | - 'OCA\\Encryption\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
| 25 | - 'OCA\\Encryption\\Command\\DisableMasterKey' => __DIR__ . '/..' . '/../lib/Command/DisableMasterKey.php', |
|
| 26 | - 'OCA\\Encryption\\Command\\EnableMasterKey' => __DIR__ . '/..' . '/../lib/Command/EnableMasterKey.php', |
|
| 27 | - 'OCA\\Encryption\\Controller\\RecoveryController' => __DIR__ . '/..' . '/../lib/Controller/RecoveryController.php', |
|
| 28 | - 'OCA\\Encryption\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php', |
|
| 29 | - 'OCA\\Encryption\\Controller\\StatusController' => __DIR__ . '/..' . '/../lib/Controller/StatusController.php', |
|
| 30 | - 'OCA\\Encryption\\Crypto\\Crypt' => __DIR__ . '/..' . '/../lib/Crypto/Crypt.php', |
|
| 31 | - 'OCA\\Encryption\\Crypto\\DecryptAll' => __DIR__ . '/..' . '/../lib/Crypto/DecryptAll.php', |
|
| 32 | - 'OCA\\Encryption\\Crypto\\EncryptAll' => __DIR__ . '/..' . '/../lib/Crypto/EncryptAll.php', |
|
| 33 | - 'OCA\\Encryption\\Crypto\\Encryption' => __DIR__ . '/..' . '/../lib/Crypto/Encryption.php', |
|
| 34 | - 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => __DIR__ . '/..' . '/../lib/Exceptions/MultiKeyDecryptException.php', |
|
| 35 | - 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => __DIR__ . '/..' . '/../lib/Exceptions/MultiKeyEncryptException.php', |
|
| 36 | - 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => __DIR__ . '/..' . '/../lib/Exceptions/PrivateKeyMissingException.php', |
|
| 37 | - 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => __DIR__ . '/..' . '/../lib/Exceptions/PublicKeyMissingException.php', |
|
| 38 | - 'OCA\\Encryption\\HookManager' => __DIR__ . '/..' . '/../lib/HookManager.php', |
|
| 39 | - 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => __DIR__ . '/..' . '/../lib/Hooks/Contracts/IHook.php', |
|
| 40 | - 'OCA\\Encryption\\Hooks\\UserHooks' => __DIR__ . '/..' . '/../lib/Hooks/UserHooks.php', |
|
| 41 | - 'OCA\\Encryption\\KeyManager' => __DIR__ . '/..' . '/../lib/KeyManager.php', |
|
| 42 | - 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => __DIR__ . '/..' . '/../lib/Migration/SetMasterKeyStatus.php', |
|
| 43 | - 'OCA\\Encryption\\Recovery' => __DIR__ . '/..' . '/../lib/Recovery.php', |
|
| 44 | - 'OCA\\Encryption\\Session' => __DIR__ . '/..' . '/../lib/Session.php', |
|
| 45 | - 'OCA\\Encryption\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
| 46 | - 'OCA\\Encryption\\Settings\\Personal' => __DIR__ . '/..' . '/../lib/Settings/Personal.php', |
|
| 47 | - 'OCA\\Encryption\\Users\\Setup' => __DIR__ . '/..' . '/../lib/Users/Setup.php', |
|
| 48 | - 'OCA\\Encryption\\Util' => __DIR__ . '/..' . '/../lib/Util.php', |
|
| 23 | + public static $classMap = array( |
|
| 24 | + 'OCA\\Encryption\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
| 25 | + 'OCA\\Encryption\\Command\\DisableMasterKey' => __DIR__.'/..'.'/../lib/Command/DisableMasterKey.php', |
|
| 26 | + 'OCA\\Encryption\\Command\\EnableMasterKey' => __DIR__.'/..'.'/../lib/Command/EnableMasterKey.php', |
|
| 27 | + 'OCA\\Encryption\\Controller\\RecoveryController' => __DIR__.'/..'.'/../lib/Controller/RecoveryController.php', |
|
| 28 | + 'OCA\\Encryption\\Controller\\SettingsController' => __DIR__.'/..'.'/../lib/Controller/SettingsController.php', |
|
| 29 | + 'OCA\\Encryption\\Controller\\StatusController' => __DIR__.'/..'.'/../lib/Controller/StatusController.php', |
|
| 30 | + 'OCA\\Encryption\\Crypto\\Crypt' => __DIR__.'/..'.'/../lib/Crypto/Crypt.php', |
|
| 31 | + 'OCA\\Encryption\\Crypto\\DecryptAll' => __DIR__.'/..'.'/../lib/Crypto/DecryptAll.php', |
|
| 32 | + 'OCA\\Encryption\\Crypto\\EncryptAll' => __DIR__.'/..'.'/../lib/Crypto/EncryptAll.php', |
|
| 33 | + 'OCA\\Encryption\\Crypto\\Encryption' => __DIR__.'/..'.'/../lib/Crypto/Encryption.php', |
|
| 34 | + 'OCA\\Encryption\\Exceptions\\MultiKeyDecryptException' => __DIR__.'/..'.'/../lib/Exceptions/MultiKeyDecryptException.php', |
|
| 35 | + 'OCA\\Encryption\\Exceptions\\MultiKeyEncryptException' => __DIR__.'/..'.'/../lib/Exceptions/MultiKeyEncryptException.php', |
|
| 36 | + 'OCA\\Encryption\\Exceptions\\PrivateKeyMissingException' => __DIR__.'/..'.'/../lib/Exceptions/PrivateKeyMissingException.php', |
|
| 37 | + 'OCA\\Encryption\\Exceptions\\PublicKeyMissingException' => __DIR__.'/..'.'/../lib/Exceptions/PublicKeyMissingException.php', |
|
| 38 | + 'OCA\\Encryption\\HookManager' => __DIR__.'/..'.'/../lib/HookManager.php', |
|
| 39 | + 'OCA\\Encryption\\Hooks\\Contracts\\IHook' => __DIR__.'/..'.'/../lib/Hooks/Contracts/IHook.php', |
|
| 40 | + 'OCA\\Encryption\\Hooks\\UserHooks' => __DIR__.'/..'.'/../lib/Hooks/UserHooks.php', |
|
| 41 | + 'OCA\\Encryption\\KeyManager' => __DIR__.'/..'.'/../lib/KeyManager.php', |
|
| 42 | + 'OCA\\Encryption\\Migration\\SetMasterKeyStatus' => __DIR__.'/..'.'/../lib/Migration/SetMasterKeyStatus.php', |
|
| 43 | + 'OCA\\Encryption\\Recovery' => __DIR__.'/..'.'/../lib/Recovery.php', |
|
| 44 | + 'OCA\\Encryption\\Session' => __DIR__.'/..'.'/../lib/Session.php', |
|
| 45 | + 'OCA\\Encryption\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
| 46 | + 'OCA\\Encryption\\Settings\\Personal' => __DIR__.'/..'.'/../lib/Settings/Personal.php', |
|
| 47 | + 'OCA\\Encryption\\Users\\Setup' => __DIR__.'/..'.'/../lib/Users/Setup.php', |
|
| 48 | + 'OCA\\Encryption\\Util' => __DIR__.'/..'.'/../lib/Util.php', |
|
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | 51 | public static function getInitializer(ClassLoader $loader) |
| 52 | 52 | { |
| 53 | - return \Closure::bind(function () use ($loader) { |
|
| 53 | + return \Closure::bind(function() use ($loader) { |
|
| 54 | 54 | $loader->prefixLengthsPsr4 = ComposerStaticInitEncryption::$prefixLengthsPsr4; |
| 55 | 55 | $loader->prefixDirsPsr4 = ComposerStaticInitEncryption::$prefixDirsPsr4; |
| 56 | 56 | $loader->classMap = ComposerStaticInitEncryption::$classMap; |