summaryrefslogtreecommitdiffstats
path: root/apps/encryption
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-11-01 15:37:29 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-11-01 15:37:29 +0100
commite2805f02aa51c602c581bd4f09b99dd791a42df4 (patch)
tree4ea194f47aa315874c2aac31c30dbdb14110539b /apps/encryption
parent2b4b3b1986e58305c08941f77a693a80cc3d5b85 (diff)
parent52b679a2d6f6b273f46334b15534ab312f974a1a (diff)
downloadnextcloud-server-e2805f02aa51c602c581bd4f09b99dd791a42df4.tar.gz
nextcloud-server-e2805f02aa51c602c581bd4f09b99dd791a42df4.zip
Merge branch 'master' into autocomplete-gui
Diffstat (limited to 'apps/encryption')
-rw-r--r--apps/encryption/composer/autoload.php7
-rw-r--r--apps/encryption/composer/composer.json13
-rw-r--r--apps/encryption/composer/composer/ClassLoader.php445
-rw-r--r--apps/encryption/composer/composer/LICENSE21
-rw-r--r--apps/encryption/composer/composer/autoload_classmap.php36
-rw-r--r--apps/encryption/composer/composer/autoload_namespaces.php9
-rw-r--r--apps/encryption/composer/composer/autoload_psr4.php10
-rw-r--r--apps/encryption/composer/composer/autoload_real.php52
-rw-r--r--apps/encryption/composer/composer/autoload_static.php62
-rw-r--r--apps/encryption/l10n/es_CO.js65
-rw-r--r--apps/encryption/l10n/es_CO.json63
-rw-r--r--apps/encryption/l10n/eu.js32
-rw-r--r--apps/encryption/l10n/eu.json32
-rw-r--r--apps/encryption/l10n/zh_TW.js7
-rw-r--r--apps/encryption/l10n/zh_TW.json7
-rw-r--r--apps/encryption/lib/Hooks/UserHooks.php21
-rw-r--r--apps/encryption/lib/Migration.php8
-rw-r--r--apps/encryption/tests/Command/TestEnableMasterKey.php14
-rw-r--r--apps/encryption/tests/Controller/RecoveryControllerTest.php12
-rw-r--r--apps/encryption/tests/Controller/SettingsControllerTest.php23
-rw-r--r--apps/encryption/tests/Controller/StatusControllerTest.php5
-rw-r--r--apps/encryption/tests/Crypto/CryptTest.php11
-rw-r--r--apps/encryption/tests/Crypto/DecryptAllTest.php10
-rw-r--r--apps/encryption/tests/Crypto/EncryptAllTest.php52
-rw-r--r--apps/encryption/tests/Crypto/EncryptionTest.php27
-rw-r--r--apps/encryption/tests/HookManagerTest.php7
-rw-r--r--apps/encryption/tests/Hooks/UserHooksTest.php33
-rw-r--r--apps/encryption/tests/KeyManagerTest.php32
-rw-r--r--apps/encryption/tests/MigrationTest.php21
-rw-r--r--apps/encryption/tests/RecoveryTest.php9
-rw-r--r--apps/encryption/tests/Settings/AdminTest.php12
-rw-r--r--apps/encryption/tests/Users/SetupTest.php9
-rw-r--r--apps/encryption/tests/UtilTest.php9
33 files changed, 1042 insertions, 134 deletions
diff --git a/apps/encryption/composer/autoload.php b/apps/encryption/composer/autoload.php
new file mode 100644
index 00000000000..52febf19470
--- /dev/null
+++ b/apps/encryption/composer/autoload.php
@@ -0,0 +1,7 @@
+<?php
+
+// autoload.php @generated by Composer
+
+require_once __DIR__ . '/composer/autoload_real.php';
+
+return ComposerAutoloaderInitEncryption::getLoader();
diff --git a/apps/encryption/composer/composer.json b/apps/encryption/composer/composer.json
new file mode 100644
index 00000000000..5b38c9dc683
--- /dev/null
+++ b/apps/encryption/composer/composer.json
@@ -0,0 +1,13 @@
+{
+ "config" : {
+ "vendor-dir": ".",
+ "optimize-autoloader": true,
+ "authorative-autoloader": true,
+ "autoloader-suffix": "Encryption"
+ },
+ "autoload" : {
+ "psr-4": {
+ "OCA\\Encryption\\": "../lib/"
+ }
+ }
+}
diff --git a/apps/encryption/composer/composer/ClassLoader.php b/apps/encryption/composer/composer/ClassLoader.php
new file mode 100644
index 00000000000..2c72175e772
--- /dev/null
+++ b/apps/encryption/composer/composer/ClassLoader.php
@@ -0,0 +1,445 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ * Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ * $loader = new \Composer\Autoload\ClassLoader();
+ *
+ * // register classes with namespaces
+ * $loader->add('Symfony\Component', __DIR__.'/component');
+ * $loader->add('Symfony', __DIR__.'/framework');
+ *
+ * // activate the autoloader
+ * $loader->register();
+ *
+ * // to enable searching the include path (eg. for PEAR packages)
+ * $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @see http://www.php-fig.org/psr/psr-0/
+ * @see http://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+ // PSR-4
+ private $prefixLengthsPsr4 = array();
+ private $prefixDirsPsr4 = array();
+ private $fallbackDirsPsr4 = array();
+
+ // PSR-0
+ private $prefixesPsr0 = array();
+ private $fallbackDirsPsr0 = array();
+
+ private $useIncludePath = false;
+ private $classMap = array();
+ private $classMapAuthoritative = false;
+ private $missingClasses = array();
+ private $apcuPrefix;
+
+ public function getPrefixes()
+ {
+ if (!empty($this->prefixesPsr0)) {
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
+ }
+
+ return array();
+ }
+
+ public function getPrefixesPsr4()
+ {
+ return $this->prefixDirsPsr4;
+ }
+
+ public function getFallbackDirs()
+ {
+ return $this->fallbackDirsPsr0;
+ }
+
+ public function getFallbackDirsPsr4()
+ {
+ return $this->fallbackDirsPsr4;
+ }
+
+ public function getClassMap()
+ {
+ return $this->classMap;
+ }
+
+ /**
+ * @param array $classMap Class to filename map
+ */
+ public function addClassMap(array $classMap)
+ {
+ if ($this->classMap) {
+ $this->classMap = array_merge($this->classMap, $classMap);
+ } else {
+ $this->classMap = $classMap;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix, either
+ * appending or prepending to the ones previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param array|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ */
+ public function add($prefix, $paths, $prepend = false)
+ {
+ if (!$prefix) {
+ if ($prepend) {
+ $this->fallbackDirsPsr0 = array_merge(
+ (array) $paths,
+ $this->fallbackDirsPsr0
+ );
+ } else {
+ $this->fallbackDirsPsr0 = array_merge(
+ $this->fallbackDirsPsr0,
+ (array) $paths
+ );
+ }
+
+ return;
+ }
+
+ $first = $prefix[0];
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+
+ return;
+ }
+ if ($prepend) {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ (array) $paths,
+ $this->prefixesPsr0[$first][$prefix]
+ );
+ } else {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $this->prefixesPsr0[$first][$prefix],
+ (array) $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace, either
+ * appending or prepending to the ones previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function addPsr4($prefix, $paths, $prepend = false)
+ {
+ if (!$prefix) {
+ // Register directories for the root namespace.
+ if ($prepend) {
+ $this->fallbackDirsPsr4 = array_merge(
+ (array) $paths,
+ $this->fallbackDirsPsr4
+ );
+ } else {
+ $this->fallbackDirsPsr4 = array_merge(
+ $this->fallbackDirsPsr4,
+ (array) $paths
+ );
+ }
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+ // Register directories for a new namespace.
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ } elseif ($prepend) {
+ // Prepend directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ (array) $paths,
+ $this->prefixDirsPsr4[$prefix]
+ );
+ } else {
+ // Append directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $this->prefixDirsPsr4[$prefix],
+ (array) $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix,
+ * replacing any others previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param array|string $paths The PSR-0 base directories
+ */
+ public function set($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr0 = (array) $paths;
+ } else {
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace,
+ * replacing any others previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function setPsr4($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr4 = (array) $paths;
+ } else {
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Turns on searching the include path for class files.
+ *
+ * @param bool $useIncludePath
+ */
+ public function setUseIncludePath($useIncludePath)
+ {
+ $this->useIncludePath = $useIncludePath;
+ }
+
+ /**
+ * Can be used to check if the autoloader uses the include path to check
+ * for classes.
+ *
+ * @return bool
+ */
+ public function getUseIncludePath()
+ {
+ return $this->useIncludePath;
+ }
+
+ /**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
+ *
+ * @param string|null $apcuPrefix
+ */
+ public function setApcuPrefix($apcuPrefix)
+ {
+ $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+ }
+
+ /**
+ * The APCu prefix in use, or null if APCu caching is not enabled.
+ *
+ * @return string|null
+ */
+ public function getApcuPrefix()
+ {
+ return $this->apcuPrefix;
+ }
+
+ /**
+ * Registers this instance as an autoloader.
+ *
+ * @param bool $prepend Whether to prepend the autoloader or not
+ */
+ public function register($prepend = false)
+ {
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+ }
+
+ /**
+ * Unregisters this instance as an autoloader.
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $class The name of the class
+ * @return bool|null True if loaded, null otherwise
+ */
+ public function loadClass($class)
+ {
+ if ($file = $this->findFile($class)) {
+ includeFile($file);
+
+ return true;
+ }
+ }
+
+ /**
+ * Finds the path to the file where the class is defined.
+ *
+ * @param string $class The name of the class
+ *
+ * @return string|false The path if found, false otherwise
+ */
+ public function findFile($class)
+ {
+ // class map lookup
+ if (isset($this->classMap[$class])) {
+ return $this->classMap[$class];
+ }
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
+ return false;
+ }
+ if (null !== $this->apcuPrefix) {
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
+ if ($hit) {
+ return $file;
+ }
+ }
+
+ $file = $this->findFileWithExtension($class, '.php');
+
+ // Search for Hack files if we are running on HHVM
+ if (false === $file && defined('HHVM_VERSION')) {
+ $file = $this->findFileWithExtension($class, '.hh');
+ }
+
+ if (null !== $this->apcuPrefix) {
+ apcu_add($this->apcuPrefix.$class, $file);
+ }
+
+ if (false === $file) {
+ // Remember that this class does not exist.
+ $this->missingClasses[$class] = true;
+ }
+
+ return $file;
+ }
+
+ private function findFileWithExtension($class, $ext)
+ {
+ // PSR-4 lookup
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+ $first = $class[0];
+ if (isset($this->prefixLengthsPsr4[$first])) {
+ $subPath = $class;
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
+ $subPath = substr($subPath, 0, $lastPos);
+ $search = $subPath.'\\';
+ if (isset($this->prefixDirsPsr4[$search])) {
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
+ $length = $this->prefixLengthsPsr4[$first][$search];
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-4 fallback dirs
+ foreach ($this->fallbackDirsPsr4 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 lookup
+ if (false !== $pos = strrpos($class, '\\')) {
+ // namespaced class name
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+ } else {
+ // PEAR-like class name
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+ }
+
+ if (isset($this->prefixesPsr0[$first])) {
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($dirs as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-0 fallback dirs
+ foreach ($this->fallbackDirsPsr0 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 include paths.
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+ return $file;
+ }
+
+ return false;
+ }
+}
+
+/**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ */
+function includeFile($file)
+{
+ include $file;
+}
diff --git a/apps/encryption/composer/composer/LICENSE b/apps/encryption/composer/composer/LICENSE
new file mode 100644
index 00000000000..f27399a042d
--- /dev/null
+++ b/apps/encryption/composer/composer/LICENSE
@@ -0,0 +1,21 @@
+
+Copyright (c) Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/apps/encryption/composer/composer/autoload_classmap.php b/apps/encryption/composer/composer/autoload_classmap.php
new file mode 100644
index 00000000000..7ab0056cc8c
--- /dev/null
+++ b/apps/encryption/composer/composer/autoload_classmap.php
@@ -0,0 +1,36 @@
+<?php
+
+// autoload_classmap.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = $vendorDir;
+
+return array(
+ '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\\MigrateKeys' => $baseDir . '/../lib/Command/MigrateKeys.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' => $baseDir . '/../lib/Migration.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_namespaces.php b/apps/encryption/composer/composer/autoload_namespaces.php
new file mode 100644
index 00000000000..71c9e91858d
--- /dev/null
+++ b/apps/encryption/composer/composer/autoload_namespaces.php
@@ -0,0 +1,9 @@
+<?php
+
+// autoload_namespaces.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = $vendorDir;
+
+return array(
+);
diff --git a/apps/encryption/composer/composer/autoload_psr4.php b/apps/encryption/composer/composer/autoload_psr4.php
new file mode 100644
index 00000000000..6baeba923d6
--- /dev/null
+++ b/apps/encryption/composer/composer/autoload_psr4.php
@@ -0,0 +1,10 @@
+<?php
+
+// autoload_psr4.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = $vendorDir;
+
+return array(
+ 'OCA\\Encryption\\' => array($baseDir . '/../lib'),
+);
diff --git a/apps/encryption/composer/composer/autoload_real.php b/apps/encryption/composer/composer/autoload_real.php
new file mode 100644
index 00000000000..fae90387a09
--- /dev/null
+++ b/apps/encryption/composer/composer/autoload_real.php
@@ -0,0 +1,52 @@
+<?php
+
+// autoload_real.php @generated by Composer
+
+class ComposerAutoloaderInitEncryption
+{
+ private static $loader;
+
+ public static function loadClassLoader($class)
+ {
+ if ('Composer\Autoload\ClassLoader' === $class) {
+ require __DIR__ . '/ClassLoader.php';
+ }
+ }
+
+ public static function getLoader()
+ {
+ if (null !== self::$loader) {
+ return self::$loader;
+ }
+
+ spl_autoload_register(array('ComposerAutoloaderInitEncryption', 'loadClassLoader'), true, true);
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
+ spl_autoload_unregister(array('ComposerAutoloaderInitEncryption', 'loadClassLoader'));
+
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
+ if ($useStaticLoader) {
+ require_once __DIR__ . '/autoload_static.php';
+
+ call_user_func(\Composer\Autoload\ComposerStaticInitEncryption::getInitializer($loader));
+ } else {
+ $map = require __DIR__ . '/autoload_namespaces.php';
+ foreach ($map as $namespace => $path) {
+ $loader->set($namespace, $path);
+ }
+
+ $map = require __DIR__ . '/autoload_psr4.php';
+ foreach ($map as $namespace => $path) {
+ $loader->setPsr4($namespace, $path);
+ }
+
+ $classMap = require __DIR__ . '/autoload_classmap.php';
+ if ($classMap) {
+ $loader->addClassMap($classMap);
+ }
+ }
+
+ $loader->register(true);
+
+ return $loader;
+ }
+}
diff --git a/apps/encryption/composer/composer/autoload_static.php b/apps/encryption/composer/composer/autoload_static.php
new file mode 100644
index 00000000000..b3ec7c52fe8
--- /dev/null
+++ b/apps/encryption/composer/composer/autoload_static.php
@@ -0,0 +1,62 @@
+<?php
+
+// autoload_static.php @generated by Composer
+
+namespace Composer\Autoload;
+
+class ComposerStaticInitEncryption
+{
+ public static $prefixLengthsPsr4 = array (
+ 'O' =>
+ array (
+ 'OCA\\Encryption\\' => 15,
+ ),
+ );
+
+ public static $prefixDirsPsr4 = array (
+ 'OCA\\Encryption\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/../lib',
+ ),
+ );
+
+ public static $classMap = array (
+ '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\\MigrateKeys' => __DIR__ . '/..' . '/../lib/Command/MigrateKeys.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' => __DIR__ . '/..' . '/../lib/Migration.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);
+ }
+}
diff --git a/apps/encryption/l10n/es_CO.js b/apps/encryption/l10n/es_CO.js
new file mode 100644
index 00000000000..424b1f9313f
--- /dev/null
+++ b/apps/encryption/l10n/es_CO.js
@@ -0,0 +1,65 @@
+OC.L10N.register(
+ "encryption",
+ {
+ "Missing recovery key password" : "No se encontró la contraseña de la llave de recuperación",
+ "Please repeat the recovery key password" : "Por favor reingresa la contraseña de recuperación",
+ "Repeated recovery key password does not match the provided recovery key password" : "Las contraseñas de la llave de recuperación no coinciden",
+ "Recovery key successfully enabled" : "Llave de recuperación habilitada exitosamente",
+ "Could not enable recovery key. Please check your recovery key password!" : "No fue posible habilitar la llave de recuperación. ¡Por favor comprueba la contraseña de tu llave de recuperación!",
+ "Recovery key successfully disabled" : "Llave de recuperación deshabilitada exitosamente",
+ "Could not disable recovery key. Please check your recovery key password!" : "No fue posible deshabilitar la llave de recuperación. ¡Por favor comprueba la contraseña de tu llave de recuperación!",
+ "Missing parameters" : "Parámetros faltantes",
+ "Please provide the old recovery password" : "Por favor proporciona tu contraseña de recuperación anterior",
+ "Please provide a new recovery password" : "Por favor proporciona una nueva contraseña de recuperación",
+ "Please repeat the new recovery password" : "Por favor reingresa la nueva contraseña de recuperación",
+ "Password successfully changed." : "La contraseña ha sido cambiada exitosamente",
+ "Could not change the password. Maybe the old password was not correct." : "No fue posible cambiar la contraseña. Por favor verifica que contraseña anterior sea correcta.",
+ "Recovery Key disabled" : "Llave de recuperación deshabilitada",
+ "Recovery Key enabled" : "Llave de recuperación habilitada",
+ "Could not enable the recovery key, please try again or contact your administrator" : "No fue posible habilitar la llave de recuperación, por favor intentalo de nuevo o contacta a tu administrador",
+ "Could not update the private key password." : "No fue posible actualizar la contraseña de la llave privada.",
+ "The old password was not correct, please try again." : "La contraseña anterior no es correcta, favor de intentar de nuevo. ",
+ "The current log-in password was not correct, please try again." : "La contraseña actual para iniciar sesión fue incorrecta, por favor vuelvelo a intentar. ",
+ "Private key password successfully updated." : "Contraseña de llave privada actualizada exitosamente.",
+ "You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "Necesitas migar tus llaves de encripción de la encripción anterior (ownCloud <=8.0) a la nueva. Por favor ejecuta 'occ encryption:migrate' o contacta a tu adminstrador",
+ "Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files." : "La llave de encripción privada es inválida para la aplicación de encripción. Por favor actualiza la contraseña de tu llave privada en tus configuraciones personales para recuperar el acceso a tus archivos encriptados. ",
+ "Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again." : "La aplicación de encripción está habilitada, pero tus llaves no han sido inicializadas. Por favor cierra sesión e inicia sesión de nuevo. ",
+ "Please enable server side encryption in the admin settings in order to use the encryption module." : "Por favor activa el encriptado del lado del servidor en los ajustes de administración para usar el módulo de encripción.",
+ "Encryption app is enabled and ready" : "La aplicación de encripción se cuentra habilitada y lista",
+ "Bad Signature" : "Firma equivocada",
+ "Missing Signature" : "Firma faltante",
+ "one-time password for server-side-encryption" : "Contraseña de una-sola-vez para la encripción del lado del servidor",
+ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No es posible decriptar este archivo, posiblemente sea un archivo compartido. Por favor solicita al dueño del archivo que lo vuelva a compartir contigo.",
+ "Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No es posible leer este archivo, posiblemente sea un archivo compartido. Por favor solicita al dueño que vuelva a compartirlo contigo.",
+ "Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n" : "Hola,\n\nel administrador ha habilitado la encripción de lado del servidor. Tus archivos fueron encriptados usando la contraseña '%s'\n\nPor favor inicia sesión en la interface web, ve a la sección \"módulo de encripción básica\" de tus configuraciones personales y actualiza su contraseña de encripción ingresando esta contraseña en el campo 'contraseña de inicio de sesión anterior' y tu contraseña de inicio de sesión actual. \n",
+ "The share will expire on %s." : "El elemento compartido expirará el %s.",
+ "Cheers!" : "¡Saludos!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section \"basic encryption module\" of your personal settings and update your encryption password by entering this password into the \"old log-in password\" field and your current login-password.<br><br>" : "Hola, <br><br>el administrador ha habilitado la encripción del lado del servidor. Tus archivos fueron encriptados usando la contraseña <strong>%s</strong>.<br><br> Por favor inicia sesisón en la interface web, ve a la sección \"módulo de encripción básica\" de tus configuraciones personales y actualiza tu contraseña de encripción ingresando esta contraseña en el campo \"contraseña de inicio de sesión anterior\" y tu contraseña de inicio de sesión actual. <br><br>",
+ "Default encryption module" : "Módulo de encripción predeterminado",
+ "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "La aplicación de encripción esta habilitada pero tus llaves no han sido inicializadas, por favor sal y vuelve a entrar a tu sesión",
+ "Encrypt the home storage" : "Encriptar el almacenamiento de inicio",
+ "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Habilitar esta opción encripta todos los archivos almacenados en el almacenamiento principal, de otro modo, sólo los archivos en el almacenamiento externo serán encriptados",
+ "Enable recovery key" : "Habilitar llave de recuperación",
+ "Disable recovery key" : "Deshabilitar llave de recuperación",
+ "The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "La llave de recuperación es una llave de encripción que se usa para encriptar archivos. Permite la recuperación de los archivos del usuario si este olvida su contraseña. ",
+ "Recovery key password" : "Contraseña de llave de recuperación",
+ "Repeat recovery key password" : "Repetir la contraseña de la llave de recuperación",
+ "Change recovery key password:" : "Cambiar la contraseña de la llave de recuperación:",
+ "Old recovery key password" : "Anterior contraseña de llave de recuperación",
+ "New recovery key password" : "Nueva contraseña de llave de recuperación",
+ "Repeat new recovery key password" : "Reingresar la nueva contraseña de llave de recuperación",
+ "Change Password" : "Cambiar contraseña",
+ "Basic encryption module" : "Módulo de encripción básica",
+ "Your private key password no longer matches your log-in password." : "Tu contraseña de llave privada ya no corresónde con tu contraseña de inicio de sesión. ",
+ "Set your old private key password to your current log-in password:" : "Establece tu contraseña de llave privada a tu contraseña actual de inicio de seisón:",
+ " If you don't remember your old password you can ask your administrator to recover your files." : "Si no recuerdas tu contraseña anterior le puedes pedir a tu administrador que recupere tus archivos.",
+ "Old log-in password" : "Contraseña anterior",
+ "Current log-in password" : "Contraseña actual",
+ "Update Private Key Password" : "Actualizar Contraseña de Llave Privada",
+ "Enable password recovery:" : "Habilitar la recuperación de contraseña:",
+ "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Habilitar esta opción te permitirá volver a tener acceso a tus archivos encriptados en caso de que pierdas la contraseña",
+ "Enabled" : "Habilitado",
+ "Disabled" : "Deshabilitado",
+ "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La aplicación de encripción está habilitada pero tus llaves no han sido establecidas, por favor cierra la sesión y vuelve a iniciarla."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/encryption/l10n/es_CO.json b/apps/encryption/l10n/es_CO.json
new file mode 100644
index 00000000000..dabe0c4c41f
--- /dev/null
+++ b/apps/encryption/l10n/es_CO.json
@@ -0,0 +1,63 @@
+{ "translations": {
+ "Missing recovery key password" : "No se encontró la contraseña de la llave de recuperación",
+ "Please repeat the recovery key password" : "Por favor reingresa la contraseña de recuperación",
+ "Repeated recovery key password does not match the provided recovery key password" : "Las contraseñas de la llave de recuperación no coinciden",
+ "Recovery key successfully enabled" : "Llave de recuperación habilitada exitosamente",
+ "Could not enable recovery key. Please check your recovery key password!" : "No fue posible habilitar la llave de recuperación. ¡Por favor comprueba la contraseña de tu llave de recuperación!",
+ "Recovery key successfully disabled" : "Llave de recuperación deshabilitada exitosamente",
+ "Could not disable recovery key. Please check your recovery key password!" : "No fue posible deshabilitar la llave de recuperación. ¡Por favor comprueba la contraseña de tu llave de recuperación!",
+ "Missing parameters" : "Parámetros faltantes",
+ "Please provide the old recovery password" : "Por favor proporciona tu contraseña de recuperación anterior",
+ "Please provide a new recovery password" : "Por favor proporciona una nueva contraseña de recuperación",
+ "Please repeat the new recovery password" : "Por favor reingresa la nueva contraseña de recuperación",
+ "Password successfully changed." : "La contraseña ha sido cambiada exitosamente",
+ "Could not change the password. Maybe the old password was not correct." : "No fue posible cambiar la contraseña. Por favor verifica que contraseña anterior sea correcta.",
+ "Recovery Key disabled" : "Llave de recuperación deshabilitada",
+ "Recovery Key enabled" : "Llave de recuperación habilitada",
+ "Could not enable the recovery key, please try again or contact your administrator" : "No fue posible habilitar la llave de recuperación, por favor intentalo de nuevo o contacta a tu administrador",
+ "Could not update the private key password." : "No fue posible actualizar la contraseña de la llave privada.",
+ "The old password was not correct, please try again." : "La contraseña anterior no es correcta, favor de intentar de nuevo. ",
+ "The current log-in password was not correct, please try again." : "La contraseña actual para iniciar sesión fue incorrecta, por favor vuelvelo a intentar. ",
+ "Private key password successfully updated." : "Contraseña de llave privada actualizada exitosamente.",
+ "You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "Necesitas migar tus llaves de encripción de la encripción anterior (ownCloud <=8.0) a la nueva. Por favor ejecuta 'occ encryption:migrate' o contacta a tu adminstrador",
+ "Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files." : "La llave de encripción privada es inválida para la aplicación de encripción. Por favor actualiza la contraseña de tu llave privada en tus configuraciones personales para recuperar el acceso a tus archivos encriptados. ",
+ "Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again." : "La aplicación de encripción está habilitada, pero tus llaves no han sido inicializadas. Por favor cierra sesión e inicia sesión de nuevo. ",
+ "Please enable server side encryption in the admin settings in order to use the encryption module." : "Por favor activa el encriptado del lado del servidor en los ajustes de administración para usar el módulo de encripción.",
+ "Encryption app is enabled and ready" : "La aplicación de encripción se cuentra habilitada y lista",
+ "Bad Signature" : "Firma equivocada",
+ "Missing Signature" : "Firma faltante",
+ "one-time password for server-side-encryption" : "Contraseña de una-sola-vez para la encripción del lado del servidor",
+ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No es posible decriptar este archivo, posiblemente sea un archivo compartido. Por favor solicita al dueño del archivo que lo vuelva a compartir contigo.",
+ "Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No es posible leer este archivo, posiblemente sea un archivo compartido. Por favor solicita al dueño que vuelva a compartirlo contigo.",
+ "Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n" : "Hola,\n\nel administrador ha habilitado la encripción de lado del servidor. Tus archivos fueron encriptados usando la contraseña '%s'\n\nPor favor inicia sesión en la interface web, ve a la sección \"módulo de encripción básica\" de tus configuraciones personales y actualiza su contraseña de encripción ingresando esta contraseña en el campo 'contraseña de inicio de sesión anterior' y tu contraseña de inicio de sesión actual. \n",
+ "The share will expire on %s." : "El elemento compartido expirará el %s.",
+ "Cheers!" : "¡Saludos!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section \"basic encryption module\" of your personal settings and update your encryption password by entering this password into the \"old log-in password\" field and your current login-password.<br><br>" : "Hola, <br><br>el administrador ha habilitado la encripción del lado del servidor. Tus archivos fueron encriptados usando la contraseña <strong>%s</strong>.<br><br> Por favor inicia sesisón en la interface web, ve a la sección \"módulo de encripción básica\" de tus configuraciones personales y actualiza tu contraseña de encripción ingresando esta contraseña en el campo \"contraseña de inicio de sesión anterior\" y tu contraseña de inicio de sesión actual. <br><br>",
+ "Default encryption module" : "Módulo de encripción predeterminado",
+ "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "La aplicación de encripción esta habilitada pero tus llaves no han sido inicializadas, por favor sal y vuelve a entrar a tu sesión",
+ "Encrypt the home storage" : "Encriptar el almacenamiento de inicio",
+ "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Habilitar esta opción encripta todos los archivos almacenados en el almacenamiento principal, de otro modo, sólo los archivos en el almacenamiento externo serán encriptados",
+ "Enable recovery key" : "Habilitar llave de recuperación",
+ "Disable recovery key" : "Deshabilitar llave de recuperación",
+ "The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "La llave de recuperación es una llave de encripción que se usa para encriptar archivos. Permite la recuperación de los archivos del usuario si este olvida su contraseña. ",
+ "Recovery key password" : "Contraseña de llave de recuperación",
+ "Repeat recovery key password" : "Repetir la contraseña de la llave de recuperación",
+ "Change recovery key password:" : "Cambiar la contraseña de la llave de recuperación:",
+ "Old recovery key password" : "Anterior contraseña de llave de recuperación",
+ "New recovery key password" : "Nueva contraseña de llave de recuperación",
+ "Repeat new recovery key password" : "Reingresar la nueva contraseña de llave de recuperación",
+ "Change Password" : "Cambiar contraseña",
+ "Basic encryption module" : "Módulo de encripción básica",
+ "Your private key password no longer matches your log-in password." : "Tu contraseña de llave privada ya no corresónde con tu contraseña de inicio de sesión. ",
+ "Set your old private key password to your current log-in password:" : "Establece tu contraseña de llave privada a tu contraseña actual de inicio de seisón:",
+ " If you don't remember your old password you can ask your administrator to recover your files." : "Si no recuerdas tu contraseña anterior le puedes pedir a tu administrador que recupere tus archivos.",
+ "Old log-in password" : "Contraseña anterior",
+ "Current log-in password" : "Contraseña actual",
+ "Update Private Key Password" : "Actualizar Contraseña de Llave Privada",
+ "Enable password recovery:" : "Habilitar la recuperación de contraseña:",
+ "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Habilitar esta opción te permitirá volver a tener acceso a tus archivos encriptados en caso de que pierdas la contraseña",
+ "Enabled" : "Habilitado",
+ "Disabled" : "Deshabilitado",
+ "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La aplicación de encripción está habilitada pero tus llaves no han sido establecidas, por favor cierra la sesión y vuelve a iniciarla."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/encryption/l10n/eu.js b/apps/encryption/l10n/eu.js
index 1c8bdf4fa04..8a256e2de16 100644
--- a/apps/encryption/l10n/eu.js
+++ b/apps/encryption/l10n/eu.js
@@ -8,23 +8,48 @@ OC.L10N.register(
"Could not enable recovery key. Please check your recovery key password!" : "Ezin da berreskuratze gako gaitu. Egiaztatu berreskuratze gako pasahitza!",
"Recovery key successfully disabled" : "Berreskuratze gakoa behar bezala desgaitu da",
"Could not disable recovery key. Please check your recovery key password!" : "Ezin da berreskuratze gako desgaitu. Egiaztatu berreskuratze gako pasahitza!",
+ "Missing parameters" : "Parametroak faltan",
"Please provide the old recovery password" : "Mesedez sartu berreskuratze pasahitz zaharra",
"Please provide a new recovery password" : "Mesedez sartu berreskuratze pasahitz berria",
"Please repeat the new recovery password" : "Mesedez errepikatu berreskuratze pasahitz berria",
"Password successfully changed." : "Pasahitza behar bezala aldatu da.",
"Could not change the password. Maybe the old password was not correct." : "Ezin izan da pasahitza aldatu. Agian pasahitz zaharra okerrekoa da.",
+ "Recovery Key disabled" : "Berreskuratze gakoa desgaituta",
+ "Recovery Key enabled" : "Berreskuratze gakoa gaituta",
+ "Could not enable the recovery key, please try again or contact your administrator" : "Ezin da berreskuratze gakoa gaitu, saia zaitez berriz mesedez edo zureadministratzailearekin kontaktuan jarri",
"Could not update the private key password." : "Ezin izan da gako pribatu pasahitza eguneratu. ",
"The old password was not correct, please try again." : "Pasahitz zaharra ez da egokia. Mesedez, saiatu berriro.",
"The current log-in password was not correct, please try again." : "Oraingo pasahitza ez da egokia. Mesedez, saiatu berriro.",
"Private key password successfully updated." : "Gako pasahitz pribatu behar bezala eguneratu da.",
- "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Enkriptazio aplikaziorako gako pribatu okerra. Mesedez eguneratu zure gako pribatuaren pasahitza zure ezarpen pertsonaletan zure enkriptatuko fitxategietarako sarrera berreskuratzeko.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Enkriptazio aplikazioa gaituta dago baina zure gakoak ez daude konfiguratuta, mesedez saioa bukatu eta berriro hasi",
+ "You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "Zure enkriptatze gakoak enkriptatze zaharretik (ownCloud <=8.0) berrira migratubehar duzu. 'occ encryption:migrate' exekuta ezazu mesedez, edo zure administratzailearekin kontaktuan jar zaitez",
+ "Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files." : "Enkriptazio aplikaziorako gako pribatu desegokia. Zure gako pribatuaren pasahitza eguneratuezarpen pertsonaletan, enkriptatutako fitxategiak berriz atzitu nahi badituzu",
+ "Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again." : "Enkriptazioa app-a gaituta dago, baina zure gakoak ez dira hasieratu. Saiotikirten eta berriz sartu, mesedez",
+ "Please enable server side encryption in the admin settings in order to use the encryption module." : "Enkriptazio modulua erabili ahal izateko zerbitzariaren aldean enkriptazioagaitu administrazio ezarpenetan",
+ "Encryption app is enabled and ready" : "Enkriptazioa app-a gaituta eta martxan dago",
+ "Bad Signature" : "Sinadura ezegokia",
+ "Missing Signature" : "Sinadura falta da",
+ "one-time password for server-side-encryption" : "aldi bateko pasahitzak zerbitzari-aldeko enkriptaziorako",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ezin izan da fitxategi hau deszifratu, ziurrenik elkarbanatutako fitxategi bat da. Mesdez, eskatu fitxategiaren jabeari fitxategia zurekin berriz elkarbana dezan.",
+ "Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ezin da fitxategi hau irakurri, ziur aski partekatutako fitxategia izango da. Fitxategiaren jabeari berriz partekatzeko eska iezaiozu",
+ "Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n" : "Kaixo\n\nadministradoreak zerbitzari-aldeko enkriptazioa gaitu du. Zure fitxategiak '%s' pasahitza erabiliz enkriptatuko dira.\n\nWeb interfazea saioa hasi, 'oinarrizko enkripazio modulua' atalera joan zaitez eta pasahitza eguneratu. Hortarako pasahitz zaharra 'pasahitz zaharra' atalean sartu eta zure oraingo pasahitza",
"The share will expire on %s." : "Elkarbanaketa %s-n iraungiko da.",
"Cheers!" : "Ongi izan!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section \"basic encryption module\" of your personal settings and update your encryption password by entering this password into the \"old log-in password\" field and your current login-password.<br><br>" : "Kaixo<br><br>administradoreak zerbitzari-aldeko enkriptazioa gaitu du. Zure fitxategiak '%s' pasahitza erabiliz enkriptatuko dira.\n\nWeb interfazea saioa hasi, 'oinarrizko enkripazio modulua' atalera joan zaitez eta pasahitza eguneratu. Hortarako pasahitz zaharra 'pasahitz zaharra' atalean sartu eta zure oraingo pasahitza",
+ "Default encryption module" : "Defektuzko enkriptazio modulua",
+ "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "Enkriptazio app-a gaituta dago baina zure gakoak ez dira hasieratu, mesedez saiotik irteneta berriz sar zaitez",
+ "Encrypt the home storage" : "Etxe-biltegia enkriptatu",
+ "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Aukera hau gaituz gero biltegi orokorreko fitxategi guztiak enkriptatuko dirabestela kanpo biltegian daudenak bakarrik enkriptatuko dira",
+ "Enable recovery key" : "Berreskuratze gakoa gaitu",
+ "Disable recovery key" : "Berreskuratze gakoa desgaitu",
+ "The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "Berreskuratze gakoa fitxategiak enkriptatzeko gako extra bat da.Erabiltzailearen fitxategiak berreskuratzea baimentzen du bere pasahitzagalduz gero.",
"Recovery key password" : "Berreskuratze gako pasahitza",
+ "Repeat recovery key password" : "Berreskuratze gakoaren pasahitza errepikatu",
"Change recovery key password:" : "Aldatu berreskuratze gako pasahitza:",
+ "Old recovery key password" : "Berreskuratze gako zaharraren pasahitza",
+ "New recovery key password" : "Berreskuratze gako berriaren pasahitza",
+ "Repeat new recovery key password" : "Berreskuratze gakoaren pasahitz berria errepikatu",
"Change Password" : "Aldatu Pasahitza",
+ "Basic encryption module" : "Oinarrizko enkriptazio modulua",
"Your private key password no longer matches your log-in password." : "Zure gako pasahitza pribatua ez da dagoeneko bat etortzen zure sartzeko pasahitzarekin.",
"Set your old private key password to your current log-in password:" : "Ezarri zure gako pasahitz zaharra orain duzun sartzeko pasahitzan:",
" If you don't remember your old password you can ask your administrator to recover your files." : "Ez baduzu zure pasahitz zaharra gogoratzen eskatu zure administratzaileari zure fitxategiak berreskuratzeko.",
@@ -34,6 +59,7 @@ OC.L10N.register(
"Enable password recovery:" : "Gaitu pasahitzaren berreskuratzea:",
"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Aukera hau gaituz zure enkriptatutako fitxategiak berreskuratu ahal izango dituzu pasahitza galtzekotan",
"Enabled" : "Gaitua",
- "Disabled" : "Ez-gaitua"
+ "Disabled" : "Ez-gaitua",
+ "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Enkriptazio aplikazioa gaituta dago baina zure gakoak ez daude konfiguratuta, mesedez saioa bukatu eta berriro hasi"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/encryption/l10n/eu.json b/apps/encryption/l10n/eu.json
index 0c07ebd477f..e684651f837 100644
--- a/apps/encryption/l10n/eu.json
+++ b/apps/encryption/l10n/eu.json
@@ -6,23 +6,48 @@
"Could not enable recovery key. Please check your recovery key password!" : "Ezin da berreskuratze gako gaitu. Egiaztatu berreskuratze gako pasahitza!",
"Recovery key successfully disabled" : "Berreskuratze gakoa behar bezala desgaitu da",
"Could not disable recovery key. Please check your recovery key password!" : "Ezin da berreskuratze gako desgaitu. Egiaztatu berreskuratze gako pasahitza!",
+ "Missing parameters" : "Parametroak faltan",
"Please provide the old recovery password" : "Mesedez sartu berreskuratze pasahitz zaharra",
"Please provide a new recovery password" : "Mesedez sartu berreskuratze pasahitz berria",
"Please repeat the new recovery password" : "Mesedez errepikatu berreskuratze pasahitz berria",
"Password successfully changed." : "Pasahitza behar bezala aldatu da.",
"Could not change the password. Maybe the old password was not correct." : "Ezin izan da pasahitza aldatu. Agian pasahitz zaharra okerrekoa da.",
+ "Recovery Key disabled" : "Berreskuratze gakoa desgaituta",
+ "Recovery Key enabled" : "Berreskuratze gakoa gaituta",
+ "Could not enable the recovery key, please try again or contact your administrator" : "Ezin da berreskuratze gakoa gaitu, saia zaitez berriz mesedez edo zureadministratzailearekin kontaktuan jarri",
"Could not update the private key password." : "Ezin izan da gako pribatu pasahitza eguneratu. ",
"The old password was not correct, please try again." : "Pasahitz zaharra ez da egokia. Mesedez, saiatu berriro.",
"The current log-in password was not correct, please try again." : "Oraingo pasahitza ez da egokia. Mesedez, saiatu berriro.",
"Private key password successfully updated." : "Gako pasahitz pribatu behar bezala eguneratu da.",
- "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Enkriptazio aplikaziorako gako pribatu okerra. Mesedez eguneratu zure gako pribatuaren pasahitza zure ezarpen pertsonaletan zure enkriptatuko fitxategietarako sarrera berreskuratzeko.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Enkriptazio aplikazioa gaituta dago baina zure gakoak ez daude konfiguratuta, mesedez saioa bukatu eta berriro hasi",
+ "You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "Zure enkriptatze gakoak enkriptatze zaharretik (ownCloud <=8.0) berrira migratubehar duzu. 'occ encryption:migrate' exekuta ezazu mesedez, edo zure administratzailearekin kontaktuan jar zaitez",
+ "Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files." : "Enkriptazio aplikaziorako gako pribatu desegokia. Zure gako pribatuaren pasahitza eguneratuezarpen pertsonaletan, enkriptatutako fitxategiak berriz atzitu nahi badituzu",
+ "Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again." : "Enkriptazioa app-a gaituta dago, baina zure gakoak ez dira hasieratu. Saiotikirten eta berriz sartu, mesedez",
+ "Please enable server side encryption in the admin settings in order to use the encryption module." : "Enkriptazio modulua erabili ahal izateko zerbitzariaren aldean enkriptazioagaitu administrazio ezarpenetan",
+ "Encryption app is enabled and ready" : "Enkriptazioa app-a gaituta eta martxan dago",
+ "Bad Signature" : "Sinadura ezegokia",
+ "Missing Signature" : "Sinadura falta da",
+ "one-time password for server-side-encryption" : "aldi bateko pasahitzak zerbitzari-aldeko enkriptaziorako",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ezin izan da fitxategi hau deszifratu, ziurrenik elkarbanatutako fitxategi bat da. Mesdez, eskatu fitxategiaren jabeari fitxategia zurekin berriz elkarbana dezan.",
+ "Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ezin da fitxategi hau irakurri, ziur aski partekatutako fitxategia izango da. Fitxategiaren jabeari berriz partekatzeko eska iezaiozu",
+ "Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n" : "Kaixo\n\nadministradoreak zerbitzari-aldeko enkriptazioa gaitu du. Zure fitxategiak '%s' pasahitza erabiliz enkriptatuko dira.\n\nWeb interfazea saioa hasi, 'oinarrizko enkripazio modulua' atalera joan zaitez eta pasahitza eguneratu. Hortarako pasahitz zaharra 'pasahitz zaharra' atalean sartu eta zure oraingo pasahitza",
"The share will expire on %s." : "Elkarbanaketa %s-n iraungiko da.",
"Cheers!" : "Ongi izan!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section \"basic encryption module\" of your personal settings and update your encryption password by entering this password into the \"old log-in password\" field and your current login-password.<br><br>" : "Kaixo<br><br>administradoreak zerbitzari-aldeko enkriptazioa gaitu du. Zure fitxategiak '%s' pasahitza erabiliz enkriptatuko dira.\n\nWeb interfazea saioa hasi, 'oinarrizko enkripazio modulua' atalera joan zaitez eta pasahitza eguneratu. Hortarako pasahitz zaharra 'pasahitz zaharra' atalean sartu eta zure oraingo pasahitza",
+ "Default encryption module" : "Defektuzko enkriptazio modulua",
+ "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "Enkriptazio app-a gaituta dago baina zure gakoak ez dira hasieratu, mesedez saiotik irteneta berriz sar zaitez",
+ "Encrypt the home storage" : "Etxe-biltegia enkriptatu",
+ "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Aukera hau gaituz gero biltegi orokorreko fitxategi guztiak enkriptatuko dirabestela kanpo biltegian daudenak bakarrik enkriptatuko dira",
+ "Enable recovery key" : "Berreskuratze gakoa gaitu",
+ "Disable recovery key" : "Berreskuratze gakoa desgaitu",
+ "The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "Berreskuratze gakoa fitxategiak enkriptatzeko gako extra bat da.Erabiltzailearen fitxategiak berreskuratzea baimentzen du bere pasahitzagalduz gero.",
"Recovery key password" : "Berreskuratze gako pasahitza",
+ "Repeat recovery key password" : "Berreskuratze gakoaren pasahitza errepikatu",
"Change recovery key password:" : "Aldatu berreskuratze gako pasahitza:",
+ "Old recovery key password" : "Berreskuratze gako zaharraren pasahitza",
+ "New recovery key password" : "Berreskuratze gako berriaren pasahitza",
+ "Repeat new recovery key password" : "Berreskuratze gakoaren pasahitz berria errepikatu",
"Change Password" : "Aldatu Pasahitza",
+ "Basic encryption module" : "Oinarrizko enkriptazio modulua",
"Your private key password no longer matches your log-in password." : "Zure gako pasahitza pribatua ez da dagoeneko bat etortzen zure sartzeko pasahitzarekin.",
"Set your old private key password to your current log-in password:" : "Ezarri zure gako pasahitz zaharra orain duzun sartzeko pasahitzan:",
" If you don't remember your old password you can ask your administrator to recover your files." : "Ez baduzu zure pasahitz zaharra gogoratzen eskatu zure administratzaileari zure fitxategiak berreskuratzeko.",
@@ -32,6 +57,7 @@
"Enable password recovery:" : "Gaitu pasahitzaren berreskuratzea:",
"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Aukera hau gaituz zure enkriptatutako fitxategiak berreskuratu ahal izango dituzu pasahitza galtzekotan",
"Enabled" : "Gaitua",
- "Disabled" : "Ez-gaitua"
+ "Disabled" : "Ez-gaitua",
+ "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Enkriptazio aplikazioa gaituta dago baina zure gakoak ez daude konfiguratuta, mesedez saioa bukatu eta berriro hasi"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/encryption/l10n/zh_TW.js b/apps/encryption/l10n/zh_TW.js
index ed09e5f7968..93fe93de726 100644
--- a/apps/encryption/l10n/zh_TW.js
+++ b/apps/encryption/l10n/zh_TW.js
@@ -22,6 +22,10 @@ OC.L10N.register(
"The current log-in password was not correct, please try again." : "目前登入的密碼不正確,請再試一次",
"Private key password successfully updated." : "私人金鑰密碼已成功更新。",
"You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "您需要搬移您的加密鑰匙從舊版的加密 (ownCloud <= 8.0) 到新版,請執行 'occ encryption:migrate' 或是聯絡系統管理員",
+ "Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files." : "無效的加密應用程序私鑰。請在您的個人設定中更新您的私鑰密碼,以恢復對加密文件的訪問。",
+ "Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again." : "已啟用加密應用,但是你的加密密鑰沒有初始化。請重新登出並登入系統一次。",
+ "Please enable server side encryption in the admin settings in order to use the encryption module." : "請啟用管理員設定中的伺服器端加密,以使用加密模組。",
+ "Encryption app is enabled and ready" : "加密應用程式已啟用並準備就緒",
"Bad Signature" : "壞的簽章",
"Missing Signature" : "遺失簽章",
"one-time password for server-side-encryption" : "一次性密碼用於伺服器端的加密",
@@ -31,6 +35,8 @@ OC.L10N.register(
"The share will expire on %s." : "這個分享將會於 %s 過期",
"Cheers!" : "太棒了!",
"Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section \"basic encryption module\" of your personal settings and update your encryption password by entering this password into the \"old log-in password\" field and your current login-password.<br><br>" : "嗨,請看這裡,<br><br>系管理員啟用了伺服器端的加密功能,您的檔案將會使用密碼<strong> '%s' </strong>加密,請從網頁登入,到 'basic encryption module' 設置您的個人設定並透過更新加密密碼,將這個組密碼設定在 'old log-in password' 以及您的目前登入密碼<br><br>",
+ "Default encryption module" : "預設加密模組",
+ "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "已啟用加密應用,但是你的加密密鑰沒有初始化。請重新登出並登入系統一次。",
"Encrypt the home storage" : "加密家目錄空間",
"Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "請啟用這個功能以用來加密主要儲存空間的檔案,否則只有再外部儲存的檔案會加密",
"Enable recovery key" : "啟用還原金鑰",
@@ -43,6 +49,7 @@ OC.L10N.register(
"New recovery key password" : "新的還原金鑰密碼",
"Repeat new recovery key password" : "再輸入新的還原金鑰密碼一次",
"Change Password" : "變更密碼",
+ "Basic encryption module" : "基本加密模組",
"Your private key password no longer matches your log-in password." : "您的私人金鑰密碼不符合您的登入密碼",
"Set your old private key password to your current log-in password:" : "設定您的舊私人金鑰密碼到您現在的登入密碼:",
" If you don't remember your old password you can ask your administrator to recover your files." : "如果您忘記舊密碼,可以請求管理員協助取回檔案。",
diff --git a/apps/encryption/l10n/zh_TW.json b/apps/encryption/l10n/zh_TW.json
index 28ef2eeab62..545a78efdda 100644
--- a/apps/encryption/l10n/zh_TW.json
+++ b/apps/encryption/l10n/zh_TW.json
@@ -20,6 +20,10 @@
"The current log-in password was not correct, please try again." : "目前登入的密碼不正確,請再試一次",
"Private key password successfully updated." : "私人金鑰密碼已成功更新。",
"You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "您需要搬移您的加密鑰匙從舊版的加密 (ownCloud <= 8.0) 到新版,請執行 'occ encryption:migrate' 或是聯絡系統管理員",
+ "Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files." : "無效的加密應用程序私鑰。請在您的個人設定中更新您的私鑰密碼,以恢復對加密文件的訪問。",
+ "Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again." : "已啟用加密應用,但是你的加密密鑰沒有初始化。請重新登出並登入系統一次。",
+ "Please enable server side encryption in the admin settings in order to use the encryption module." : "請啟用管理員設定中的伺服器端加密,以使用加密模組。",
+ "Encryption app is enabled and ready" : "加密應用程式已啟用並準備就緒",
"Bad Signature" : "壞的簽章",
"Missing Signature" : "遺失簽章",
"one-time password for server-side-encryption" : "一次性密碼用於伺服器端的加密",
@@ -29,6 +33,8 @@
"The share will expire on %s." : "這個分享將會於 %s 過期",
"Cheers!" : "太棒了!",
"Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section \"basic encryption module\" of your personal settings and update your encryption password by entering this password into the \"old log-in password\" field and your current login-password.<br><br>" : "嗨,請看這裡,<br><br>系管理員啟用了伺服器端的加密功能,您的檔案將會使用密碼<strong> '%s' </strong>加密,請從網頁登入,到 'basic encryption module' 設置您的個人設定並透過更新加密密碼,將這個組密碼設定在 'old log-in password' 以及您的目前登入密碼<br><br>",
+ "Default encryption module" : "預設加密模組",
+ "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "已啟用加密應用,但是你的加密密鑰沒有初始化。請重新登出並登入系統一次。",
"Encrypt the home storage" : "加密家目錄空間",
"Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "請啟用這個功能以用來加密主要儲存空間的檔案,否則只有再外部儲存的檔案會加密",
"Enable recovery key" : "啟用還原金鑰",
@@ -41,6 +47,7 @@
"New recovery key password" : "新的還原金鑰密碼",
"Repeat new recovery key password" : "再輸入新的還原金鑰密碼一次",
"Change Password" : "變更密碼",
+ "Basic encryption module" : "基本加密模組",
"Your private key password no longer matches your log-in password." : "您的私人金鑰密碼不符合您的登入密碼",
"Set your old private key password to your current log-in password:" : "設定您的舊私人金鑰密碼到您現在的登入密碼:",
" If you don't remember your old password you can ask your administrator to recover your files." : "如果您忘記舊密碼,可以請求管理員協助取回檔案。",
diff --git a/apps/encryption/lib/Hooks/UserHooks.php b/apps/encryption/lib/Hooks/UserHooks.php
index e0826e2c7e3..a08796aee54 100644
--- a/apps/encryption/lib/Hooks/UserHooks.php
+++ b/apps/encryption/lib/Hooks/UserHooks.php
@@ -170,11 +170,6 @@ class UserHooks implements IHook {
* @return boolean|null
*/
public function login($params) {
-
- if (!App::isEnabled('encryption')) {
- return true;
- }
-
// ensure filesystem is loaded
if (!\OC\Files\Filesystem::$loaded) {
$this->setupFS($params['uid']);
@@ -200,10 +195,7 @@ class UserHooks implements IHook {
* @param array $params
*/
public function postCreateUser($params) {
-
- if (App::isEnabled('encryption')) {
- $this->userSetup->setupUser($params['uid'], $params['password']);
- }
+ $this->userSetup->setupUser($params['uid'], $params['password']);
}
/**
@@ -213,17 +205,12 @@ class UserHooks implements IHook {
* @note This method should never be called for users using client side encryption
*/
public function postDeleteUser($params) {
-
- if (App::isEnabled('encryption')) {
- $this->keyManager->deletePublicKey($params['uid']);
- }
+ $this->keyManager->deletePublicKey($params['uid']);
}
public function prePasswordReset($params) {
- if (App::isEnabled('encryption')) {
- $user = $params['uid'];
- self::$passwordResetUsers[$user] = true;
- }
+ $user = $params['uid'];
+ self::$passwordResetUsers[$user] = true;
}
public function postPasswordReset($params) {
diff --git a/apps/encryption/lib/Migration.php b/apps/encryption/lib/Migration.php
index 7f4acbb68d4..656cab6a1e1 100644
--- a/apps/encryption/lib/Migration.php
+++ b/apps/encryption/lib/Migration.php
@@ -26,6 +26,7 @@ namespace OCA\Encryption;
use OC\Files\View;
+use OCP\App\IAppManager;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\ILogger;
@@ -43,6 +44,8 @@ class Migration {
private $logger;
/** @var string*/
protected $installedVersion;
+ /** @var IAppManager */
+ protected $appManager;
/**
* @param IConfig $config
@@ -50,7 +53,7 @@ class Migration {
* @param IDBConnection $connection
* @param ILogger $logger
*/
- public function __construct(IConfig $config, View $view, IDBConnection $connection, ILogger $logger) {
+ public function __construct(IConfig $config, View $view, IDBConnection $connection, ILogger $logger, IAppManager $appManager) {
$this->view = $view;
$this->view->disableCacheUpdate();
$this->connection = $connection;
@@ -58,6 +61,7 @@ class Migration {
$this->config = $config;
$this->logger = $logger;
$this->installedVersion = $this->config->getAppValue('files_encryption', 'installed_version', '-1');
+ $this->appManager = $appManager;
}
public function finalCleanUp() {
@@ -137,7 +141,7 @@ class Migration {
$path = '/files_encryption/keys';
$this->renameFileKeys($user, $path);
$trashPath = '/files_trashbin/keys';
- if (\OC_App::isEnabled('files_trashbin') && $this->view->is_dir($user . '/' . $trashPath)) {
+ if ($this->appManager->isEnabledForUser('files_trashbin') && $this->view->is_dir($user . '/' . $trashPath)) {
$this->renameFileKeys($user, $trashPath, true);
$this->view->deleteAll($trashPath);
}
diff --git a/apps/encryption/tests/Command/TestEnableMasterKey.php b/apps/encryption/tests/Command/TestEnableMasterKey.php
index 75d5fa3d5e7..58118db8c53 100644
--- a/apps/encryption/tests/Command/TestEnableMasterKey.php
+++ b/apps/encryption/tests/Command/TestEnableMasterKey.php
@@ -27,6 +27,10 @@ namespace OCA\Encryption\Tests\Command;
use OCA\Encryption\Command\EnableMasterKey;
use OCA\Encryption\Util;
+use OCP\IConfig;
+use Symfony\Component\Console\Helper\QuestionHelper;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
class TestEnableMasterKey extends TestCase {
@@ -52,15 +56,15 @@ class TestEnableMasterKey extends TestCase {
public function setUp() {
parent::setUp();
- $this->util = $this->getMockBuilder('OCA\Encryption\Util')
+ $this->util = $this->getMockBuilder(Util::class)
->disableOriginalConstructor()->getMock();
- $this->config = $this->getMockBuilder('OCP\IConfig')
+ $this->config = $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()->getMock();
- $this->questionHelper = $this->getMockBuilder('Symfony\Component\Console\Helper\QuestionHelper')
+ $this->questionHelper = $this->getMockBuilder(QuestionHelper::class)
->disableOriginalConstructor()->getMock();
- $this->output = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface')
+ $this->output = $this->getMockBuilder(OutputInterface::class)
->disableOriginalConstructor()->getMock();
- $this->input = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')
+ $this->input = $this->getMockBuilder(InputInterface::class)
->disableOriginalConstructor()->getMock();
$this->enableMasterKey = new EnableMasterKey($this->util, $this->config, $this->questionHelper);
diff --git a/apps/encryption/tests/Controller/RecoveryControllerTest.php b/apps/encryption/tests/Controller/RecoveryControllerTest.php
index fd1b0663b49..7ab3bc7eebb 100644
--- a/apps/encryption/tests/Controller/RecoveryControllerTest.php
+++ b/apps/encryption/tests/Controller/RecoveryControllerTest.php
@@ -26,7 +26,11 @@ namespace OCA\Encryption\Tests\Controller;
use OCA\Encryption\Controller\RecoveryController;
+use OCA\Encryption\Recovery;
use OCP\AppFramework\Http;
+use OCP\IConfig;
+use OCP\IL10N;
+use OCP\IRequest;
use Test\TestCase;
class RecoveryControllerTest extends TestCase {
@@ -151,15 +155,15 @@ class RecoveryControllerTest extends TestCase {
protected function setUp() {
parent::setUp();
- $this->requestMock = $this->getMockBuilder('OCP\IRequest')
+ $this->requestMock = $this->getMockBuilder(IRequest::class)
->disableOriginalConstructor()
->getMock();
- $this->configMock = $this->getMockBuilder('OCP\IConfig')
+ $this->configMock = $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock();
- $this->l10nMock = $this->getMockBuilder('OCP\IL10N')
+ $this->l10nMock = $this->getMockBuilder(IL10N::class)
->disableOriginalConstructor()
->getMock();
@@ -168,7 +172,7 @@ class RecoveryControllerTest extends TestCase {
->method('t')
->willReturnArgument(0);
- $this->recoveryMock = $this->getMockBuilder('OCA\Encryption\Recovery')
+ $this->recoveryMock = $this->getMockBuilder(Recovery::class)
->disableOriginalConstructor()
->getMock();
diff --git a/apps/encryption/tests/Controller/SettingsControllerTest.php b/apps/encryption/tests/Controller/SettingsControllerTest.php
index 4f3e09687e3..aceb94b23f7 100644
--- a/apps/encryption/tests/Controller/SettingsControllerTest.php
+++ b/apps/encryption/tests/Controller/SettingsControllerTest.php
@@ -24,9 +24,16 @@
namespace OCA\Encryption\Tests\Controller;
use OCA\Encryption\Controller\SettingsController;
+use OCA\Encryption\Crypto\Crypt;
+use OCA\Encryption\KeyManager;
use OCA\Encryption\Session;
+use OCA\Encryption\Util;
use OCP\AppFramework\Http;
+use OCP\IL10N;
use OCP\IRequest;
+use OCP\ISession;
+use OCP\IUserManager;
+use OCP\IUserSession;
use Test\TestCase;
class SettingsControllerTest extends TestCase {
@@ -67,7 +74,7 @@ class SettingsControllerTest extends TestCase {
$this->requestMock = $this->createMock(IRequest::class);
- $this->l10nMock = $this->getMockBuilder('OCP\IL10N')
+ $this->l10nMock = $this->getMockBuilder(IL10N::class)
->disableOriginalConstructor()->getMock();
$this->l10nMock->expects($this->any())
@@ -76,16 +83,16 @@ class SettingsControllerTest extends TestCase {
return $message;
}));
- $this->userManagerMock = $this->getMockBuilder('OCP\IUserManager')
+ $this->userManagerMock = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()->getMock();
- $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager')
+ $this->keyManagerMock = $this->getMockBuilder(KeyManager::class)
->disableOriginalConstructor()->getMock();
- $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ $this->cryptMock = $this->getMockBuilder(Crypt::class)
->disableOriginalConstructor()->getMock();
- $this->userSessionMock = $this->getMockBuilder('OCP\IUserSession')
+ $this->userSessionMock = $this->getMockBuilder(IUserSession::class)
->disableOriginalConstructor()
->setMethods([
'isLoggedIn',
@@ -98,7 +105,7 @@ class SettingsControllerTest extends TestCase {
])
->getMock();
- $this->ocSessionMock = $this->getMockBuilder('OCP\ISession')->disableOriginalConstructor()->getMock();
+ $this->ocSessionMock = $this->getMockBuilder(ISession::class)->disableOriginalConstructor()->getMock();
$this->userSessionMock->expects($this->any())
->method('getUID')
@@ -108,10 +115,10 @@ class SettingsControllerTest extends TestCase {
->method($this->anything())
->will($this->returnSelf());
- $this->sessionMock = $this->getMockBuilder('OCA\Encryption\Session')
+ $this->sessionMock = $this->getMockBuilder(Session::class)
->disableOriginalConstructor()->getMock();
- $this->utilMock = $this->getMockBuilder('OCA\Encryption\Util')
+ $this->utilMock = $this->getMockBuilder(Util::class)
->disableOriginalConstructor()
->getMock();
diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php
index ee0f7b2661c..d72fcd1ac36 100644
--- a/apps/encryption/tests/Controller/StatusControllerTest.php
+++ b/apps/encryption/tests/Controller/StatusControllerTest.php
@@ -28,6 +28,7 @@ namespace OCA\Encryption\Tests\Controller;
use OCA\Encryption\Controller\StatusController;
use OCA\Encryption\Session;
use OCP\Encryption\IManager;
+use OCP\IL10N;
use OCP\IRequest;
use Test\TestCase;
@@ -52,11 +53,11 @@ class StatusControllerTest extends TestCase {
parent::setUp();
- $this->sessionMock = $this->getMockBuilder('OCA\Encryption\Session')
+ $this->sessionMock = $this->getMockBuilder(Session::class)
->disableOriginalConstructor()->getMock();
$this->requestMock = $this->createMock(IRequest::class);
- $this->l10nMock = $this->getMockBuilder('OCP\IL10N')
+ $this->l10nMock = $this->getMockBuilder(IL10N::class)
->disableOriginalConstructor()->getMock();
$this->l10nMock->expects($this->any())
->method('t')
diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php
index 3c226ed94ab..ace4453a803 100644
--- a/apps/encryption/tests/Crypto/CryptTest.php
+++ b/apps/encryption/tests/Crypto/CryptTest.php
@@ -27,7 +27,10 @@ namespace OCA\Encryption\Tests\Crypto;
use OCA\Encryption\Crypto\Crypt;
+use OCP\IConfig;
use OCP\IL10N;
+use OCP\ILogger;
+use OCP\IUserSession;
use Test\TestCase;
class CryptTest extends TestCase {
@@ -51,16 +54,16 @@ class CryptTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->logger = $this->getMockBuilder('OCP\ILogger')
+ $this->logger = $this->getMockBuilder(ILogger::class)
->disableOriginalConstructor()
->getMock();
$this->logger->expects($this->any())
->method('warning')
->willReturn(true);
- $this->userSession = $this->getMockBuilder('OCP\IUserSession')
+ $this->userSession = $this->getMockBuilder(IUserSession::class)
->disableOriginalConstructor()
->getMock();
- $this->config = $this->getMockBuilder('OCP\IConfig')
+ $this->config = $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock();
$this->l = $this->createMock(IL10N::class);
@@ -389,7 +392,7 @@ class CryptTest extends TestCase {
*/
public function testDecryptPrivateKey($header, $privateKey, $expectedCipher, $isValidKey, $expected) {
/** @var \OCA\Encryption\Crypto\Crypt | \PHPUnit_Framework_MockObject_MockObject $crypt */
- $crypt = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ $crypt = $this->getMockBuilder(Crypt::class)
->setConstructorArgs(
[
$this->logger,
diff --git a/apps/encryption/tests/Crypto/DecryptAllTest.php b/apps/encryption/tests/Crypto/DecryptAllTest.php
index fdef37adc84..99b1b47ba8e 100644
--- a/apps/encryption/tests/Crypto/DecryptAllTest.php
+++ b/apps/encryption/tests/Crypto/DecryptAllTest.php
@@ -56,15 +56,15 @@ class DecryptAllTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->util = $this->getMockBuilder('OCA\Encryption\Util')
+ $this->util = $this->getMockBuilder(Util::class)
->disableOriginalConstructor()->getMock();
- $this->keyManager = $this->getMockBuilder('OCA\Encryption\KeyManager')
+ $this->keyManager = $this->getMockBuilder(KeyManager::class)
->disableOriginalConstructor()->getMock();
- $this->crypt = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ $this->crypt = $this->getMockBuilder(Crypt::class)
->disableOriginalConstructor()->getMock();
- $this->session = $this->getMockBuilder('OCA\Encryption\Session')
+ $this->session = $this->getMockBuilder(Session::class)
->disableOriginalConstructor()->getMock();
- $this->questionHelper = $this->getMockBuilder('Symfony\Component\Console\Helper\QuestionHelper')
+ $this->questionHelper = $this->getMockBuilder(QuestionHelper::class)
->disableOriginalConstructor()->getMock();
$this->instance = new DecryptAll(
diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php
index df8401c15b2..38b64a8b6bf 100644
--- a/apps/encryption/tests/Crypto/EncryptAllTest.php
+++ b/apps/encryption/tests/Crypto/EncryptAllTest.php
@@ -25,8 +25,22 @@
namespace OCA\Encryption\Tests\Crypto;
+use OC\Files\View;
use OCA\Encryption\Crypto\EncryptAll;
+use OCA\Encryption\KeyManager;
+use OCA\Encryption\Users\Setup;
+use OCA\Encryption\Util;
+use OCP\IConfig;
+use OCP\IL10N;
+use OCP\IUserManager;
+use OCP\Mail\IMailer;
+use OCP\Security\ISecureRandom;
+use OCP\UserInterface;
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
+use Symfony\Component\Console\Helper\ProgressBar;
+use Symfony\Component\Console\Helper\QuestionHelper;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
class EncryptAllTest extends TestCase {
@@ -75,29 +89,29 @@ class EncryptAllTest extends TestCase {
function setUp() {
parent::setUp();
- $this->setupUser = $this->getMockBuilder('OCA\Encryption\Users\Setup')
+ $this->setupUser = $this->getMockBuilder(Setup::class)
->disableOriginalConstructor()->getMock();
- $this->keyManager = $this->getMockBuilder('OCA\Encryption\KeyManager')
+ $this->keyManager = $this->getMockBuilder(KeyManager::class)
->disableOriginalConstructor()->getMock();
- $this->util = $this->getMockBuilder('OCA\Encryption\Util')
+ $this->util = $this->getMockBuilder(Util::class)
->disableOriginalConstructor()->getMock();
- $this->userManager = $this->getMockBuilder('OCP\IUserManager')
+ $this->userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()->getMock();
- $this->view = $this->getMockBuilder('OC\Files\View')
+ $this->view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()->getMock();
- $this->config = $this->getMockBuilder('OCP\IConfig')
+ $this->config = $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()->getMock();
- $this->mailer = $this->getMockBuilder('OCP\Mail\IMailer')
+ $this->mailer = $this->getMockBuilder(IMailer::class)
->disableOriginalConstructor()->getMock();
- $this->l = $this->getMockBuilder('OCP\IL10N')
+ $this->l = $this->getMockBuilder(IL10N::class)
->disableOriginalConstructor()->getMock();
- $this->questionHelper = $this->getMockBuilder('Symfony\Component\Console\Helper\QuestionHelper')
+ $this->questionHelper = $this->getMockBuilder(QuestionHelper::class)
->disableOriginalConstructor()->getMock();
- $this->inputInterface = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')
+ $this->inputInterface = $this->getMockBuilder(InputInterface::class)
->disableOriginalConstructor()->getMock();
- $this->outputInterface = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface')
+ $this->outputInterface = $this->getMockBuilder(OutputInterface::class)
->disableOriginalConstructor()->getMock();
- $this->userInterface = $this->getMockBuilder('OCP\UserInterface')
+ $this->userInterface = $this->getMockBuilder(UserInterface::class)
->disableOriginalConstructor()->getMock();
@@ -107,7 +121,7 @@ class EncryptAllTest extends TestCase {
$this->userManager->expects($this->any())->method('getBackends')->willReturn([$this->userInterface]);
$this->userInterface->expects($this->any())->method('getUsers')->willReturn(['user1', 'user2']);
- $this->secureRandom = $this->getMockBuilder('OCP\Security\ISecureRandom')->disableOriginalConstructor()->getMock();
+ $this->secureRandom = $this->getMockBuilder(ISecureRandom::class)->disableOriginalConstructor()->getMock();
$this->secureRandom->expects($this->any())->method('getMediumStrengthGenerator')->willReturn($this->secureRandom);
$this->secureRandom->expects($this->any())->method('getLowStrengthGenerator')->willReturn($this->secureRandom);
$this->secureRandom->expects($this->any())->method('generate')->willReturn('12345678');
@@ -129,7 +143,7 @@ class EncryptAllTest extends TestCase {
public function testEncryptAll() {
/** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */
- $encryptAll = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
+ $encryptAll = $this->getMockBuilder(EncryptAll::class)
->setConstructorArgs(
[
$this->setupUser,
@@ -158,7 +172,7 @@ class EncryptAllTest extends TestCase {
public function testEncryptAllWithMasterKey() {
/** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */
- $encryptAll = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
+ $encryptAll = $this->getMockBuilder(EncryptAll::class)
->setConstructorArgs(
[
$this->setupUser,
@@ -188,7 +202,7 @@ class EncryptAllTest extends TestCase {
public function testCreateKeyPairs() {
/** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */
- $encryptAll = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
+ $encryptAll = $this->getMockBuilder(EncryptAll::class)
->setConstructorArgs(
[
$this->setupUser,
@@ -237,7 +251,7 @@ class EncryptAllTest extends TestCase {
public function testEncryptAllUsersFiles() {
/** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */
- $encryptAll = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
+ $encryptAll = $this->getMockBuilder(EncryptAll::class)
->setConstructorArgs(
[
$this->setupUser,
@@ -270,7 +284,7 @@ class EncryptAllTest extends TestCase {
public function testEncryptUsersFiles() {
/** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */
- $encryptAll = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
+ $encryptAll = $this->getMockBuilder(EncryptAll::class)
->setConstructorArgs(
[
$this->setupUser,
@@ -318,7 +332,7 @@ class EncryptAllTest extends TestCase {
$encryptAll->expects($this->at(1))->method('encryptFile')->with('/user1/files/bar');
$encryptAll->expects($this->at(2))->method('encryptFile')->with('/user1/files/foo/subfile');
- $progressBar = $this->getMockBuilder('Symfony\Component\Console\Helper\ProgressBar')
+ $progressBar = $this->getMockBuilder(ProgressBar::class)
->disableOriginalConstructor()->getMock();
$this->invokePrivate($encryptAll, 'encryptUsersFiles', ['user1', $progressBar, '']);
diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php
index 7e074a5b9e8..42da71b0eb1 100644
--- a/apps/encryption/tests/Crypto/EncryptionTest.php
+++ b/apps/encryption/tests/Crypto/EncryptionTest.php
@@ -23,7 +23,16 @@
namespace OCA\Encryption\Tests\Crypto;
+use OCA\Encryption\Crypto\Crypt;
+use OCA\Encryption\Crypto\DecryptAll;
+use OCA\Encryption\Crypto\EncryptAll;
use OCA\Encryption\Exceptions\PublicKeyMissingException;
+use OCA\Encryption\KeyManager;
+use OCA\Encryption\Session;
+use OCA\Encryption\Util;
+use OCP\Files\Storage;
+use OCP\IL10N;
+use OCP\ILogger;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
@@ -64,30 +73,30 @@ class EncryptionTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->storageMock = $this->getMockBuilder('OCP\Files\Storage')
+ $this->storageMock = $this->getMockBuilder(Storage::class)
->disableOriginalConstructor()->getMock();
- $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ $this->cryptMock = $this->getMockBuilder(Crypt::class)
->disableOriginalConstructor()
->getMock();
- $this->utilMock = $this->getMockBuilder('OCA\Encryption\Util')
+ $this->utilMock = $this->getMockBuilder(Util::class)
->disableOriginalConstructor()
->getMock();
- $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager')
+ $this->keyManagerMock = $this->getMockBuilder(KeyManager::class)
->disableOriginalConstructor()
->getMock();
- $this->sessionMock = $this->getMockBuilder('OCA\Encryption\Session')
+ $this->sessionMock = $this->getMockBuilder(Session::class)
->disableOriginalConstructor()
->getMock();
- $this->encryptAllMock = $this->getMockBuilder('OCA\Encryption\Crypto\EncryptAll')
+ $this->encryptAllMock = $this->getMockBuilder(EncryptAll::class)
->disableOriginalConstructor()
->getMock();
- $this->decryptAllMock = $this->getMockBuilder('OCA\Encryption\Crypto\DecryptAll')
+ $this->decryptAllMock = $this->getMockBuilder(DecryptAll::class)
->disableOriginalConstructor()
->getMock();
- $this->loggerMock = $this->getMockBuilder('OCP\ILogger')
+ $this->loggerMock = $this->getMockBuilder(ILogger::class)
->disableOriginalConstructor()
->getMock();
- $this->l10nMock = $this->getMockBuilder('OCP\IL10N')
+ $this->l10nMock = $this->getMockBuilder(IL10N::class)
->disableOriginalConstructor()
->getMock();
$this->l10nMock->expects($this->any())
diff --git a/apps/encryption/tests/HookManagerTest.php b/apps/encryption/tests/HookManagerTest.php
index c5e5487dba5..109afb1ef8d 100644
--- a/apps/encryption/tests/HookManagerTest.php
+++ b/apps/encryption/tests/HookManagerTest.php
@@ -26,6 +26,7 @@ namespace OCA\Encryption\Tests;
use OCA\Encryption\HookManager;
+use OCA\Encryption\Hooks\Contracts\IHook;
use OCP\IConfig;
use Test\TestCase;
@@ -41,8 +42,8 @@ class HookManagerTest extends TestCase {
*/
public function testRegisterHookWithArray() {
self::$instance->registerHook([
- $this->getMockBuilder('OCA\Encryption\Hooks\Contracts\IHook')->disableOriginalConstructor()->getMock(),
- $this->getMockBuilder('OCA\Encryption\Hooks\Contracts\IHook')->disableOriginalConstructor()->getMock(),
+ $this->getMockBuilder(IHook::class)->disableOriginalConstructor()->getMock(),
+ $this->getMockBuilder(IHook::class)->disableOriginalConstructor()->getMock(),
$this->createMock(IConfig::class)
]);
@@ -66,7 +67,7 @@ class HookManagerTest extends TestCase {
*
*/
public function testRegisterHooksWithInstance() {
- $mock = $this->getMockBuilder('OCA\Encryption\Hooks\Contracts\IHook')->disableOriginalConstructor()->getMock();
+ $mock = $this->getMockBuilder(IHook::class)->disableOriginalConstructor()->getMock();
/** @var \OCA\Encryption\Hooks\Contracts\IHook $mock */
self::$instance->registerHook($mock);
diff --git a/apps/encryption/tests/Hooks/UserHooksTest.php b/apps/encryption/tests/Hooks/UserHooksTest.php
index f9477e3e038..f4c7a5ae0f7 100644
--- a/apps/encryption/tests/Hooks/UserHooksTest.php
+++ b/apps/encryption/tests/Hooks/UserHooksTest.php
@@ -29,8 +29,15 @@ namespace OCA\Encryption\Tests\Hooks;
use OCA\Encryption\Crypto\Crypt;
use OCA\Encryption\Hooks\UserHooks;
+use OCA\Encryption\KeyManager;
+use OCA\Encryption\Recovery;
+use OCA\Encryption\Session;
+use OCA\Encryption\Users\Setup;
+use OCA\Encryption\Util;
use OCP\ILogger;
use OCP\IUser;
+use OCP\IUserManager;
+use OCP\IUserSession;
use Test\TestCase;
/**
@@ -151,7 +158,7 @@ class UserHooksTest extends TestCase {
public function testPreSetPassphrase($canChange) {
/** @var UserHooks | \PHPUnit_Framework_MockObject_MockObject $instance */
- $instance = $this->getMockBuilder('OCA\Encryption\Hooks\UserHooks')
+ $instance = $this->getMockBuilder(UserHooks::class)
->setConstructorArgs(
[
$this->keyManagerMock,
@@ -230,7 +237,7 @@ class UserHooksTest extends TestCase {
->willReturnOnConsecutiveCalls(true, false);
- $this->instance = $this->getMockBuilder('OCA\Encryption\Hooks\UserHooks')
+ $this->instance = $this->getMockBuilder(UserHooks::class)
->setConstructorArgs(
[
$this->keyManagerMock,
@@ -291,7 +298,7 @@ class UserHooksTest extends TestCase {
->method('getPrivateKey')
->willReturn(true);
- $userSessionMock = $this->getMockBuilder('OCP\IUserSession')
+ $userSessionMock = $this->getMockBuilder(IUserSession::class)
->disableOriginalConstructor()
->getMock();
@@ -302,7 +309,7 @@ class UserHooksTest extends TestCase {
->with('testUser')
->willReturn(false);
- $userHooks = $this->getMockBuilder('OCA\Encryption\Hooks\UserHooks')
+ $userHooks = $this->getMockBuilder(UserHooks::class)
->setConstructorArgs(
[
$this->keyManagerMock,
@@ -324,17 +331,17 @@ class UserHooksTest extends TestCase {
protected function setUp() {
parent::setUp();
$this->loggerMock = $this->createMock(ILogger::class);
- $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager')
+ $this->keyManagerMock = $this->getMockBuilder(KeyManager::class)
->disableOriginalConstructor()
->getMock();
- $this->userManagerMock = $this->getMockBuilder('OCP\IUserManager')
+ $this->userManagerMock = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- $this->userSetupMock = $this->getMockBuilder('OCA\Encryption\Users\Setup')
+ $this->userSetupMock = $this->getMockBuilder(Setup::class)
->disableOriginalConstructor()
->getMock();
- $this->userSessionMock = $this->getMockBuilder('OCP\IUserSession')
+ $this->userSessionMock = $this->getMockBuilder(IUserSession::class)
->disableOriginalConstructor()
->setMethods([
'isLoggedIn',
@@ -353,18 +360,18 @@ class UserHooksTest extends TestCase {
->method($this->anything())
->will($this->returnSelf());
- $utilMock = $this->getMockBuilder('OCA\Encryption\Util')
+ $utilMock = $this->getMockBuilder(Util::class)
->disableOriginalConstructor()
->getMock();
- $sessionMock = $this->getMockBuilder('OCA\Encryption\Session')
+ $sessionMock = $this->getMockBuilder(Session::class)
->disableOriginalConstructor()
->getMock();
- $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ $this->cryptMock = $this->getMockBuilder(Crypt::class)
->disableOriginalConstructor()
->getMock();
- $recoveryMock = $this->getMockBuilder('OCA\Encryption\Recovery')
+ $recoveryMock = $this->getMockBuilder(Recovery::class)
->disableOriginalConstructor()
->getMock();
@@ -373,7 +380,7 @@ class UserHooksTest extends TestCase {
$this->utilMock = $utilMock;
$this->utilMock->expects($this->any())->method('isMasterKeyEnabled')->willReturn(false);
- $this->instance = $this->getMockBuilder('OCA\Encryption\Hooks\UserHooks')
+ $this->instance = $this->getMockBuilder(UserHooks::class)
->setConstructorArgs(
[
$this->keyManagerMock,
diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php
index a8441427a2c..721b7f53a0c 100644
--- a/apps/encryption/tests/KeyManagerTest.php
+++ b/apps/encryption/tests/KeyManagerTest.php
@@ -27,9 +27,15 @@
namespace OCA\Encryption\Tests;
+use OC\Files\FileInfo;
+use OC\Files\View;
+use OCA\Encryption\Crypto\Crypt;
use OCA\Encryption\KeyManager;
use OCA\Encryption\Session;
+use OCA\Encryption\Util;
use OCP\Encryption\Keys\IStorage;
+use OCP\Files\Cache\ICache;
+use OCP\Files\Storage;
use OCP\IConfig;
use OCP\ILogger;
use OCP\IUserSession;
@@ -74,7 +80,7 @@ class KeyManagerTest extends TestCase {
$this->userId = 'user1';
$this->systemKeyId = 'systemKeyId';
$this->keyStorageMock = $this->createMock(IStorage::class);
- $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ $this->cryptMock = $this->getMockBuilder(Crypt::class)
->disableOriginalConstructor()
->getMock();
$this->configMock = $this->createMock(IConfig::class);
@@ -82,11 +88,11 @@ class KeyManagerTest extends TestCase {
->method('getAppValue')
->willReturn($this->systemKeyId);
$this->userMock = $this->createMock(IUserSession::class);
- $this->sessionMock = $this->getMockBuilder('OCA\Encryption\Session')
+ $this->sessionMock = $this->getMockBuilder(Session::class)
->disableOriginalConstructor()
->getMock();
$this->logMock = $this->createMock(ILogger::class);
- $this->utilMock = $this->getMockBuilder('OCA\Encryption\Util')
+ $this->utilMock = $this->getMockBuilder(Util::class)
->disableOriginalConstructor()
->getMock();
@@ -251,7 +257,7 @@ class KeyManagerTest extends TestCase {
public function testInit($useMasterKey) {
/** @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject $instance */
- $instance = $this->getMockBuilder('OCA\Encryption\KeyManager')
+ $instance = $this->getMockBuilder(KeyManager::class)
->setConstructorArgs(
[
$this->keyStorageMock,
@@ -544,7 +550,7 @@ class KeyManagerTest extends TestCase {
public function testValidateMasterKey($masterKey) {
/** @var \OCA\Encryption\KeyManager | \PHPUnit_Framework_MockObject_MockObject $instance */
- $instance = $this->getMockBuilder('OCA\Encryption\KeyManager')
+ $instance = $this->getMockBuilder(KeyManager::class)
->setConstructorArgs(
[
$this->keyStorageMock,
@@ -592,7 +598,7 @@ class KeyManagerTest extends TestCase {
}
public function testGetVersionWithoutFileInfo() {
- $view = $this->getMockBuilder('\\OC\\Files\\View')
+ $view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()->getMock();
$view->expects($this->once())
->method('getFileInfo')
@@ -604,9 +610,9 @@ class KeyManagerTest extends TestCase {
}
public function testGetVersionWithFileInfo() {
- $view = $this->getMockBuilder('\\OC\\Files\\View')
+ $view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()->getMock();
- $fileInfo = $this->getMockBuilder('\\OC\\Files\\FileInfo')
+ $fileInfo = $this->getMockBuilder(FileInfo::class)
->disableOriginalConstructor()->getMock();
$fileInfo->expects($this->once())
->method('getEncryptedVersion')
@@ -621,19 +627,19 @@ class KeyManagerTest extends TestCase {
}
public function testSetVersionWithFileInfo() {
- $view = $this->getMockBuilder('\\OC\\Files\\View')
+ $view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()->getMock();
- $cache = $this->getMockBuilder('\\OCP\\Files\\Cache\\ICache')
+ $cache = $this->getMockBuilder(ICache::class)
->disableOriginalConstructor()->getMock();
$cache->expects($this->once())
->method('update')
->with(123, ['encrypted' => 5, 'encryptedVersion' => 5]);
- $storage = $this->getMockBuilder('\\OCP\\Files\\Storage')
+ $storage = $this->getMockBuilder(Storage::class)
->disableOriginalConstructor()->getMock();
$storage->expects($this->once())
->method('getCache')
->willReturn($cache);
- $fileInfo = $this->getMockBuilder('\\OC\\Files\\FileInfo')
+ $fileInfo = $this->getMockBuilder(FileInfo::class)
->disableOriginalConstructor()->getMock();
$fileInfo->expects($this->once())
->method('getStorage')
@@ -651,7 +657,7 @@ class KeyManagerTest extends TestCase {
}
public function testSetVersionWithoutFileInfo() {
- $view = $this->getMockBuilder('\\OC\\Files\\View')
+ $view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()->getMock();
$view->expects($this->once())
->method('getFileInfo')
diff --git a/apps/encryption/tests/MigrationTest.php b/apps/encryption/tests/MigrationTest.php
index 595d7f12067..71d2f52dd5c 100644
--- a/apps/encryption/tests/MigrationTest.php
+++ b/apps/encryption/tests/MigrationTest.php
@@ -25,6 +25,7 @@
namespace OCA\Encryption\Tests;
+use OC\Files\View;
use OCA\Encryption\Migration;
use OCP\ILogger;
@@ -68,7 +69,7 @@ class MigrationTest extends \Test\TestCase {
public function setUp() {
- $this->logger = $this->getMockBuilder('\OCP\ILogger')->disableOriginalConstructor()->getMock();
+ $this->logger = $this->getMockBuilder(ILogger::class)->disableOriginalConstructor()->getMock();
$this->view = new \OC\Files\View();
$this->moduleId = \OCA\Encryption\Crypto\Encryption::ID;
}
@@ -203,13 +204,14 @@ class MigrationTest extends \Test\TestCase {
$this->createDummySystemWideKeys();
/** @var \PHPUnit_Framework_MockObject_MockObject|\OCA\Encryption\Migration $m */
- $m = $this->getMockBuilder('OCA\Encryption\Migration')
+ $m = $this->getMockBuilder(Migration::class)
->setConstructorArgs(
[
\OC::$server->getConfig(),
new \OC\Files\View(),
\OC::$server->getDatabaseConnection(),
- $this->logger
+ $this->logger,
+ \OC::$server->getAppManager()
]
)->setMethods(['getSystemMountPoints'])->getMock();
@@ -366,7 +368,7 @@ class MigrationTest extends \Test\TestCase {
public function testUpdateDB() {
$this->prepareDB();
- $m = new Migration(\OC::$server->getConfig(), new \OC\Files\View(), \OC::$server->getDatabaseConnection(), $this->logger);
+ $m = new Migration(\OC::$server->getConfig(), new \OC\Files\View(), \OC::$server->getDatabaseConnection(), $this->logger, \OC::$server->getAppManager());
$this->invokePrivate($m, 'installedVersion', ['0.7']);
$m->updateDB();
@@ -386,7 +388,7 @@ class MigrationTest extends \Test\TestCase {
$config->setAppValue('encryption', 'publicShareKeyId', 'wrong_share_id');
$config->setUserValue(self::TEST_ENCRYPTION_MIGRATION_USER1, 'encryption', 'recoverKeyEnabled', '9');
- $m = new Migration(\OC::$server->getConfig(), new \OC\Files\View(), \OC::$server->getDatabaseConnection(), $this->logger);
+ $m = new Migration(\OC::$server->getConfig(), new \OC\Files\View(), \OC::$server->getDatabaseConnection(), $this->logger, \OC::$server->getAppManager());
$this->invokePrivate($m, 'installedVersion', ['0.7']);
$m->updateDB();
@@ -455,7 +457,7 @@ class MigrationTest extends \Test\TestCase {
*/
public function testUpdateFileCache() {
$this->prepareFileCache();
- $m = new Migration(\OC::$server->getConfig(), new \OC\Files\View(), \OC::$server->getDatabaseConnection(), $this->logger);
+ $m = new Migration(\OC::$server->getConfig(), new \OC\Files\View(), \OC::$server->getDatabaseConnection(), $this->logger, \OC::$server->getAppManager());
$this->invokePrivate($m, 'installedVersion', ['0.7']);
self::invokePrivate($m, 'updateFileCache');
@@ -523,17 +525,18 @@ class MigrationTest extends \Test\TestCase {
*/
public function testGetTargetDir($user, $keyPath, $filename, $trash, $systemMounts, $expected) {
- $view = $this->getMockBuilder('\OC\Files\View')
+ $view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()->getMock();
$view->expects($this->any())->method('file_exists')->willReturn(true);
- $m = $this->getMockBuilder('OCA\Encryption\Migration')
+ $m = $this->getMockBuilder(Migration::class)
->setConstructorArgs(
[
\OC::$server->getConfig(),
$view,
\OC::$server->getDatabaseConnection(),
- $this->logger
+ $this->logger,
+ \OC::$server->getAppManager()
]
)->setMethods(['getSystemMountPoints'])->getMock();
diff --git a/apps/encryption/tests/RecoveryTest.php b/apps/encryption/tests/RecoveryTest.php
index d73b5d48c91..2dda774565c 100644
--- a/apps/encryption/tests/RecoveryTest.php
+++ b/apps/encryption/tests/RecoveryTest.php
@@ -28,10 +28,13 @@ namespace OCA\Encryption\Tests;
use OC\Files\View;
+use OCA\Encryption\Crypto\Crypt;
+use OCA\Encryption\KeyManager;
use OCA\Encryption\Recovery;
use OCP\Encryption\IFile;
use OCP\Encryption\Keys\IStorage;
use OCP\IConfig;
+use OCP\IUserSession;
use OCP\Security\ISecureRandom;
use Test\TestCase;
@@ -253,7 +256,7 @@ class RecoveryTest extends TestCase {
parent::setUp();
- $this->userSessionMock = $this->getMockBuilder('OCP\IUserSession')
+ $this->userSessionMock = $this->getMockBuilder(IUserSession::class)
->disableOriginalConstructor()
->setMethods([
'isLoggedIn',
@@ -271,10 +274,10 @@ class RecoveryTest extends TestCase {
->method($this->anything())
->will($this->returnSelf());
- $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')->disableOriginalConstructor()->getMock();
+ $this->cryptMock = $this->getMockBuilder(Crypt::class)->disableOriginalConstructor()->getMock();
/** @var \OCP\Security\ISecureRandom $randomMock */
$randomMock = $this->createMock(ISecureRandom::class);
- $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager')->disableOriginalConstructor()->getMock();
+ $this->keyManagerMock = $this->getMockBuilder(KeyManager::class)->disableOriginalConstructor()->getMock();
$this->configMock = $this->createMock(IConfig::class);
/** @var \OCP\Encryption\Keys\IStorage $keyStorageMock */
$keyStorageMock = $this->createMock(IStorage::class);
diff --git a/apps/encryption/tests/Settings/AdminTest.php b/apps/encryption/tests/Settings/AdminTest.php
index 93896585dad..5fe3fe956e4 100644
--- a/apps/encryption/tests/Settings/AdminTest.php
+++ b/apps/encryption/tests/Settings/AdminTest.php
@@ -52,12 +52,12 @@ class AdminTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->l = $this->getMockBuilder('\OCP\IL10N')->getMock();
- $this->logger = $this->getMockBuilder('\OCP\ILogger')->getMock();
- $this->userSession = $this->getMockBuilder('\OCP\IUserSession')->getMock();
- $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
- $this->userManager = $this->getMockBuilder('\OCP\IUserManager')->getMock();
- $this->session = $this->getMockBuilder('\OCP\ISession')->getMock();
+ $this->l = $this->getMockBuilder(IL10N::class)->getMock();
+ $this->logger = $this->getMockBuilder(ILogger::class)->getMock();
+ $this->userSession = $this->getMockBuilder(IUserSession::class)->getMock();
+ $this->config = $this->getMockBuilder(IConfig::class)->getMock();
+ $this->userManager = $this->getMockBuilder(IUserManager::class)->getMock();
+ $this->session = $this->getMockBuilder(ISession::class)->getMock();
$this->admin = new Admin(
$this->l,
diff --git a/apps/encryption/tests/Users/SetupTest.php b/apps/encryption/tests/Users/SetupTest.php
index 9e856861046..27866ef3927 100644
--- a/apps/encryption/tests/Users/SetupTest.php
+++ b/apps/encryption/tests/Users/SetupTest.php
@@ -26,8 +26,11 @@
namespace OCA\Encryption\Tests\Users;
+use OCA\Encryption\Crypto\Crypt;
+use OCA\Encryption\KeyManager;
use OCA\Encryption\Users\Setup;
use OCP\ILogger;
+use OCP\IUserSession;
use Test\TestCase;
class SetupTest extends TestCase {
@@ -47,14 +50,14 @@ class SetupTest extends TestCase {
protected function setUp() {
parent::setUp();
$logMock = $this->createMock(ILogger::class);
- $userSessionMock = $this->getMockBuilder('OCP\IUserSession')
+ $userSessionMock = $this->getMockBuilder(IUserSession::class)
->disableOriginalConstructor()
->getMock();
- $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ $this->cryptMock = $this->getMockBuilder(Crypt::class)
->disableOriginalConstructor()
->getMock();
- $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager')
+ $this->keyManagerMock = $this->getMockBuilder(KeyManager::class)
->disableOriginalConstructor()
->getMock();
diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php
index 40fc5537251..e59565d3b84 100644
--- a/apps/encryption/tests/UtilTest.php
+++ b/apps/encryption/tests/UtilTest.php
@@ -27,11 +27,14 @@ namespace OCA\Encryption\Tests;
use OC\Files\View;
+use OCA\Encryption\Crypto\Crypt;
use OCA\Encryption\Util;
use OCP\Files\Mount\IMountPoint;
+use OCP\Files\Storage;
use OCP\IConfig;
use OCP\ILogger;
use OCP\IUserManager;
+use OCP\IUserSession;
use Test\TestCase;
class UtilTest extends TestCase {
@@ -80,13 +83,13 @@ class UtilTest extends TestCase {
$this->userManagerMock = $this->createMock(IUserManager::class);
/** @var \OCA\Encryption\Crypto\Crypt $cryptMock */
- $cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ $cryptMock = $this->getMockBuilder(Crypt::class)
->disableOriginalConstructor()
->getMock();
/** @var \OCP\ILogger $loggerMock */
$loggerMock = $this->createMock(ILogger::class);
/** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSessionMock */
- $userSessionMock = $this->getMockBuilder('OCP\IUserSession')
+ $userSessionMock = $this->getMockBuilder(IUserSession::class)
->disableOriginalConstructor()
->setMethods([
'isLoggedIn',
@@ -205,7 +208,7 @@ class UtilTest extends TestCase {
}
public function testGetStorage() {
- $return = $this->getMockBuilder('OC\Files\Storage\Storage')
+ $return = $this->getMockBuilder(Storage::class)
->disableOriginalConstructor()
->getMock();