summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/encryption/appinfo/app.php (renamed from apps/files_encryption/appinfo/register_command.php)13
-rw-r--r--apps/encryption/appinfo/application.php190
-rw-r--r--apps/encryption/appinfo/info.xml36
-rw-r--r--apps/encryption/appinfo/routes.php44
-rw-r--r--apps/encryption/controller/recoverycontroller.php160
-rw-r--r--apps/encryption/css/settings-personal.css (renamed from apps/files_encryption/css/settings-personal.css)0
-rw-r--r--apps/encryption/hooks/contracts/ihook.php (renamed from apps/files_encryption/appinfo/update.php)21
-rw-r--r--apps/encryption/hooks/userhooks.php286
-rw-r--r--apps/encryption/img/app.svg (renamed from apps/files_encryption/img/app.svg)0
-rw-r--r--apps/encryption/js/detect-migration.js (renamed from apps/files_encryption/js/detect-migration.js)0
-rw-r--r--apps/encryption/js/encryption.js (renamed from apps/files_encryption/js/encryption.js)0
-rw-r--r--apps/encryption/js/settings-admin.js (renamed from apps/files_encryption/js/settings-admin.js)4
-rw-r--r--apps/encryption/js/settings-personal.js (renamed from apps/files_encryption/js/settings-personal.js)31
-rw-r--r--apps/encryption/l10n/.gitkeep (renamed from apps/files_encryption/l10n/.gitkeep)0
-rw-r--r--apps/encryption/lib/crypto/crypt.php457
-rw-r--r--apps/encryption/lib/crypto/encryption.php328
-rw-r--r--apps/encryption/lib/exceptions/multikeydecryptexception.php9
-rw-r--r--apps/encryption/lib/exceptions/multikeyencryptexception.php9
-rw-r--r--apps/encryption/lib/exceptions/privatekeymissingexception.php (renamed from apps/files_encryption/lib/capabilities.php)37
-rw-r--r--apps/encryption/lib/exceptions/publickeymissingexception.php20
-rw-r--r--apps/encryption/lib/hookmanager.php66
-rw-r--r--apps/encryption/lib/keymanager.php511
-rw-r--r--apps/encryption/lib/recovery.php316
-rw-r--r--apps/encryption/lib/session.php114
-rw-r--r--apps/encryption/lib/users/setup.php72
-rw-r--r--apps/encryption/lib/util.php117
-rw-r--r--apps/encryption/settings/settings-admin.php21
-rw-r--r--apps/encryption/settings/settings-personal.php58
-rw-r--r--apps/encryption/templates/settings-admin.php (renamed from apps/files_encryption/templates/settings-admin.php)10
-rw-r--r--apps/encryption/templates/settings-personal.php (renamed from apps/files_encryption/templates/settings-personal.php)142
-rw-r--r--apps/encryption/tests/lib/HookManagerTest.php74
-rw-r--r--apps/encryption/tests/lib/KeyManagerTest.php286
-rw-r--r--apps/encryption/tests/lib/RecoveryTest.php265
-rw-r--r--apps/encryption/tests/lib/SessionTest.php140
-rw-r--r--apps/encryption/tests/lib/UtilTest.php128
-rw-r--r--apps/encryption/tests/lib/crypto/encryptionTest.php78
-rw-r--r--apps/encryption/tests/lib/users/SetupTest.php81
-rw-r--r--apps/encryption_dummy/img/app.svg51
-rw-r--r--apps/encryption_dummy/lib/dummymodule.php30
-rw-r--r--apps/files/index.php8
-rw-r--r--apps/files/js/files.js23
-rw-r--r--apps/files/templates/index.php2
-rw-r--r--apps/files_encryption/ajax/adminrecovery.php91
-rw-r--r--apps/files_encryption/ajax/changeRecoveryPassword.php92
-rw-r--r--apps/files_encryption/ajax/getMigrationStatus.php44
-rw-r--r--apps/files_encryption/ajax/updatePrivateKeyPassword.php81
-rw-r--r--apps/files_encryption/ajax/userrecovery.php63
-rw-r--r--apps/files_encryption/appinfo/app.php57
-rw-r--r--apps/files_encryption/appinfo/info.xml25
-rw-r--r--apps/files_encryption/appinfo/routes.php39
-rw-r--r--apps/files_encryption/appinfo/spec.txt77
-rw-r--r--apps/files_encryption/appinfo/version1
-rw-r--r--apps/files_encryption/command/migratekeys.php95
-rw-r--r--apps/files_encryption/exception/encryptionexception.php50
-rw-r--r--apps/files_encryption/files/error.php75
-rw-r--r--apps/files_encryption/l10n/ar.js40
-rw-r--r--apps/files_encryption/l10n/ar.json38
-rw-r--r--apps/files_encryption/l10n/ast.js41
-rw-r--r--apps/files_encryption/l10n/ast.json39
-rw-r--r--apps/files_encryption/l10n/az.js53
-rw-r--r--apps/files_encryption/l10n/az.json51
-rw-r--r--apps/files_encryption/l10n/bg_BG.js53
-rw-r--r--apps/files_encryption/l10n/bg_BG.json51
-rw-r--r--apps/files_encryption/l10n/bn_BD.js22
-rw-r--r--apps/files_encryption/l10n/bn_BD.json20
-rw-r--r--apps/files_encryption/l10n/bs.js9
-rw-r--r--apps/files_encryption/l10n/bs.json7
-rw-r--r--apps/files_encryption/l10n/ca.js42
-rw-r--r--apps/files_encryption/l10n/ca.json40
-rw-r--r--apps/files_encryption/l10n/cs_CZ.js53
-rw-r--r--apps/files_encryption/l10n/cs_CZ.json51
-rw-r--r--apps/files_encryption/l10n/cy_GB.js6
-rw-r--r--apps/files_encryption/l10n/cy_GB.json4
-rw-r--r--apps/files_encryption/l10n/da.js53
-rw-r--r--apps/files_encryption/l10n/da.json51
-rw-r--r--apps/files_encryption/l10n/de.js53
-rw-r--r--apps/files_encryption/l10n/de.json51
-rw-r--r--apps/files_encryption/l10n/de_CH.js33
-rw-r--r--apps/files_encryption/l10n/de_CH.json31
-rw-r--r--apps/files_encryption/l10n/de_DE.js53
-rw-r--r--apps/files_encryption/l10n/de_DE.json51
-rw-r--r--apps/files_encryption/l10n/el.js53
-rw-r--r--apps/files_encryption/l10n/el.json51
-rw-r--r--apps/files_encryption/l10n/en_GB.js53
-rw-r--r--apps/files_encryption/l10n/en_GB.json51
-rw-r--r--apps/files_encryption/l10n/eo.js17
-rw-r--r--apps/files_encryption/l10n/eo.json15
-rw-r--r--apps/files_encryption/l10n/es.js53
-rw-r--r--apps/files_encryption/l10n/es.json51
-rw-r--r--apps/files_encryption/l10n/es_AR.js38
-rw-r--r--apps/files_encryption/l10n/es_AR.json36
-rw-r--r--apps/files_encryption/l10n/es_CL.js6
-rw-r--r--apps/files_encryption/l10n/es_CL.json4
-rw-r--r--apps/files_encryption/l10n/es_MX.js37
-rw-r--r--apps/files_encryption/l10n/es_MX.json35
-rw-r--r--apps/files_encryption/l10n/et_EE.js51
-rw-r--r--apps/files_encryption/l10n/et_EE.json49
-rw-r--r--apps/files_encryption/l10n/eu.js53
-rw-r--r--apps/files_encryption/l10n/eu.json51
-rw-r--r--apps/files_encryption/l10n/fa.js30
-rw-r--r--apps/files_encryption/l10n/fa.json28
-rw-r--r--apps/files_encryption/l10n/fi_FI.js51
-rw-r--r--apps/files_encryption/l10n/fi_FI.json49
-rw-r--r--apps/files_encryption/l10n/fr.js53
-rw-r--r--apps/files_encryption/l10n/fr.json51
-rw-r--r--apps/files_encryption/l10n/gl.js53
-rw-r--r--apps/files_encryption/l10n/gl.json51
-rw-r--r--apps/files_encryption/l10n/he.js6
-rw-r--r--apps/files_encryption/l10n/he.json4
-rw-r--r--apps/files_encryption/l10n/hr.js42
-rw-r--r--apps/files_encryption/l10n/hr.json40
-rw-r--r--apps/files_encryption/l10n/hu_HU.js38
-rw-r--r--apps/files_encryption/l10n/hu_HU.json36
-rw-r--r--apps/files_encryption/l10n/ia.js6
-rw-r--r--apps/files_encryption/l10n/ia.json4
-rw-r--r--apps/files_encryption/l10n/id.js53
-rw-r--r--apps/files_encryption/l10n/id.json51
-rw-r--r--apps/files_encryption/l10n/is.js6
-rw-r--r--apps/files_encryption/l10n/is.json4
-rw-r--r--apps/files_encryption/l10n/it.js53
-rw-r--r--apps/files_encryption/l10n/it.json51
-rw-r--r--apps/files_encryption/l10n/ja.js53
-rw-r--r--apps/files_encryption/l10n/ja.json51
-rw-r--r--apps/files_encryption/l10n/ka_GE.js6
-rw-r--r--apps/files_encryption/l10n/ka_GE.json4
-rw-r--r--apps/files_encryption/l10n/km.js11
-rw-r--r--apps/files_encryption/l10n/km.json9
-rw-r--r--apps/files_encryption/l10n/kn.js8
-rw-r--r--apps/files_encryption/l10n/kn.json6
-rw-r--r--apps/files_encryption/l10n/ko.js53
-rw-r--r--apps/files_encryption/l10n/ko.json51
-rw-r--r--apps/files_encryption/l10n/ku_IQ.js6
-rw-r--r--apps/files_encryption/l10n/ku_IQ.json4
-rw-r--r--apps/files_encryption/l10n/lb.js6
-rw-r--r--apps/files_encryption/l10n/lb.json4
-rw-r--r--apps/files_encryption/l10n/lo.js6
-rw-r--r--apps/files_encryption/l10n/lo.json4
-rw-r--r--apps/files_encryption/l10n/lt_LT.js37
-rw-r--r--apps/files_encryption/l10n/lt_LT.json35
-rw-r--r--apps/files_encryption/l10n/lv.js8
-rw-r--r--apps/files_encryption/l10n/lv.json6
-rw-r--r--apps/files_encryption/l10n/mk.js18
-rw-r--r--apps/files_encryption/l10n/mk.json16
-rw-r--r--apps/files_encryption/l10n/nb_NO.js53
-rw-r--r--apps/files_encryption/l10n/nb_NO.json51
-rw-r--r--apps/files_encryption/l10n/nl.js53
-rw-r--r--apps/files_encryption/l10n/nl.json51
-rw-r--r--apps/files_encryption/l10n/nn_NO.js6
-rw-r--r--apps/files_encryption/l10n/nn_NO.json4
-rw-r--r--apps/files_encryption/l10n/pa.js6
-rw-r--r--apps/files_encryption/l10n/pa.json4
-rw-r--r--apps/files_encryption/l10n/pl.js53
-rw-r--r--apps/files_encryption/l10n/pl.json51
-rw-r--r--apps/files_encryption/l10n/pt_BR.js53
-rw-r--r--apps/files_encryption/l10n/pt_BR.json51
-rw-r--r--apps/files_encryption/l10n/pt_PT.js53
-rw-r--r--apps/files_encryption/l10n/pt_PT.json51
-rw-r--r--apps/files_encryption/l10n/ro.js18
-rw-r--r--apps/files_encryption/l10n/ro.json16
-rw-r--r--apps/files_encryption/l10n/ru.js53
-rw-r--r--apps/files_encryption/l10n/ru.json51
-rw-r--r--apps/files_encryption/l10n/si_LK.js6
-rw-r--r--apps/files_encryption/l10n/si_LK.json4
-rw-r--r--apps/files_encryption/l10n/sk_SK.js53
-rw-r--r--apps/files_encryption/l10n/sk_SK.json51
-rw-r--r--apps/files_encryption/l10n/sl.js53
-rw-r--r--apps/files_encryption/l10n/sl.json51
-rw-r--r--apps/files_encryption/l10n/sq.js7
-rw-r--r--apps/files_encryption/l10n/sq.json5
-rw-r--r--apps/files_encryption/l10n/sr.js53
-rw-r--r--apps/files_encryption/l10n/sr.json51
-rw-r--r--apps/files_encryption/l10n/sr@latin.js8
-rw-r--r--apps/files_encryption/l10n/sr@latin.json6
-rw-r--r--apps/files_encryption/l10n/sv.js52
-rw-r--r--apps/files_encryption/l10n/sv.json50
-rw-r--r--apps/files_encryption/l10n/ta_LK.js6
-rw-r--r--apps/files_encryption/l10n/ta_LK.json4
-rw-r--r--apps/files_encryption/l10n/th_TH.js6
-rw-r--r--apps/files_encryption/l10n/th_TH.json4
-rw-r--r--apps/files_encryption/l10n/tr.js53
-rw-r--r--apps/files_encryption/l10n/tr.json51
-rw-r--r--apps/files_encryption/l10n/ug.js6
-rw-r--r--apps/files_encryption/l10n/ug.json4
-rw-r--r--apps/files_encryption/l10n/uk.js53
-rw-r--r--apps/files_encryption/l10n/uk.json51
-rw-r--r--apps/files_encryption/l10n/ur_PK.js6
-rw-r--r--apps/files_encryption/l10n/ur_PK.json4
-rw-r--r--apps/files_encryption/l10n/vi.js24
-rw-r--r--apps/files_encryption/l10n/vi.json22
-rw-r--r--apps/files_encryption/l10n/zh_CN.js48
-rw-r--r--apps/files_encryption/l10n/zh_CN.json46
-rw-r--r--apps/files_encryption/l10n/zh_HK.js9
-rw-r--r--apps/files_encryption/l10n/zh_HK.json7
-rw-r--r--apps/files_encryption/l10n/zh_TW.js39
-rw-r--r--apps/files_encryption/l10n/zh_TW.json37
-rw-r--r--apps/files_encryption/lib/crypt.php581
-rw-r--r--apps/files_encryption/lib/helper.php532
-rw-r--r--apps/files_encryption/lib/hooks.php625
-rw-r--r--apps/files_encryption/lib/keymanager.php500
-rw-r--r--apps/files_encryption/lib/migration.php302
-rw-r--r--apps/files_encryption/lib/proxy.php401
-rw-r--r--apps/files_encryption/lib/session.php203
-rw-r--r--apps/files_encryption/lib/stream.php700
-rw-r--r--apps/files_encryption/lib/util.php1700
-rw-r--r--apps/files_encryption/settings-admin.php42
-rw-r--r--apps/files_encryption/settings-personal.php60
-rw-r--r--apps/files_encryption/templates/invalid_private_key.php12
-rw-r--r--apps/files_encryption/tests/binarybin9734 -> 0 bytes
-rwxr-xr-xapps/files_encryption/tests/crypt.php678
-rw-r--r--apps/files_encryption/tests/encryption.keybin24 -> 0 bytes
-rw-r--r--apps/files_encryption/tests/encryption_table.xml39
-rw-r--r--apps/files_encryption/tests/helper.php339
-rw-r--r--apps/files_encryption/tests/hooks.php447
-rw-r--r--apps/files_encryption/tests/keymanager.php411
-rw-r--r--apps/files_encryption/tests/legacy-encrypted-text.txt1
-rw-r--r--apps/files_encryption/tests/migration.php266
-rw-r--r--apps/files_encryption/tests/proxy.php154
-rwxr-xr-xapps/files_encryption/tests/share.php1392
-rw-r--r--apps/files_encryption/tests/stream.php232
-rw-r--r--apps/files_encryption/tests/testcase.php111
-rwxr-xr-xapps/files_encryption/tests/trashbin.php346
-rwxr-xr-xapps/files_encryption/tests/util.php693
-rw-r--r--apps/files_encryption/tests/zerosbin10238 -> 0 bytes
-rw-r--r--apps/files_sharing/lib/cache.php9
-rw-r--r--apps/files_sharing/lib/share/file.php7
-rw-r--r--apps/files_sharing/lib/sharedstorage.php15
-rw-r--r--apps/files_sharing/tests/propagation.php22
-rw-r--r--apps/files_sharing/tests/testcase.php29
-rw-r--r--apps/files_sharing/tests/updater.php2
-rw-r--r--apps/files_trashbin/lib/storage.php4
-rw-r--r--apps/files_trashbin/lib/trashbin.php129
-rw-r--r--apps/files_trashbin/tests/trashbin.php14
-rw-r--r--apps/files_versions/lib/storage.php14
-rw-r--r--apps/files_versions/tests/versions.php6
-rw-r--r--build/license.php2
-rw-r--r--core/application.php4
-rw-r--r--lib/base.php27
-rw-r--r--lib/private/app.php2
-rw-r--r--lib/private/cache/file.php9
-rw-r--r--lib/private/connector/sabre/file.php140
-rw-r--r--lib/private/encryption/exceptions/decryptionfailedexception.php (renamed from apps/files_encryption/exception/multikeyencryptexception.php)23
-rw-r--r--lib/private/encryption/exceptions/emptyencryptiondataexception.php (renamed from apps/files_encryption/exception/multikeydecryptexception.php)23
-rw-r--r--lib/private/encryption/exceptions/encryptionfailedexception.php29
-rw-r--r--lib/private/encryption/exceptions/encryptionheaderkeyexistsexception.php11
-rw-r--r--lib/private/encryption/exceptions/encryptionheadertolargeexception.php33
-rw-r--r--lib/private/encryption/exceptions/modulealreadyexistsexception.php12
-rw-r--r--lib/private/encryption/exceptions/moduledoesnotexistsexception.php4
-rw-r--r--lib/private/encryption/exceptions/unknowncipherexception.php29
-rw-r--r--lib/private/encryption/file.php79
-rw-r--r--lib/private/encryption/keys/storage.php43
-rw-r--r--lib/private/encryption/manager.php53
-rw-r--r--lib/private/encryption/update.php46
-rw-r--r--lib/private/encryption/util.php149
-rw-r--r--lib/private/filechunking.php4
-rw-r--r--lib/private/fileproxy.php138
-rw-r--r--lib/private/files.php2
-rw-r--r--lib/private/files/cache/cache.php29
-rw-r--r--lib/private/files/cache/homecache.php14
-rw-r--r--lib/private/files/fileinfo.php7
-rw-r--r--lib/private/files/storage/common.php43
-rw-r--r--lib/private/files/storage/localtempfiletrait.php85
-rw-r--r--lib/private/files/storage/wrapper/encryption.php181
-rw-r--r--lib/private/files/storage/wrapper/quota.php5
-rw-r--r--lib/private/files/stream/encryption.php126
-rw-r--r--lib/private/files/view.php22
-rw-r--r--lib/private/hook.php52
-rw-r--r--lib/private/server.php26
-rw-r--r--lib/private/share/share.php2
-rw-r--r--lib/private/util.php45
-rw-r--r--lib/public/encryption/exceptions/genericencryptionexception.php34
-rw-r--r--lib/public/encryption/ifile.php36
-rw-r--r--lib/public/encryption/imanager.php4
-rw-r--r--lib/public/encryption/keys/istorage.php16
-rw-r--r--lib/public/iservercontainer.php25
-rw-r--r--lib/public/util.php17
-rw-r--r--settings/admin.php12
-rw-r--r--settings/ajax/decryptall.php62
-rw-r--r--settings/ajax/deletekeys.php35
-rw-r--r--settings/ajax/restorekeys.php35
-rw-r--r--settings/changepassword/controller.php37
-rw-r--r--settings/js/personal.js75
-rw-r--r--settings/personal.php11
-rw-r--r--settings/routes.php6
-rw-r--r--settings/templates/admin.php67
-rw-r--r--settings/templates/personal.php52
-rw-r--r--settings/users.php4
-rw-r--r--tests/bootstrap.php1
-rw-r--r--tests/enable_all.php2
-rw-r--r--tests/lib/avatar.php13
-rw-r--r--tests/lib/cache/file.php7
-rw-r--r--tests/lib/cache/usercache.php7
-rw-r--r--tests/lib/encryption/keys/storage.php153
-rw-r--r--tests/lib/encryption/managertest.php58
-rw-r--r--tests/lib/encryption/utiltest.php18
-rw-r--r--tests/lib/files/cache/cache.php9
-rw-r--r--tests/lib/files/cache/updaterlegacy.php11
-rw-r--r--tests/lib/files/storage/storage.php2
-rw-r--r--tests/lib/files/storage/wrapper/encryption.php125
-rw-r--r--tests/lib/files/storage/wrapper/jail.php4
-rw-r--r--tests/lib/files/storage/wrapper/quota.php8
-rw-r--r--tests/lib/files/stream/encryption.php104
-rw-r--r--tests/lib/streamwrappers.php14
-rw-r--r--tests/lib/testcase.php11
303 files changed, 5541 insertions, 17549 deletions
diff --git a/apps/files_encryption/appinfo/register_command.php b/apps/encryption/appinfo/app.php
index 4864e801162..240a1726715 100644
--- a/apps/files_encryption/appinfo/register_command.php
+++ b/apps/encryption/appinfo/app.php
@@ -1,8 +1,7 @@
<?php
/**
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/19/15, 9:52 AM
* @copyright Copyright (c) 2015, ownCloud, Inc.
* @license AGPL-3.0
*
@@ -20,7 +19,9 @@
*
*/
-use OCA\Files_Encryption\Command\MigrateKeys;
+namespace OCA\Encryption\AppInfo;
-$userManager = OC::$server->getUserManager();
-$application->add(new MigrateKeys($userManager));
+$app = new Application();
+$app->registerEncryptionModule();
+$app->registerHooks();
+$app->registerSettings();
diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php
new file mode 100644
index 00000000000..0d1bd0d6bed
--- /dev/null
+++ b/apps/encryption/appinfo/application.php
@@ -0,0 +1,190 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 3/11/15, 11:03 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+namespace OCA\Encryption\AppInfo;
+
+
+use OC\Files\Filesystem;
+use OC\Files\View;
+use OCA\Encryption\Crypto\Crypt;
+use OCA\Encryption\HookManager;
+use OCA\Encryption\Hooks\UserHooks;
+use OCA\Encryption\KeyManager;
+use OCA\Encryption\Recovery;
+use OCA\Encryption\Users\Setup;
+use OCA\Encryption\Util;
+use OCP\App;
+use OCP\AppFramework\IAppContainer;
+use OCP\Encryption\IManager;
+use OCP\IConfig;
+
+
+class Application extends \OCP\AppFramework\App {
+ /**
+ * @var IManager
+ */
+ private $encryptionManager;
+ /**
+ * @var IConfig
+ */
+ private $config;
+
+ /**
+ * @param $appName
+ * @param array $urlParams
+ */
+ public function __construct($urlParams = array()) {
+ parent::__construct('encryption', $urlParams);
+ $this->encryptionManager = \OC::$server->getEncryptionManager();
+ $this->config = \OC::$server->getConfig();
+ $this->registerServices();
+ }
+
+ /**
+ *
+ */
+ public function registerHooks() {
+ if (!$this->config->getSystemValue('maintenance', false)) {
+
+ $container = $this->getContainer();
+ $server = $container->getServer();
+ // Register our hooks and fire them.
+ $hookManager = new HookManager();
+
+ $hookManager->registerHook([
+ new UserHooks($container->query('KeyManager'),
+ $server->getLogger(),
+ $container->query('UserSetup'),
+ $server->getUserSession(),
+ $container->query('Util'),
+ new \OCA\Encryption\Session($server->getSession()),
+ $container->query('Crypt'),
+ $container->query('Recovery'))
+ ]);
+
+ $hookManager->fireHooks();
+
+ } else {
+ // Logout user if we are in maintenance to force re-login
+ $this->getContainer()->getServer()->getUserSession()->logout();
+ }
+ }
+
+ /**
+ *
+ */
+ public function registerEncryptionModule() {
+ $container = $this->getContainer();
+ $container->registerService('EncryptionModule', function (IAppContainer $c) {
+ return new \OCA\Encryption\Crypto\Encryption(
+ $c->query('Crypt'),
+ $c->query('KeyManager'),
+ $c->query('Util'));
+ });
+ $module = $container->query('EncryptionModule');
+ $this->encryptionManager->registerEncryptionModule($module);
+ }
+
+ /**
+ *
+ */
+ public function registerServices() {
+ $container = $this->getContainer();
+
+ $container->registerService('Crypt',
+ function (IAppContainer $c) {
+ $server = $c->getServer();
+ return new Crypt($server->getLogger(),
+ $server->getUserSession(),
+ $server->getConfig());
+ });
+
+ $container->registerService('KeyManager',
+ function (IAppContainer $c) {
+ $server = $c->getServer();
+
+ return new KeyManager($server->getEncryptionKeyStorage(\OCA\Encryption\Crypto\Encryption::ID),
+ $c->query('Crypt'),
+ $server->getConfig(),
+ $server->getUserSession(),
+ new \OCA\Encryption\Session($server->getSession()),
+ $server->getLogger(),
+ $c->query('Util')
+ );
+ });
+
+
+ $container->registerService('Recovery',
+ function (IAppContainer $c) {
+ $server = $c->getServer();
+
+ return new Recovery(
+ $server->getUserSession(),
+ $c->query('Crypt'),
+ $server->getSecureRandom(),
+ $c->query('KeyManager'),
+ $server->getConfig(),
+ $server->getEncryptionKeyStorage(\OCA\Encryption\Crypto\Encryption::ID),
+ $server->getEncryptionFilesHelper(),
+ new \OC\Files\View());
+ });
+
+ $container->registerService('RecoveryController', function (IAppContainer $c) {
+ $server = $c->getServer();
+ return new \OCA\Encryption\Controller\RecoveryController(
+ $c->getAppName(),
+ $server->getRequest(),
+ $server->getConfig(),
+ $server->getL10N($c->getAppName()),
+ $c->query('Recovery'));
+ });
+
+ $container->registerService('UserSetup',
+ function (IAppContainer $c) {
+ $server = $c->getServer();
+ return new Setup($server->getLogger(),
+ $server->getUserSession(),
+ $c->query('Crypt'),
+ $c->query('KeyManager'));
+ });
+
+ $container->registerService('Util',
+ function (IAppContainer $c) {
+ $server = $c->getServer();
+
+ return new Util(
+ new View(),
+ $c->query('Crypt'),
+ $server->getLogger(),
+ $server->getUserSession(),
+ $server->getConfig());
+ });
+
+ }
+
+ /**
+ *
+ */
+ public function registerSettings() {
+ // Register settings scripts
+ App::registerAdmin('encryption', 'settings/settings-admin');
+ App::registerPersonal('encryption', 'settings/settings-personal');
+ }
+}
diff --git a/apps/encryption/appinfo/info.xml b/apps/encryption/appinfo/info.xml
new file mode 100644
index 00000000000..e4a7d790e9c
--- /dev/null
+++ b/apps/encryption/appinfo/info.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<info>
+ <id>encryption</id>
+ <description>
+ This application encrypts all files accessed by ownCloud at rest,
+ wherever they are stored. As an example, with this application
+ enabled, external cloud based Amazon S3 storage will be encrypted,
+ protecting this data on storage outside of the control of the Admin.
+ When this application is enabled for the first time, all files are
+ encrypted as users log in and are prompted for their password. The
+ recommended recovery key option enables recovery of files in case
+ the key is lost.
+ Note that this app encrypts all files that are touched by ownCloud,
+ so external storage providers and applications such as SharePoint
+ will see new files encrypted when they are accessed. Encryption is
+ based on AES 128 or 256 bit keys. More information is available in
+ the Encryption documentation
+ </description>
+<name>Encryption</name>
+ <license>AGPL</license>
+ <author>Bjoern Schiessle, Clark Tomlinson</author>
+ <requiremin>8</requiremin>
+ <shipped>true</shipped>
+ <documentation>
+ <user>user-encryption</user>
+ <admin>admin-encryption</admin>
+ </documentation>
+ <rememberlogin>false</rememberlogin>
+ <types>
+ <filesystem/>
+ </types>
+ <dependencies>
+ <lib>openssl</lib>
+ </dependencies>
+
+</info>
diff --git a/apps/encryption/appinfo/routes.php b/apps/encryption/appinfo/routes.php
new file mode 100644
index 00000000000..d4867f5fdaa
--- /dev/null
+++ b/apps/encryption/appinfo/routes.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/19/15, 11:22 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+namespace OCA\Encryption\AppInfo;
+
+(new Application())->registerRoutes($this, array('routes' => array(
+
+ [
+ 'name' => 'Recovery#adminRecovery',
+ 'url' => '/ajax/adminRecovery',
+ 'verb' => 'POST'
+ ],
+ [
+ 'name' => 'Recovery#changeRecoveryPassword',
+ 'url' => '/ajax/changeRecoveryPassword',
+ 'verb' => 'POST'
+ ],
+ [
+ 'name' => 'Recovery#userSetRecovery',
+ 'url' => '/ajax/userSetRecovery',
+ 'verb' => 'POST'
+ ]
+
+
+)));
diff --git a/apps/encryption/controller/recoverycontroller.php b/apps/encryption/controller/recoverycontroller.php
new file mode 100644
index 00000000000..da55d81f63a
--- /dev/null
+++ b/apps/encryption/controller/recoverycontroller.php
@@ -0,0 +1,160 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/19/15, 11:25 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Encryption\Controller;
+
+
+use OCA\Encryption\Recovery;
+use OCP\AppFramework\Controller;
+use OCP\IConfig;
+use OCP\IL10N;
+use OCP\IRequest;
+use OCP\JSON;
+use OCP\AppFramework\Http\DataResponse;
+
+class RecoveryController extends Controller {
+ /**
+ * @var IConfig
+ */
+ private $config;
+ /**
+ * @var IL10N
+ */
+ private $l;
+ /**
+ * @var Recovery
+ */
+ private $recovery;
+
+ /**
+ * @param string $AppName
+ * @param IRequest $request
+ * @param IConfig $config
+ * @param IL10N $l10n
+ * @param Recovery $recovery
+ */
+ public function __construct($AppName, IRequest $request, IConfig $config, IL10N $l10n, Recovery $recovery) {
+ parent::__construct($AppName, $request);
+ $this->config = $config;
+ $this->l = $l10n;
+ $this->recovery = $recovery;
+ }
+
+ public function adminRecovery($recoveryPassword, $confirmPassword, $adminEnableRecovery) {
+ // Check if both passwords are the same
+ if (empty($recoveryPassword)) {
+ $errorMessage = (string) $this->l->t('Missing recovery key password');
+ return new DataResponse(['data' => ['message' => $errorMessage]], 500);
+ }
+
+ if (empty($confirmPassword)) {
+ $errorMessage = (string) $this->l->t('Please repeat the recovery key password');
+ return new DataResponse(['data' => ['message' => $errorMessage]], 500);
+ }
+
+ if ($recoveryPassword !== $confirmPassword) {
+ $errorMessage = (string) $this->l->t('Repeated recovery key password does not match the provided recovery key password');
+ return new DataResponse(['data' => ['message' => $errorMessage]], 500);
+ }
+
+ if (isset($adminEnableRecovery) && $adminEnableRecovery === '1') {
+ if ($this->recovery->enableAdminRecovery($recoveryPassword)) {
+ return new DataResponse(['status' =>'success', 'data' => array('message' => (string) $this->l->t('Recovery key successfully enabled'))]);
+ }
+ return new DataResponse(['data' => array('message' => (string) $this->l->t('Could not enable recovery key. Please check your recovery key password!'))]);
+ } elseif (isset($adminEnableRecovery) && $adminEnableRecovery === '0') {
+ if ($this->recovery->disableAdminRecovery($recoveryPassword)) {
+ return new DataResponse(['data' => array('message' => (string) $this->l->t('Recovery key successfully disabled'))]);
+ }
+ return new DataResponse(['data' => array('message' => (string) $this->l->t('Could not disable recovery key. Please check your recovery key password!'))]);
+ }
+ }
+
+ public function changeRecoveryPassword($newPassword, $oldPassword, $confirmPassword) {
+ //check if both passwords are the same
+ if (empty($oldPassword)) {
+ $errorMessage = (string) $this->l->t('Please provide the old recovery password');
+ return new DataResponse(array('data' => array('message' => $errorMessage)));
+ }
+
+ if (empty($newPassword)) {
+ $errorMessage = (string) $this->l->t('Please provide a new recovery password');
+ return new DataResponse (array('data' => array('message' => $errorMessage)));
+ }
+
+ if (empty($confirmPassword)) {
+ $errorMessage = (string) $this->l->t('Please repeat the new recovery password');
+ return new DataResponse(array('data' => array('message' => $errorMessage)));
+ }
+
+ if ($newPassword !== $confirmPassword) {
+ $errorMessage = (string) $this->l->t('Repeated recovery key password does not match the provided recovery key password');
+ return new DataResponse(array('data' => array('message' => $errorMessage)));
+ }
+
+ $result = $this->recovery->changeRecoveryKeyPassword($newPassword, $oldPassword);
+
+ if ($result) {
+ return new DataResponse(
+ array(
+ 'status' => 'success' ,
+ 'data' => array(
+ 'message' => (string) $this->l->t('Password successfully changed.'))
+ )
+ );
+ } else {
+ return new DataResponse(
+ array(
+ 'data' => array
+ ('message' => (string) $this->l->t('Could not change the password. Maybe the old password was not correct.'))
+ )
+ );
+ }
+ }
+
+ /**
+ * @NoAdminRequired
+ */
+ public function userSetRecovery($userEnableRecovery) {
+ if ($userEnableRecovery === '0' || $userEnableRecovery === '1') {
+
+ $result = $this->recovery->setRecoveryForUser($userEnableRecovery);
+
+ if ($result) {
+ return new DataResponse(
+ array(
+ 'status' => 'success',
+ 'data' => array(
+ 'message' => (string) $this->l->t('Recovery Key enabled'))
+ )
+ );
+ } else {
+ return new DataResponse(
+ array(
+ 'data' => array
+ ('message' => (string) $this->l->t('Could not enable the recovery key, please try again or contact your administrator'))
+ )
+ );
+ }
+ }
+ }
+
+}
diff --git a/apps/files_encryption/css/settings-personal.css b/apps/encryption/css/settings-personal.css
index 8eb5bedcb06..8eb5bedcb06 100644
--- a/apps/files_encryption/css/settings-personal.css
+++ b/apps/encryption/css/settings-personal.css
diff --git a/apps/files_encryption/appinfo/update.php b/apps/encryption/hooks/contracts/ihook.php
index e8ccee063ef..2cc01fd7c9b 100644
--- a/apps/files_encryption/appinfo/update.php
+++ b/apps/encryption/hooks/contracts/ihook.php
@@ -1,9 +1,7 @@
<?php
/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/19/15, 10:03 AM
* @copyright Copyright (c) 2015, ownCloud, Inc.
* @license AGPL-3.0
*
@@ -20,12 +18,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-use OCA\Files_Encryption\Migration;
-$installedVersion=OCP\Config::getAppValue('files_encryption', 'installed_version');
+namespace OCA\Encryption\Hooks\Contracts;
+
-// Migration OC7 -> OC8
-if (version_compare($installedVersion, '0.7', '<')) {
- $m = new Migration();
- $m->reorganizeFolderStructure();
+interface IHook {
+ /**
+ * Connects Hooks
+ *
+ * @return null
+ */
+ public function addHooks();
}
diff --git a/apps/encryption/hooks/userhooks.php b/apps/encryption/hooks/userhooks.php
new file mode 100644
index 00000000000..1ec0950d941
--- /dev/null
+++ b/apps/encryption/hooks/userhooks.php
@@ -0,0 +1,286 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/19/15, 10:02 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Encryption\Hooks;
+
+
+use OCP\Util as OCUtil;
+use OCA\Encryption\Hooks\Contracts\IHook;
+use OCA\Encryption\KeyManager;
+use OCA\Encryption\Crypto\Crypt;
+use OCA\Encryption\Users\Setup;
+use OCP\App;
+use OCP\ILogger;
+use OCP\IUserSession;
+use OCA\Encryption\Util;
+use OCA\Encryption\Session;
+use OCA\Encryption\Recovery;
+
+class UserHooks implements IHook {
+ /**
+ * @var KeyManager
+ */
+ private $keyManager;
+ /**
+ * @var ILogger
+ */
+ private $logger;
+ /**
+ * @var Setup
+ */
+ private $userSetup;
+ /**
+ * @var IUserSession
+ */
+ private $user;
+ /**
+ * @var Util
+ */
+ private $util;
+ /**
+ * @var Session
+ */
+ private $session;
+ /**
+ * @var Recovery
+ */
+ private $recovery;
+ /**
+ * @var Crypt
+ */
+ private $crypt;
+
+ /**
+ * UserHooks constructor.
+ *
+ * @param KeyManager $keyManager
+ * @param ILogger $logger
+ * @param Setup $userSetup
+ * @param IUserSession $user
+ * @param Util $util
+ * @param Session $session
+ * @param Crypt $crypt
+ * @param Recovery $recovery
+ */
+ public function __construct(KeyManager $keyManager,
+ ILogger $logger,
+ Setup $userSetup,
+ IUserSession $user,
+ Util $util,
+ Session $session,
+ Crypt $crypt,
+ Recovery $recovery) {
+
+ $this->keyManager = $keyManager;
+ $this->logger = $logger;
+ $this->userSetup = $userSetup;
+ $this->user = $user;
+ $this->util = $util;
+ $this->session = $session;
+ $this->recovery = $recovery;
+ $this->crypt = $crypt;
+ }
+
+ /**
+ * Connects Hooks
+ *
+ * @return null
+ */
+ public function addHooks() {
+ OCUtil::connectHook('OC_User', 'post_login', $this, 'login');
+ OCUtil::connectHook('OC_User', 'logout', $this, 'logout');
+ OCUtil::connectHook('OC_User',
+ 'post_setPassword',
+ $this,
+ 'setPassphrase');
+ OCUtil::connectHook('OC_User',
+ 'pre_setPassword',
+ $this,
+ 'preSetPassphrase');
+ OCUtil::connectHook('OC_User',
+ 'post_createUser',
+ $this,
+ 'postCreateUser');
+ OCUtil::connectHook('OC_User',
+ 'post_deleteUser',
+ $this,
+ 'postDeleteUser');
+ }
+
+
+ /**
+ * Startup encryption backend upon user login
+ *
+ * @note This method should never be called for users using client side encryption
+ * @param array $params
+ * @return bool
+ */
+ public function login($params) {
+
+ if (!App::isEnabled('encryption')) {
+ return true;
+ }
+
+ // ensure filesystem is loaded
+ // Todo: update?
+ if (!\OC\Files\Filesystem::$loaded) {
+ \OC_Util::setupFS($params['uid']);
+ }
+
+ // setup user, if user not ready force relogin
+ if (!$this->userSetup->setupUser($params['uid'], $params['password'])) {
+ return false;
+ }
+
+ $this->keyManager->init($params['uid'], $params['password']);
+ }
+
+ /**
+ * remove keys from session during logout
+ */
+ public function logout() {
+ $this->session->clear();
+ }
+
+ /**
+ * setup encryption backend upon user created
+ *
+ * @note This method should never be called for users using client side encryption
+ * @param array $params
+ */
+ public function postCreateUser($params) {
+
+ if (App::isEnabled('encryption')) {
+ $this->userSetup->setupUser($params['uid'], $params['password']);
+ }
+ }
+
+ /**
+ * cleanup encryption backend upon user deleted
+ *
+ * @param array $params : uid, password
+ * @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']);
+ }
+ }
+
+ /**
+ * If the password can't be changed within ownCloud, than update the key password in advance.
+ *
+ * @param array $params : uid, password
+ * @return bool
+ */
+ public function preSetPassphrase($params) {
+ if (App::isEnabled('encryption')) {
+
+ if (!$this->user->getUser()->canChangePassword()) {
+ $this->setPassphrase($params);
+ }
+ }
+ }
+
+ /**
+ * Change a user's encryption passphrase
+ *
+ * @param array $params keys: uid, password
+ * @return bool
+ */
+ public function setPassphrase($params) {
+
+ // Get existing decrypted private key
+ $privateKey = $this->session->getPrivateKey();
+
+ if ($params['uid'] === $this->user->getUser()->getUID() && $privateKey) {
+
+ // Encrypt private key with new user pwd as passphrase
+ $encryptedPrivateKey = $this->crypt->symmetricEncryptFileContent($privateKey,
+ $params['password']);
+
+ // Save private key
+ if ($encryptedPrivateKey) {
+ $this->keyManager->setPrivateKey($this->user->getUser()->getUID(),
+ $encryptedPrivateKey);
+ } else {
+ $this->logger->error('Encryption could not update users encryption password');
+ }
+
+ // NOTE: Session does not need to be updated as the
+ // private key has not changed, only the passphrase
+ // used to decrypt it has changed
+ } else { // admin changed the password for a different user, create new keys and reencrypt file keys
+ $user = $params['uid'];
+ $recoveryPassword = isset($params['recoveryPassword']) ? $params['recoveryPassword'] : null;
+
+ // we generate new keys if...
+ // ...we have a recovery password and the user enabled the recovery key
+ // ...encryption was activated for the first time (no keys exists)
+ // ...the user doesn't have any files
+ if (
+ ($this->recovery->isRecoveryEnabledForUser($user) && $recoveryPassword)
+ || !$this->keyManager->userHasKeys($user)
+ || !$this->util->userHasFiles($user)
+ ) {
+
+ // backup old keys
+ //$this->backupAllKeys('recovery');
+
+ $newUserPassword = $params['password'];
+
+ $keyPair = $this->crypt->createKeyPair();
+
+ // Save public key
+ $this->keyManager->setPublicKey($user, $keyPair['publicKey']);
+
+ // Encrypt private key with new password
+ $encryptedKey = $this->crypt->symmetricEncryptFileContent($keyPair['privateKey'],
+ $newUserPassword);
+
+ if ($encryptedKey) {
+ $this->keyManager->setPrivateKey($user, $encryptedKey);
+
+ if ($recoveryPassword) { // if recovery key is set we can re-encrypt the key files
+ $this->recovery->recoverUsersFiles($recoveryPassword, $user);
+ }
+ } else {
+ $this->logger->error('Encryption Could not update users encryption password');
+ }
+ }
+ }
+ }
+
+
+
+ /**
+ * after password reset we create a new key pair for the user
+ *
+ * @param array $params
+ */
+ public function postPasswordReset($params) {
+ $password = $params['password'];
+
+ $this->keyManager->replaceUserKeys($params['uid']);
+ $this->userSetup->setupServerSide($params['uid'], $password);
+ }
+}
diff --git a/apps/files_encryption/img/app.svg b/apps/encryption/img/app.svg
index 1157c71c66e..1157c71c66e 100644
--- a/apps/files_encryption/img/app.svg
+++ b/apps/encryption/img/app.svg
diff --git a/apps/files_encryption/js/detect-migration.js b/apps/encryption/js/detect-migration.js
index f5627edf4e4..f5627edf4e4 100644
--- a/apps/files_encryption/js/detect-migration.js
+++ b/apps/encryption/js/detect-migration.js
diff --git a/apps/files_encryption/js/encryption.js b/apps/encryption/js/encryption.js
index d2d1c3a1fc5..d2d1c3a1fc5 100644
--- a/apps/files_encryption/js/encryption.js
+++ b/apps/encryption/js/encryption.js
diff --git a/apps/files_encryption/js/settings-admin.js b/apps/encryption/js/settings-admin.js
index 2242c1f7124..36765adf3e4 100644
--- a/apps/files_encryption/js/settings-admin.js
+++ b/apps/encryption/js/settings-admin.js
@@ -17,7 +17,7 @@ $(document).ready(function(){
var confirmPassword = $( '#repeatEncryptionRecoveryPassword' ).val();
OC.msg.startSaving('#encryptionSetRecoveryKey .msg');
$.post(
- OC.filePath( 'files_encryption', 'ajax', 'adminrecovery.php' )
+ OC.generateUrl('/apps/encryption/ajax/adminRecovery')
, { adminEnableRecovery: recoveryStatus, recoveryPassword: recoveryPassword, confirmPassword: confirmPassword }
, function( result ) {
OC.msg.finishedSaving('#encryptionSetRecoveryKey .msg', result);
@@ -44,7 +44,7 @@ $(document).ready(function(){
var confirmNewPassword = $('#repeatedNewEncryptionRecoveryPassword').val();
OC.msg.startSaving('#encryptionChangeRecoveryKey .msg');
$.post(
- OC.filePath( 'files_encryption', 'ajax', 'changeRecoveryPassword.php' )
+ OC.generateUrl('/apps/encryption/ajax/changeRecoveryPassword')
, { oldPassword: oldRecoveryPassword, newPassword: newRecoveryPassword, confirmPassword: confirmNewPassword }
, function( data ) {
OC.msg.finishedSaving('#encryptionChangeRecoveryKey .msg', data);
diff --git a/apps/files_encryption/js/settings-personal.js b/apps/encryption/js/settings-personal.js
index b798ba7e4e1..dcfbba4ecde 100644
--- a/apps/files_encryption/js/settings-personal.js
+++ b/apps/encryption/js/settings-personal.js
@@ -9,7 +9,7 @@ function updatePrivateKeyPasswd() {
var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val();
OC.msg.startSaving('#encryption .msg');
$.post(
- OC.filePath( 'files_encryption', 'ajax', 'updatePrivateKeyPassword.php' )
+ OC.generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword')
, { oldPassword: oldPrivateKeyPassword, newPassword: newPrivateKeyPassword }
, function( data ) {
if (data.status === "error") {
@@ -29,7 +29,7 @@ $(document).ready(function(){
var recoveryStatus = $( this ).val();
OC.msg.startAction('#userEnableRecovery .msg', 'Updating recovery keys. This can take some time...');
$.post(
- OC.filePath( 'files_encryption', 'ajax', 'userrecovery.php' )
+ OC.generateUrl('/apps/encryption/ajax/userSetRecovery')
, { userEnableRecovery: recoveryStatus }
, function( data ) {
OC.msg.finishedAction('#userEnableRecovery .msg', data);
@@ -40,33 +40,6 @@ $(document).ready(function(){
}
);
- $("#encryptAll").click(
- function(){
-
- // Hide feedback messages in case they're already visible
- $('#encryptAllSuccess').hide();
- $('#encryptAllError').hide();
-
- var userPassword = $( '#userPassword' ).val();
- var encryptAll = $( '#encryptAll' ).val();
-
- $.post(
- OC.filePath( 'files_encryption', 'ajax', 'encryptall.php' )
- , { encryptAll: encryptAll, userPassword: userPassword }
- , function( data ) {
- if ( data.status == "success" ) {
- $('#encryptAllSuccess').show();
- } else {
- $('#encryptAllError').show();
- }
- }
- );
- // Ensure page is not reloaded on form submit
- return false;
- }
-
- );
-
// update private key password
$('input:password[name="changePrivateKeyPassword"]').keyup(function(event) {
diff --git a/apps/files_encryption/l10n/.gitkeep b/apps/encryption/l10n/.gitkeep
index e69de29bb2d..e69de29bb2d 100644
--- a/apps/files_encryption/l10n/.gitkeep
+++ b/apps/encryption/l10n/.gitkeep
diff --git a/apps/encryption/lib/crypto/crypt.php b/apps/encryption/lib/crypto/crypt.php
new file mode 100644
index 00000000000..c0b737a3daa
--- /dev/null
+++ b/apps/encryption/lib/crypto/crypt.php
@@ -0,0 +1,457 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/19/15, 1:42 PM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Encryption\Crypto;
+
+
+use OC\Encryption\Exceptions\DecryptionFailedException;
+use OC\Encryption\Exceptions\EncryptionFailedException;
+use OCA\Encryption\Exceptions\MultiKeyDecryptException;
+use OCA\Encryption\Exceptions\MultiKeyEncryptException;
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+use OCP\IConfig;
+use OCP\ILogger;
+use OCP\IUser;
+use OCP\IUserSession;
+
+class Crypt {
+
+ const DEFAULT_CIPHER = 'AES-256-CFB';
+
+ const HEADER_START = 'HBEGIN';
+ const HEADER_END = 'HEND';
+ /**
+ * @var ILogger
+ */
+ private $logger;
+ /**
+ * @var IUser
+ */
+ private $user;
+ /**
+ * @var IConfig
+ */
+ private $config;
+
+ /**
+ * @param ILogger $logger
+ * @param IUserSession $userSession
+ * @param IConfig $config
+ */
+ public function __construct(ILogger $logger, IUserSession $userSession, IConfig $config) {
+ $this->logger = $logger;
+ $this->user = $userSession && $userSession->isLoggedIn() ? $userSession->getUser() : false;
+ $this->config = $config;
+ }
+
+ /**
+ * @return array|bool
+ */
+ public function createKeyPair() {
+
+ $log = $this->logger;
+ $res = $this->getOpenSSLPKey();
+
+ if (!$res) {
+ $log->error("Encryption Library could'nt generate users key-pair for {$this->user->getUID()}",
+ ['app' => 'encryption']);
+
+ if (openssl_error_string()) {
+ $log->error('Encryption library openssl_pkey_new() fails: ' . openssl_error_string(),
+ ['app' => 'encryption']);
+ }
+ } elseif (openssl_pkey_export($res,
+ $privateKey,
+ null,
+ $this->getOpenSSLConfig())) {
+ $keyDetails = openssl_pkey_get_details($res);
+ $publicKey = $keyDetails['key'];
+
+ return [
+ 'publicKey' => $publicKey,
+ 'privateKey' => $privateKey
+ ];
+ }
+ $log->error('Encryption library couldn\'t export users private key, please check your servers openSSL configuration.' . $this->user->getUID(),
+ ['app' => 'encryption']);
+ if (openssl_error_string()) {
+ $log->error('Encryption Library:' . openssl_error_string(),
+ ['app' => 'encryption']);
+ }
+
+ return false;
+ }
+
+ /**
+ * @return resource
+ */
+ public function getOpenSSLPKey() {
+ $config = $this->getOpenSSLConfig();
+ return openssl_pkey_new($config);
+ }
+
+ /**
+ * @return array
+ */
+ private function getOpenSSLConfig() {
+ $config = ['private_key_bits' => 4096];
+ $config = array_merge(\OC::$server->getConfig()->getSystemValue('openssl',
+ []),
+ $config);
+ return $config;
+ }
+
+ /**
+ * @param string $plainContent
+ * @param string $passPhrase
+ * @return bool|string
+ * @throws GenericEncryptionException
+ */
+ public function symmetricEncryptFileContent($plainContent, $passPhrase) {
+
+ if (!$plainContent) {
+ $this->logger->error('Encryption Library, symmetrical encryption failed no content given',
+ ['app' => 'encryption']);
+ return false;
+ }
+
+ $iv = $this->generateIv();
+
+ $encryptedContent = $this->encrypt($plainContent,
+ $iv,
+ $passPhrase,
+ $this->getCipher());
+ // combine content to encrypt the IV identifier and actual IV
+ $catFile = $this->concatIV($encryptedContent, $iv);
+ $padded = $this->addPadding($catFile);
+
+ return $padded;
+ }
+
+ /**
+ * @param string $plainContent
+ * @param string $iv
+ * @param string $passPhrase
+ * @param string $cipher
+ * @return string
+ * @throws EncryptionFailedException
+ */
+ private function encrypt($plainContent, $iv, $passPhrase = '', $cipher = self::DEFAULT_CIPHER) {
+ $encryptedContent = openssl_encrypt($plainContent,
+ $cipher,
+ $passPhrase,
+ false,
+ $iv);
+
+ if (!$encryptedContent) {
+ $error = 'Encryption (symmetric) of content failed';
+ $this->logger->error($error . openssl_error_string(),
+ ['app' => 'encryption']);
+ throw new EncryptionFailedException($error);
+ }
+
+ return $encryptedContent;
+ }
+
+ /**
+ * @return mixed|string
+ */
+ public function getCipher() {
+ $cipher = $this->config->getSystemValue('cipher', self::DEFAULT_CIPHER);
+ if ($cipher !== 'AES-256-CFB' && $cipher !== 'AES-128-CFB') {
+ $this->logger->warning('Wrong cipher defined in config.php only AES-128-CFB and AES-256-CFB are supported. Fall back' . self::DEFAULT_CIPHER,
+ ['app' => 'encryption']);
+ $cipher = self::DEFAULT_CIPHER;
+ }
+
+ return $cipher;
+ }
+
+ /**
+ * @param string $encryptedContent
+ * @param string $iv
+ * @return string
+ */
+ private function concatIV($encryptedContent, $iv) {
+ return $encryptedContent . '00iv00' . $iv;
+ }
+
+ /**
+ * @param $data
+ * @return string
+ */
+ private function addPadding($data) {
+ return $data . 'xx';
+ }
+
+ /**
+ * @param string $recoveryKey
+ * @param string $password
+ * @return bool|string
+ */
+ public function decryptPrivateKey($recoveryKey, $password) {
+
+ $header = $this->parseHeader($recoveryKey);
+ $cipher = $this->getCipher();
+
+ // If we found a header we need to remove it from the key we want to decrypt
+ if (!empty($header)) {
+ $recoveryKey = substr($recoveryKey,
+ strpos($recoveryKey,
+ self::HEADER_END) + strlen(self::HEADER_START));
+ }
+
+ $plainKey = $this->symmetricDecryptFileContent($recoveryKey,
+ $password,
+ $cipher);
+
+ // Check if this is a valid private key
+ $res = openssl_get_privatekey($plainKey);
+ if (is_resource($res)) {
+ $sslInfo = openssl_pkey_get_details($res);
+ if (!isset($sslInfo['key'])) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+
+ return $plainKey;
+ }
+
+ /**
+ * @param $keyFileContents
+ * @param string $passPhrase
+ * @param string $cipher
+ * @return string
+ * @throws DecryptionFailedException
+ */
+ public function symmetricDecryptFileContent($keyFileContents, $passPhrase = '', $cipher = self::DEFAULT_CIPHER) {
+ // Remove Padding
+ $noPadding = $this->removePadding($keyFileContents);
+
+ $catFile = $this->splitIv($noPadding);
+
+ return $this->decrypt($catFile['encrypted'],
+ $catFile['iv'],
+ $passPhrase,
+ $cipher);
+ }
+
+ /**
+ * @param $padded
+ * @return bool|string
+ */
+ private function removePadding($padded) {
+ if (substr($padded, -2) === 'xx') {
+ return substr($padded, 0, -2);
+ }
+ return false;
+ }
+
+ /**
+ * @param $catFile
+ * @return array
+ */
+ private function splitIv($catFile) {
+ // Fetch encryption metadata from end of file
+ $meta = substr($catFile, -22);
+
+ // Fetch IV from end of file
+ $iv = substr($meta, -16);
+
+ // Remove IV and IV Identifier text to expose encrypted content
+
+ $encrypted = substr($catFile, 0, -22);
+
+ return [
+ 'encrypted' => $encrypted,
+ 'iv' => $iv
+ ];
+ }
+
+ /**
+ * @param $encryptedContent
+ * @param $iv
+ * @param string $passPhrase
+ * @param string $cipher
+ * @return string
+ * @throws DecryptionFailedException
+ */
+ private function decrypt($encryptedContent, $iv, $passPhrase = '', $cipher = self::DEFAULT_CIPHER) {
+ $plainContent = openssl_decrypt($encryptedContent,
+ $cipher,
+ $passPhrase,
+ false,
+ $iv);
+
+ if ($plainContent) {
+ return $plainContent;
+ } else {
+ throw new DecryptionFailedException('Encryption library: Decryption (symmetric) of content failed: ' . openssl_error_string());
+ }
+ }
+
+ /**
+ * @param $data
+ * @return array
+ */
+ private function parseHeader($data) {
+ $result = [];
+
+ if (substr($data, 0, strlen(self::HEADER_START)) === self::HEADER_START) {
+ $endAt = strpos($data, self::HEADER_END);
+ $header = substr($data, 0, $endAt + strlen(self::HEADER_END));
+
+ // +1 not to start with an ':' which would result in empty element at the beginning
+ $exploded = explode(':',
+ substr($header, strlen(self::HEADER_START) + 1));
+
+ $element = array_shift($exploded);
+
+ while ($element != self::HEADER_END) {
+ $result[$element] = array_shift($exploded);
+ $element = array_shift($exploded);
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * @return string
+ * @throws GenericEncryptionException
+ */
+ private function generateIv() {
+ $random = openssl_random_pseudo_bytes(12, $strong);
+ if ($random) {
+ if (!$strong) {
+ // If OpenSSL indicates randomness is insecure log error
+ $this->logger->error('Encryption Library: Insecure symmetric key was generated using openssl_random_psudo_bytes()',
+ ['app' => 'encryption']);
+ }
+
+ /*
+ * We encode the iv purely for string manipulation
+ * purposes -it gets decoded before use
+ */
+ return base64_encode($random);
+ }
+ // If we ever get here we've failed anyway no need for an else
+ throw new GenericEncryptionException('Generating IV Failed');
+ }
+
+ /**
+ * Generate a pseudo random 256-bit ASCII key, used as file key
+ * @return string
+ */
+ public static function generateFileKey() {
+ // Generate key
+ $key = base64_encode(openssl_random_pseudo_bytes(32, $strong));
+ if (!$key || !$strong) {
+ // If OpenSSL indicates randomness is insecure, log error
+ throw new \Exception('Encryption library, Insecure symmetric key was generated using openssl_random_pseudo_bytes()');
+ }
+
+ return $key;
+ }
+
+ /**
+ * Check if a file's contents contains an IV and is symmetrically encrypted
+ *
+ * @param $content
+ * @return bool
+ */
+ public function isCatFileContent($content) {
+ if (!$content) {
+ return false;
+ }
+
+ $noPadding = $this->removePadding($content);
+
+ // Fetch encryption metadata from end of file
+ $meta = substr($noPadding, -22);
+
+ // Fetch identifier from start of metadata
+ $identifier = substr($meta, 0, 6);
+
+ if ($identifier === '00iv00') {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @param $encKeyFile
+ * @param $shareKey
+ * @param $privateKey
+ * @return mixed
+ * @throws MultiKeyDecryptException
+ */
+ public function multiKeyDecrypt($encKeyFile, $shareKey, $privateKey) {
+ if (!$encKeyFile) {
+ throw new MultiKeyDecryptException('Cannot multikey decrypt empty plain content');
+ }
+
+ if (openssl_open($encKeyFile, $plainContent, $shareKey, $privateKey)) {
+ return $plainContent;
+ } else {
+ throw new MultiKeyDecryptException('multikeydecrypt with share key failed:' . openssl_error_string());
+ }
+ }
+
+ /**
+ * @param $plainContent
+ * @param array $keyFiles
+ * @return array
+ * @throws MultiKeyEncryptException
+ */
+ public function multiKeyEncrypt($plainContent, array $keyFiles) {
+ // openssl_seal returns false without errors if plaincontent is empty
+ // so trigger our own error
+ if (empty($plainContent)) {
+ throw new MultiKeyEncryptException('Cannot multikeyencrypt empty plain content');
+ }
+
+ // Set empty vars to be set by openssl by reference
+ $sealed = '';
+ $shareKeys = [];
+ $mappedShareKeys = [];
+
+ if (openssl_seal($plainContent, $sealed, $shareKeys, $keyFiles)) {
+ $i = 0;
+
+ // Ensure each shareKey is labelled with its corresponding key id
+ foreach ($keyFiles as $userId => $publicKey) {
+ $mappedShareKeys[$userId] = $shareKeys[$i];
+ $i++;
+ }
+
+ return [
+ 'keys' => $mappedShareKeys,
+ 'data' => $sealed
+ ];
+ } else {
+ throw new MultiKeyEncryptException('multikeyencryption failed ' . openssl_error_string());
+ }
+ }
+}
+
diff --git a/apps/encryption/lib/crypto/encryption.php b/apps/encryption/lib/crypto/encryption.php
new file mode 100644
index 00000000000..7c633b7411f
--- /dev/null
+++ b/apps/encryption/lib/crypto/encryption.php
@@ -0,0 +1,328 @@
+<?php
+/**
+ * @author Clark Tomlinson <fallen013@gmail.com>
+ * @since 3/6/15, 2:28 PM
+ * @link http:/www.clarkt.com
+ * @copyright Clark Tomlinson © 2015
+ *
+ */
+
+namespace OCA\Encryption\Crypto;
+
+
+use OCA\Encryption\Util;
+use OCP\Encryption\IEncryptionModule;
+use OCA\Encryption\KeyManager;
+
+class Encryption implements IEncryptionModule {
+
+ const ID = 'OC_DEFAULT_MODULE';
+
+ /**
+ * @var Crypt
+ */
+ private $crypt;
+
+ /** @var string */
+ private $cipher;
+
+ /** @var string */
+ private $path;
+
+ /** @var string */
+ private $user;
+
+ /** @var string */
+ private $fileKey;
+
+ /** @var string */
+ private $writeCache;
+
+ /** @var KeyManager */
+ private $keyManager;
+
+ /** @var array */
+ private $accessList;
+
+ /** @var boolean */
+ private $isWriteOperation;
+
+ /** @var Util */
+ private $util;
+
+ /**
+ *
+ * @param \OCA\Encryption\Crypto\Crypt $crypt
+ * @param KeyManager $keyManager
+ * @param Util $util
+ */
+ public function __construct(Crypt $crypt, KeyManager $keyManager, Util $util) {
+ $this->crypt = $crypt;
+ $this->keyManager = $keyManager;
+ $this->util = $util;
+ }
+
+ /**
+ * @return string defining the technical unique id
+ */
+ public function getId() {
+ return self::ID;
+ }
+
+ /**
+ * In comparison to getKey() this function returns a human readable (maybe translated) name
+ *
+ * @return string
+ */
+ public function getDisplayName() {
+ return 'ownCloud Default Encryption';
+ }
+
+ /**
+ * start receiving chunks from a file. This is the place where you can
+ * perform some initial step before starting encrypting/decrypting the
+ * chunks
+ *
+ * @param string $path to the file
+ * @param string $user who read/write the file
+ * @param array $header contains the header data read from the file
+ * @param array $accessList who has access to the file contains the key 'users' and 'public'
+ *
+ * @return array $header contain data as key-value pairs which should be
+ * written to the header, in case of a write operation
+ * or if no additional data is needed return a empty array
+ */
+ public function begin($path, $user, $header, $accessList) {
+
+ if (isset($header['cipher'])) {
+ $this->cipher = $header['cipher'];
+ } else {
+ $this->cipher = $this->crypt->getCipher();
+ }
+
+ $this->path = $this->getPathToRealFile($path);
+ $this->accessList = $accessList;
+ $this->user = $user;
+ $this->writeCache = '';
+ $this->isWriteOperation = false;
+
+ $this->fileKey = $this->keyManager->getFileKey($this->path, $this->user);
+
+ return array('cipher' => $this->cipher);
+ }
+
+ /**
+ * last chunk received. This is the place where you can perform some final
+ * operation and return some remaining data if something is left in your
+ * buffer.
+ *
+ * @param string $path to the file
+ * @return string remained data which should be written to the file in case
+ * of a write operation
+ */
+ public function end($path) {
+ $result = '';
+ if ($this->isWriteOperation) {
+ if (!empty($this->writeCache)) {
+ $result = $this->crypt->symmetricEncryptFileContent($this->writeCache, $this->fileKey);
+ $this->writeCache = '';
+ }
+ $publicKeys = array();
+ foreach ($this->accessList['users'] as $uid) {
+ $publicKeys[$uid] = $this->keyManager->getPublicKey($uid);
+ }
+
+ $publicKeys = $this->keyManager->addSystemKeys($this->accessList, $publicKeys);
+
+ $encryptedKeyfiles = $this->crypt->multiKeyEncrypt($this->fileKey, $publicKeys);
+ $this->keyManager->setAllFileKeys($this->path, $encryptedKeyfiles);
+ }
+ return $result;
+ }
+
+ /**
+ * encrypt data
+ *
+ * @param string $data you want to encrypt
+ * @return mixed encrypted data
+ */
+ public function encrypt($data) {
+ $this->isWriteOperation = true;
+ if (empty($this->fileKey)) {
+ $this->fileKey = $this->crypt->generateFileKey();
+ }
+
+ // If extra data is left over from the last round, make sure it
+ // is integrated into the next 6126 / 8192 block
+ if ($this->writeCache) {
+
+ // Concat writeCache to start of $data
+ $data = $this->writeCache . $data;
+
+ // Clear the write cache, ready for reuse - it has been
+ // flushed and its old contents processed
+ $this->writeCache = '';
+
+ }
+
+ $encrypted = '';
+ // While there still remains some data to be processed & written
+ while (strlen($data) > 0) {
+
+ // Remaining length for this iteration, not of the
+ // entire file (may be greater than 8192 bytes)
+ $remainingLength = strlen($data);
+
+ // If data remaining to be written is less than the
+ // size of 1 6126 byte block
+ if ($remainingLength < 6126) {
+
+ // Set writeCache to contents of $data
+ // The writeCache will be carried over to the
+ // next write round, and added to the start of
+ // $data to ensure that written blocks are
+ // always the correct length. If there is still
+ // data in writeCache after the writing round
+ // has finished, then the data will be written
+ // to disk by $this->flush().
+ $this->writeCache = $data;
+
+ // Clear $data ready for next round
+ $data = '';
+
+ } else {
+
+ // Read the chunk from the start of $data
+ $chunk = substr($data, 0, 6126);
+
+ $encrypted .= $this->crypt->symmetricEncryptFileContent($chunk, $this->fileKey);
+
+ // Remove the chunk we just processed from
+ // $data, leaving only unprocessed data in $data
+ // var, for handling on the next round
+ $data = substr($data, 6126);
+
+ }
+
+ }
+
+ return $encrypted;
+ }
+
+ /**
+ * decrypt data
+ *
+ * @param string $data you want to decrypt
+ * @return mixed decrypted data
+ */
+ public function decrypt($data) {
+ $result = '';
+ if (!empty($data)) {
+ $result = $this->crypt->symmetricDecryptFileContent($data, $this->fileKey);
+ }
+ return $result;
+ }
+
+ /**
+ * update encrypted file, e.g. give additional users access to the file
+ *
+ * @param string $path path to the file which should be updated
+ * @param string $uid of the user who performs the operation
+ * @param array $accessList who has access to the file contains the key 'users' and 'public'
+ * @return boolean
+ */
+ public function update($path, $uid, $accessList) {
+ $fileKey = $this->keyManager->getFileKey($path, $uid);
+ $publicKeys = array();
+ foreach ($accessList['users'] as $user) {
+ $publicKeys[$user] = $this->keyManager->getPublicKey($user);
+ }
+
+ $publicKeys = $this->keyManager->addSystemKeys($accessList, $publicKeys);
+
+ $encryptedFileKey = $this->crypt->multiKeyEncrypt($fileKey, $publicKeys);
+
+ $this->keyManager->deleteAllFileKeys($path);
+
+ $this->keyManager->setAllFileKeys($path, $encryptedFileKey);
+
+ return true;
+ }
+
+ /**
+ * add system keys such as the public share key and the recovery key
+ *
+ * @param array $accessList
+ * @param array $publicKeys
+ * @return array
+ */
+ public function addSystemKeys(array $accessList, array $publicKeys) {
+ if (!empty($accessList['public'])) {
+ $publicKeys[$this->keyManager->getPublicShareKeyId()] = $this->keyManager->getPublicShareKey();
+ }
+
+ if ($this->keyManager->recoveryKeyExists() &&
+ $this->util->recoveryEnabled($this->user)) {
+
+ $publicKeys[$this->keyManager->getRecoveryKeyId()] = $this->keyManager->getRecoveryKey();
+ }
+
+
+ return $publicKeys;
+ }
+
+
+ /**
+ * should the file be encrypted or not
+ *
+ * @param string $path
+ * @return boolean
+ */
+ public function shouldEncrypt($path) {
+ $parts = explode('/', $path);
+ if (count($parts) < 3) {
+ return false;
+ }
+
+ if ($parts[2] == 'files') {
+ return true;
+ }
+ if ($parts[2] == 'files_versions') {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * calculate unencrypted size
+ *
+ * @param string $path to file
+ * @return integer unencrypted size
+ */
+ public function calculateUnencryptedSize($path) {
+ // TODO: Implement calculateUnencryptedSize() method.
+ }
+
+ /**
+ * get size of the unencrypted payload per block.
+ * ownCloud read/write files with a block size of 8192 byte
+ *
+ * @return integer
+ */
+ public function getUnencryptedBlockSize() {
+ return 6126;
+ }
+
+ protected function getPathToRealFile($path) {
+ $realPath = $path;
+ $parts = explode('/', $path);
+ if ($parts[2] === 'files_versions') {
+ $realPath = '/' . $parts[1] . '/files/' . implode('/', array_slice($parts, 3));
+ $length = strrpos($realPath, '.');
+ $realPath = substr($realPath, 0, $length);
+ }
+
+ return $realPath;
+ }
+}
diff --git a/apps/encryption/lib/exceptions/multikeydecryptexception.php b/apps/encryption/lib/exceptions/multikeydecryptexception.php
new file mode 100644
index 00000000000..1466d35eda3
--- /dev/null
+++ b/apps/encryption/lib/exceptions/multikeydecryptexception.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace OCA\Encryption\Exceptions;
+
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class MultiKeyDecryptException extends GenericEncryptionException {
+
+}
diff --git a/apps/encryption/lib/exceptions/multikeyencryptexception.php b/apps/encryption/lib/exceptions/multikeyencryptexception.php
new file mode 100644
index 00000000000..daf528e2cf7
--- /dev/null
+++ b/apps/encryption/lib/exceptions/multikeyencryptexception.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace OCA\Encryption\Exceptions;
+
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class MultiKeyEncryptException extends GenericEncryptionException {
+
+}
diff --git a/apps/files_encryption/lib/capabilities.php b/apps/encryption/lib/exceptions/privatekeymissingexception.php
index 0ed696fc7cb..50d75870b20 100644
--- a/apps/files_encryption/lib/capabilities.php
+++ b/apps/encryption/lib/exceptions/privatekeymissingexception.php
@@ -1,10 +1,7 @@
<?php
-/**
- * @author Christopher Schäpers <kondou@ts.unde.re>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Tom Needham <tom@owncloud.com>
- *
+ /**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/25/15, 9:39 AM
* @copyright Copyright (c) 2015, ownCloud, Inc.
* @license AGPL-3.0
*
@@ -21,19 +18,21 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-
-namespace OCA\Files_Encryption;
-class Capabilities {
-
- public static function getCapabilities() {
- return new \OC_OCS_Result(array(
- 'capabilities' => array(
- 'files' => array(
- 'encryption' => true,
- ),
- ),
- ));
+namespace OCA\Encryption\Exceptions;
+
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class PrivateKeyMissingException extends GenericEncryptionException {
+
+ /**
+ * @param string $userId
+ */
+ public function __construct($userId) {
+ if(empty($userId)) {
+ $userId = "<no-user-id-given>";
+ }
+ parent::__construct("Private Key missing for user: $userId");
}
-
+
}
diff --git a/apps/encryption/lib/exceptions/publickeymissingexception.php b/apps/encryption/lib/exceptions/publickeymissingexception.php
new file mode 100644
index 00000000000..9638c28e427
--- /dev/null
+++ b/apps/encryption/lib/exceptions/publickeymissingexception.php
@@ -0,0 +1,20 @@
+<?php
+
+
+namespace OCA\Encryption\Exceptions;
+
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class PublicKeyMissingException extends GenericEncryptionException {
+
+ /**
+ * @param string $userId
+ */
+ public function __construct($userId) {
+ if(empty($userId)) {
+ $userId = "<no-user-id-given>";
+ }
+ parent::__construct("Public Key missing for user: $userId");
+ }
+
+}
diff --git a/apps/encryption/lib/hookmanager.php b/apps/encryption/lib/hookmanager.php
new file mode 100644
index 00000000000..19ee142a622
--- /dev/null
+++ b/apps/encryption/lib/hookmanager.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/19/15, 10:13 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Encryption;
+
+
+use OCA\Encryption\Hooks\Contracts\IHook;
+
+class HookManager {
+
+ private $hookInstances = [];
+
+ /**
+ * @param array|IHook $instances
+ * - This accepts either a single instance of IHook or an array of instances of IHook
+ * @return bool
+ */
+ public function registerHook($instances) {
+ if (is_array($instances)) {
+ foreach ($instances as $instance) {
+ if (!$instance instanceof IHook) {
+ return false;
+ }
+ $this->hookInstances[] = $instance;
+ }
+
+ } elseif ($instances instanceof IHook) {
+ $this->hookInstances[] = $instances;
+ }
+ return true;
+ }
+
+ /**
+ *
+ */
+ public function fireHooks() {
+ foreach ($this->hookInstances as $instance) {
+ /**
+ * Fire off the add hooks method of each instance stored in cache
+ *
+ * @var $instance IHook
+ */
+ $instance->addHooks();
+ }
+
+ }
+
+}
diff --git a/apps/encryption/lib/keymanager.php b/apps/encryption/lib/keymanager.php
new file mode 100644
index 00000000000..1f71a891e81
--- /dev/null
+++ b/apps/encryption/lib/keymanager.php
@@ -0,0 +1,511 @@
+<?php
+
+namespace OCA\Encryption;
+
+use OC\Encryption\Exceptions\DecryptionFailedException;
+use OCA\Encryption\Exceptions\PrivateKeyMissingException;
+use OCA\Encryption\Exceptions\PublicKeyMissingException;
+use OCA\Encryption\Crypto\Crypt;
+use OCP\Encryption\Keys\IStorage;
+use OCP\IConfig;
+use OCP\ILogger;
+use OCP\IUserSession;
+
+class KeyManager {
+
+ /**
+ * @var Session
+ */
+ protected $session;
+ /**
+ * @var IStorage
+ */
+ private $keyStorage;
+ /**
+ * @var Crypt
+ */
+ private $crypt;
+ /**
+ * @var string
+ */
+ private $recoveryKeyId;
+ /**
+ * @var string
+ */
+ private $publicShareKeyId;
+ /**
+ * @var string UserID
+ */
+ private $keyId;
+ /**
+ * @var string
+ */
+ private $publicKeyId = 'publicKey';
+ /**
+ * @var string
+ */
+ private $privateKeyId = 'privateKey';
+
+ /**
+ * @var string
+ */
+ private $shareKeyId = 'shareKey';
+
+ /**
+ * @var string
+ */
+ private $fileKeyId = 'fileKey';
+ /**
+ * @var IConfig
+ */
+ private $config;
+ /**
+ * @var ILogger
+ */
+ private $log;
+ /**
+ * @var Util
+ */
+ private $util;
+
+ /**
+ * @param IStorage $keyStorage
+ * @param Crypt $crypt
+ * @param IConfig $config
+ * @param IUserSession $userSession
+ * @param Session $session
+ * @param ILogger $log
+ * @param Util $util
+ */
+ public function __construct(
+ IStorage $keyStorage,
+ Crypt $crypt,
+ IConfig $config,
+ IUserSession $userSession,
+ Session $session,
+ ILogger $log,
+ Util $util
+ ) {
+
+ $this->util = $util;
+ $this->session = $session;
+ $this->keyStorage = $keyStorage;
+ $this->crypt = $crypt;
+ $this->config = $config;
+ $this->log = $log;
+
+ $this->recoveryKeyId = $this->config->getAppValue('encryption',
+ 'recoveryKeyId');
+ if (empty($this->recoveryKeyId)) {
+ $this->recoveryKeyId = 'recoveryKey_' . substr(md5(time()), 0, 8);
+ $this->config->setAppValue('encryption',
+ 'recoveryKeyId',
+ $this->recoveryKeyId);
+ }
+
+ $this->publicShareKeyId = $this->config->getAppValue('encryption',
+ 'publicShareKeyId');
+ if (empty($this->publicShareKeyId)) {
+ $this->publicShareKeyId = 'pubShare_' . substr(md5(time()), 0, 8);
+ $this->config->setAppValue('encryption', 'publicShareKeyId', $this->publicShareKeyId);
+ }
+
+ $shareKey = $this->getPublicShareKey();
+ if (empty($shareKey)) {
+ $keyPair = $this->crypt->createKeyPair();
+
+ // Save public key
+ $this->keyStorage->setSystemUserKey(
+ $this->publicShareKeyId . '.publicKey', $keyPair['publicKey']);
+
+ // Encrypt private key empty passphrase
+ $encryptedKey = $this->crypt->symmetricEncryptFileContent($keyPair['privateKey'], '');
+ $this->keyStorage->setSystemUserKey($this->publicShareKeyId . '.privateKey', $encryptedKey);
+ }
+
+ $this->keyId = $userSession && $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : false;
+ $this->log = $log;
+ }
+
+ /**
+ * @return bool
+ */
+ public function recoveryKeyExists() {
+ $key = $this->getRecoveryKey();
+ return (!empty($key));
+ }
+
+ /**
+ * get recovery key
+ *
+ * @return string
+ */
+ public function getRecoveryKey() {
+ return $this->keyStorage->getSystemUserKey($this->recoveryKeyId . '.publicKey');
+ }
+
+ /**
+ * get recovery key ID
+ *
+ * @return string
+ */
+ public function getRecoveryKeyId() {
+ return $this->recoveryKeyId;
+ }
+
+ /**
+ * @param $password
+ * @return bool
+ */
+ public function checkRecoveryPassword($password) {
+ $recoveryKey = $this->keyStorage->getSystemUserKey($this->recoveryKeyId . '.privateKey');
+ $decryptedRecoveryKey = $this->crypt->decryptPrivateKey($recoveryKey,
+ $password);
+
+ if ($decryptedRecoveryKey) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @param string $uid
+ * @param string $password
+ * @param string $keyPair
+ * @return bool
+ */
+ public function storeKeyPair($uid, $password, $keyPair) {
+ // Save Public Key
+ $this->setPublicKey($uid, $keyPair['publicKey']);
+
+ $encryptedKey = $this->crypt->symmetricEncryptFileContent($keyPair['privateKey'],
+ $password);
+
+ if ($encryptedKey) {
+ $this->setPrivateKey($uid, $encryptedKey);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @param string $password
+ * @param array $keyPair
+ * @return bool
+ */
+ public function setRecoveryKey($password, $keyPair) {
+ // Save Public Key
+ $this->keyStorage->setSystemUserKey($this->getRecoveryKeyId(). '.publicKey', $keyPair['publicKey']);
+
+ $encryptedKey = $this->crypt->symmetricEncryptFileContent($keyPair['privateKey'],
+ $password);
+
+ if ($encryptedKey) {
+ $this->setSystemPrivateKey($this->getRecoveryKeyId(), $encryptedKey);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @param $userId
+ * @param $key
+ * @return bool
+ */
+ public function setPublicKey($userId, $key) {
+ return $this->keyStorage->setUserKey($userId, $this->publicKeyId, $key);
+ }
+
+ /**
+ * @param $userId
+ * @param $key
+ * @return bool
+ */
+ public function setPrivateKey($userId, $key) {
+ return $this->keyStorage->setUserKey($userId,
+ $this->privateKeyId,
+ $key);
+ }
+
+ /**
+ * write file key to key storage
+ *
+ * @param string $path
+ * @param string $key
+ * @return boolean
+ */
+ public function setFileKey($path, $key) {
+ return $this->keyStorage->setFileKey($path, $this->fileKeyId, $key);
+ }
+
+ /**
+ * set all file keys (the file key and the corresponding share keys)
+ *
+ * @param string $path
+ * @param array $keys
+ */
+ public function setAllFileKeys($path, $keys) {
+ $this->setFileKey($path, $keys['data']);
+ foreach ($keys['keys'] as $uid => $keyFile) {
+ $this->setShareKey($path, $uid, $keyFile);
+ }
+ }
+
+ /**
+ * write share key to the key storage
+ *
+ * @param string $path
+ * @param string $uid
+ * @param string $key
+ * @return boolean
+ */
+ public function setShareKey($path, $uid, $key) {
+ $keyId = $uid . '.' . $this->shareKeyId;
+ return $this->keyStorage->setFileKey($path, $keyId, $key);
+ }
+
+ /**
+ * Decrypt private key and store it
+ *
+ * @param string $uid userid
+ * @param string $passPhrase users password
+ * @return boolean
+ */
+ public function init($uid, $passPhrase) {
+ try {
+ $privateKey = $this->getPrivateKey($uid);
+ $privateKey = $this->crypt->decryptPrivateKey($privateKey,
+ $passPhrase);
+ } catch (PrivateKeyMissingException $e) {
+ return false;
+ } catch (DecryptionFailedException $e) {
+ return false;
+ }
+
+ $this->session->setPrivateKey($privateKey);
+ $this->session->setStatus(Session::INIT_SUCCESSFUL);
+
+ return true;
+ }
+
+ /**
+ * @param $userId
+ * @return mixed
+ * @throws PrivateKeyMissingException
+ */
+ public function getPrivateKey($userId) {
+ $privateKey = $this->keyStorage->getUserKey($userId,
+ $this->privateKeyId);
+
+ if (strlen($privateKey) !== 0) {
+ return $privateKey;
+ }
+ throw new PrivateKeyMissingException($userId);
+ }
+
+ /**
+ * @param $path
+ * @param $uid
+ * @return string
+ */
+ public function getFileKey($path, $uid) {
+ $encryptedFileKey = $this->keyStorage->getFileKey($path, $this->fileKeyId);
+
+ if (is_null($uid)) {
+ $uid = $this->getPublicShareKeyId();
+ $shareKey = $this->getShareKey($path, $uid);
+ $privateKey = $this->keyStorage->getSystemUserKey($this->publicShareKeyId . '.privateKey');
+ $privateKey = $this->crypt->symmetricDecryptFileContent($privateKey);
+ } else {
+ $shareKey = $this->getShareKey($path, $uid);
+ $privateKey = $this->session->getPrivateKey();
+ }
+
+ if ($encryptedFileKey && $shareKey && $privateKey) {
+ return $this->crypt->multiKeyDecrypt($encryptedFileKey,
+ $shareKey,
+ $privateKey);
+ }
+
+ return '';
+ }
+
+ /**
+ * get the encrypted file key
+ *
+ * @param $path
+ * @return string
+ */
+ public function getEncryptedFileKey($path) {
+ $encryptedFileKey = $this->keyStorage->getFileKey($path,
+ $this->fileKeyId);
+
+ return $encryptedFileKey;
+ }
+
+ /**
+ * delete share key
+ *
+ * @param string $path
+ * @param string $keyId
+ * @return boolean
+ */
+ public function deleteShareKey($path, $keyId) {
+ return $this->keyStorage->deleteFileKey($path, $keyId . '.' . $this->shareKeyId);
+ }
+
+
+ /**
+ * @param $path
+ * @param $uid
+ * @return mixed
+ */
+ public function getShareKey($path, $uid) {
+ $keyId = $uid . '.' . $this->shareKeyId;
+ return $this->keyStorage->getFileKey($path, $keyId);
+ }
+
+ /**
+ * @param $userId
+ * @return bool
+ */
+ public function userHasKeys($userId) {
+ try {
+ $this->getPrivateKey($userId);
+ $this->getPublicKey($userId);
+ } catch (PrivateKeyMissingException $e) {
+ return false;
+ } catch (PublicKeyMissingException $e) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * @param $userId
+ * @return mixed
+ * @throws PublicKeyMissingException
+ */
+ public function getPublicKey($userId) {
+ $publicKey = $this->keyStorage->getUserKey($userId, $this->publicKeyId);
+
+ if (strlen($publicKey) !== 0) {
+ return $publicKey;
+ }
+ throw new PublicKeyMissingException($userId);
+ }
+
+ public function getPublicShareKeyId() {
+ return $this->publicShareKeyId;
+ }
+
+ /**
+ * get public key for public link shares
+ *
+ * @return string
+ */
+ public function getPublicShareKey() {
+ return $this->keyStorage->getSystemUserKey($this->publicShareKeyId . '.publicKey');
+ }
+
+ /**
+ * @param $purpose
+ * @param bool $timestamp
+ * @param bool $includeUserKeys
+ */
+ public function backupAllKeys($purpose, $timestamp = true, $includeUserKeys = true) {
+// $backupDir = $this->keyStorage->;
+ }
+
+ /**
+ * @param string $uid
+ */
+ public function replaceUserKeys($uid) {
+ $this->backupAllKeys('password_reset');
+ $this->deletePublicKey($uid);
+ $this->deletePrivateKey($uid);
+ }
+
+ /**
+ * @param $uid
+ * @return bool
+ */
+ public function deletePublicKey($uid) {
+ return $this->keyStorage->deleteUserKey($uid, $this->publicKeyId);
+ }
+
+ /**
+ * @param $uid
+ * @return bool
+ */
+ private function deletePrivateKey($uid) {
+ return $this->keyStorage->deleteUserKey($uid, $this->privateKeyId);
+ }
+
+ public function deleteAllFileKeys($path) {
+ return $this->keyStorage->deleteAllFileKeys($path);
+ }
+
+ /**
+ * @param array $userIds
+ * @return array
+ * @throws PublicKeyMissingException
+ */
+ public function getPublicKeys(array $userIds) {
+ $keys = [];
+
+ foreach ($userIds as $userId) {
+ try {
+ $keys[$userId] = $this->getPublicKey($userId);
+ } catch (PublicKeyMissingException $e) {
+ continue;
+ }
+ }
+
+ return $keys;
+
+ }
+
+ /**
+ * @param string $keyId
+ * @return string returns openssl key
+ */
+ public function getSystemPrivateKey($keyId) {
+ return $this->keyStorage->getSystemUserKey($keyId . '.' . $this->privateKeyId);
+ }
+
+ /**
+ * @param string $keyId
+ * @param string $key
+ * @return string returns openssl key
+ */
+ public function setSystemPrivateKey($keyId, $key) {
+ return $this->keyStorage->setSystemUserKey($keyId . '.' . $this->privateKeyId, $key);
+ }
+
+ /**
+ * add system keys such as the public share key and the recovery key
+ *
+ * @param array $accessList
+ * @param array $publicKeys
+ * @return array
+ * @throws PublicKeyMissingException
+ */
+ public function addSystemKeys(array $accessList, array $publicKeys) {
+ if (!empty($accessList['public'])) {
+ $publicShareKey = $this->getPublicShareKey();
+ if (empty($publicShareKey)) {
+ throw new PublicKeyMissingException($this->getPublicShareKeyId());
+ }
+ $publicKeys[$this->getPublicShareKeyId()] = $publicShareKey;
+ }
+
+ if ($this->recoveryKeyExists() &&
+ $this->util->isRecoveryEnabledForUser()) {
+
+ $publicKeys[$this->getRecoveryKeyId()] = $this->getRecoveryKey();
+ }
+
+ return $publicKeys;
+ }
+}
diff --git a/apps/encryption/lib/recovery.php b/apps/encryption/lib/recovery.php
new file mode 100644
index 00000000000..34acdd0a6e3
--- /dev/null
+++ b/apps/encryption/lib/recovery.php
@@ -0,0 +1,316 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/19/15, 11:45 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Encryption;
+
+
+use OCA\Encryption\Crypto\Crypt;
+use OCP\Encryption\Keys\IStorage;
+use OCP\IConfig;
+use OCP\IUser;
+use OCP\IUserSession;
+use OCP\PreConditionNotMetException;
+use OCP\Security\ISecureRandom;
+use OC\Files\View;
+use OCP\Encryption\IFile;
+
+class Recovery {
+
+
+ /**
+ * @var null|IUser
+ */
+ protected $user;
+ /**
+ * @var Crypt
+ */
+ protected $crypt;
+ /**
+ * @var ISecureRandom
+ */
+ private $random;
+ /**
+ * @var KeyManager
+ */
+ private $keyManager;
+ /**
+ * @var IConfig
+ */
+ private $config;
+ /**
+ * @var IStorage
+ */
+ private $keyStorage;
+ /**
+ * @var View
+ */
+ private $view;
+ /**
+ * @var IFile
+ */
+ private $file;
+ /**
+ * @var string
+ */
+ private $recoveryKeyId;
+
+ /**
+ * @param IUserSession $user
+ * @param Crypt $crypt
+ * @param ISecureRandom $random
+ * @param KeyManager $keyManager
+ * @param IConfig $config
+ * @param IStorage $keyStorage
+ * @param IFile $file
+ * @param View $view
+ */
+ public function __construct(IUserSession $user,
+ Crypt $crypt,
+ ISecureRandom $random,
+ KeyManager $keyManager,
+ IConfig $config,
+ IStorage $keyStorage,
+ IFile $file,
+ View $view) {
+ $this->user = ($user && $user->isLoggedIn()) ? $user->getUser() : false;
+ $this->crypt = $crypt;
+ $this->random = $random;
+ $this->keyManager = $keyManager;
+ $this->config = $config;
+ $this->keyStorage = $keyStorage;
+ $this->view = $view;
+ $this->file = $file;
+ }
+
+ /**
+ * @param $recoveryKeyId
+ * @param $password
+ * @return bool
+ */
+ public function enableAdminRecovery($password) {
+ $appConfig = $this->config;
+ $keyManager = $this->keyManager;
+
+ if (!$keyManager->recoveryKeyExists()) {
+ $keyPair = $this->crypt->createKeyPair();
+
+ $this->keyManager->setRecoveryKey($password, $keyPair);
+ }
+
+ if ($keyManager->checkRecoveryPassword($password)) {
+ $appConfig->setAppValue('encryption', 'recoveryAdminEnabled', 1);
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * change recovery key id
+ *
+ * @param string $newPassword
+ * @param string $oldPassword
+ */
+ public function changeRecoveryKeyPassword($newPassword, $oldPassword) {
+ $recoveryKey = $this->keyManager->getSystemPrivateKey($this->keyManager->getRecoveryKeyId());
+ $decryptedRecoveryKey = $this->crypt->decryptPrivateKey($recoveryKey, $oldPassword);
+ $encryptedRecoveryKey = $this->crypt->symmetricEncryptFileContent($decryptedRecoveryKey, $newPassword);
+ if ($encryptedRecoveryKey) {
+ $this->keyManager->setSystemPrivateKey($this->keyManager->getRecoveryKeyId(), $encryptedRecoveryKey);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @param $recoveryPassword
+ * @return bool
+ */
+ public function disableAdminRecovery($recoveryPassword) {
+ $keyManager = $this->keyManager;
+
+ if ($keyManager->checkRecoveryPassword($recoveryPassword)) {
+ // Set recoveryAdmin as disabled
+ $this->config->setAppValue('encryption', 'recoveryAdminEnabled', 0);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * check if recovery is enabled for user
+ *
+ * @param string $user if no user is given we check the current logged-in user
+ *
+ * @return bool
+ */
+ public function isRecoveryEnabledForUser($user = '') {
+ $uid = empty($user) ? $this->user->getUID() : $user;
+ $recoveryMode = $this->config->getUserValue($uid,
+ 'encryption',
+ 'recoveryEnabled',
+ 0);
+
+ return ($recoveryMode === '1');
+ }
+
+ /**
+ * check if recovery is key is enabled by the administrator
+ *
+ * @return bool
+ */
+ public function isRecoveryKeyEnabled() {
+ $enabled = $this->config->getAppValue('encryption', 'recoveryAdminEnabled', 0);
+
+ return ($enabled === '1');
+ }
+
+ /**
+ * @param string $value
+ * @return bool
+ */
+ public function setRecoveryForUser($value) {
+
+ try {
+ $this->config->setUserValue($this->user->getUID(),
+ 'encryption',
+ 'recoveryEnabled',
+ $value);
+
+ if ($value === '1') {
+ $this->addRecoveryKeys('/' . $this->user->getUID() . '/files/');
+ } else {
+ $this->removeRecoveryKeys('/' . $this->user->getUID() . '/files/');
+ }
+
+ return true;
+ } catch (PreConditionNotMetException $e) {
+ return false;
+ }
+ }
+
+ /**
+ * add recovery key to all encrypted files
+ */
+ private function addRecoveryKeys($path) {
+ $dirContent = $this->view->getDirectoryContent($path);
+ foreach ($dirContent as $item) {
+ $filePath = $item->getPath();
+ if ($item['type'] === 'dir') {
+ $this->addRecoveryKeys($filePath . '/');
+ } else {
+ $fileKey = $this->keyManager->getFileKey($filePath, $this->user->getUID());
+ if (!empty($fileKey)) {
+ $accessList = $this->file->getAccessList($filePath);
+ $publicKeys = array();
+ foreach ($accessList['users'] as $uid) {
+ $publicKeys[$uid] = $this->keyManager->getPublicKey($uid);
+ }
+
+ $publicKeys = $this->keyManager->addSystemKeys($accessList, $publicKeys);
+
+ $encryptedKeyfiles = $this->crypt->multiKeyEncrypt($fileKey, $publicKeys);
+ $this->keyManager->setAllFileKeys($filePath, $encryptedKeyfiles);
+ }
+ }
+ }
+ }
+
+ /**
+ * remove recovery key to all encrypted files
+ */
+ private function removeRecoveryKeys($path) {
+ $dirContent = $this->view->getDirectoryContent($path);
+ foreach ($dirContent as $item) {
+ $filePath = $item->getPath();
+ if ($item['type'] === 'dir') {
+ $this->removeRecoveryKeys($filePath . '/');
+ } else {
+ $this->keyManager->deleteShareKey($filePath, $this->keyManager->getRecoveryKeyId());
+ }
+ }
+ }
+
+ /**
+ * recover users files with the recovery key
+ *
+ * @param string $recoveryPassword
+ * @param string $user
+ */
+ public function recoverUsersFiles($recoveryPassword, $user) {
+ $encryptedKey = $this->keyManager->getSystemPrivateKey($this->keyManager->getRecoveryKeyId());
+
+ $privateKey = $this->crypt->decryptPrivateKey($encryptedKey,
+ $recoveryPassword);
+
+ $this->recoverAllFiles('/' . $user . '/files/', $privateKey);
+ }
+
+ /**
+ * @param $path
+ * @param $privateKey
+ */
+ private function recoverAllFiles($path, $privateKey) {
+ $dirContent = $this->view->getDirectoryContent($path);
+
+ foreach ($dirContent as $item) {
+ // Get relative path from encryption/keyfiles
+ $filePath = $item->getPath();
+ if ($this->view->is_dir($filePath)) {
+ $this->recoverAllFiles($filePath . '/', $privateKey);
+ } else {
+ $this->recoverFile($filePath, $privateKey);
+ }
+ }
+
+ }
+
+ /**
+ * @param string $path
+ * @param string $privateKey
+ */
+ private function recoverFile($path, $privateKey) {
+ $encryptedFileKey = $this->keyManager->getEncryptedFileKey($path);
+ $shareKey = $this->keyManager->getShareKey($path, $this->keyManager->getRecoveryKeyId());
+
+ if ($encryptedFileKey && $shareKey && $privateKey) {
+ $fileKey = $this->crypt->multiKeyDecrypt($encryptedFileKey,
+ $shareKey,
+ $privateKey);
+ }
+
+ if (!empty($fileKey)) {
+ $accessList = $this->file->getAccessList($path);
+ $publicKeys = array();
+ foreach ($accessList['users'] as $uid) {
+ $publicKeys[$uid] = $this->keyManager->getPublicKey($uid);
+ }
+
+ $publicKeys = $this->keyManager->addSystemKeys($accessList, $publicKeys);
+
+ $encryptedKeyfiles = $this->crypt->multiKeyEncrypt($fileKey, $publicKeys);
+ $this->keyManager->setAllFileKeys($path, $encryptedKeyfiles);
+ }
+
+ }
+
+
+}
diff --git a/apps/encryption/lib/session.php b/apps/encryption/lib/session.php
new file mode 100644
index 00000000000..e705611fa6e
--- /dev/null
+++ b/apps/encryption/lib/session.php
@@ -0,0 +1,114 @@
+<?php
+
+/**
+ * ownCloud
+ *
+ * @copyright (C) 2015 ownCloud, Inc.
+ *
+ * @author Bjoern Schiessle <schiessle@owncloud.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace OCA\Encryption;
+
+use \OCP\ISession;
+
+class Session {
+
+ /** @var ISession */
+ protected $session;
+
+ const NOT_INITIALIZED = '0';
+ const INIT_EXECUTED = '1';
+ const INIT_SUCCESSFUL = '2';
+
+ public function __construct(ISession $session) {
+ $this->session = $session;
+ }
+
+ /**
+ * Sets status of encryption app
+ *
+ * @param string $status INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INITIALIZED
+ */
+ public function setStatus($status) {
+ $this->session->set('encryptionInitialized', $status);
+ }
+
+ /**
+ * Gets status if we already tried to initialize the encryption app
+ *
+ * @return string init status INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INITIALIZED
+ */
+ public function getStatus() {
+ $status = $this->session->get('encryptionInitialized');
+ if (is_null($status)) {
+ $status = self::NOT_INITIALIZED;
+ }
+
+ return $status;
+ }
+
+ /**
+ * Gets user or public share private key from session
+ *
+ * @return string $privateKey The user's plaintext private key
+ * @throws Exceptions\PrivateKeyMissingException
+ */
+ public function getPrivateKey() {
+ $key = $this->session->get('privateKey');
+ if (is_null($key)) {
+ throw new Exceptions\PrivateKeyMissingException('please try to log-out and log-in again', 0);
+ }
+ return $key;
+ }
+
+ /**
+ * check if private key is set
+ *
+ * @return boolean
+ */
+ public function isPrivateKeySet() {
+ $key = $this->session->get('privateKey');
+ if (is_null($key)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Sets user private key to session
+ *
+ * @param string $key users private key
+ *
+ * @note this should only be set on login
+ */
+ public function setPrivateKey($key) {
+ $this->session->set('privateKey', $key);
+ }
+
+
+ /**
+ * remove keys from session
+ */
+ public function clear() {
+ $this->session->remove('publicSharePrivateKey');
+ $this->session->remove('privateKey');
+ $this->session->remove('encryptionInitialized');
+
+ }
+
+}
diff --git a/apps/encryption/lib/users/setup.php b/apps/encryption/lib/users/setup.php
new file mode 100644
index 00000000000..e80bf6003e6
--- /dev/null
+++ b/apps/encryption/lib/users/setup.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * @author Clark Tomlinson <fallen013@gmail.com>
+ * @since 3/6/15, 11:36 AM
+ * @link http:/www.clarkt.com
+ * @copyright Clark Tomlinson © 2015
+ *
+ */
+
+namespace OCA\Encryption\Users;
+
+
+use OCA\Encryption\Crypto\Crypt;
+use OCA\Encryption\KeyManager;
+use OCP\ILogger;
+use OCP\IUserSession;
+
+class Setup {
+ /**
+ * @var Crypt
+ */
+ private $crypt;
+ /**
+ * @var KeyManager
+ */
+ private $keyManager;
+ /**
+ * @var ILogger
+ */
+ private $logger;
+ /**
+ * @var bool|string
+ */
+ private $user;
+
+
+ /**
+ * @param ILogger $logger
+ * @param IUserSession $userSession
+ * @param Crypt $crypt
+ * @param KeyManager $keyManager
+ */
+ public function __construct(ILogger $logger, IUserSession $userSession, Crypt $crypt, KeyManager $keyManager) {
+ $this->logger = $logger;
+ $this->user = $userSession && $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : false;
+ $this->crypt = $crypt;
+ $this->keyManager = $keyManager;
+ }
+
+ /**
+ * @param $uid userid
+ * @param $password user password
+ * @return bool
+ */
+ public function setupUser($uid, $password) {
+ return $this->setupServerSide($uid, $password);
+ }
+
+ /**
+ * @param $uid userid
+ * @param $password user password
+ * @return bool
+ */
+ public function setupServerSide($uid, $password) {
+ // Check if user already has keys
+ if (!$this->keyManager->userHasKeys($uid)) {
+ return $this->keyManager->storeKeyPair($uid, $password,
+ $this->crypt->createKeyPair());
+ }
+ return true;
+ }
+}
diff --git a/apps/encryption/lib/util.php b/apps/encryption/lib/util.php
new file mode 100644
index 00000000000..6b6b8b6b38c
--- /dev/null
+++ b/apps/encryption/lib/util.php
@@ -0,0 +1,117 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 3/17/15, 10:31 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+namespace OCA\Encryption;
+
+
+use OC\Files\View;
+use OCA\Encryption\Crypto\Crypt;
+use OCP\IConfig;
+use OCP\ILogger;
+use OCP\IUser;
+use OCP\IUserSession;
+use OCP\PreConditionNotMetException;
+
+class Util {
+ /**
+ * @var View
+ */
+ private $files;
+ /**
+ * @var Crypt
+ */
+ private $crypt;
+ /**
+ * @var ILogger
+ */
+ private $logger;
+ /**
+ * @var bool|IUser
+ */
+ private $user;
+ /**
+ * @var IConfig
+ */
+ private $config;
+
+ /**
+ * Util constructor.
+ *
+ * @param View $files
+ * @param Crypt $crypt
+ * @param ILogger $logger
+ * @param IUserSession $userSession
+ * @param IConfig $config
+ */
+ public function __construct(View $files,
+ Crypt $crypt,
+ ILogger $logger,
+ IUserSession $userSession,
+ IConfig $config
+ ) {
+ $this->files = $files;
+ $this->crypt = $crypt;
+ $this->logger = $logger;
+ $this->user = $userSession && $userSession->isLoggedIn() ? $userSession->getUser() : false;
+ $this->config = $config;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isRecoveryEnabledForUser() {
+ $recoveryMode = $this->config->getUserValue($this->user->getUID(),
+ 'encryption',
+ 'recoveryEnabled',
+ 0);
+
+ return ($recoveryMode === '1');
+ }
+
+ /**
+ * @param $enabled
+ * @return bool
+ */
+ public function setRecoveryForUser($enabled) {
+ $value = $enabled ? '1' : '0';
+
+ try {
+ $this->config->setUserValue($this->user->getUID(),
+ 'encryption',
+ 'recoveryEnabled',
+ $value);
+ return true;
+ } catch (PreConditionNotMetException $e) {
+ return false;
+ }
+ }
+
+ /**
+ * @param string $uid
+ * @return bool
+ */
+ public function userHasFiles($uid) {
+ return $this->files->file_exists($uid . '/files');
+ }
+
+
+}
diff --git a/apps/encryption/settings/settings-admin.php b/apps/encryption/settings/settings-admin.php
new file mode 100644
index 00000000000..36e9c532bbd
--- /dev/null
+++ b/apps/encryption/settings/settings-admin.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Copyright (c) 2015 Clark Tomlinson <clark@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+\OC_Util::checkAdminUser();
+
+$tmpl = new OCP\Template('encryption', 'settings-admin');
+
+// Check if an adminRecovery account is enabled for recovering files after lost pwd
+$recoveryAdminEnabled = \OC::$server->getConfig()->getAppValue('encryption', 'recoveryAdminEnabled', '0');
+$session = new \OCA\Encryption\Session(\OC::$server->getSession());
+
+
+$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
+$tmpl->assign('initStatus', $session->getStatus());
+
+return $tmpl->fetchPage();
diff --git a/apps/encryption/settings/settings-personal.php b/apps/encryption/settings/settings-personal.php
new file mode 100644
index 00000000000..ec3d30f457d
--- /dev/null
+++ b/apps/encryption/settings/settings-personal.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Copyright (c) 2015 Clark Tomlinson <clark@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+$session = new \OCA\Encryption\Session(\OC::$server->getSession());
+$userSession = \OC::$server->getUserSession();
+
+$template = new OCP\Template('encryption', 'settings-personal');
+$crypt = new \OCA\Encryption\Crypto\Crypt(
+ \OC::$server->getLogger(),
+ $userSession,
+ \OC::$server->getConfig());
+
+$util = new \OCA\Encryption\Util(
+ new \OC\Files\View(),
+ $crypt,
+ \OC::$server->getLogger(),
+ $userSession,
+ \OC::$server->getConfig());
+
+$keyManager = new \OCA\Encryption\KeyManager(
+ \OC::$server->getEncryptionKeyStorage(\OCA\Encryption\Crypto\Encryption::ID),
+ $crypt,
+ \OC::$server->getConfig(),
+ $userSession,
+ $session,
+ \OC::$server->getLogger(), $util);
+
+$user = $userSession->getUser()->getUID();
+
+$view = new \OC\Files\View('/');
+
+
+
+$privateKeySet = $session->isPrivateKeySet();
+// did we tried to initialize the keys for this session?
+$initialized = $session->getStatus();
+
+$recoveryAdminEnabled = \OC::$server->getConfig()->getAppValue('encryption', 'recoveryAdminEnabled');
+$recoveryEnabledForUser = $util->isRecoveryEnabledForUser();
+
+$result = false;
+
+if ($recoveryAdminEnabled || !$privateKeySet) {
+ $template->assign('recoveryEnabled', $recoveryAdminEnabled);
+ $template->assign('recoveryEnabledForUser', $recoveryEnabledForUser);
+ $template->assign('privateKeySet', $privateKeySet);
+ $template->assign('initialized', $initialized);
+
+ $result = $template->fetchPage();
+}
+
+return $result;
+
diff --git a/apps/files_encryption/templates/settings-admin.php b/apps/encryption/templates/settings-admin.php
index b686912bf4d..b64e75512e7 100644
--- a/apps/files_encryption/templates/settings-admin.php
+++ b/apps/encryption/templates/settings-admin.php
@@ -1,11 +1,13 @@
<?php
- /** @var array $_ */
- /** @var OC_L10N $l */
+/** @var array $_ */
+/** @var OC_L10N $l */
+script('encryption', 'settings-admin');
+script('core', 'multiselect');
?>
<form id="encryption" class="section">
- <h2><?php p($l->t('Server-side Encryption')); ?></h2>
+ <h2><?php p($l->t('ownCloud basic encryption module')); ?></h2>
- <?php if($_["initStatus"] === \OCA\Files_Encryption\Session::NOT_INITIALIZED): ?>
+ <?php if(!$_["initStatus"]): ?>
<?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?>
<?php else: ?>
<p id="encryptionSetRecoveryKey">
diff --git a/apps/files_encryption/templates/settings-personal.php b/apps/encryption/templates/settings-personal.php
index 3c8034c968f..6b8821ca8a8 100644
--- a/apps/files_encryption/templates/settings-personal.php
+++ b/apps/encryption/templates/settings-personal.php
@@ -1,70 +1,72 @@
-<?php
- /** @var array $_ */
- /** @var OC_L10N $l */
-?>
-<form id="encryption" class="section">
- <h2><?php p($l->t('Server-side Encryption')); ?></h2>
-
- <?php if ( $_["initialized"] === \OCA\Files_Encryption\Session::NOT_INITIALIZED ): ?>
-
- <?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?>
-
- <?php elseif ( $_["initialized"] === \OCA\Files_Encryption\Session::INIT_EXECUTED ): ?>
- <p>
- <a name="changePKPasswd" />
- <label for="changePrivateKeyPasswd">
- <em><?php p( $l->t( "Your private key password no longer matches your log-in password." ) ); ?></em>
- </label>
- <br />
- <?php p( $l->t( "Set your old private key password to your current log-in password:" ) ); ?>
- <?php if ( $_["recoveryEnabledForUser"] ):
- p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) );
- endif; ?>
- <br />
- <input
- type="password"
- name="changePrivateKeyPassword"
- id="oldPrivateKeyPassword" />
- <label for="oldPrivateKeyPassword"><?php p($l->t( "Old log-in password" )); ?></label>
- <br />
- <input
- type="password"
- name="changePrivateKeyPassword"
- id="newPrivateKeyPassword" />
- <label for="newRecoveryPassword"><?php p($l->t( "Current log-in password" )); ?></label>
- <br />
- <button
- type="button"
- name="submitChangePrivateKeyPassword"
- disabled><?php p($l->t( "Update Private Key Password" )); ?>
- </button>
- <span class="msg"></span>
- </p>
-
- <?php elseif ( $_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Files_Encryption\Session::INIT_SUCCESSFUL ): ?>
- <br />
- <p id="userEnableRecovery">
- <label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label>
- <span class="msg"></span>
- <br />
- <em><?php p( $l->t( "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" ) ); ?></em>
- <br />
- <input
- type='radio'
- id='userEnableRecovery'
- name='userEnableRecovery'
- value='1'
- <?php echo ( $_["recoveryEnabledForUser"] ? 'checked="checked"' : '' ); ?> />
- <label for="userEnableRecovery"><?php p( $l->t( "Enabled" ) ); ?></label>
- <br />
-
- <input
- type='radio'
- id='userDisableRecovery'
- name='userEnableRecovery'
- value='0'
- <?php echo ( $_["recoveryEnabledForUser"] === false ? 'checked="checked"' : '' ); ?> />
- <label for="userDisableRecovery"><?php p( $l->t( "Disabled" ) ); ?></label>
- </p>
- <?php endif; ?>
-</form>
+<?php
+ /** @var array $_ */
+ /** @var OC_L10N $l */
+script('encryption', 'settings-personal');
+script('core', 'multiselect');
+?>
+<form id="encryption" class="section">
+ <h2><?php p($l->t('ownCloud basic encryption module')); ?></h2>
+
+ <?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?>
+
+ <?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?>
+
+ <?php elseif ( $_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED ): ?>
+ <p>
+ <a name="changePKPasswd" />
+ <label for="changePrivateKeyPasswd">
+ <em><?php p( $l->t( "Your private key password no longer matches your log-in password." ) ); ?></em>
+ </label>
+ <br />
+ <?php p( $l->t( "Set your old private key password to your current log-in password:" ) ); ?>
+ <?php if ( $_["recoveryEnabledForUser"] ):
+ p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) );
+ endif; ?>
+ <br />
+ <input
+ type="password"
+ name="changePrivateKeyPassword"
+ id="oldPrivateKeyPassword" />
+ <label for="oldPrivateKeyPassword"><?php p($l->t( "Old log-in password" )); ?></label>
+ <br />
+ <input
+ type="password"
+ name="changePrivateKeyPassword"
+ id="newPrivateKeyPassword" />
+ <label for="newRecoveryPassword"><?php p($l->t( "Current log-in password" )); ?></label>
+ <br />
+ <button
+ type="button"
+ name="submitChangePrivateKeyPassword"
+ disabled><?php p($l->t( "Update Private Key Password" )); ?>
+ </button>
+ <span class="msg"></span>
+ </p>
+
+ <?php elseif ( $_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL ): ?>
+ <br />
+ <p id="userEnableRecovery">
+ <label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label>
+ <span class="msg"></span>
+ <br />
+ <em><?php p( $l->t( "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" ) ); ?></em>
+ <br />
+ <input
+ type='radio'
+ id='userEnableRecovery'
+ name='userEnableRecovery'
+ value='1'
+ <?php echo ( $_["recoveryEnabledForUser"] ? 'checked="checked"' : '' ); ?> />
+ <label for="userEnableRecovery"><?php p( $l->t( "Enabled" ) ); ?></label>
+ <br />
+
+ <input
+ type='radio'
+ id='userDisableRecovery'
+ name='userEnableRecovery'
+ value='0'
+ <?php echo ( $_["recoveryEnabledForUser"] === false ? 'checked="checked"' : '' ); ?> />
+ <label for="userDisableRecovery"><?php p( $l->t( "Disabled" ) ); ?></label>
+ </p>
+ <?php endif; ?>
+</form>
diff --git a/apps/encryption/tests/lib/HookManagerTest.php b/apps/encryption/tests/lib/HookManagerTest.php
new file mode 100644
index 00000000000..3c360ff3504
--- /dev/null
+++ b/apps/encryption/tests/lib/HookManagerTest.php
@@ -0,0 +1,74 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 3/31/15, 1:54 PM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+namespace OCA\Encryption\Tests;
+
+
+use OCA\Encryption\HookManager;
+use Test\TestCase;
+
+class HookManagerTest extends TestCase {
+
+ /**
+ * @var HookManager
+ */
+ private static $instance;
+
+ /**
+ *
+ */
+ 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->getMock('NotIHook')
+ ]);
+
+ $hookInstances = \Test_Helper::invokePrivate(self::$instance, 'hookInstances');
+ // Make sure our type checking works
+ $this->assertCount(2, $hookInstances);
+ }
+
+
+ /**
+ *
+ */
+ public static function setUpBeforeClass() {
+ parent::setUpBeforeClass();
+ // have to make instance static to preserve data between tests
+ self::$instance = new HookManager();
+
+ }
+
+ /**
+ *
+ */
+ public function testRegisterHooksWithInstance() {
+ $mock = $this->getMockBuilder('OCA\Encryption\Hooks\Contracts\IHook')->disableOriginalConstructor()->getMock();
+ self::$instance->registerHook($mock);
+
+ $hookInstances = \Test_Helper::invokePrivate(self::$instance, 'hookInstances');
+ $this->assertCount(3, $hookInstances);
+
+ }
+
+}
diff --git a/apps/encryption/tests/lib/KeyManagerTest.php b/apps/encryption/tests/lib/KeyManagerTest.php
new file mode 100644
index 00000000000..d12578bb8d2
--- /dev/null
+++ b/apps/encryption/tests/lib/KeyManagerTest.php
@@ -0,0 +1,286 @@
+<?php
+/**
+ * @author Clark Tomlinson <fallen013@gmail.com>
+ * @since 3/5/15, 10:53 AM
+ * @link http:/www.clarkt.com
+ * @copyright Clark Tomlinson © 2015
+ *
+ */
+
+namespace OCA\Encryption\Tests;
+
+
+use OCA\Encryption\KeyManager;
+use Test\TestCase;
+
+class KeyManagerTest extends TestCase {
+ /**
+ * @var KeyManager
+ */
+ private $instance;
+ /**
+ * @var string
+ */
+ private $userId;
+
+ /** @var string */
+ private $systemKeyId;
+
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $keyStorageMock;
+
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $cryptMock;
+
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $userMock;
+
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $sessionMock;
+
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $logMock;
+
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $utilMock;
+
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $configMock;
+
+ public function setUp() {
+ parent::setUp();
+ $this->userId = 'user1';
+ $this->systemKeyId = 'systemKeyId';
+ $this->keyStorageMock = $this->getMock('OCP\Encryption\Keys\IStorage');
+ $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->configMock = $this->getMock('OCP\IConfig');
+ $this->configMock->expects($this->any())
+ ->method('getAppValue')
+ ->willReturn($this->systemKeyId);
+ $this->userMock = $this->getMock('OCP\IUserSession');
+ $this->sessionMock = $this->getMockBuilder('OCA\Encryption\Session')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->logMock = $this->getMock('OCP\ILogger');
+ $this->utilMock = $this->getMockBuilder('OCA\Encryption\Util')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->instance = new KeyManager(
+ $this->keyStorageMock,
+ $this->cryptMock,
+ $this->configMock,
+ $this->userMock,
+ $this->sessionMock,
+ $this->logMock,
+ $this->utilMock);
+ }
+
+ public function testDeleteShareKey() {
+ $this->keyStorageMock->expects($this->any())
+ ->method('deleteFileKey')
+ ->with($this->equalTo('/path'), $this->equalTo('keyId.shareKey'))
+ ->willReturn(true);
+
+ $this->assertTrue(
+ $this->instance->deleteShareKey('/path', 'keyId')
+ );
+ }
+
+ public function testGetPrivateKey() {
+ $this->keyStorageMock->expects($this->any())
+ ->method('getUserKey')
+ ->with($this->equalTo($this->userId), $this->equalTo('privateKey'))
+ ->willReturn('privateKey');
+
+
+ $this->assertSame('privateKey',
+ $this->instance->getPrivateKey($this->userId)
+ );
+ }
+
+ public function testGetPublicKey() {
+ $this->keyStorageMock->expects($this->any())
+ ->method('getUserKey')
+ ->with($this->equalTo($this->userId), $this->equalTo('publicKey'))
+ ->willReturn('publicKey');
+
+
+ $this->assertSame('publicKey',
+ $this->instance->getPublicKey($this->userId)
+ );
+ }
+
+ public function testRecoveryKeyExists() {
+ $this->keyStorageMock->expects($this->any())
+ ->method('getSystemUserKey')
+ ->with($this->equalTo($this->systemKeyId . '.publicKey'))
+ ->willReturn('recoveryKey');
+
+
+ $this->assertTrue($this->instance->recoveryKeyExists());
+ }
+
+ public function testCheckRecoveryKeyPassword() {
+ $this->keyStorageMock->expects($this->any())
+ ->method('getSystemUserKey')
+ ->with($this->equalTo($this->systemKeyId . '.privateKey'))
+ ->willReturn('recoveryKey');
+ $this->cryptMock->expects($this->any())
+ ->method('decryptPrivateKey')
+ ->with($this->equalTo('recoveryKey'), $this->equalTo('pass'))
+ ->willReturn('decryptedRecoveryKey');
+
+ $this->assertTrue($this->instance->checkRecoveryPassword('pass'));
+ }
+
+ public function testSetPublicKey() {
+ $this->keyStorageMock->expects($this->any())
+ ->method('setUserKey')
+ ->with(
+ $this->equalTo($this->userId),
+ $this->equalTo('publicKey'),
+ $this->equalTo('key'))
+ ->willReturn(true);
+
+
+ $this->assertTrue(
+ $this->instance->setPublicKey($this->userId, 'key')
+ );
+ }
+
+ public function testSetPrivateKey() {
+ $this->keyStorageMock->expects($this->any())
+ ->method('setUserKey')
+ ->with(
+ $this->equalTo($this->userId),
+ $this->equalTo('privateKey'),
+ $this->equalTo('key'))
+ ->willReturn(true);
+
+
+ $this->assertTrue(
+ $this->instance->setPrivateKey($this->userId, 'key')
+ );
+ }
+
+ public function testUserHasKeys() {
+ $this->keyStorageMock->expects($this->exactly(2))
+ ->method('getUserKey')
+ ->with($this->equalTo($this->userId), $this->anything())
+ ->willReturn('key');
+
+
+ $this->assertTrue(
+ $this->instance->userHasKeys($this->userId)
+ );
+ }
+
+ public function testInit() {
+ $this->keyStorageMock->expects($this->any())
+ ->method('getUserKey')
+ ->with($this->equalTo($this->userId), $this->equalTo('privateKey'))
+ ->willReturn('privateKey');
+ $this->cryptMock->expects($this->any())
+ ->method('decryptPrivateKey')
+ ->with($this->equalTo('privateKey'), $this->equalTo('pass'))
+ ->willReturn('decryptedPrivateKey');
+
+
+ $this->assertTrue(
+ $this->instance->init($this->userId, 'pass')
+ );
+
+ }
+
+ public function testSetRecoveryKey() {
+ $this->keyStorageMock->expects($this->exactly(2))
+ ->method('setSystemUserKey')
+ ->willReturn(true);
+ $this->cryptMock->expects($this->any())
+ ->method('symmetricEncryptFileContent')
+ ->with($this->equalTo('privateKey'), $this->equalTo('pass'))
+ ->willReturn('decryptedPrivateKey');
+
+
+ $this->assertTrue(
+ $this->instance->setRecoveryKey('pass',
+ array('publicKey' => 'publicKey', 'privateKey' => 'privateKey'))
+ );
+ }
+
+ public function testSetSystemPrivateKey() {
+ $this->keyStorageMock->expects($this->exactly(1))
+ ->method('setSystemUserKey')
+ ->with($this->equalTo('keyId.privateKey'), $this->equalTo('key'))
+ ->willReturn(true);
+
+
+ $this->assertTrue(
+ $this->instance->setSystemPrivateKey('keyId', 'key')
+ );
+ }
+
+ public function testGetSystemPrivateKey() {
+ $this->keyStorageMock->expects($this->exactly(1))
+ ->method('getSystemUserKey')
+ ->with($this->equalTo('keyId.privateKey'))
+ ->willReturn('systemPrivateKey');
+
+
+ $this->assertSame('systemPrivateKey',
+ $this->instance->getSystemPrivateKey('keyId')
+ );
+ }
+
+ public function testGetEncryptedFileKey() {
+ $this->keyStorageMock->expects($this->once())
+ ->method('getFileKey')
+ ->with('/', 'fileKey')
+ ->willReturn(true);
+
+ $this->assertTrue($this->instance->getEncryptedFileKey('/'));
+ }
+
+ public function testGetFileKey() {
+ $this->keyStorageMock->expects($this->exactly(4))
+ ->method('getFileKey')
+ ->willReturn(true);
+
+ $this->keyStorageMock->expects($this->once())
+ ->method('getSystemUserKey')
+ ->willReturn(true);
+
+ $this->cryptMock->expects($this->once())
+ ->method('symmetricDecryptFileContent')
+ ->willReturn(true);
+
+ $this->cryptMock->expects($this->once())
+ ->method('multiKeyDecrypt')
+ ->willReturn(true);
+
+ $this->assertTrue($this->instance->getFileKey('/', null));
+ $this->assertEmpty($this->instance->getFileKey('/', $this->userId));
+ }
+
+ public function testDeletePrivateKey() {
+ $this->keyStorageMock->expects($this->once())
+ ->method('deleteUserKey')
+ ->with('user1', 'privateKey')
+ ->willReturn(true);
+
+ $this->assertTrue(\Test_Helper::invokePrivate($this->instance,
+ 'deletePrivateKey',
+ [$this->userId]));
+ }
+
+ public function testDeleteAllFileKeys() {
+ $this->keyStorageMock->expects($this->once())
+ ->method('deleteAllFileKeys')
+ ->willReturn(true);
+
+ $this->assertTrue($this->instance->deleteAllFileKeys('/'));
+ }
+}
diff --git a/apps/encryption/tests/lib/RecoveryTest.php b/apps/encryption/tests/lib/RecoveryTest.php
new file mode 100644
index 00000000000..701762b56d6
--- /dev/null
+++ b/apps/encryption/tests/lib/RecoveryTest.php
@@ -0,0 +1,265 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 4/3/15, 9:57 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+namespace OCA\Encryption\Tests;
+
+
+use OCA\Encryption\Recovery;
+use Test\TestCase;
+
+class RecoveryTest extends TestCase {
+ private static $tempStorage = [];
+ /**
+ * @var \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $fileMock;
+ /**
+ * @var \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $viewMock;
+ /**
+ * @var \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $userSessionMock;
+ /**
+ * @var \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $keyManagerMock;
+ /**
+ * @var \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $configMock;
+ /**
+ * @var \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $cryptMock;
+ /**
+ * @var Recovery
+ */
+ private $instance;
+
+ public function testEnableAdminRecovery() {
+ $this->keyManagerMock->expects($this->exactly(2))
+ ->method('recoveryKeyExists')
+ ->willReturnOnConsecutiveCalls(false, true);
+
+ $this->cryptMock->expects($this->once())
+ ->method('createKeyPair')
+ ->willReturn(true);
+
+ $this->keyManagerMock->expects($this->once())
+ ->method('setRecoveryKey')
+ ->willReturn(false);
+
+ $this->keyManagerMock->expects($this->exactly(2))
+ ->method('checkRecoveryPassword')
+ ->willReturnOnConsecutiveCalls(true, false);
+
+ $this->assertTrue($this->instance->enableAdminRecovery('password'));
+ $this->assertArrayHasKey('recoveryAdminEnabled', self::$tempStorage);
+ $this->assertEquals(1, self::$tempStorage['recoveryAdminEnabled']);
+
+ $this->assertFalse($this->instance->enableAdminRecovery('password'));
+ }
+
+ public function testChangeRecoveryKeyPassword() {
+ $this->assertFalse($this->instance->changeRecoveryKeyPassword('password',
+ 'passwordOld'));
+
+ $this->keyManagerMock->expects($this->once())
+ ->method('getSystemPrivateKey');
+
+ $this->cryptMock->expects($this->once())
+ ->method('decryptPrivateKey');
+
+ $this->cryptMock->expects($this->once())
+ ->method('symmetricEncryptFileContent')
+ ->willReturn(true);
+
+ $this->assertTrue($this->instance->changeRecoveryKeyPassword('password',
+ 'passwordOld'));
+ }
+
+ public function testDisableAdminRecovery() {
+
+ $this->keyManagerMock->expects($this->exactly(2))
+ ->method('checkRecoveryPassword')
+ ->willReturnOnConsecutiveCalls(true, false);
+
+ $this->assertArrayHasKey('recoveryAdminEnabled', self::$tempStorage);
+ $this->assertTrue($this->instance->disableAdminRecovery('password'));
+ $this->assertEquals(0, self::$tempStorage['recoveryAdminEnabled']);
+
+ $this->assertFalse($this->instance->disableAdminRecovery('password'));
+ }
+
+ public function testIsRecoveryEnabledForUser() {
+
+ $this->configMock->expects($this->exactly(2))
+ ->method('getUserValue')
+ ->willReturnOnConsecutiveCalls('1', '0');
+
+ $this->assertTrue($this->instance->isRecoveryEnabledForUser());
+ $this->assertFalse($this->instance->isRecoveryEnabledForUser('admin'));
+ }
+
+ public function testIsRecoveryKeyEnabled() {
+ $this->assertFalse($this->instance->isRecoveryKeyEnabled());
+ self::$tempStorage['recoveryAdminEnabled'] = '1';
+ $this->assertTrue($this->instance->isRecoveryKeyEnabled());
+ }
+
+ public function testSetRecoveryFolderForUser() {
+ $this->viewMock->expects($this->exactly(2))
+ ->method('getDirectoryContent')
+ ->willReturn([]);
+ $this->assertTrue($this->instance->setRecoveryForUser(0));
+ $this->assertTrue($this->instance->setRecoveryForUser('1'));
+ }
+
+ public function testRecoverUserFiles() {
+ $this->viewMock->expects($this->once())
+ ->method('getDirectoryContent')
+ ->willReturn([]);
+
+ $this->cryptMock->expects($this->once())
+ ->method('decryptPrivateKey');
+ $this->assertNull($this->instance->recoverUsersFiles('password',
+ 'admin'));
+ }
+
+ public function testRecoverFile() {
+ $this->keyManagerMock->expects($this->once())
+ ->method('getEncryptedFileKey')
+ ->willReturn(true);
+
+ $this->keyManagerMock->expects($this->once())
+ ->method('getShareKey')
+ ->willReturn(true);
+
+ $this->cryptMock->expects($this->once())
+ ->method('multiKeyDecrypt')
+ ->willReturn(true);
+
+ $this->fileMock->expects($this->once())
+ ->method('getAccessList')
+ ->willReturn(['users' => ['admin']]);
+
+ $this->keyManagerMock->expects($this->once())
+ ->method('getPublicKey')
+ ->willReturn('publicKey');
+
+ $this->keyManagerMock->expects($this->once())
+ ->method('addSystemKeys')
+ ->willReturn(['admin' => 'publicKey']);
+
+
+ $this->cryptMock->expects($this->once())
+ ->method('multiKeyEncrypt');
+
+ $this->keyManagerMock->expects($this->once())
+ ->method('setAllFileKeys');
+
+ $this->assertNull(\Test_Helper::invokePrivate($this->instance,
+ 'recoverFile',
+ ['/', 'testkey']));
+ }
+
+ protected function setUp() {
+ parent::setUp();
+
+
+ $this->userSessionMock = $this->getMockBuilder('OCP\IUserSession')
+ ->disableOriginalConstructor()
+ ->setMethods([
+ 'isLoggedIn',
+ 'getUID',
+ 'login',
+ 'logout',
+ 'setUser',
+ 'getUser'
+ ])
+ ->getMock();
+
+ $this->userSessionMock->expects($this->any())->method('getUID')->will($this->returnValue('admin'));
+
+ $this->userSessionMock->expects($this->any())
+ ->method($this->anything())
+ ->will($this->returnSelf());
+
+ $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')->disableOriginalConstructor()->getMock();
+ $randomMock = $this->getMock('OCP\Security\ISecureRandom');
+ $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager')->disableOriginalConstructor()->getMock();
+ $this->configMock = $this->getMock('OCP\IConfig');
+ $keyStorageMock = $this->getMock('OCP\Encryption\Keys\IStorage');
+ $this->fileMock = $this->getMock('OCP\Encryption\IFile');
+ $this->viewMock = $this->getMock('OC\Files\View');
+
+ $this->configMock->expects($this->any())
+ ->method('setAppValue')
+ ->will($this->returnCallback([$this, 'setValueTester']));
+
+ $this->configMock->expects($this->any())
+ ->method('getAppValue')
+ ->will($this->returnCallback([$this, 'getValueTester']));
+
+ $this->instance = new Recovery($this->userSessionMock,
+ $this->cryptMock,
+ $randomMock,
+ $this->keyManagerMock,
+ $this->configMock,
+ $keyStorageMock,
+ $this->fileMock,
+ $this->viewMock);
+ }
+
+
+ /**
+ * @param $app
+ * @param $key
+ * @param $value
+ */
+ public function setValueTester($app, $key, $value) {
+ self::$tempStorage[$key] = $value;
+ }
+
+ /**
+ * @param $key
+ */
+ public function removeValueTester($key) {
+ unset(self::$tempStorage[$key]);
+ }
+
+ /**
+ * @param $app
+ * @param $key
+ * @return mixed
+ */
+ public function getValueTester($app, $key) {
+ if (!empty(self::$tempStorage[$key])) {
+ return self::$tempStorage[$key];
+ }
+ return null;
+ }
+
+
+}
diff --git a/apps/encryption/tests/lib/SessionTest.php b/apps/encryption/tests/lib/SessionTest.php
new file mode 100644
index 00000000000..f7e026808f0
--- /dev/null
+++ b/apps/encryption/tests/lib/SessionTest.php
@@ -0,0 +1,140 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 3/31/15, 10:19 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+namespace OCA\Encryption\Tests;
+
+
+use OCA\Encryption\Session;
+use Test\TestCase;
+
+class SessionTest extends TestCase {
+ private static $tempStorage = [];
+ /**
+ * @var Session
+ */
+ private $instance;
+ private $sessionMock;
+
+ /**
+ * @expectedException \OCA\Encryption\Exceptions\PrivateKeyMissingException
+ * @expectedExceptionMessage Private Key missing for user: please try to log-out and log-in again
+ */
+ public function testThatGetPrivateKeyThrowsExceptionWhenNotSet() {
+ $this->instance->getPrivateKey();
+ }
+
+ /**
+ * @depends testThatGetPrivateKeyThrowsExceptionWhenNotSet
+ */
+ public function testSetAndGetPrivateKey() {
+ $this->instance->setPrivateKey('dummyPrivateKey');
+ $this->assertEquals('dummyPrivateKey', $this->instance->getPrivateKey());
+
+ }
+
+ /**
+ * @depends testSetAndGetPrivateKey
+ */
+ public function testIsPrivateKeySet() {
+ $this->assertTrue($this->instance->isPrivateKeySet());
+
+ unset(self::$tempStorage['privateKey']);
+ $this->assertFalse($this->instance->isPrivateKeySet());
+
+ // Set private key back so we can test clear method
+ self::$tempStorage['privateKey'] = 'dummyPrivateKey';
+ }
+
+ /**
+ *
+ */
+ public function testSetAndGetStatusWillSetAndReturn() {
+ // Check if get status will return 0 if it has not been set before
+ $this->assertEquals(0, $this->instance->getStatus());
+
+ $this->instance->setStatus(Session::NOT_INITIALIZED);
+ $this->assertEquals(0, $this->instance->getStatus());
+
+ $this->instance->setStatus(Session::INIT_EXECUTED);
+ $this->assertEquals(1, $this->instance->getStatus());
+
+ $this->instance->setStatus(Session::INIT_SUCCESSFUL);
+ $this->assertEquals(2, $this->instance->getStatus());
+ }
+
+ /**
+ * @param $key
+ * @param $value
+ */
+ public function setValueTester($key, $value) {
+ self::$tempStorage[$key] = $value;
+ }
+
+ /**
+ * @param $key
+ */
+ public function removeValueTester($key) {
+ unset(self::$tempStorage[$key]);
+ }
+
+ /**
+ * @param $key
+ * @return mixed
+ */
+ public function getValueTester($key) {
+ if (!empty(self::$tempStorage[$key])) {
+ return self::$tempStorage[$key];
+ }
+ return null;
+ }
+
+ /**
+ *
+ */
+ public function testClearWillRemoveValues() {
+ $this->instance->clear();
+ $this->assertEmpty(self::$tempStorage);
+ }
+
+ /**
+ *
+ */
+ protected function setUp() {
+ parent::setUp();
+ $this->sessionMock = $this->getMock('OCP\ISession');
+
+ $this->sessionMock->expects($this->any())
+ ->method('set')
+ ->will($this->returnCallback([$this, "setValueTester"]));
+
+ $this->sessionMock->expects($this->any())
+ ->method('get')
+ ->will($this->returnCallback([$this, "getValueTester"]));
+
+ $this->sessionMock->expects($this->any())
+ ->method('remove')
+ ->will($this->returnCallback([$this, "removeValueTester"]));
+
+
+ $this->instance = new Session($this->sessionMock);
+ }
+}
diff --git a/apps/encryption/tests/lib/UtilTest.php b/apps/encryption/tests/lib/UtilTest.php
new file mode 100644
index 00000000000..fa87a629f2f
--- /dev/null
+++ b/apps/encryption/tests/lib/UtilTest.php
@@ -0,0 +1,128 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 3/31/15, 3:49 PM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+namespace OCA\Encryption\Tests;
+
+
+use OCA\Encryption\Util;
+use Test\TestCase;
+
+class UtilTest extends TestCase {
+ private static $tempStorage = [];
+ private $configMock;
+ private $filesMock;
+ /**
+ * @var Util
+ */
+ private $instance;
+
+ public function testSetRecoveryForUser() {
+ $this->instance->setRecoveryForUser('1');
+ $this->assertArrayHasKey('recoveryEnabled', self::$tempStorage);
+ }
+
+ /**
+ *
+ */
+ public function testIsRecoveryEnabledForUser() {
+ $this->assertTrue($this->instance->isRecoveryEnabledForUser());
+
+ // Assert recovery will return default value if not set
+ unset(self::$tempStorage['recoveryEnabled']);
+ $this->assertEquals(0, $this->instance->isRecoveryEnabledForUser());
+ }
+
+ public function testUserHasFiles() {
+ $this->filesMock->expects($this->once())
+ ->method('file_exists')
+ ->will($this->returnValue(true));
+
+ $this->assertTrue($this->instance->userHasFiles('admin'));
+ }
+
+ protected function setUp() {
+ parent::setUp();
+ $this->filesMock = $this->getMock('OC\Files\View');
+
+ $cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $loggerMock = $this->getMock('OCP\ILogger');
+ $userSessionMock = $this->getMockBuilder('OCP\IUserSession')
+ ->disableOriginalConstructor()
+ ->setMethods([
+ 'isLoggedIn',
+ 'getUID',
+ 'login',
+ 'logout',
+ 'setUser',
+ 'getUser'
+ ])
+ ->getMock();
+
+ $userSessionMock->method('isLoggedIn')->will($this->returnValue(true));
+
+ $userSessionMock->method('getUID')->will($this->returnValue('admin'));
+
+ $userSessionMock->expects($this->any())
+ ->method($this->anything())
+ ->will($this->returnSelf());
+
+
+ $this->configMock = $configMock = $this->getMock('OCP\IConfig');
+
+ $this->configMock->expects($this->any())
+ ->method('getUserValue')
+ ->will($this->returnCallback([$this, 'getValueTester']));
+
+ $this->configMock->expects($this->any())
+ ->method('setUserValue')
+ ->will($this->returnCallback([$this, 'setValueTester']));
+
+ $this->instance = new Util($this->filesMock, $cryptMock, $loggerMock, $userSessionMock, $configMock);
+ }
+
+ /**
+ * @param $userId
+ * @param $app
+ * @param $key
+ * @param $value
+ */
+ public function setValueTester($userId, $app, $key, $value) {
+ self::$tempStorage[$key] = $value;
+ }
+
+ /**
+ * @param $userId
+ * @param $app
+ * @param $key
+ * @param $default
+ * @return mixed
+ */
+ public function getValueTester($userId, $app, $key, $default) {
+ if (!empty(self::$tempStorage[$key])) {
+ return self::$tempStorage[$key];
+ }
+ return $default ?: null;
+ }
+
+}
diff --git a/apps/encryption/tests/lib/crypto/encryptionTest.php b/apps/encryption/tests/lib/crypto/encryptionTest.php
new file mode 100644
index 00000000000..52a322463a9
--- /dev/null
+++ b/apps/encryption/tests/lib/crypto/encryptionTest.php
@@ -0,0 +1,78 @@
+<?php
+
+/**
+ * ownCloud
+ *
+ * @copyright (C) 2015 ownCloud, Inc.
+ *
+ * @author Bjoern Schiessle <schiessle@owncloud.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace OCA\Encryption\Tests\Crypto;
+
+use Test\TestCase;
+use OCA\Encryption\Crypto\Encryption;
+
+class EncryptionTest extends TestCase {
+
+ /** @var Encryption */
+ private $instance;
+
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $keyManagerMock;
+
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $cryptMock;
+
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $utilMock;
+
+ public function setUp() {
+ parent::setUp();
+
+ $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->utilMock = $this->getMockBuilder('OCA\Encryption\Util')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->instance = new Encryption($this->cryptMock, $this->keyManagerMock, $this->utilMock);
+ }
+
+ /**
+ * @dataProvider dataProviderForTestGetPathToRealFile
+ */
+ public function testGetPathToRealFile($path, $expected) {
+ $this->assertSame($expected,
+ \Test_Helper::invokePrivate($this->instance, 'getPathToRealFile', array($path))
+ );
+ }
+
+ public function dataProviderForTestGetPathToRealFile() {
+ return array(
+ array('/user/files/foo/bar.txt', '/user/files/foo/bar.txt'),
+ array('/user/files/foo.txt', '/user/files/foo.txt'),
+ array('/user/files_versions/foo.txt.v543534', '/user/files/foo.txt'),
+ array('/user/files_versions/foo/bar.txt.v5454', '/user/files/foo/bar.txt'),
+ );
+ }
+
+
+} \ No newline at end of file
diff --git a/apps/encryption/tests/lib/users/SetupTest.php b/apps/encryption/tests/lib/users/SetupTest.php
new file mode 100644
index 00000000000..6a66df3674b
--- /dev/null
+++ b/apps/encryption/tests/lib/users/SetupTest.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 4/6/15, 11:50 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+namespace OCA\Encryption\Tests\Users;
+
+
+use OCA\Encryption\Users\Setup;
+use Test\TestCase;
+
+class SetupTest extends TestCase {
+ /**
+ * @var \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $keyManagerMock;
+ /**
+ * @var \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $cryptMock;
+ /**
+ * @var Setup
+ */
+ private $instance;
+
+ public function testSetupServerSide() {
+ $this->keyManagerMock->expects($this->exactly(2))
+ ->method('userHasKeys')
+ ->with('admin')
+ ->willReturnOnConsecutiveCalls(true, false);
+
+ $this->assertTrue($this->instance->setupServerSide('admin',
+ 'password'));
+
+ $this->keyManagerMock->expects($this->once())
+ ->method('storeKeyPair')
+ ->with('admin', 'password')
+ ->willReturn(false);
+
+ $this->assertFalse($this->instance->setupServerSide('admin',
+ 'password'));
+ }
+
+ protected function setUp() {
+ parent::setUp();
+ $logMock = $this->getMock('OCP\ILogger');
+ $userSessionMock = $this->getMockBuilder('OCP\IUserSession')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->instance = new Setup($logMock,
+ $userSessionMock,
+ $this->cryptMock,
+ $this->keyManagerMock);
+ }
+
+}
diff --git a/apps/encryption_dummy/img/app.svg b/apps/encryption_dummy/img/app.svg
new file mode 100644
index 00000000000..1157c71c66e
--- /dev/null
+++ b/apps/encryption_dummy/img/app.svg
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xml:space="preserve"
+ height="16px"
+ width="16px"
+ version="1.1"
+ y="0px"
+ x="0px"
+ viewBox="0 0 71 100"
+ id="svg2"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="app.svg"><metadata
+ id="metadata10"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs8" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1014"
+ id="namedview6"
+ showgrid="false"
+ inkscape:zoom="14.75"
+ inkscape:cx="-21.423729"
+ inkscape:cy="8"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" /><path
+ d="m8 1c-2.2091 0-4 1.7909-4 4v2h-1v7h10v-7h-1v-2c0-2.2091-1.791-4-4-4zm0 2c1.1046 0 2 0.89543 2 2v2h-4v-2c0-1.1046 0.8954-2 2-2z"
+ transform="matrix(6.25,0,0,6.25,-14.5,0)"
+ id="path4"
+ style="fill:#ffffff;fill-opacity:1" /><path
+ style="fill:none"
+ d="m 3.0644068,10.508475 0,-3.4576275 0.4655371,0 0.465537,0 0.049537,-1.2033899 C 4.1094633,4.2818838 4.1578923,4.0112428 4.4962182,3.3259708 4.7075644,2.8978935 4.9002217,2.6327599 5.2605792,2.2740624 6.7855365,0.75613022 8.9920507,0.69157582 10.623172,2.1171729 c 0.384104,0.3357058 0.882069,1.0763131 1.054177,1.5678422 0.147302,0.4206856 0.262873,1.6086448 0.266436,2.7387137 l 0.002,0.6271187 0.508474,0 0.508475,0 0,3.4576275 0,3.457627 -4.9491527,0 -4.9491525,0 0,-3.457627 z M 10.065882,6.3559322 c -0.02012,-0.3822034 -0.04774,-0.7076271 -0.0614,-0.7231639 -0.013653,-0.015537 -0.024824,0.281921 -0.024824,0.661017 l 0,0.6892655 -1.9630041,0 -1.963004,0 -0.023717,-0.4576271 -0.023717,-0.4576271 -0.013279,0.4915254 -0.013279,0.4915255 2.0613978,0 2.0613972,0 -0.03657,-0.6949153 0,0 z M 6.5396275,3.7118644 C 6.648082,3.5720339 6.7197092,3.4576271 6.6987988,3.4576271 c -0.062956,0 -0.5835446,0.6841947 -0.5835446,0.7669359 0,0.042237 0.051116,0.00136 0.1135916,-0.090834 0.062475,-0.092195 0.2023271,-0.2820343 0.3107817,-0.4218648 z M 9.7498983,4.0169492 C 9.6961899,3.9144068 9.5352369,3.723769 9.392225,3.5933098 L 9.1322034,3.356111 9.3784249,3.6272081 c 0.1354218,0.1491033 0.2814105,0.3397411 0.3244192,0.4236394 0.043009,0.083898 0.093162,0.1525423 0.1114515,0.1525423 0.01829,0 -0.010689,-0.083898 -0.064397,-0.1864406 l 0,0 z M 7.3032896,3.1315382 C 7.2704731,3.0987216 6.877102,3.3089557 6.8306315,3.3841466 6.8091904,3.4188389 6.911918,3.3813452 7.0589148,3.300827 7.2059117,3.2203088 7.3158803,3.1441289 7.3032896,3.1315382 l 0,0 z"
+ id="path3007"
+ inkscape:connector-curvature="0"
+ transform="matrix(6.25,0,0,6.25,-14.5,0)" /></svg> \ No newline at end of file
diff --git a/apps/encryption_dummy/lib/dummymodule.php b/apps/encryption_dummy/lib/dummymodule.php
index 8ca9cd4f9af..8cec9dfaf4c 100644
--- a/apps/encryption_dummy/lib/dummymodule.php
+++ b/apps/encryption_dummy/lib/dummymodule.php
@@ -23,7 +23,9 @@
namespace OCA\Encryption_Dummy;
-class DummyModule implements \OCP\Encryption\IEncryptionModule {
+use OCP\Encryption\IEncryptionModule;
+
+class DummyModule implements IEncryptionModule {
/** @var boolean */
protected $isWriteOperation;
@@ -32,7 +34,7 @@ class DummyModule implements \OCP\Encryption\IEncryptionModule {
* @return string defining the technical unique id
*/
public function getId() {
- return "34876934";
+ return "OC_DUMMY_MODULE";
}
/**
@@ -104,17 +106,6 @@ class DummyModule implements \OCP\Encryption\IEncryptionModule {
}
/**
- * update encrypted file, e.g. give additional users access to the file
- *
- * @param string $path path to the file which should be updated
- * @param array $accessList who has access to the file contains the key 'users' and 'public'
- * @return boolean
- */
- public function update($path, $accessList) {
- return true;
- }
-
- /**
* should the file be encrypted or not
*
* @param string $path
@@ -142,4 +133,15 @@ class DummyModule implements \OCP\Encryption\IEncryptionModule {
return 6126;
}
-} \ No newline at end of file
+ /**
+ * update encrypted file, e.g. give additional users access to the file
+ *
+ * @param string $path path to the file which should be updated
+ * @param string $uid of the user who performs the operation
+ * @param array $accessList who has access to the file contains the key 'users' and 'public'
+ * @return boolean
+ */
+ public function update($path, $uid, $accessList) {
+ return true;
+ }
+}
diff --git a/apps/files/index.php b/apps/files/index.php
index cfc5b931e13..ea0fd0ce2fe 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -84,12 +84,6 @@ $config = \OC::$server->getConfig();
// mostly for the home storage's free space
$dirInfo = \OC\Files\Filesystem::getFileInfo('/', false);
$storageInfo=OC_Helper::getStorageInfo('/', $dirInfo);
-// if the encryption app is disabled, than everything is fine (INIT_SUCCESSFUL status code)
-$encryptionInitStatus = 2;
-if (OC_App::isEnabled('files_encryption')) {
- $session = new \OCA\Files_Encryption\Session(new \OC\Files\View('/'));
- $encryptionInitStatus = $session->getInitialized();
-}
$nav = new OCP\Template('files', 'appnavigation', '');
@@ -146,11 +140,9 @@ OCP\Util::addscript('files', 'keyboardshortcuts');
$tmpl = new OCP\Template('files', 'index', 'user');
$tmpl->assign('usedSpacePercent', (int)$storageInfo['relative']);
$tmpl->assign('isPublic', false);
-$tmpl->assign("encryptedFiles", \OCP\Util::encryptedFiles());
$tmpl->assign("mailNotificationEnabled", $config->getAppValue('core', 'shareapi_allow_mail_notification', 'no'));
$tmpl->assign("mailPublicNotificationEnabled", $config->getAppValue('core', 'shareapi_allow_public_notification', 'no'));
$tmpl->assign("allowShareWithLink", $config->getAppValue('core', 'shareapi_allow_links', 'yes'));
-$tmpl->assign("encryptionInitStatus", $encryptionInitStatus);
$tmpl->assign('appNavigation', $nav);
$tmpl->assign('appContents', $contentItems);
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index e63c3cad52e..68e9315954f 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -120,28 +120,6 @@
}
},
- displayEncryptionWarning: function() {
-
- if (!OC.Notification.isHidden()) {
- return;
- }
-
- var encryptedFiles = $('#encryptedFiles').val();
- var initStatus = $('#encryptionInitStatus').val();
- if (initStatus === '0') { // enc not initialized, but should be
- OC.Notification.show(t('files', 'Encryption App is enabled but your keys are not initialized, please log-out and log-in again'));
- return;
- }
- if (initStatus === '1') { // encryption tried to init but failed
- OC.Notification.show(t('files', 'Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files.'));
- return;
- }
- if (encryptedFiles === '1') {
- OC.Notification.show(t('files', 'Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files.'));
- return;
- }
- },
-
/**
* Returns the download URL of the given file(s)
* @param filename string or array of file names to download
@@ -220,7 +198,6 @@
*/
initialize: function() {
Files.getMimeIcon.cache = {};
- Files.displayEncryptionWarning();
Files.bindKeyboardShortcuts(document, $);
// TODO: move file list related code (upload) to OCA.Files.FileList
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 222a996aae3..77f80bc346d 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -12,8 +12,6 @@
<input type="hidden" name="filesApp" id="filesApp" value="1" />
<input type="hidden" name="usedSpacePercent" id="usedSpacePercent" value="<?php p($_['usedSpacePercent']); ?>" />
<?php if (!$_['isPublic']) :?>
-<input type="hidden" name="encryptedFiles" id="encryptedFiles" value="<?php $_['encryptedFiles'] ? p('1') : p('0'); ?>" />
-<input type="hidden" name="encryptedInitStatus" id="encryptionInitStatus" value="<?php p($_['encryptionInitStatus']) ?>" />
<input type="hidden" name="mailNotificationEnabled" id="mailNotificationEnabled" value="<?php p($_['mailNotificationEnabled']) ?>" />
<input type="hidden" name="mailPublicNotificationEnabled" id="mailPublicNotificationEnabled" value="<?php p($_['mailPublicNotificationEnabled']) ?>" />
<input type="hidden" name="allowShareWithLink" id="allowShareWithLink" value="<?php p($_['allowShareWithLink']) ?>" />
diff --git a/apps/files_encryption/ajax/adminrecovery.php b/apps/files_encryption/ajax/adminrecovery.php
deleted file mode 100644
index 1c13df8b885..00000000000
--- a/apps/files_encryption/ajax/adminrecovery.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Sam Tuke <mail@samtuke.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-use OCA\Files_Encryption\Helper;
-
-\OCP\JSON::checkAdminUser();
-\OCP\JSON::checkAppEnabled('files_encryption');
-\OCP\JSON::callCheck();
-
-$l = \OC::$server->getL10N('files_encryption');
-
-$return = false;
-$errorMessage = $l->t("Unknown error");
-
-//check if both passwords are the same
-if (empty($_POST['recoveryPassword'])) {
- $errorMessage = $l->t('Missing recovery key password');
- \OCP\JSON::error(array('data' => array('message' => $errorMessage)));
- exit();
-}
-
-if (empty($_POST['confirmPassword'])) {
- $errorMessage = $l->t('Please repeat the recovery key password');
- \OCP\JSON::error(array('data' => array('message' => $errorMessage)));
- exit();
-}
-
-if ($_POST['recoveryPassword'] !== $_POST['confirmPassword']) {
- $errorMessage = $l->t('Repeated recovery key password does not match the provided recovery key password');
- \OCP\JSON::error(array('data' => array('message' => $errorMessage)));
- exit();
-}
-
-// Enable recoveryAdmin
-$recoveryKeyId = \OC::$server->getAppConfig()->getValue('files_encryption', 'recoveryKeyId');
-
-if (isset($_POST['adminEnableRecovery']) && $_POST['adminEnableRecovery'] === '1') {
-
- $return = Helper::adminEnableRecovery($recoveryKeyId, (string)$_POST['recoveryPassword']);
-
- // Return success or failure
- if ($return) {
- $successMessage = $l->t('Recovery key successfully enabled');
- } else {
- $errorMessage = $l->t('Could not disable recovery key. Please check your recovery key password!');
- }
-
-// Disable recoveryAdmin
-} elseif (
- isset($_POST['adminEnableRecovery'])
- && '0' === $_POST['adminEnableRecovery']
-) {
- $return = Helper::adminDisableRecovery((string)$_POST['recoveryPassword']);
-
- if ($return) {
- $successMessage = $l->t('Recovery key successfully disabled');
- } else {
- $errorMessage = $l->t('Could not disable recovery key. Please check your recovery key password!');
- }
-}
-
-// Return success or failure
-if ($return) {
- \OCP\JSON::success(array('data' => array('message' => $successMessage)));
-} else {
- \OCP\JSON::error(array('data' => array('message' => $errorMessage)));
-}
diff --git a/apps/files_encryption/ajax/changeRecoveryPassword.php b/apps/files_encryption/ajax/changeRecoveryPassword.php
deleted file mode 100644
index 146c0c5c5dc..00000000000
--- a/apps/files_encryption/ajax/changeRecoveryPassword.php
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Christopher Schäpers <kondou@ts.unde.re>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-\OCP\JSON::checkAdminUser();
-\OCP\JSON::checkAppEnabled('files_encryption');
-\OCP\JSON::callCheck();
-
-$l = \OC::$server->getL10N('core');
-
-$return = false;
-
-$oldPassword = (string)$_POST['oldPassword'];
-$newPassword = (string)$_POST['newPassword'];
-$confirmPassword = (string)$_POST['confirmPassword'];
-
-//check if both passwords are the same
-if (empty($_POST['oldPassword'])) {
- $errorMessage = $l->t('Please provide the old recovery password');
- \OCP\JSON::error(array('data' => array('message' => $errorMessage)));
- exit();
-}
-
-if (empty($_POST['newPassword'])) {
- $errorMessage = $l->t('Please provide a new recovery password');
- \OCP\JSON::error(array('data' => array('message' => $errorMessage)));
- exit();
-}
-
-if (empty($_POST['confirmPassword'])) {
- $errorMessage = $l->t('Please repeat the new recovery password');
- \OCP\JSON::error(array('data' => array('message' => $errorMessage)));
- exit();
-}
-
-if ($_POST['newPassword'] !== $_POST['confirmPassword']) {
- $errorMessage = $l->t('Repeated recovery key password does not match the provided recovery key password');
- \OCP\JSON::error(array('data' => array('message' => $errorMessage)));
- exit();
-}
-
-$view = new \OC\Files\View('/');
-$util = new \OCA\Files_Encryption\Util(new \OC\Files\View('/'), \OCP\User::getUser());
-
-$proxyStatus = \OC_FileProxy::$enabled;
-\OC_FileProxy::$enabled = false;
-
-$keyId = $util->getRecoveryKeyId();
-
-$encryptedRecoveryKey = \OCA\Files_Encryption\Keymanager::getPrivateSystemKey($keyId);
-$decryptedRecoveryKey = $encryptedRecoveryKey ? \OCA\Files_Encryption\Crypt::decryptPrivateKey($encryptedRecoveryKey, $oldPassword) : false;
-
-if ($decryptedRecoveryKey) {
- $cipher = \OCA\Files_Encryption\Helper::getCipher();
- $encryptedKey = \OCA\Files_Encryption\Crypt::symmetricEncryptFileContent($decryptedRecoveryKey, $newPassword, $cipher);
- if ($encryptedKey) {
- \OCA\Files_Encryption\Keymanager::setPrivateSystemKey($encryptedKey, $keyId);
- $return = true;
- }
-}
-
-\OC_FileProxy::$enabled = $proxyStatus;
-
-// success or failure
-if ($return) {
- \OCP\JSON::success(array('data' => array('message' => $l->t('Password successfully changed.'))));
-} else {
- \OCP\JSON::error(array('data' => array('message' => $l->t('Could not change the password. Maybe the old password was not correct.'))));
-}
diff --git a/apps/files_encryption/ajax/getMigrationStatus.php b/apps/files_encryption/ajax/getMigrationStatus.php
deleted file mode 100644
index e140a296f32..00000000000
--- a/apps/files_encryption/ajax/getMigrationStatus.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * @author Arthur Schiwon <blizzz@owncloud.com>
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-use OCA\Files_Encryption\Util;
-
-\OCP\JSON::checkAppEnabled('files_encryption');
-
-$loginname = isset($_POST['user']) ? (string)$_POST['user'] : '';
-$password = isset($_POST['password']) ? (string)$_POST['password'] : '';
-
-$migrationStatus = Util::MIGRATION_COMPLETED;
-
-if ($loginname !== '' && $password !== '') {
- $username = \OCP\User::checkPassword($loginname, $password);
- if ($username) {
- $util = new Util(new \OC\Files\View('/'), $username);
- $migrationStatus = $util->getMigrationStatus();
- }
-}
-
-\OCP\JSON::success(array('data' => array('migrationStatus' => $migrationStatus)));
diff --git a/apps/files_encryption/ajax/updatePrivateKeyPassword.php b/apps/files_encryption/ajax/updatePrivateKeyPassword.php
deleted file mode 100644
index e5f2d654348..00000000000
--- a/apps/files_encryption/ajax/updatePrivateKeyPassword.php
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Christopher Schäpers <kondou@ts.unde.re>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-\OCP\JSON::checkLoggedIn();
-\OCP\JSON::checkAppEnabled('files_encryption');
-\OCP\JSON::callCheck();
-
-$l = \OC::$server->getL10N('core');
-
-$return = false;
-$errorMessage = $l->t('Could not update the private key password.');
-
-$oldPassword = (string)$_POST['oldPassword'];
-$newPassword = (string)$_POST['newPassword'];
-
-$view = new \OC\Files\View('/');
-$session = new \OCA\Files_Encryption\Session($view);
-$user = \OCP\User::getUser();
-$loginName = \OC::$server->getUserSession()->getLoginName();
-
-// check new password
-$passwordCorrect = \OCP\User::checkPassword($loginName, $newPassword);
-
-if ($passwordCorrect !== false) {
-
-$proxyStatus = \OC_FileProxy::$enabled;
-\OC_FileProxy::$enabled = false;
-
-$encryptedKey = \OCA\Files_Encryption\Keymanager::getPrivateKey($view, $user);
-$decryptedKey = $encryptedKey ? \OCA\Files_Encryption\Crypt::decryptPrivateKey($encryptedKey, $oldPassword) : false;
-
-if ($decryptedKey) {
- $cipher = \OCA\Files_Encryption\Helper::getCipher();
- $encryptedKey = \OCA\Files_Encryption\Crypt::symmetricEncryptFileContent($decryptedKey, $newPassword, $cipher);
- if ($encryptedKey) {
- \OCA\Files_Encryption\Keymanager::setPrivateKey($encryptedKey, $user);
- $session->setPrivateKey($decryptedKey);
- $return = true;
- }
-} else {
- $result = false;
- $errorMessage = $l->t('The old password was not correct, please try again.');
-}
-
-\OC_FileProxy::$enabled = $proxyStatus;
-
-} else {
- $result = false;
- $errorMessage = $l->t('The current log-in password was not correct, please try again.');
-}
-
-// success or failure
-if ($return) {
- $session->setInitialized(\OCA\Files_Encryption\Session::INIT_SUCCESSFUL);
- \OCP\JSON::success(array('data' => array('message' => $l->t('Private key password successfully updated.'))));
-} else {
- \OCP\JSON::error(array('data' => array('message' => $errorMessage)));
-}
diff --git a/apps/files_encryption/ajax/userrecovery.php b/apps/files_encryption/ajax/userrecovery.php
deleted file mode 100644
index a1145172f71..00000000000
--- a/apps/files_encryption/ajax/userrecovery.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-\OCP\JSON::checkLoggedIn();
-\OCP\JSON::checkAppEnabled('files_encryption');
-\OCP\JSON::callCheck();
-
-$l = \OC::$server->getL10N('files_encryption');
-
-if (
- isset($_POST['userEnableRecovery'])
- && (0 == $_POST['userEnableRecovery'] || '1' === $_POST['userEnableRecovery'])
-) {
-
- $userId = \OCP\USER::getUser();
- $view = new \OC\Files\View('/');
- $util = new \OCA\Files_Encryption\Util($view, $userId);
-
- // Save recovery preference to DB
- $return = $util->setRecoveryForUser((string)$_POST['userEnableRecovery']);
-
- if ($_POST['userEnableRecovery'] === '1') {
- $util->addRecoveryKeys();
- } else {
- $util->removeRecoveryKeys();
- }
-
-} else {
-
- $return = false;
-
-}
-
-// Return success or failure
-if ($return) {
- \OCP\JSON::success(array('data' => array('message' => $l->t('File recovery settings updated'))));
-} else {
- \OCP\JSON::error(array('data' => array('message' => $l->t('Could not update file recovery'))));
-}
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php
deleted file mode 100644
index 5da8a3a7cb9..00000000000
--- a/apps/files_encryption/appinfo/app.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-\OCP\Util::addscript('files_encryption', 'encryption');
-\OCP\Util::addscript('files_encryption', 'detect-migration');
-
-if (!OC_Config::getValue('maintenance', false)) {
- OC_FileProxy::register(new OCA\Files_Encryption\Proxy());
-
- // User related hooks
- OCA\Files_Encryption\Helper::registerUserHooks();
-
- // Sharing related hooks
- OCA\Files_Encryption\Helper::registerShareHooks();
-
- // Filesystem related hooks
- OCA\Files_Encryption\Helper::registerFilesystemHooks();
-
- // App manager related hooks
- OCA\Files_Encryption\Helper::registerAppHooks();
-
- if(!in_array('crypt', stream_get_wrappers())) {
- stream_wrapper_register('crypt', 'OCA\Files_Encryption\Stream');
- }
-} else {
- // logout user if we are in maintenance to force re-login
- OCP\User::logout();
-}
-
-\OC::$server->getCommandBus()->requireSync('\OC\Command\FileAccess');
-
-// Register settings scripts
-OCP\App::registerAdmin('files_encryption', 'settings-admin');
-OCP\App::registerPersonal('files_encryption', 'settings-personal');
diff --git a/apps/files_encryption/appinfo/info.xml b/apps/files_encryption/appinfo/info.xml
deleted file mode 100644
index 7f7e09d6271..00000000000
--- a/apps/files_encryption/appinfo/info.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<info>
- <id>files_encryption</id>
- <name>Server-side Encryption</name>
- <description>
- This application encrypts all files accessed by ownCloud at rest, wherever they are stored. As an example, with this application enabled, external cloud based Amazon S3 storage will be encrypted, protecting this data on storage outside of the control of the Admin. When this application is enabled for the first time, all files are encrypted as users log in and are prompted for their password. The recommended recovery key option enables recovery of files in case the key is lost.
- Note that this app encrypts all files that are touched by ownCloud, so external storage providers and applications such as SharePoint will see new files encrypted when they are accessed. Encryption is based on AES 128 or 256 bit keys. More information is available in the Encryption documentation
- </description>
- <licence>AGPL</licence>
- <author>Sam Tuke, Bjoern Schiessle, Florin Peter</author>
- <requiremin>4</requiremin>
- <shipped>true</shipped>
- <documentation>
- <user>user-encryption</user>
- <admin>admin-encryption</admin>
- </documentation>
- <rememberlogin>false</rememberlogin>
- <types>
- <filesystem/>
- </types>
- <ocsid>166047</ocsid>
- <dependencies>
- <lib>openssl</lib>
- </dependencies>
-</info>
diff --git a/apps/files_encryption/appinfo/routes.php b/apps/files_encryption/appinfo/routes.php
deleted file mode 100644
index 8884ac3b6aa..00000000000
--- a/apps/files_encryption/appinfo/routes.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Tom Needham <tom@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-/** @var $this \OCP\Route\IRouter */
-
-$this->create('files_encryption_ajax_adminrecovery', 'ajax/adminrecovery.php')
- ->actionInclude('files_encryption/ajax/adminrecovery.php');
-$this->create('files_encryption_ajax_changeRecoveryPassword', 'ajax/changeRecoveryPassword.php')
- ->actionInclude('files_encryption/ajax/changeRecoveryPassword.php');
-$this->create('files_encryption_ajax_getMigrationStatus', 'ajax/getMigrationStatus.php')
- ->actionInclude('files_encryption/ajax/getMigrationStatus.php');
-$this->create('files_encryption_ajax_updatePrivateKeyPassword', 'ajax/updatePrivateKeyPassword.php')
- ->actionInclude('files_encryption/ajax/updatePrivateKeyPassword.php');
-$this->create('files_encryption_ajax_userrecovery', 'ajax/userrecovery.php')
- ->actionInclude('files_encryption/ajax/userrecovery.php');
-
-// Register with the capabilities API
-OC_API::register('get', '/cloud/capabilities', array('OCA\Files_Encryption\Capabilities', 'getCapabilities'), 'files_encryption', OC_API::USER_AUTH);
diff --git a/apps/files_encryption/appinfo/spec.txt b/apps/files_encryption/appinfo/spec.txt
deleted file mode 100644
index ddd3983a9eb..00000000000
--- a/apps/files_encryption/appinfo/spec.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-Encrypted files
----------------
-
-- Each encrypted file has at least two components: the encrypted data file
- ('catfile'), and it's corresponding key file ('keyfile'). Shared files have an
- additional key file ('share key'). The catfile contains the encrypted data
- concatenated with delimiter text, followed by the initialisation vector ('IV'),
- and padding. e.g.:
-
- [encrypted data string][delimiter][IV][padding]
- [anhAAjAmcGXqj1X9g==][00iv00][MSHU5N5gECP7aAg7][xx] (square braces added)
-
-- Directory structure:
- - Encrypted user data (catfiles) are stored in the usual /data/user/files dir
- - Keyfiles are stored in /data/user/files_encryption/keyfiles
- - Sharekey are stored in /data/user/files_encryption/share-files
-
-- File extensions:
- - Catfiles have to keep the file extension of the original file, pre-encryption
- - Keyfiles use .keyfile
- - Sharekeys have .shareKey
-
-Shared files
-------------
-
-Shared files have a centrally stored catfile and keyfile, and one sharekey for
-each user that shares it.
-
-When sharing is used, a different encryption method is used to encrypt the
-keyfile (openssl_seal). Although shared files have a keyfile, its contents
-use a different format therefore.
-
-Each time a shared file is edited or deleted, all sharekeys for users sharing
-that file must have their sharekeys changed also. The keyfile and catfile
-however need only changing in the owners files, as there is only one copy of
-these.
-
-Publicly shared files (public links)
-------------------------------------
-
-Files shared via public links use a separate system user account called 'ownCloud'. All public files are shared to that user's public key, and the private key is used to access the files when the public link is used in browser.
-
-This means that files shared via public links are accessible only to users who know the shared URL, or to admins who know the 'ownCloud' user password.
-
-Lost password recovery
-----------------------
-
-In order to enable users to read their encrypted files in the event of a password loss/reset scenario, administrators can choose to enable a 'recoveryAdmin' account. This is a user that all user files will automatically be shared to of the option is enabled. This allows the recoveryAdmin user to generate new keyfiles for the user. By default the UID of the recoveryAdmin is 'recoveryAdmin'.
-
-OC_FilesystemView
------------------
-
-files_encryption deals extensively with paths and the filesystem. In order to minimise bugs, it makes calls to filesystem methods in a consistent way: OC_FilesystemView{} objects always use '/' as their root, and specify paths each time particular methods are called. e.g. do this:
-
-$view->file_exists( 'path/to/file' );
-
-Not:
-
-$view->chroot( 'path/to' );
-$view->file_exists( 'file' );
-
-Using this convention means that $view objects are more predictable and less likely to break. Problems with paths are the #1 cause of bugs in this app, and consistent $view handling is an important way to prevent them.
-
-Notes
------
-
-- The user passphrase is required in order to set up or upgrade the app. New
- keypair generation, and the re-encryption of legacy encrypted files requires
- it. Therefore an appinfo/update.php script cannot be used, and upgrade logic
- is handled in the login hook listener. Therefore each time the user logs in
- their files are scanned to detect unencrypted and legacy encrypted files, and
- they are (re)encrypted as necessary. This may present a performance issue; we
- need to monitor this.
-- When files are saved to ownCloud via WebDAV, a .part file extension is used so
- that the file isn't cached before the upload has been completed. .part files
- are not compatible with files_encrytion's key management system however, so
- we have to always sanitise such paths manually before using them. \ No newline at end of file
diff --git a/apps/files_encryption/appinfo/version b/apps/files_encryption/appinfo/version
deleted file mode 100644
index 39e898a4f95..00000000000
--- a/apps/files_encryption/appinfo/version
+++ /dev/null
@@ -1 +0,0 @@
-0.7.1
diff --git a/apps/files_encryption/command/migratekeys.php b/apps/files_encryption/command/migratekeys.php
deleted file mode 100644
index 4f3e558167b..00000000000
--- a/apps/files_encryption/command/migratekeys.php
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-/**
- * @author Arthur Schiwon <blizzz@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Command;
-
-use OCA\Files_Encryption\Migration;
-use OCP\IUserBackend;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-class MigrateKeys extends Command {
-
- /** @var \OC\User\Manager */
- private $userManager;
-
- public function __construct(\OC\User\Manager $userManager) {
- $this->userManager = $userManager;
- parent::__construct();
- }
-
- protected function configure() {
- $this
- ->setName('encryption:migrate-keys')
- ->setDescription('migrate encryption keys')
- ->addArgument(
- 'user_id',
- InputArgument::OPTIONAL | InputArgument::IS_ARRAY,
- 'will migrate keys of the given user(s)'
- );
- }
-
- protected function execute(InputInterface $input, OutputInterface $output) {
-
- // perform system reorganization
- $migration = new Migration();
- $output->writeln("Reorganize system folder structure");
- $migration->reorganizeSystemFolderStructure();
-
- $users = $input->getArgument('user_id');
- if (!empty($users)) {
- foreach ($users as $user) {
- if ($this->userManager->userExists($user)) {
- $output->writeln("Migrating keys <info>$user</info>");
- $migration->reorganizeFolderStructureForUser($user);
- } else {
- $output->writeln("<error>Unknown user $user</error>");
- }
- }
- } else {
- foreach($this->userManager->getBackends() as $backend) {
- $name = get_class($backend);
-
- if ($backend instanceof IUserBackend) {
- $name = $backend->getBackendName();
- }
-
- $output->writeln("Migrating keys for users on backend <info>$name</info>");
-
- $limit = 500;
- $offset = 0;
- do {
- $users = $backend->getUsers('', $limit, $offset);
- foreach ($users as $user) {
- $output->writeln(" <info>$user</info>");
- $migration->reorganizeFolderStructureForUser($user);
- }
- $offset += $limit;
- } while(count($users) >= $limit);
- }
- }
-
- }
-}
diff --git a/apps/files_encryption/exception/encryptionexception.php b/apps/files_encryption/exception/encryptionexception.php
deleted file mode 100644
index 637103f5651..00000000000
--- a/apps/files_encryption/exception/encryptionexception.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Exception;
-
-/**
- * Base class for all encryption exception
- *
- * Possible Error Codes:
- * 10 - generic error
- * 20 - unexpected end of encryption header
- * 30 - unexpected blog size
- * 40 - encryption header to large
- * 50 - unknown cipher
- * 60 - encryption failed
- * 70 - decryption failed
- * 80 - empty data
- * 90 - private key missing
- */
-class EncryptionException extends \Exception {
- const GENERIC = 10;
- const UNEXPECTED_END_OF_ENCRYPTION_HEADER = 20;
- const UNEXPECTED_BLOCK_SIZE = 30;
- const ENCRYPTION_HEADER_TO_LARGE = 40;
- const UNKNOWN_CIPHER = 50;
- const ENCRYPTION_FAILED = 60;
- const DECRYPTION_FAILED = 70;
- const EMPTY_DATA = 80;
- const PRIVATE_KEY_MISSING = 90;
-}
diff --git a/apps/files_encryption/files/error.php b/apps/files_encryption/files/error.php
deleted file mode 100644
index 6976c9ff6cd..00000000000
--- a/apps/files_encryption/files/error.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Volkan Gezer <volkangezer@gmail.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-if (!isset($_)) { //also provide standalone error page
- require_once __DIR__ . '/../../../lib/base.php';
- require_once __DIR__ . '/../lib/crypt.php';
-
- OC_JSON::checkAppEnabled('files_encryption');
- OC_App::loadApp('files_encryption');
-
- $l = \OC::$server->getL10N('files_encryption');
-
- if (isset($_GET['errorCode'])) {
- $errorCode = $_GET['errorCode'];
- switch ($errorCode) {
- case \OCA\Files_Encryption\Crypt::ENCRYPTION_NOT_INITIALIZED_ERROR:
- $errorMsg = $l->t('Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app.');
- break;
- case \OCA\Files_Encryption\Crypt::ENCRYPTION_PRIVATE_KEY_NOT_VALID_ERROR:
- $theme = new OC_Defaults();
- $errorMsg = $l->t('Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files.', array($theme->getName()));
- break;
- case \OCA\Files_Encryption\Crypt::ENCRYPTION_NO_SHARE_KEY_FOUND:
- $errorMsg = $l->t('Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
- break;
- default:
- $errorMsg = $l->t("Unknown error. Please check your system settings or contact your administrator");
- break;
- }
- } else {
- $errorCode = \OCA\Files_Encryption\Crypt::ENCRYPTION_UNKNOWN_ERROR;
- $errorMsg = $l->t("Unknown error. Please check your system settings or contact your administrator");
- }
-
- if (isset($_GET['p']) && $_GET['p'] === '1') {
- header('HTTP/1.0 403 ' . $errorMsg);
- }
-
-// check if ajax request
- if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
- \OCP\JSON::error(array('data' => array('message' => $errorMsg)));
- } else {
- header('HTTP/1.0 403 ' . $errorMsg);
- $tmpl = new OC_Template('files_encryption', 'invalid_private_key', 'guest');
- $tmpl->assign('message', $errorMsg);
- $tmpl->assign('errorCode', $errorCode);
- $tmpl->printPage();
- }
-
- exit;
-}
-
diff --git a/apps/files_encryption/l10n/ar.js b/apps/files_encryption/l10n/ar.js
deleted file mode 100644
index 88b1750cc0d..00000000000
--- a/apps/files_encryption/l10n/ar.js
+++ /dev/null
@@ -1,40 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "خطأ غير معروÙ. ",
- "Recovery key successfully enabled" : "تم بنجاح تÙعيل Ù…Ùتاح الاستعادة",
- "Could not disable recovery key. Please check your recovery key password!" : "لا يمكن تعطيل Ù…Ùتاح الاستعادة, يرجى التحقق من كلمة مرور Ù…Ùتاح الاستعادة!",
- "Recovery key successfully disabled" : "تم تعطيل Ù…Ùتاح الاستعادة بنجاح",
- "Password successfully changed." : "تم تغيير كلمة المرور بنجاح.",
- "Could not change the password. Maybe the old password was not correct." : "تعذر تغيير كلمة المرور. من الممكن ان كلمة المرور القديمة غير صحيحة.",
- "Private key password successfully updated." : "تم تحديث كلمة المرور للمÙتاح الخاص بنجاح.",
- "File recovery settings updated" : "اعدادات مل٠الاستعادة تم تحديثه",
- "Could not update file recovery" : "تعذر تحديث مل٠الاستعادة",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "برنامج التشÙير لم يتم تهيئتة ! من الممكن ان برنامج التشÙير تم اعادة تÙعيلة خلال الجلسة. يرجى تسجيل الخروج ومن ثم تسجيل الدخول مجددا لتهيئة برنامج التشÙير.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Ù…Ùتاحك الخاص غير صالح! ربما تم تغيير كلمة المرور خارج %s (مثل:مجلد شركتك). يمكنك تحديث كلمة المرور ÙÙŠ الاعدادات الشخصية لإستعادة الوصول الى ملÙاتك المشÙرة.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "لا يمكن ÙÙƒ التشÙير من هذا الملÙ, من الممكن ان يكون هذا المل٠مÙشارك. يرجى سؤال صاحب المل٠لإعادة مشاركتة معك.",
- "Unknown error. Please check your system settings or contact your administrator" : "خطأ غير معروÙ, الرجاء التحقق من إعدادات نظامك أو راسل المدير",
- "Initial encryption started... This can take some time. Please wait." : "بدأ التشÙير... من الممكن ان ياخذ بعض الوقت. يرجى الانتظار.",
- "Initial encryption running... Please try again later." : "جاري تÙعيل التشÙير المبدئي ØŒ الرجاء المحاولة لاحقا",
- "Missing requirements." : "متطلبات ناقصة.",
- "Following users are not set up for encryption:" : "المستخدمين التاليين لم يتم تعيين لهم التشÙيير:",
- "Go directly to your %spersonal settings%s." : " .%spersonal settings%s إنتقل مباشرة إلى ",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "تم تمكين تشÙير البرامج لكن لم يتم تهيئة المÙاتيح لذا يرجى تسجيل الخروج ثم تسجيل الدخول مرة آخرى.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "تÙعيل استعادة المÙتاح (سو٠يمكنك من استعادة ملÙات المستخدمين ÙÙŠ حال Ùقدان كلمة المرور):",
- "Recovery key password" : "استعادة كلمة مرور المÙتاح",
- "Repeat Recovery key password" : "كرر كلمة المرور لـ استعادة المÙتاح",
- "Enabled" : "Ù…Ùعلة",
- "Disabled" : "معطلة",
- "Change recovery key password:" : "تعديل كلمة المرور استعادة المÙتاح:",
- "Old Recovery key password" : "كلمة المرور القديمة لـ استعامة المÙتاح",
- "New Recovery key password" : "تعيين كلمة مرور جديدة لـ استعادة المÙتاح",
- "Repeat New Recovery key password" : "كرر كلمة المرور لـ استعادة المÙتاح من جديد",
- "Change Password" : "عدل كلمة السر",
- " If you don't remember your old password you can ask your administrator to recover your files." : "اذا كنت لاتتذكر كلمة السر تستطيع ان تطلب من المدير ان يستعيد ملÙاتك.",
- "Old log-in password" : "كلمة المرور القديمة الخاصة بالدخول",
- "Current log-in password" : "كلمة المرور الحالية الخاصة بالدخول",
- "Update Private Key Password" : "تحديث كلمة المرور لـ المÙتاح الخاص",
- "Enable password recovery:" : "تÙعيل استعادة كلمة المرور:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "تÙعيل هذا الخيار يمكنك من اعادة الوصول الى ملÙاتك المشÙرة عند Ùقدان كلمة المرور"
-},
-"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;");
diff --git a/apps/files_encryption/l10n/ar.json b/apps/files_encryption/l10n/ar.json
deleted file mode 100644
index ef8d71a0b1f..00000000000
--- a/apps/files_encryption/l10n/ar.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{ "translations": {
- "Unknown error" : "خطأ غير معروÙ. ",
- "Recovery key successfully enabled" : "تم بنجاح تÙعيل Ù…Ùتاح الاستعادة",
- "Could not disable recovery key. Please check your recovery key password!" : "لا يمكن تعطيل Ù…Ùتاح الاستعادة, يرجى التحقق من كلمة مرور Ù…Ùتاح الاستعادة!",
- "Recovery key successfully disabled" : "تم تعطيل Ù…Ùتاح الاستعادة بنجاح",
- "Password successfully changed." : "تم تغيير كلمة المرور بنجاح.",
- "Could not change the password. Maybe the old password was not correct." : "تعذر تغيير كلمة المرور. من الممكن ان كلمة المرور القديمة غير صحيحة.",
- "Private key password successfully updated." : "تم تحديث كلمة المرور للمÙتاح الخاص بنجاح.",
- "File recovery settings updated" : "اعدادات مل٠الاستعادة تم تحديثه",
- "Could not update file recovery" : "تعذر تحديث مل٠الاستعادة",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "برنامج التشÙير لم يتم تهيئتة ! من الممكن ان برنامج التشÙير تم اعادة تÙعيلة خلال الجلسة. يرجى تسجيل الخروج ومن ثم تسجيل الدخول مجددا لتهيئة برنامج التشÙير.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Ù…Ùتاحك الخاص غير صالح! ربما تم تغيير كلمة المرور خارج %s (مثل:مجلد شركتك). يمكنك تحديث كلمة المرور ÙÙŠ الاعدادات الشخصية لإستعادة الوصول الى ملÙاتك المشÙرة.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "لا يمكن ÙÙƒ التشÙير من هذا الملÙ, من الممكن ان يكون هذا المل٠مÙشارك. يرجى سؤال صاحب المل٠لإعادة مشاركتة معك.",
- "Unknown error. Please check your system settings or contact your administrator" : "خطأ غير معروÙ, الرجاء التحقق من إعدادات نظامك أو راسل المدير",
- "Initial encryption started... This can take some time. Please wait." : "بدأ التشÙير... من الممكن ان ياخذ بعض الوقت. يرجى الانتظار.",
- "Initial encryption running... Please try again later." : "جاري تÙعيل التشÙير المبدئي ØŒ الرجاء المحاولة لاحقا",
- "Missing requirements." : "متطلبات ناقصة.",
- "Following users are not set up for encryption:" : "المستخدمين التاليين لم يتم تعيين لهم التشÙيير:",
- "Go directly to your %spersonal settings%s." : " .%spersonal settings%s إنتقل مباشرة إلى ",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "تم تمكين تشÙير البرامج لكن لم يتم تهيئة المÙاتيح لذا يرجى تسجيل الخروج ثم تسجيل الدخول مرة آخرى.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "تÙعيل استعادة المÙتاح (سو٠يمكنك من استعادة ملÙات المستخدمين ÙÙŠ حال Ùقدان كلمة المرور):",
- "Recovery key password" : "استعادة كلمة مرور المÙتاح",
- "Repeat Recovery key password" : "كرر كلمة المرور لـ استعادة المÙتاح",
- "Enabled" : "Ù…Ùعلة",
- "Disabled" : "معطلة",
- "Change recovery key password:" : "تعديل كلمة المرور استعادة المÙتاح:",
- "Old Recovery key password" : "كلمة المرور القديمة لـ استعامة المÙتاح",
- "New Recovery key password" : "تعيين كلمة مرور جديدة لـ استعادة المÙتاح",
- "Repeat New Recovery key password" : "كرر كلمة المرور لـ استعادة المÙتاح من جديد",
- "Change Password" : "عدل كلمة السر",
- " If you don't remember your old password you can ask your administrator to recover your files." : "اذا كنت لاتتذكر كلمة السر تستطيع ان تطلب من المدير ان يستعيد ملÙاتك.",
- "Old log-in password" : "كلمة المرور القديمة الخاصة بالدخول",
- "Current log-in password" : "كلمة المرور الحالية الخاصة بالدخول",
- "Update Private Key Password" : "تحديث كلمة المرور لـ المÙتاح الخاص",
- "Enable password recovery:" : "تÙعيل استعادة كلمة المرور:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "تÙعيل هذا الخيار يمكنك من اعادة الوصول الى ملÙاتك المشÙرة عند Ùقدان كلمة المرور"
-},"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ast.js b/apps/files_encryption/l10n/ast.js
deleted file mode 100644
index 724f4fb0c1c..00000000000
--- a/apps/files_encryption/l10n/ast.js
+++ /dev/null
@@ -1,41 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Fallu desconocíu",
- "Recovery key successfully enabled" : "Habilitóse la recuperación de ficheros",
- "Could not disable recovery key. Please check your recovery key password!" : "Nun pudo deshabilitase la clave de recuperación. Por favor comprueba la contraseña!",
- "Recovery key successfully disabled" : "Clave de recuperación deshabilitada",
- "Password successfully changed." : "Camudóse la contraseña",
- "Could not change the password. Maybe the old password was not correct." : "Nun pudo camudase la contraseña. Comprueba que la contraseña actual seya correuta.",
- "Private key password successfully updated." : "Contraseña de clave privada anovada correchamente.",
- "File recovery settings updated" : "Opciones de recuperación de ficheros anovada",
- "Could not update file recovery" : "Nun pudo anovase la recuperación de ficheros",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "¡L'aplicación de cifráu nun s'anició! Seique se restableciera mentanto la sesión. Por favor intenta zarrar la sesión y volver a aniciala p'aniciar l'aplicación de cifráu.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡La clave privada nun ye válida! Seique la contraseña se camudase dende fuera de %s (Ex:El to direutoriu corporativu). Pues anovar la contraseña de la clave privada nes tos opciones personales pa recuperar l'accesu a los ficheros.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Nun pudo descifrase esti ficheru, dablemente seya un ficheru compartíu. Solicita al propietariu del mesmu que vuelva a compartilu contigo.",
- "Unknown error. Please check your system settings or contact your administrator" : "Fallu desconocíu. Por favor, comprueba los axustes del sistema o contauta col alministrador",
- "Initial encryption started... This can take some time. Please wait." : "Cifráu aniciáu..... Esto pue llevar un tiempu. Por favor espera.",
- "Initial encryption running... Please try again later." : "Cifráu inicial en cursu... Inténtalo dempués.",
- "Missing requirements." : "Requisitos incompletos.",
- "Following users are not set up for encryption:" : "Los siguientes usuarios nun se configuraron pal cifráu:",
- "Go directly to your %spersonal settings%s." : "Dir direutamente a los tos %saxustes personales%s.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'aplicación Encryption ta habilitada pero les tos claves nun s'aniciaron, por favor zarra sesión y aníciala de nueves",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar la clave de recuperación (permite recuperar los ficheros del usuariu en casu de perda de la contraseña);",
- "Recovery key password" : "Contraseña de clave de recuperación",
- "Repeat Recovery key password" : "Repeti la contraseña de clave de recuperación",
- "Enabled" : "Habilitar",
- "Disabled" : "Deshabilitáu",
- "Change recovery key password:" : "Camudar la contraseña de la clave de recuperación",
- "Old Recovery key password" : "Clave de recuperación vieya",
- "New Recovery key password" : "Clave de recuperación nueva",
- "Repeat New Recovery key password" : "Repetir la clave de recuperación nueva",
- "Change Password" : "Camudar contraseña",
- "Set your old private key password to your current log-in password:" : "Afita la contraseña de clave privada vieya pa la to contraseña d'aniciu de sesión actual:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si nun recuerdes la contraseña vieya, pues pidir a alministrador que te recupere los ficheros.",
- "Old log-in password" : "Contraseña d'accesu vieya",
- "Current log-in password" : "Contraseña d'accesu actual",
- "Update Private Key Password" : "Anovar Contraseña de Clave 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 va permitite volver a tener accesu a los ficheros cifraos en casu de perda de contraseña"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/ast.json b/apps/files_encryption/l10n/ast.json
deleted file mode 100644
index 407c27dfe7e..00000000000
--- a/apps/files_encryption/l10n/ast.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{ "translations": {
- "Unknown error" : "Fallu desconocíu",
- "Recovery key successfully enabled" : "Habilitóse la recuperación de ficheros",
- "Could not disable recovery key. Please check your recovery key password!" : "Nun pudo deshabilitase la clave de recuperación. Por favor comprueba la contraseña!",
- "Recovery key successfully disabled" : "Clave de recuperación deshabilitada",
- "Password successfully changed." : "Camudóse la contraseña",
- "Could not change the password. Maybe the old password was not correct." : "Nun pudo camudase la contraseña. Comprueba que la contraseña actual seya correuta.",
- "Private key password successfully updated." : "Contraseña de clave privada anovada correchamente.",
- "File recovery settings updated" : "Opciones de recuperación de ficheros anovada",
- "Could not update file recovery" : "Nun pudo anovase la recuperación de ficheros",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "¡L'aplicación de cifráu nun s'anició! Seique se restableciera mentanto la sesión. Por favor intenta zarrar la sesión y volver a aniciala p'aniciar l'aplicación de cifráu.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡La clave privada nun ye válida! Seique la contraseña se camudase dende fuera de %s (Ex:El to direutoriu corporativu). Pues anovar la contraseña de la clave privada nes tos opciones personales pa recuperar l'accesu a los ficheros.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Nun pudo descifrase esti ficheru, dablemente seya un ficheru compartíu. Solicita al propietariu del mesmu que vuelva a compartilu contigo.",
- "Unknown error. Please check your system settings or contact your administrator" : "Fallu desconocíu. Por favor, comprueba los axustes del sistema o contauta col alministrador",
- "Initial encryption started... This can take some time. Please wait." : "Cifráu aniciáu..... Esto pue llevar un tiempu. Por favor espera.",
- "Initial encryption running... Please try again later." : "Cifráu inicial en cursu... Inténtalo dempués.",
- "Missing requirements." : "Requisitos incompletos.",
- "Following users are not set up for encryption:" : "Los siguientes usuarios nun se configuraron pal cifráu:",
- "Go directly to your %spersonal settings%s." : "Dir direutamente a los tos %saxustes personales%s.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'aplicación Encryption ta habilitada pero les tos claves nun s'aniciaron, por favor zarra sesión y aníciala de nueves",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar la clave de recuperación (permite recuperar los ficheros del usuariu en casu de perda de la contraseña);",
- "Recovery key password" : "Contraseña de clave de recuperación",
- "Repeat Recovery key password" : "Repeti la contraseña de clave de recuperación",
- "Enabled" : "Habilitar",
- "Disabled" : "Deshabilitáu",
- "Change recovery key password:" : "Camudar la contraseña de la clave de recuperación",
- "Old Recovery key password" : "Clave de recuperación vieya",
- "New Recovery key password" : "Clave de recuperación nueva",
- "Repeat New Recovery key password" : "Repetir la clave de recuperación nueva",
- "Change Password" : "Camudar contraseña",
- "Set your old private key password to your current log-in password:" : "Afita la contraseña de clave privada vieya pa la to contraseña d'aniciu de sesión actual:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si nun recuerdes la contraseña vieya, pues pidir a alministrador que te recupere los ficheros.",
- "Old log-in password" : "Contraseña d'accesu vieya",
- "Current log-in password" : "Contraseña d'accesu actual",
- "Update Private Key Password" : "Anovar Contraseña de Clave 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 va permitite volver a tener accesu a los ficheros cifraos en casu de perda de contraseña"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/az.js b/apps/files_encryption/l10n/az.js
deleted file mode 100644
index d6d243d165b..00000000000
--- a/apps/files_encryption/l10n/az.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Bəlli olmayan səhv baş verdi",
- "Missing recovery key password" : "Bərpa açarının şifrəsi çatışmır",
- "Please repeat the recovery key password" : "Xahiş olunur bərpa açarı şifrəsini təkrarlayasınız",
- "Repeated recovery key password does not match the provided recovery key password" : "Təkrar daxil edilən bərpa açarı şifrəsi, öncə daxil edilən bərpa açarı ilə üst-üstə düşmür ",
- "Recovery key successfully enabled" : "Bərpa açarı uğurla aktivləşdi",
- "Could not disable recovery key. Please check your recovery key password!" : "Geriqaytarılma açarını sondürmək olmur. Xahiş edirik geriqaytarılma key açarınızı yoxlayın.",
- "Recovery key successfully disabled" : "Bərpa açarı uğurla söndürüldü",
- "Please provide the old recovery password" : "Xahiş olunur köhnə bərpa açarını daxil edəsiniz",
- "Please provide a new recovery password" : "Xahiş olunur yeni bərpa açarı şifrəsini daxil esəsiniz",
- "Please repeat the new recovery password" : "Xahiş olunur yeni bərpa açarını təkrarlayasınız",
- "Password successfully changed." : "Şifrə uğurla dəyişdirildi.",
- "Could not change the password. Maybe the old password was not correct." : "Şifrəni dəyişmək olmur, ola bilər ki, köhnə şifrə düzgün olmayıb.",
- "Could not update the private key password." : "Gizli açarın şifrəsini yeniləmək mümkün olmadı.",
- "The old password was not correct, please try again." : "Köhnə şifrə düzgün deyildi, xahiş olunur yenidən cəhd edəsiniz.",
- "The current log-in password was not correct, please try again." : "Hal-hazırki istifadəçi şifrəsi düzgün deyildi, xahiş olunur yenidən cəhd edəsiniz.",
- "Private key password successfully updated." : "Gizli aşar şifrəsi uğurla yeniləndi.",
- "File recovery settings updated" : "Fayl bərpa quraşdırmaları yeniləndi",
- "Could not update file recovery" : "Fayl bərpasını yeniləmək olmur",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Şifrələmə proqramı inisializasiya edilməyib! Ola bilər ki, şifrələnmə proqramı sizin sessiya müddətində yenidən işə salınıb. Xahiş olunur çıxıb yenidən girişə cəhd edəsiniz ki, şifrələnmə proqramı sizin istifadəçı adı üçün təkrar inisializasiya edilsin. ",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Sizin gizli açarınız doğru deyil! Təxmin edilir ki, sizin şifrə %s-dən kənarda dəyişdirilib(misal üçün sizin koorporativ qovluq). Siz öz şifrələnmiş fayllarınıza yetkinizi bərpa etmək üçün, öz şifrənizi şəxsi quraşdırmalarınızda yeniləyə bilərsiniz.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Bu faylı deşifrə etmək olmur və ola bilər ki, bu paylaşımda olan fayldır. Xahiş olunur faylın sahibinə həmin faylı sizinlə yenidən paylaşım etməsini bildirəsiniz. ",
- "Unknown error. Please check your system settings or contact your administrator" : "Tanınmayan səhv. Xahiş olunur sistem quraşdırmalarınızı yoxlayın yada öz inzibatçınızla əlaqə yaradın",
- "Initial encryption started... This can take some time. Please wait." : "İlkin şifələnmə başlandı... Bu müəyyən vaxt ala bilər. Xahiş olunur gözləyəsiniz.",
- "Initial encryption running... Please try again later." : "İlkin şifrələnmə işləyir... Xahiş olunur birazdan yenidən müraciət edəsiniz.",
- "Missing requirements." : "Taləbatlar çatışmır.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Xahiş olunur ki, PHP-in OpenSSL genişlənməsi yüklənib və düzgün konfiqurasiya edilib. İndiki hal üçün şifrələnmə proqramı dayandırılmışdır.",
- "Following users are not set up for encryption:" : "Göstərilən istifadəçilər şifrələnmə üçün quraşdırılmayıb:",
- "Go directly to your %spersonal settings%s." : "Birbaşa öz %sşəxsi quraşdırmalarınıza%s gedin.",
- "Server-side Encryption" : "Server-tərəf şifrələnmə",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Proqram şifrələnməsi işə salınıb ancaq, sizin açarlar inisializasiya edilməyib. Xahiş edilir çıxıb yenidən daxil olasınız",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Bərpa açarını aktivləşdir(şifrə itirilməsi hadısələrində, istifadəçi fayllarının bərpasına izin verir)",
- "Recovery key password" : "Açar şifrənin bərpa edilməsi",
- "Repeat Recovery key password" : "Bərpa açarın şifrəsini təkrar edin",
- "Enabled" : "İşə salınıb",
- "Disabled" : "Dayandırılıb",
- "Change recovery key password:" : "Bərpa açarın şifrəsini dəyişdir:",
- "Old Recovery key password" : "Köhnə bərpa açarı şifrəsi",
- "New Recovery key password" : "Yeni bərpa açarı şifrəsi",
- "Repeat New Recovery key password" : "Yeni bərpa açarı şifrəsini təkrar edin",
- "Change Password" : "Şifrəni dəyişdir",
- "Your private key password no longer matches your log-in password." : "Sizin gizli açar şifrəsi, artıq giriş adınızla uyğun gəlmir.",
- "Set your old private key password to your current log-in password:" : "Köhnə açar şifrənizi, sizin hal-hazırki giriş şifrənizə təyin edin: ",
- " If you don't remember your old password you can ask your administrator to recover your files." : "ÆgÉ™r siz köhnÉ™ ÅŸifrÉ™nizi xatırlamırsınızsa, öz inzibatçınızdan fayllarınızın bÉ™rpasını istÉ™yÉ™ bilÉ™rsiniz.",
- "Old log-in password" : "Köhnə giriş şifrəsi",
- "Current log-in password" : "Hal-hazırki giriş şifrəsi",
- "Update Private Key Password" : "Gizli açar şifrəsini yenilə",
- "Enable password recovery:" : "Şifrə bərpasını işə sal:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Bu opsiyanın aktiv edilməsi sizə, şifrənin itdiyi hallarda bütün şifrələnmiş fayllarınıza yetkinin yenidən əldə edilməsinə şərait yaradacaq"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/az.json b/apps/files_encryption/l10n/az.json
deleted file mode 100644
index 730e79a5084..00000000000
--- a/apps/files_encryption/l10n/az.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Bəlli olmayan səhv baş verdi",
- "Missing recovery key password" : "Bərpa açarının şifrəsi çatışmır",
- "Please repeat the recovery key password" : "Xahiş olunur bərpa açarı şifrəsini təkrarlayasınız",
- "Repeated recovery key password does not match the provided recovery key password" : "Təkrar daxil edilən bərpa açarı şifrəsi, öncə daxil edilən bərpa açarı ilə üst-üstə düşmür ",
- "Recovery key successfully enabled" : "Bərpa açarı uğurla aktivləşdi",
- "Could not disable recovery key. Please check your recovery key password!" : "Geriqaytarılma açarını sondürmək olmur. Xahiş edirik geriqaytarılma key açarınızı yoxlayın.",
- "Recovery key successfully disabled" : "Bərpa açarı uğurla söndürüldü",
- "Please provide the old recovery password" : "Xahiş olunur köhnə bərpa açarını daxil edəsiniz",
- "Please provide a new recovery password" : "Xahiş olunur yeni bərpa açarı şifrəsini daxil esəsiniz",
- "Please repeat the new recovery password" : "Xahiş olunur yeni bərpa açarını təkrarlayasınız",
- "Password successfully changed." : "Şifrə uğurla dəyişdirildi.",
- "Could not change the password. Maybe the old password was not correct." : "Şifrəni dəyişmək olmur, ola bilər ki, köhnə şifrə düzgün olmayıb.",
- "Could not update the private key password." : "Gizli açarın şifrəsini yeniləmək mümkün olmadı.",
- "The old password was not correct, please try again." : "Köhnə şifrə düzgün deyildi, xahiş olunur yenidən cəhd edəsiniz.",
- "The current log-in password was not correct, please try again." : "Hal-hazırki istifadəçi şifrəsi düzgün deyildi, xahiş olunur yenidən cəhd edəsiniz.",
- "Private key password successfully updated." : "Gizli aşar şifrəsi uğurla yeniləndi.",
- "File recovery settings updated" : "Fayl bərpa quraşdırmaları yeniləndi",
- "Could not update file recovery" : "Fayl bərpasını yeniləmək olmur",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Şifrələmə proqramı inisializasiya edilməyib! Ola bilər ki, şifrələnmə proqramı sizin sessiya müddətində yenidən işə salınıb. Xahiş olunur çıxıb yenidən girişə cəhd edəsiniz ki, şifrələnmə proqramı sizin istifadəçı adı üçün təkrar inisializasiya edilsin. ",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Sizin gizli açarınız doğru deyil! Təxmin edilir ki, sizin şifrə %s-dən kənarda dəyişdirilib(misal üçün sizin koorporativ qovluq). Siz öz şifrələnmiş fayllarınıza yetkinizi bərpa etmək üçün, öz şifrənizi şəxsi quraşdırmalarınızda yeniləyə bilərsiniz.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Bu faylı deşifrə etmək olmur və ola bilər ki, bu paylaşımda olan fayldır. Xahiş olunur faylın sahibinə həmin faylı sizinlə yenidən paylaşım etməsini bildirəsiniz. ",
- "Unknown error. Please check your system settings or contact your administrator" : "Tanınmayan səhv. Xahiş olunur sistem quraşdırmalarınızı yoxlayın yada öz inzibatçınızla əlaqə yaradın",
- "Initial encryption started... This can take some time. Please wait." : "İlkin şifələnmə başlandı... Bu müəyyən vaxt ala bilər. Xahiş olunur gözləyəsiniz.",
- "Initial encryption running... Please try again later." : "İlkin şifrələnmə işləyir... Xahiş olunur birazdan yenidən müraciət edəsiniz.",
- "Missing requirements." : "Taləbatlar çatışmır.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Xahiş olunur ki, PHP-in OpenSSL genişlənməsi yüklənib və düzgün konfiqurasiya edilib. İndiki hal üçün şifrələnmə proqramı dayandırılmışdır.",
- "Following users are not set up for encryption:" : "Göstərilən istifadəçilər şifrələnmə üçün quraşdırılmayıb:",
- "Go directly to your %spersonal settings%s." : "Birbaşa öz %sşəxsi quraşdırmalarınıza%s gedin.",
- "Server-side Encryption" : "Server-tərəf şifrələnmə",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Proqram şifrələnməsi işə salınıb ancaq, sizin açarlar inisializasiya edilməyib. Xahiş edilir çıxıb yenidən daxil olasınız",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Bərpa açarını aktivləşdir(şifrə itirilməsi hadısələrində, istifadəçi fayllarının bərpasına izin verir)",
- "Recovery key password" : "Açar şifrənin bərpa edilməsi",
- "Repeat Recovery key password" : "Bərpa açarın şifrəsini təkrar edin",
- "Enabled" : "İşə salınıb",
- "Disabled" : "Dayandırılıb",
- "Change recovery key password:" : "Bərpa açarın şifrəsini dəyişdir:",
- "Old Recovery key password" : "Köhnə bərpa açarı şifrəsi",
- "New Recovery key password" : "Yeni bərpa açarı şifrəsi",
- "Repeat New Recovery key password" : "Yeni bərpa açarı şifrəsini təkrar edin",
- "Change Password" : "Şifrəni dəyişdir",
- "Your private key password no longer matches your log-in password." : "Sizin gizli açar şifrəsi, artıq giriş adınızla uyğun gəlmir.",
- "Set your old private key password to your current log-in password:" : "Köhnə açar şifrənizi, sizin hal-hazırki giriş şifrənizə təyin edin: ",
- " If you don't remember your old password you can ask your administrator to recover your files." : "ÆgÉ™r siz köhnÉ™ ÅŸifrÉ™nizi xatırlamırsınızsa, öz inzibatçınızdan fayllarınızın bÉ™rpasını istÉ™yÉ™ bilÉ™rsiniz.",
- "Old log-in password" : "Köhnə giriş şifrəsi",
- "Current log-in password" : "Hal-hazırki giriş şifrəsi",
- "Update Private Key Password" : "Gizli açar şifrəsini yenilə",
- "Enable password recovery:" : "Şifrə bərpasını işə sal:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Bu opsiyanın aktiv edilməsi sizə, şifrənin itdiyi hallarda bütün şifrələnmiş fayllarınıza yetkinin yenidən əldə edilməsinə şərait yaradacaq"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/bg_BG.js b/apps/files_encryption/l10n/bg_BG.js
deleted file mode 100644
index 6f5876c0654..00000000000
--- a/apps/files_encryption/l10n/bg_BG.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Ðепозната грешка.",
- "Missing recovery key password" : "ЛипÑва парола за възÑтановÑване",
- "Please repeat the recovery key password" : "Повтори новата парола за възÑтановÑване",
- "Repeated recovery key password does not match the provided recovery key password" : "Повторената парола за възÑтановÑване не Ñъвпада ÑÑŠÑ Ð·Ð°Ð´Ð°Ð´ÐµÐ½Ð°Ñ‚Ð° парола за възÑтановÑване",
- "Recovery key successfully enabled" : "УÑпешно включване на опциÑта ключ за възÑтановÑване.",
- "Could not disable recovery key. Please check your recovery key password!" : "ÐеуÑпешно изключване на ключа за възÑтановÑване. МолÑ, провери паролата за ключа за възÑтановÑване!",
- "Recovery key successfully disabled" : "УÑпешно изключване на ключа за възÑтановÑване.",
- "Please provide the old recovery password" : "МолÑ, въведи Ñтарата парола за възÑтановÑване",
- "Please provide a new recovery password" : "МолÑ, задай нова парола за възÑтановÑване",
- "Please repeat the new recovery password" : "МолÑ, въведи повторна новата парола за възÑтановÑване",
- "Password successfully changed." : "Паролата е уÑпешно променена.",
- "Could not change the password. Maybe the old password was not correct." : "Грешка при промÑна на паролата. Може би Ñтарата ти парола е Ñгрешена.",
- "Could not update the private key password." : "ÐеуÑпешна промÑна на паролата на Ð»Ð¸Ñ‡Ð½Ð¸Ñ ÐºÐ»ÑŽÑ‡",
- "The old password was not correct, please try again." : "Старата парола е грешна, опитай отново.",
- "The current log-in password was not correct, please try again." : "Грешна парола за впиÑване, опитай отново.",
- "Private key password successfully updated." : "УÑпешно променена тайната парола за ключа.",
- "File recovery settings updated" : "ÐаÑтройките за възÑтановÑване на файлове Ñа променени.",
- "Could not update file recovery" : "ÐеуÑпешна промÑна на наÑтройките за възÑтановÑване на файлове.",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "ÐеуÑпешна Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð½Ð° криптиращото приложение! Може би криптиращото приложение бе включено по време на твоÑта ÑеÑиÑ. Отпиши Ñе и Ñе впиши обратно за да инциализираш криптиращото приложение.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "ТвоÑÑ‚ таен ключ е невалиден! ВероÑтно твоÑта парола беше променена извън %s(пр. твоÑта корпоративна директориÑ). Можеш да промениш ÑвоÑÑ‚ таен ключ в Лични наÑтройки, за да възÑтановиш доÑтъпа до криптираните файлове.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "ÐеуÑпешно разшифроване на този файл, вероÑтно това е Ñподелен файл. МолÑ, поиÑкай ÑобÑтвеника на файла да го Ñподели повторно Ñ Ñ‚ÐµÐ±.",
- "Unknown error. Please check your system settings or contact your administrator" : "Ðепозната грешка. МолÑ, провери ÑиÑтемните наÑтройки или Ñе Ñвържи Ñ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтратора.",
- "Initial encryption started... This can take some time. Please wait." : "Първоначалното криптиране започна... Това може да отнеме време. ÐœÐ¾Ð»Ñ Ð¸Ð·Ñ‡Ð°ÐºÐ°Ð¹.",
- "Initial encryption running... Please try again later." : "Тече първоначално криптиране... ÐœÐ¾Ð»Ñ Ð¾Ð¿Ð¸Ñ‚Ð°Ð¹ по-къÑно.",
- "Missing requirements." : "ЛипÑва задължителна информациÑ.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "ÐœÐ¾Ð»Ñ ÑƒÐ²ÐµÑ€ÐµÑ‚Ðµ Ñе че OpenSSL заедно Ñ PHP разширене Ñа включени и конфигурирани правилно. За Ñега, криптиращото приложение е изключено.",
- "Following users are not set up for encryption:" : "Следните потребители не Ñа наÑтроени за криптиране:",
- "Go directly to your %spersonal settings%s." : "Отиде направо към твоите %sлични наÑтройки%s.",
- "Server-side Encryption" : "Криптиране от Ñтрана на Ñървъра",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Програмата за криптиране е включена, но твоите ключове не Ñа зададени, Ð¼Ð¾Ð»Ñ Ð¾Ñ‚Ð¿Ð¸ÑˆÐ¸ Ñи и Ñе впиши отново.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Включи опциÑта възÑтановÑване на ключ (разрешава да възÑтанови файловете на потребителите в Ñлучай на загубена парола):",
- "Recovery key password" : "Парола за възÑтановÑане на ключа",
- "Repeat Recovery key password" : "Повтори паролата за възÑтановÑване на ключа",
- "Enabled" : "Включено",
- "Disabled" : "Изключено",
- "Change recovery key password:" : "Промени паролата за въÑтановÑване на ключа:",
- "Old Recovery key password" : "Старата парола за въÑтановÑване на ключа",
- "New Recovery key password" : "Ðовата парола за възÑтановÑване на ключа",
- "Repeat New Recovery key password" : "Повтори новата паролза за възÑтановÑване на ключа",
- "Change Password" : "Промени Паролата",
- "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." : "Ðко не помниш Ñтарата парола помоли админиÑтратора да възÑтанови файловете ти.",
- "Old log-in password" : "Стара парола за впиÑване",
- "Current log-in password" : "Текуща парола за впиÑване",
- "Update Private Key Password" : "Промени Тайната Парола за Ключа",
- "Enable password recovery:" : "Включи опциÑта възÑтановÑване на паролата:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Избирането на тази Ð¾Ð¿Ñ†Ð¸Ñ Ñ‰Ðµ ти позволи да възÑтановиш доÑтъпа Ñи до файловете в Ñлучай на изгубена парола."
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/bg_BG.json b/apps/files_encryption/l10n/bg_BG.json
deleted file mode 100644
index 055c434d229..00000000000
--- a/apps/files_encryption/l10n/bg_BG.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Ðепозната грешка.",
- "Missing recovery key password" : "ЛипÑва парола за възÑтановÑване",
- "Please repeat the recovery key password" : "Повтори новата парола за възÑтановÑване",
- "Repeated recovery key password does not match the provided recovery key password" : "Повторената парола за възÑтановÑване не Ñъвпада ÑÑŠÑ Ð·Ð°Ð´Ð°Ð´ÐµÐ½Ð°Ñ‚Ð° парола за възÑтановÑване",
- "Recovery key successfully enabled" : "УÑпешно включване на опциÑта ключ за възÑтановÑване.",
- "Could not disable recovery key. Please check your recovery key password!" : "ÐеуÑпешно изключване на ключа за възÑтановÑване. МолÑ, провери паролата за ключа за възÑтановÑване!",
- "Recovery key successfully disabled" : "УÑпешно изключване на ключа за възÑтановÑване.",
- "Please provide the old recovery password" : "МолÑ, въведи Ñтарата парола за възÑтановÑване",
- "Please provide a new recovery password" : "МолÑ, задай нова парола за възÑтановÑване",
- "Please repeat the new recovery password" : "МолÑ, въведи повторна новата парола за възÑтановÑване",
- "Password successfully changed." : "Паролата е уÑпешно променена.",
- "Could not change the password. Maybe the old password was not correct." : "Грешка при промÑна на паролата. Може би Ñтарата ти парола е Ñгрешена.",
- "Could not update the private key password." : "ÐеуÑпешна промÑна на паролата на Ð»Ð¸Ñ‡Ð½Ð¸Ñ ÐºÐ»ÑŽÑ‡",
- "The old password was not correct, please try again." : "Старата парола е грешна, опитай отново.",
- "The current log-in password was not correct, please try again." : "Грешна парола за впиÑване, опитай отново.",
- "Private key password successfully updated." : "УÑпешно променена тайната парола за ключа.",
- "File recovery settings updated" : "ÐаÑтройките за възÑтановÑване на файлове Ñа променени.",
- "Could not update file recovery" : "ÐеуÑпешна промÑна на наÑтройките за възÑтановÑване на файлове.",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "ÐеуÑпешна Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð½Ð° криптиращото приложение! Може би криптиращото приложение бе включено по време на твоÑта ÑеÑиÑ. Отпиши Ñе и Ñе впиши обратно за да инциализираш криптиращото приложение.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "ТвоÑÑ‚ таен ключ е невалиден! ВероÑтно твоÑта парола беше променена извън %s(пр. твоÑта корпоративна директориÑ). Можеш да промениш ÑвоÑÑ‚ таен ключ в Лични наÑтройки, за да възÑтановиш доÑтъпа до криптираните файлове.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "ÐеуÑпешно разшифроване на този файл, вероÑтно това е Ñподелен файл. МолÑ, поиÑкай ÑобÑтвеника на файла да го Ñподели повторно Ñ Ñ‚ÐµÐ±.",
- "Unknown error. Please check your system settings or contact your administrator" : "Ðепозната грешка. МолÑ, провери ÑиÑтемните наÑтройки или Ñе Ñвържи Ñ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтратора.",
- "Initial encryption started... This can take some time. Please wait." : "Първоначалното криптиране започна... Това може да отнеме време. ÐœÐ¾Ð»Ñ Ð¸Ð·Ñ‡Ð°ÐºÐ°Ð¹.",
- "Initial encryption running... Please try again later." : "Тече първоначално криптиране... ÐœÐ¾Ð»Ñ Ð¾Ð¿Ð¸Ñ‚Ð°Ð¹ по-къÑно.",
- "Missing requirements." : "ЛипÑва задължителна информациÑ.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "ÐœÐ¾Ð»Ñ ÑƒÐ²ÐµÑ€ÐµÑ‚Ðµ Ñе че OpenSSL заедно Ñ PHP разширене Ñа включени и конфигурирани правилно. За Ñега, криптиращото приложение е изключено.",
- "Following users are not set up for encryption:" : "Следните потребители не Ñа наÑтроени за криптиране:",
- "Go directly to your %spersonal settings%s." : "Отиде направо към твоите %sлични наÑтройки%s.",
- "Server-side Encryption" : "Криптиране от Ñтрана на Ñървъра",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Програмата за криптиране е включена, но твоите ключове не Ñа зададени, Ð¼Ð¾Ð»Ñ Ð¾Ñ‚Ð¿Ð¸ÑˆÐ¸ Ñи и Ñе впиши отново.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Включи опциÑта възÑтановÑване на ключ (разрешава да възÑтанови файловете на потребителите в Ñлучай на загубена парола):",
- "Recovery key password" : "Парола за възÑтановÑане на ключа",
- "Repeat Recovery key password" : "Повтори паролата за възÑтановÑване на ключа",
- "Enabled" : "Включено",
- "Disabled" : "Изключено",
- "Change recovery key password:" : "Промени паролата за въÑтановÑване на ключа:",
- "Old Recovery key password" : "Старата парола за въÑтановÑване на ключа",
- "New Recovery key password" : "Ðовата парола за възÑтановÑване на ключа",
- "Repeat New Recovery key password" : "Повтори новата паролза за възÑтановÑване на ключа",
- "Change Password" : "Промени Паролата",
- "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." : "Ðко не помниш Ñтарата парола помоли админиÑтратора да възÑтанови файловете ти.",
- "Old log-in password" : "Стара парола за впиÑване",
- "Current log-in password" : "Текуща парола за впиÑване",
- "Update Private Key Password" : "Промени Тайната Парола за Ключа",
- "Enable password recovery:" : "Включи опциÑта възÑтановÑване на паролата:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Избирането на тази Ð¾Ð¿Ñ†Ð¸Ñ Ñ‰Ðµ ти позволи да възÑтановиш доÑтъпа Ñи до файловете в Ñлучай на изгубена парола."
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/bn_BD.js b/apps/files_encryption/l10n/bn_BD.js
deleted file mode 100644
index 2a1446e5723..00000000000
--- a/apps/files_encryption/l10n/bn_BD.js
+++ /dev/null
@@ -1,22 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "অজানা জটিলতা",
- "Recovery key successfully enabled" : "পূনরà§à¦¦à§à¦§à¦¾à¦° চাবি সারà§à¦¥à¦•à¦­à¦¾à¦¬à§‡ কারà§à¦¯à¦•à¦° করা হয়েছে",
- "Recovery key successfully disabled" : "পূনরà§à¦¦à§à¦§à¦¾à¦° চাবি সারà§à¦¥à¦•à¦­à¦¾à¦¬à§‡ অকারà§à¦¯à¦•à¦° করা হয়েছে",
- "Password successfully changed." : "আপনার কূটশবà§à¦¦à¦Ÿà¦¿ সারà§à¦¥à¦•à¦­à¦¾à¦¬à§‡ পরিবরà§à¦¤à¦¨ করা হয়েছে ",
- "Initial encryption started... This can take some time. Please wait." : "পà§à¦°à¦¾à¦¥à¦®à¦¿à¦• à¦à¦¨à¦•à§à¦°à¦¿à¦ªà¦¸à¦¨ শà§à¦°à§ হয়েছে.... à¦à¦Ÿà¦¿ কিছà§à¦Ÿà¦¾ সময় নিতে পারে। অপেকà§à¦·à¦¾ করà§à¦¨à¥¤",
- "Initial encryption running... Please try again later." : "পà§à¦°à¦¾à¦¥à¦®à¦¿à¦• à¦à¦¨à¦•à§à¦°à¦¿à¦ªà¦¸à¦¨ চলছে.... দয়া করে পরে আবার চেষà§à¦Ÿà¦¾ করà§à¦¨à¥¤",
- "Missing requirements." : "পà§à¦°à§Ÿà§‹à¦œà¦¨à¦¾à¦¨à§à¦¯à¦¾à§Ÿà§€ ঘাটতি আছে।",
- "Following users are not set up for encryption:" : "নিমà§à¦¨à¦¬à¦°à§à¦£à¦¿à¦¤ বà§à¦¯à¦¬à¦¹à¦¾à¦°à¦•à¦¾à¦°à§€à¦—ণ à¦à¦¨à¦•à§à¦°à¦¿à¦ªà¦¸à¦¨à§‡à¦° জনà§à¦¯ অধিকারপà§à¦°à¦¾à¦ªà§à¦¤ নন:",
- "Go directly to your %spersonal settings%s." : "সরাসরি আপনার %spersonal settings%s ঠযান।",
- "Repeat Recovery key password" : "পূণরূদà§à¦§à¦¾à¦° কি à¦à¦° কà§à¦Ÿà¦¶à¦¬à§à¦¦ পূণরায় দিন",
- "Enabled" : "কারà§à¦¯à¦•à¦°",
- "Disabled" : "অকারà§à¦¯à¦•à¦°",
- "Change recovery key password:" : "পূণরূদà§à¦§à¦¾à¦° কি à¦à¦° কà§à¦Ÿà¦¶à¦¬à§à¦¦ পরিবরà§à¦¤à¦¨ করà§à¦¨:",
- "Old Recovery key password" : "পূণরূদà§à¦§à¦¾à¦° কি à¦à¦° পà§à¦°à¦¾à¦¤à¦¨ কà§à¦Ÿà¦¶à¦¬à§à¦¦",
- "New Recovery key password" : "পূণরূদà§à¦§à¦¾à¦° কি à¦à¦° নতà§à¦¨ কà§à¦Ÿà¦¶à¦¬à§à¦¦",
- "Repeat New Recovery key password" : "পূণরূদà§à¦§à¦¾à¦° কি à¦à¦° নতà§à¦¨ কà§à¦Ÿà¦¶à¦¬à§à¦¦ পূণরায় দিন",
- "Change Password" : "কূটশবà§à¦¦ পরিবরà§à¦¤à¦¨ করà§à¦¨"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/bn_BD.json b/apps/files_encryption/l10n/bn_BD.json
deleted file mode 100644
index 9c2eca6591a..00000000000
--- a/apps/files_encryption/l10n/bn_BD.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{ "translations": {
- "Unknown error" : "অজানা জটিলতা",
- "Recovery key successfully enabled" : "পূনরà§à¦¦à§à¦§à¦¾à¦° চাবি সারà§à¦¥à¦•à¦­à¦¾à¦¬à§‡ কারà§à¦¯à¦•à¦° করা হয়েছে",
- "Recovery key successfully disabled" : "পূনরà§à¦¦à§à¦§à¦¾à¦° চাবি সারà§à¦¥à¦•à¦­à¦¾à¦¬à§‡ অকারà§à¦¯à¦•à¦° করা হয়েছে",
- "Password successfully changed." : "আপনার কূটশবà§à¦¦à¦Ÿà¦¿ সারà§à¦¥à¦•à¦­à¦¾à¦¬à§‡ পরিবরà§à¦¤à¦¨ করা হয়েছে ",
- "Initial encryption started... This can take some time. Please wait." : "পà§à¦°à¦¾à¦¥à¦®à¦¿à¦• à¦à¦¨à¦•à§à¦°à¦¿à¦ªà¦¸à¦¨ শà§à¦°à§ হয়েছে.... à¦à¦Ÿà¦¿ কিছà§à¦Ÿà¦¾ সময় নিতে পারে। অপেকà§à¦·à¦¾ করà§à¦¨à¥¤",
- "Initial encryption running... Please try again later." : "পà§à¦°à¦¾à¦¥à¦®à¦¿à¦• à¦à¦¨à¦•à§à¦°à¦¿à¦ªà¦¸à¦¨ চলছে.... দয়া করে পরে আবার চেষà§à¦Ÿà¦¾ করà§à¦¨à¥¤",
- "Missing requirements." : "পà§à¦°à§Ÿà§‹à¦œà¦¨à¦¾à¦¨à§à¦¯à¦¾à§Ÿà§€ ঘাটতি আছে।",
- "Following users are not set up for encryption:" : "নিমà§à¦¨à¦¬à¦°à§à¦£à¦¿à¦¤ বà§à¦¯à¦¬à¦¹à¦¾à¦°à¦•à¦¾à¦°à§€à¦—ণ à¦à¦¨à¦•à§à¦°à¦¿à¦ªà¦¸à¦¨à§‡à¦° জনà§à¦¯ অধিকারপà§à¦°à¦¾à¦ªà§à¦¤ নন:",
- "Go directly to your %spersonal settings%s." : "সরাসরি আপনার %spersonal settings%s ঠযান।",
- "Repeat Recovery key password" : "পূণরূদà§à¦§à¦¾à¦° কি à¦à¦° কà§à¦Ÿà¦¶à¦¬à§à¦¦ পূণরায় দিন",
- "Enabled" : "কারà§à¦¯à¦•à¦°",
- "Disabled" : "অকারà§à¦¯à¦•à¦°",
- "Change recovery key password:" : "পূণরূদà§à¦§à¦¾à¦° কি à¦à¦° কà§à¦Ÿà¦¶à¦¬à§à¦¦ পরিবরà§à¦¤à¦¨ করà§à¦¨:",
- "Old Recovery key password" : "পূণরূদà§à¦§à¦¾à¦° কি à¦à¦° পà§à¦°à¦¾à¦¤à¦¨ কà§à¦Ÿà¦¶à¦¬à§à¦¦",
- "New Recovery key password" : "পূণরূদà§à¦§à¦¾à¦° কি à¦à¦° নতà§à¦¨ কà§à¦Ÿà¦¶à¦¬à§à¦¦",
- "Repeat New Recovery key password" : "পূণরূদà§à¦§à¦¾à¦° কি à¦à¦° নতà§à¦¨ কà§à¦Ÿà¦¶à¦¬à§à¦¦ পূণরায় দিন",
- "Change Password" : "কূটশবà§à¦¦ পরিবরà§à¦¤à¦¨ করà§à¦¨"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/bs.js b/apps/files_encryption/l10n/bs.js
deleted file mode 100644
index 7bf649dcb68..00000000000
--- a/apps/files_encryption/l10n/bs.js
+++ /dev/null
@@ -1,9 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Nepoznata greška",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikacija Å¡ifriranja je ukljuÄena, ali vaÅ¡i kljuÄevi nisu inicializirani, molim odjavite se i ponovno prijavite",
- "Enabled" : "Aktivirano",
- "Disabled" : "Onemogućeno"
-},
-"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/files_encryption/l10n/bs.json b/apps/files_encryption/l10n/bs.json
deleted file mode 100644
index df05ce3e24f..00000000000
--- a/apps/files_encryption/l10n/bs.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{ "translations": {
- "Unknown error" : "Nepoznata greška",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikacija Å¡ifriranja je ukljuÄena, ali vaÅ¡i kljuÄevi nisu inicializirani, molim odjavite se i ponovno prijavite",
- "Enabled" : "Aktivirano",
- "Disabled" : "Onemogućeno"
-},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ca.js b/apps/files_encryption/l10n/ca.js
deleted file mode 100644
index 189fc653160..00000000000
--- a/apps/files_encryption/l10n/ca.js
+++ /dev/null
@@ -1,42 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Error desconegut",
- "Recovery key successfully enabled" : "La clau de recuperació s'ha activat",
- "Could not disable recovery key. Please check your recovery key password!" : "No s'ha pogut desactivar la calu de recuperació. Comproveu la contrasenya de la clau de recuperació!",
- "Recovery key successfully disabled" : "La clau de recuperació s'ha descativat",
- "Password successfully changed." : "La contrasenya s'ha canviat.",
- "Could not change the password. Maybe the old password was not correct." : "No s'ha pogut canviar la contrasenya. Potser la contrasenya anterior no era correcta.",
- "Private key password successfully updated." : "La contrasenya de la clau privada s'ha actualitzat.",
- "File recovery settings updated" : "S'han actualitzat els arranjaments de recuperació de fitxers",
- "Could not update file recovery" : "No s'ha pogut actualitzar la recuperació de fitxers",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "L'aplicació d'encriptació no està inicialitzada! Potser l'aplicació d'encriptació ha estat reiniciada durant la sessió. Intenteu sortir i acreditar-vos de nou per reinicialitzar l'aplicació d'encriptació.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "La clau privada no és vàlida! Probablement la contrasenya va ser canviada des de fora de %s (per exemple, en el directori de l'empresa). Vostè pot actualitzar la contrasenya de clau privada en la seva configuració personal per poder recuperar l'accés en els arxius xifrats.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No es pot desencriptar aquest fitxer, probablement és un fitxer compartit. Demaneu al propietari del fitxer que el comparteixi de nou amb vós.",
- "Unknown error. Please check your system settings or contact your administrator" : "Error desconegut. Comproveu l'arranjament del sistema o aviseu a l'administrador",
- "Initial encryption started... This can take some time. Please wait." : "La encriptació inicial ha començat... Pot trigar una estona, espereu.",
- "Initial encryption running... Please try again later." : "encriptació inicial en procés... Proveu-ho més tard.",
- "Missing requirements." : "Manca de requisits.",
- "Following users are not set up for encryption:" : "Els usuaris següents no estan configurats per a l'encriptació:",
- "Go directly to your %spersonal settings%s." : "Vés directament a l'%sarranjament personal%s.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'aplicació d'encriptació està activada però les claus no estan inicialitzades, sortiu i acrediteu-vos de nou.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Activa la clau de recuperació (permet recuperar fitxers d'usuaris en cas de pèrdua de contrasenya):",
- "Recovery key password" : "Clau de recuperació de la contrasenya",
- "Repeat Recovery key password" : "Repetiu la clau de recuperació de contrasenya",
- "Enabled" : "Activat",
- "Disabled" : "Desactivat",
- "Change recovery key password:" : "Canvia la clau de recuperació de contrasenya:",
- "Old Recovery key password" : "Antiga clau de recuperació de contrasenya",
- "New Recovery key password" : "Nova clau de recuperació de contrasenya",
- "Repeat New Recovery key password" : "Repetiu la nova clau de recuperació de contrasenya",
- "Change Password" : "Canvia la contrasenya",
- "Your private key password no longer matches your log-in password." : "La clau privada ja no es correspon amb la contrasenya d'accés:",
- "Set your old private key password to your current log-in password:" : "Establiu la vostra antiga clau privada a l'actual contrasenya d'accés:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si no recordeu la contrasenya anterior podeu demanar a l'administrador que recuperi els vostres fitxers.",
- "Old log-in password" : "Contrasenya anterior d'accés",
- "Current log-in password" : "Contrasenya d'accés actual",
- "Update Private Key Password" : "Actualitza la contrasenya de clau privada",
- "Enable password recovery:" : "Habilita la recuperació de contrasenya:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Activar aquesta opció us permetrà obtenir de nou accés als vostres fitxers encriptats en cas de perdre la contrasenya"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/ca.json b/apps/files_encryption/l10n/ca.json
deleted file mode 100644
index e3de02e1701..00000000000
--- a/apps/files_encryption/l10n/ca.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{ "translations": {
- "Unknown error" : "Error desconegut",
- "Recovery key successfully enabled" : "La clau de recuperació s'ha activat",
- "Could not disable recovery key. Please check your recovery key password!" : "No s'ha pogut desactivar la calu de recuperació. Comproveu la contrasenya de la clau de recuperació!",
- "Recovery key successfully disabled" : "La clau de recuperació s'ha descativat",
- "Password successfully changed." : "La contrasenya s'ha canviat.",
- "Could not change the password. Maybe the old password was not correct." : "No s'ha pogut canviar la contrasenya. Potser la contrasenya anterior no era correcta.",
- "Private key password successfully updated." : "La contrasenya de la clau privada s'ha actualitzat.",
- "File recovery settings updated" : "S'han actualitzat els arranjaments de recuperació de fitxers",
- "Could not update file recovery" : "No s'ha pogut actualitzar la recuperació de fitxers",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "L'aplicació d'encriptació no està inicialitzada! Potser l'aplicació d'encriptació ha estat reiniciada durant la sessió. Intenteu sortir i acreditar-vos de nou per reinicialitzar l'aplicació d'encriptació.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "La clau privada no és vàlida! Probablement la contrasenya va ser canviada des de fora de %s (per exemple, en el directori de l'empresa). Vostè pot actualitzar la contrasenya de clau privada en la seva configuració personal per poder recuperar l'accés en els arxius xifrats.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No es pot desencriptar aquest fitxer, probablement és un fitxer compartit. Demaneu al propietari del fitxer que el comparteixi de nou amb vós.",
- "Unknown error. Please check your system settings or contact your administrator" : "Error desconegut. Comproveu l'arranjament del sistema o aviseu a l'administrador",
- "Initial encryption started... This can take some time. Please wait." : "La encriptació inicial ha començat... Pot trigar una estona, espereu.",
- "Initial encryption running... Please try again later." : "encriptació inicial en procés... Proveu-ho més tard.",
- "Missing requirements." : "Manca de requisits.",
- "Following users are not set up for encryption:" : "Els usuaris següents no estan configurats per a l'encriptació:",
- "Go directly to your %spersonal settings%s." : "Vés directament a l'%sarranjament personal%s.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'aplicació d'encriptació està activada però les claus no estan inicialitzades, sortiu i acrediteu-vos de nou.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Activa la clau de recuperació (permet recuperar fitxers d'usuaris en cas de pèrdua de contrasenya):",
- "Recovery key password" : "Clau de recuperació de la contrasenya",
- "Repeat Recovery key password" : "Repetiu la clau de recuperació de contrasenya",
- "Enabled" : "Activat",
- "Disabled" : "Desactivat",
- "Change recovery key password:" : "Canvia la clau de recuperació de contrasenya:",
- "Old Recovery key password" : "Antiga clau de recuperació de contrasenya",
- "New Recovery key password" : "Nova clau de recuperació de contrasenya",
- "Repeat New Recovery key password" : "Repetiu la nova clau de recuperació de contrasenya",
- "Change Password" : "Canvia la contrasenya",
- "Your private key password no longer matches your log-in password." : "La clau privada ja no es correspon amb la contrasenya d'accés:",
- "Set your old private key password to your current log-in password:" : "Establiu la vostra antiga clau privada a l'actual contrasenya d'accés:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si no recordeu la contrasenya anterior podeu demanar a l'administrador que recuperi els vostres fitxers.",
- "Old log-in password" : "Contrasenya anterior d'accés",
- "Current log-in password" : "Contrasenya d'accés actual",
- "Update Private Key Password" : "Actualitza la contrasenya de clau privada",
- "Enable password recovery:" : "Habilita la recuperació de contrasenya:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Activar aquesta opció us permetrà obtenir de nou accés als vostres fitxers encriptats en cas de perdre la contrasenya"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/cs_CZ.js b/apps/files_encryption/l10n/cs_CZ.js
deleted file mode 100644
index 42e14ca683f..00000000000
--- a/apps/files_encryption/l10n/cs_CZ.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Neznámá chyba",
- "Missing recovery key password" : "Chybí heslo klíÄe pro obnovu",
- "Please repeat the recovery key password" : "Zopakujte prosím heslo klíÄe pro obnovu",
- "Repeated recovery key password does not match the provided recovery key password" : "Opakované heslo pro obnovu nesouhlasí se zadaným heslem",
- "Recovery key successfully enabled" : "Záchranný klÃ­Ä byl úspěšnÄ› povolen",
- "Could not disable recovery key. Please check your recovery key password!" : "Nelze zakázat záchranný klíÄ. Zkontrolujte prosím heslo svého záchranného klíÄe!",
- "Recovery key successfully disabled" : "Záchranný klÃ­Ä byl úspěšnÄ› zakázán",
- "Please provide the old recovery password" : "Zadejte prosím staré heslo pro obnovu",
- "Please provide a new recovery password" : "Zadejte prosím nové heslo pro obnovu",
- "Please repeat the new recovery password" : "Zopakujte prosím nové heslo pro obnovu",
- "Password successfully changed." : "Heslo bylo úspěšně změněno.",
- "Could not change the password. Maybe the old password was not correct." : "Změna hesla se nezdařila. Pravděpodobně nebylo stávající heslo zadáno správně.",
- "Could not update the private key password." : "Nelze aktualizovat heslo soukromého klíÄe.",
- "The old password was not correct, please try again." : "Staré heslo nebylo zadáno správně, zkuste to prosím znovu.",
- "The current log-in password was not correct, please try again." : "SouÄasné pÅ™ihlaÅ¡ovací heslo nebylo zadáno správnÄ›, zkuste to prosím znovu.",
- "Private key password successfully updated." : "Heslo soukromého klíÄe úspěšnÄ› aktualizováno.",
- "File recovery settings updated" : "Možnosti záchrany souborů aktualizovány",
- "Could not update file recovery" : "Nelze nastavit záchranu souborů",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Aplikace pro šifrování není inicializována! Je možné, že aplikace byla znovu aktivována během vašeho přihlášení. Zkuste se prosím odhlásit a znovu přihlásit pro provedení inicializace šifrovací aplikace.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Váš soukromý klÃ­Ä není platný! PravdÄ›podobnÄ› bylo vaÅ¡e heslo zmÄ›nÄ›no vnÄ› systému %s (napÅ™. ve vaÅ¡em firemním adresáři). Heslo vaÅ¡eho soukromého klíÄe můžete zmÄ›nit ve svém osobním nastavení pro obnovení přístupu k vaÅ¡im zaÅ¡ifrovaným souborům.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tento soubor se nepodařilo dešifrovat, pravděpodobně je sdílený. Požádejte prosím majitele souboru, aby jej s vámi znovu sdílel.",
- "Unknown error. Please check your system settings or contact your administrator" : "Neznámá chyba. Zkontrolujte nastavení systému nebo kontaktujte vašeho správce.",
- "Initial encryption started... This can take some time. Please wait." : "PoÄáteÄní Å¡ifrování zahájeno... Toto může chvíli trvat. PoÄkejte prosím.",
- "Initial encryption running... Please try again later." : "Probíhá poÄáteÄní Å¡ifrování... Zkuste to prosím znovu pozdÄ›ji.",
- "Missing requirements." : "Nesplněné závislosti.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "UjistÄ›te se prosím, že máte povolené a správnÄ› nakonfigurované OpenSSL vÄetnÄ› jeho rozšíření pro PHP. Aplikace pro Å¡ifrování byla prozatím vypnuta.",
- "Following users are not set up for encryption:" : "Následující uživatelé nemají nastavené šifrování:",
- "Go directly to your %spersonal settings%s." : "Přejít přímo do svého %sosobního nastavení%s.",
- "Server-side Encryption" : "Šifrování na serveru",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikace pro Å¡ifrování je zapnuta, ale vaÅ¡e klíÄe nejsou inicializované. Prosím odhlaste se a znovu pÅ™ihlaste",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Povolit klÃ­Ä pro obnovu (umožňuje obnovu uživatelských souborů v případÄ› ztráty hesla)",
- "Recovery key password" : "Heslo klíÄe pro obnovu",
- "Repeat Recovery key password" : "Zopakujte heslo klíÄe pro obnovu",
- "Enabled" : "Povoleno",
- "Disabled" : "Zakázáno",
- "Change recovery key password:" : "ZmÄ›na hesla klíÄe pro obnovu:",
- "Old Recovery key password" : "Původní heslo klíÄe pro obnovu",
- "New Recovery key password" : "Nové heslo klíÄe pro obnovu",
- "Repeat New Recovery key password" : "Zopakujte nové heslo klíÄe pro obnovu",
- "Change Password" : "Změnit heslo",
- "Your private key password no longer matches your log-in password." : "Heslo vaÅ¡eho soukromého klíÄe se již neshoduje s vaším pÅ™ihlaÅ¡ovacím heslem.",
- "Set your old private key password to your current log-in password:" : "Změňte své staré heslo soukromého klíÄe na stejné, jako je vaÅ¡e souÄasné pÅ™ihlaÅ¡ovací heslo:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Pokud si nepamatujete své původní heslo, můžete požádat správce o obnovu vašich souborů.",
- "Old log-in password" : "Původní přihlašovací heslo",
- "Current log-in password" : "Aktuální přihlašovací heslo",
- "Update Private Key Password" : "ZmÄ›nit heslo soukromého klíÄe",
- "Enable password recovery:" : "Povolit obnovu hesla:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Zapnutí této volby vám umožní znovu získat přístup k vašim zašifrovaným souborům pokud ztratíte heslo"
-},
-"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;");
diff --git a/apps/files_encryption/l10n/cs_CZ.json b/apps/files_encryption/l10n/cs_CZ.json
deleted file mode 100644
index 6e724f8ea2e..00000000000
--- a/apps/files_encryption/l10n/cs_CZ.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Neznámá chyba",
- "Missing recovery key password" : "Chybí heslo klíÄe pro obnovu",
- "Please repeat the recovery key password" : "Zopakujte prosím heslo klíÄe pro obnovu",
- "Repeated recovery key password does not match the provided recovery key password" : "Opakované heslo pro obnovu nesouhlasí se zadaným heslem",
- "Recovery key successfully enabled" : "Záchranný klÃ­Ä byl úspěšnÄ› povolen",
- "Could not disable recovery key. Please check your recovery key password!" : "Nelze zakázat záchranný klíÄ. Zkontrolujte prosím heslo svého záchranného klíÄe!",
- "Recovery key successfully disabled" : "Záchranný klÃ­Ä byl úspěšnÄ› zakázán",
- "Please provide the old recovery password" : "Zadejte prosím staré heslo pro obnovu",
- "Please provide a new recovery password" : "Zadejte prosím nové heslo pro obnovu",
- "Please repeat the new recovery password" : "Zopakujte prosím nové heslo pro obnovu",
- "Password successfully changed." : "Heslo bylo úspěšně změněno.",
- "Could not change the password. Maybe the old password was not correct." : "Změna hesla se nezdařila. Pravděpodobně nebylo stávající heslo zadáno správně.",
- "Could not update the private key password." : "Nelze aktualizovat heslo soukromého klíÄe.",
- "The old password was not correct, please try again." : "Staré heslo nebylo zadáno správně, zkuste to prosím znovu.",
- "The current log-in password was not correct, please try again." : "SouÄasné pÅ™ihlaÅ¡ovací heslo nebylo zadáno správnÄ›, zkuste to prosím znovu.",
- "Private key password successfully updated." : "Heslo soukromého klíÄe úspěšnÄ› aktualizováno.",
- "File recovery settings updated" : "Možnosti záchrany souborů aktualizovány",
- "Could not update file recovery" : "Nelze nastavit záchranu souborů",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Aplikace pro šifrování není inicializována! Je možné, že aplikace byla znovu aktivována během vašeho přihlášení. Zkuste se prosím odhlásit a znovu přihlásit pro provedení inicializace šifrovací aplikace.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Váš soukromý klÃ­Ä není platný! PravdÄ›podobnÄ› bylo vaÅ¡e heslo zmÄ›nÄ›no vnÄ› systému %s (napÅ™. ve vaÅ¡em firemním adresáři). Heslo vaÅ¡eho soukromého klíÄe můžete zmÄ›nit ve svém osobním nastavení pro obnovení přístupu k vaÅ¡im zaÅ¡ifrovaným souborům.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tento soubor se nepodařilo dešifrovat, pravděpodobně je sdílený. Požádejte prosím majitele souboru, aby jej s vámi znovu sdílel.",
- "Unknown error. Please check your system settings or contact your administrator" : "Neznámá chyba. Zkontrolujte nastavení systému nebo kontaktujte vašeho správce.",
- "Initial encryption started... This can take some time. Please wait." : "PoÄáteÄní Å¡ifrování zahájeno... Toto může chvíli trvat. PoÄkejte prosím.",
- "Initial encryption running... Please try again later." : "Probíhá poÄáteÄní Å¡ifrování... Zkuste to prosím znovu pozdÄ›ji.",
- "Missing requirements." : "Nesplněné závislosti.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "UjistÄ›te se prosím, že máte povolené a správnÄ› nakonfigurované OpenSSL vÄetnÄ› jeho rozšíření pro PHP. Aplikace pro Å¡ifrování byla prozatím vypnuta.",
- "Following users are not set up for encryption:" : "Následující uživatelé nemají nastavené šifrování:",
- "Go directly to your %spersonal settings%s." : "Přejít přímo do svého %sosobního nastavení%s.",
- "Server-side Encryption" : "Šifrování na serveru",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikace pro Å¡ifrování je zapnuta, ale vaÅ¡e klíÄe nejsou inicializované. Prosím odhlaste se a znovu pÅ™ihlaste",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Povolit klÃ­Ä pro obnovu (umožňuje obnovu uživatelských souborů v případÄ› ztráty hesla)",
- "Recovery key password" : "Heslo klíÄe pro obnovu",
- "Repeat Recovery key password" : "Zopakujte heslo klíÄe pro obnovu",
- "Enabled" : "Povoleno",
- "Disabled" : "Zakázáno",
- "Change recovery key password:" : "ZmÄ›na hesla klíÄe pro obnovu:",
- "Old Recovery key password" : "Původní heslo klíÄe pro obnovu",
- "New Recovery key password" : "Nové heslo klíÄe pro obnovu",
- "Repeat New Recovery key password" : "Zopakujte nové heslo klíÄe pro obnovu",
- "Change Password" : "Změnit heslo",
- "Your private key password no longer matches your log-in password." : "Heslo vaÅ¡eho soukromého klíÄe se již neshoduje s vaším pÅ™ihlaÅ¡ovacím heslem.",
- "Set your old private key password to your current log-in password:" : "Změňte své staré heslo soukromého klíÄe na stejné, jako je vaÅ¡e souÄasné pÅ™ihlaÅ¡ovací heslo:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Pokud si nepamatujete své původní heslo, můžete požádat správce o obnovu vašich souborů.",
- "Old log-in password" : "Původní přihlašovací heslo",
- "Current log-in password" : "Aktuální přihlašovací heslo",
- "Update Private Key Password" : "ZmÄ›nit heslo soukromého klíÄe",
- "Enable password recovery:" : "Povolit obnovu hesla:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Zapnutí této volby vám umožní znovu získat přístup k vašim zašifrovaným souborům pokud ztratíte heslo"
-},"pluralForm" :"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/cy_GB.js b/apps/files_encryption/l10n/cy_GB.js
deleted file mode 100644
index 03b6d253b38..00000000000
--- a/apps/files_encryption/l10n/cy_GB.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Encryption" : "Amgryptiad"
-},
-"nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;");
diff --git a/apps/files_encryption/l10n/cy_GB.json b/apps/files_encryption/l10n/cy_GB.json
deleted file mode 100644
index ed3f6b2fb92..00000000000
--- a/apps/files_encryption/l10n/cy_GB.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Encryption" : "Amgryptiad"
-},"pluralForm" :"nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/da.js b/apps/files_encryption/l10n/da.js
deleted file mode 100644
index 667b8e72c7a..00000000000
--- a/apps/files_encryption/l10n/da.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Ukendt fejl",
- "Missing recovery key password" : "Der mangler kodeord for gendannelsesnøgle",
- "Please repeat the recovery key password" : "Gentag venligst kodeordet for gendannelsesnøglen",
- "Repeated recovery key password does not match the provided recovery key password" : "Det gentagne kodeord for gendannelsesnøglen stemmer ikke med det angivne kodeord for gendannelsesnøglen",
- "Recovery key successfully enabled" : "Gendannelsesnøgle aktiveret med succes",
- "Could not disable recovery key. Please check your recovery key password!" : "Kunne ikke deaktivere gendannelsesnøgle. Kontroller din gendannelsesnøgle kodeord!",
- "Recovery key successfully disabled" : "Gendannelsesnøgle deaktiveret succesfuldt",
- "Please provide the old recovery password" : "Angiv venligst det gamle kodeord for gendannelsesnøglen",
- "Please provide a new recovery password" : "Angiv venligst et nyt kodeord til gendannelse",
- "Please repeat the new recovery password" : "Gentag venligst det nye kodeord til gendannelse",
- "Password successfully changed." : "Kodeordet blev ændret succesfuldt",
- "Could not change the password. Maybe the old password was not correct." : "Kunne ikke ændre kodeordet. Måske var det gamle kodeord ikke korrekt.",
- "Could not update the private key password." : "Kunne ikke opdatere kodeordet til den private nøgle.",
- "The old password was not correct, please try again." : "Det gamle kodeord var ikke korrekt, prøv venligst igen.",
- "The current log-in password was not correct, please try again." : "Det nuværende kodeord til log-in var ikke korrekt, prøv venligst igen.",
- "Private key password successfully updated." : "Privat nøgle kodeord succesfuldt opdateret.",
- "File recovery settings updated" : "Filgendannelsesindstillinger opdateret",
- "Could not update file recovery" : "Kunne ikke opdatere filgendannelse",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Krypteringsprogrammet er ikke igangsat. Det kan skyldes at krypteringsprogrammet er blevet genaktiveret under din session. Prøv at logge ud og ind igen for at aktivere krypteringsprogrammet. ",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Din private nøgle er ikke gyldig. Sandsynligvis er dit kodeord blevet ændret uden for %s (f.eks dit firmas adressebog). Du kan opdatere din private nøglekode i dine personlige indstillinger for at genskabe adgang til dine krypterede filer.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ikke kryptere denne fil, sandsynligvis fordi filen er delt. Bed venligst filens ejer om at dele den med dig på ny.",
- "Unknown error. Please check your system settings or contact your administrator" : "Ukendt fejl. Venligst tjek dine systemindstillinger eller kontakt din systemadministrator",
- "Initial encryption started... This can take some time. Please wait." : "Førstegangskrypteringen er påbegyndt... Dette kan tage nogen tid. Vent venligst.",
- "Initial encryption running... Please try again later." : "Kryptering foretages... Prøv venligst igen senere.",
- "Missing requirements." : "Manglende betingelser.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Sørg for at OpenSSL, sammen med PHP-udvidelsen, er aktiveret og korrekt konfigureret. Indtil videre er krypteringsprogrammet deaktiveret.",
- "Following users are not set up for encryption:" : "Følgende brugere er ikke sat op til kryptering:",
- "Go directly to your %spersonal settings%s." : "GÃ¥ direkte til dine %spersonlige indstillinger%s.",
- "Server-side Encryption" : "Kryptering på serverdelen",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Krypteringsprogrammet er aktiveret, men din nøgler er ikke igangsat. Log venligst ud og ind igen.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktiver gendannelsesnøgle (Tillad gendannelse af brugerfiler i tilfælde af tab af kodeord):",
- "Recovery key password" : "Gendannelsesnøgle kodeord",
- "Repeat Recovery key password" : "Gentag gendannelse af nøglekoden",
- "Enabled" : "Aktiveret",
- "Disabled" : "Deaktiveret",
- "Change recovery key password:" : "Skift gendannelsesnøgle kodeord:",
- "Old Recovery key password" : "Gammel Gendannelsesnøgle kodeord",
- "New Recovery key password" : "Ny Gendannelsesnøgle kodeord",
- "Repeat New Recovery key password" : "Gentag det nye gendannaleses nøglekodeord",
- "Change Password" : "Skift Kodeord",
- "Your private key password no longer matches your log-in password." : "Dit private nøglekodeord stemmer ikke længere overens med dit login-kodeord.",
- "Set your old private key password to your current log-in password:" : "Sæt dit gamle, private nøglekodeord til at være dit nuværende login-kodeord. ",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Hvis du ikke kan huske dit gamle kodeord kan du bede din administrator om at gendanne dine filer.",
- "Old log-in password" : "Gammelt login kodeord",
- "Current log-in password" : "Nuvrende login kodeord",
- "Update Private Key Password" : "Opdater Privat Nøgle Kodeord",
- "Enable password recovery:" : "Aktiver kodeord gendannelse:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Aktivering af denne valgmulighed tillader dig at generhverve adgang til dine krypterede filer i tilfælde af tab af kodeord"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/da.json b/apps/files_encryption/l10n/da.json
deleted file mode 100644
index 0561094f291..00000000000
--- a/apps/files_encryption/l10n/da.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Ukendt fejl",
- "Missing recovery key password" : "Der mangler kodeord for gendannelsesnøgle",
- "Please repeat the recovery key password" : "Gentag venligst kodeordet for gendannelsesnøglen",
- "Repeated recovery key password does not match the provided recovery key password" : "Det gentagne kodeord for gendannelsesnøglen stemmer ikke med det angivne kodeord for gendannelsesnøglen",
- "Recovery key successfully enabled" : "Gendannelsesnøgle aktiveret med succes",
- "Could not disable recovery key. Please check your recovery key password!" : "Kunne ikke deaktivere gendannelsesnøgle. Kontroller din gendannelsesnøgle kodeord!",
- "Recovery key successfully disabled" : "Gendannelsesnøgle deaktiveret succesfuldt",
- "Please provide the old recovery password" : "Angiv venligst det gamle kodeord for gendannelsesnøglen",
- "Please provide a new recovery password" : "Angiv venligst et nyt kodeord til gendannelse",
- "Please repeat the new recovery password" : "Gentag venligst det nye kodeord til gendannelse",
- "Password successfully changed." : "Kodeordet blev ændret succesfuldt",
- "Could not change the password. Maybe the old password was not correct." : "Kunne ikke ændre kodeordet. Måske var det gamle kodeord ikke korrekt.",
- "Could not update the private key password." : "Kunne ikke opdatere kodeordet til den private nøgle.",
- "The old password was not correct, please try again." : "Det gamle kodeord var ikke korrekt, prøv venligst igen.",
- "The current log-in password was not correct, please try again." : "Det nuværende kodeord til log-in var ikke korrekt, prøv venligst igen.",
- "Private key password successfully updated." : "Privat nøgle kodeord succesfuldt opdateret.",
- "File recovery settings updated" : "Filgendannelsesindstillinger opdateret",
- "Could not update file recovery" : "Kunne ikke opdatere filgendannelse",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Krypteringsprogrammet er ikke igangsat. Det kan skyldes at krypteringsprogrammet er blevet genaktiveret under din session. Prøv at logge ud og ind igen for at aktivere krypteringsprogrammet. ",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Din private nøgle er ikke gyldig. Sandsynligvis er dit kodeord blevet ændret uden for %s (f.eks dit firmas adressebog). Du kan opdatere din private nøglekode i dine personlige indstillinger for at genskabe adgang til dine krypterede filer.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ikke kryptere denne fil, sandsynligvis fordi filen er delt. Bed venligst filens ejer om at dele den med dig på ny.",
- "Unknown error. Please check your system settings or contact your administrator" : "Ukendt fejl. Venligst tjek dine systemindstillinger eller kontakt din systemadministrator",
- "Initial encryption started... This can take some time. Please wait." : "Førstegangskrypteringen er påbegyndt... Dette kan tage nogen tid. Vent venligst.",
- "Initial encryption running... Please try again later." : "Kryptering foretages... Prøv venligst igen senere.",
- "Missing requirements." : "Manglende betingelser.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Sørg for at OpenSSL, sammen med PHP-udvidelsen, er aktiveret og korrekt konfigureret. Indtil videre er krypteringsprogrammet deaktiveret.",
- "Following users are not set up for encryption:" : "Følgende brugere er ikke sat op til kryptering:",
- "Go directly to your %spersonal settings%s." : "GÃ¥ direkte til dine %spersonlige indstillinger%s.",
- "Server-side Encryption" : "Kryptering på serverdelen",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Krypteringsprogrammet er aktiveret, men din nøgler er ikke igangsat. Log venligst ud og ind igen.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktiver gendannelsesnøgle (Tillad gendannelse af brugerfiler i tilfælde af tab af kodeord):",
- "Recovery key password" : "Gendannelsesnøgle kodeord",
- "Repeat Recovery key password" : "Gentag gendannelse af nøglekoden",
- "Enabled" : "Aktiveret",
- "Disabled" : "Deaktiveret",
- "Change recovery key password:" : "Skift gendannelsesnøgle kodeord:",
- "Old Recovery key password" : "Gammel Gendannelsesnøgle kodeord",
- "New Recovery key password" : "Ny Gendannelsesnøgle kodeord",
- "Repeat New Recovery key password" : "Gentag det nye gendannaleses nøglekodeord",
- "Change Password" : "Skift Kodeord",
- "Your private key password no longer matches your log-in password." : "Dit private nøglekodeord stemmer ikke længere overens med dit login-kodeord.",
- "Set your old private key password to your current log-in password:" : "Sæt dit gamle, private nøglekodeord til at være dit nuværende login-kodeord. ",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Hvis du ikke kan huske dit gamle kodeord kan du bede din administrator om at gendanne dine filer.",
- "Old log-in password" : "Gammelt login kodeord",
- "Current log-in password" : "Nuvrende login kodeord",
- "Update Private Key Password" : "Opdater Privat Nøgle Kodeord",
- "Enable password recovery:" : "Aktiver kodeord gendannelse:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Aktivering af denne valgmulighed tillader dig at generhverve adgang til dine krypterede filer i tilfælde af tab af kodeord"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/de.js b/apps/files_encryption/l10n/de.js
deleted file mode 100644
index 544d7630833..00000000000
--- a/apps/files_encryption/l10n/de.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Unbekannter Fehler",
- "Missing recovery key password" : "Schlüsselpasswort zur Wiederherstellung fehlt",
- "Please repeat the recovery key password" : "Schlüsselpasswort zur Wiederherstellung bitte wiederholen",
- "Repeated recovery key password does not match the provided recovery key password" : "Das wiederholte Schlüsselpasswort zur Wiederherstellung stimmt nicht mit dem geforderten Schlüsselpasswort zur Wiederherstellung überein",
- "Recovery key successfully enabled" : "Wiederherstellungsschlüssel wurde erfolgreich aktiviert",
- "Could not disable recovery key. Please check your recovery key password!" : "Der Wiederherstellungsschlüssel konnte nicht deaktiviert werden. Überprüfe Dein Wiederherstellungspasswort!",
- "Recovery key successfully disabled" : "Wiederherstellungsschlüssel deaktiviert.",
- "Please provide the old recovery password" : "Bitte das alte Passwort zur Wiederherstellung eingeben",
- "Please provide a new recovery password" : "Bitte das alte Passwort zur Wiederherstellung eingeben",
- "Please repeat the new recovery password" : "Bitte das neue Passwort zur Wiederherstellung wiederholen",
- "Password successfully changed." : "Dein Passwort wurde geändert.",
- "Could not change the password. Maybe the old password was not correct." : "Das Passwort konnte nicht geändert werden. Vielleicht war das alte Passwort falsch.",
- "Could not update the private key password." : "Das Passwort des privaten Schlüssels konnte nicht aktualisiert werden.",
- "The old password was not correct, please try again." : "Das alte Passwort war nicht korrekt, bitte versuche es noch einmal.",
- "The current log-in password was not correct, please try again." : "Das aktuelle Anmeldepasswort war nicht korrekt, bitte versuche es noch einmal.",
- "Private key password successfully updated." : "Passwort des privaten Schlüssels erfolgreich aktualisiert",
- "File recovery settings updated" : "Einstellungen zur Wiederherstellung von Dateien wurden aktualisiert",
- "Could not update file recovery" : "Dateiwiederherstellung konnte nicht aktualisiert werden",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Verschlüsselung-App ist nicht initialisiert! Vielleicht wurde die Verschlüsselung-App in der aktuellen Sitzung reaktiviert. Bitte versuche Dich ab- und wieder anzumelden, um die Verschlüsselung-App zu initialisieren.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Dein privater Schlüssel ist ungültig. Möglicher Weise wurde außerhalb von %s Dein Passwort geändert (z.B. in Deinem gemeinsamen Verzeichnis). Du kannst das Passwort Deines privaten Schlüssels in den persönlichen Einstellungen aktualisieren, um wieder an Deine Dateien zu gelangen.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Die Datei kann nicht entschlüsselt werden, da die Datei möglicherweise eine geteilte Datei ist. Bitte frage den Dateibesitzer, ob er die Datei nochmals mit Dir teilt.",
- "Unknown error. Please check your system settings or contact your administrator" : "Unbekannter Fehler. Bitte prüfe Deine Systemeinstellungen oder kontaktiere Deinen Administrator",
- "Initial encryption started... This can take some time. Please wait." : "Initialverschlüsselung gestartet… Dies kann einige Zeit dauern. Bitte warten.",
- "Initial encryption running... Please try again later." : "Anfangsverschlüsselung läuft … Bitte versuche es später wieder.",
- "Missing requirements." : "Fehlende Vorraussetzungen",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stelle sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.",
- "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:",
- "Go directly to your %spersonal settings%s." : "Direkt zu Deinen %spersonal settings%s wechseln.",
- "Server-side Encryption" : "Serverseitige Verschlüsselung",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Die Verschlüsselung-App ist aktiviert, aber Deine Schlüssel sind nicht initialisiert. Bitte melde Dich nochmals ab und wieder an.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Wiederherstellungsschlüssel aktivieren (ermöglicht das Wiederherstellen von Dateien, falls das Passwort vergessen wurde):",
- "Recovery key password" : "Wiederherstellungsschlüssel-Passwort",
- "Repeat Recovery key password" : "Schlüssel-Passwort zur Wiederherstellung wiederholen",
- "Enabled" : "Aktiviert",
- "Disabled" : "Deaktiviert",
- "Change recovery key password:" : "Wiederherstellungsschlüssel-Passwort ändern:",
- "Old Recovery key password" : "Altes Wiederherstellungsschlüssel-Passwort",
- "New Recovery key password" : "Neues Wiederherstellungsschlüssel-Passwort",
- "Repeat New Recovery key password" : "Neues Schlüssel-Passwort zur Wiederherstellung wiederholen",
- "Change Password" : "Passwort ändern",
- "Your private key password no longer matches your log-in password." : "Dein Passwort für Deinen privaten Schlüssel stimmt nicht mehr mit Deinem Loginpasswort überein.",
- "Set your old private key password to your current log-in password:" : "Dein altes Passwort für Deinen privaten Schlüssel auf Dein aktuelles Anmeldepasswort einstellen:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Wenn Du Dein altes Passwort vergessen hast, könntest Du Deinen Administrator bitten, Deine Daten wiederherzustellen.",
- "Old log-in password" : "Altes Login Passwort",
- "Current log-in password" : "Aktuelles Passwort",
- "Update Private Key Password" : "Passwort für den privaten Schlüssel aktualisieren",
- "Enable password recovery:" : "Passwortwiederherstellung aktivieren:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Wenn Du diese Option aktivierst, kannst Du Deine verschlüsselten Dateien wiederherstellen, falls Du Dein Passwort vergisst"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/de.json b/apps/files_encryption/l10n/de.json
deleted file mode 100644
index 7ba97e39ac5..00000000000
--- a/apps/files_encryption/l10n/de.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Unbekannter Fehler",
- "Missing recovery key password" : "Schlüsselpasswort zur Wiederherstellung fehlt",
- "Please repeat the recovery key password" : "Schlüsselpasswort zur Wiederherstellung bitte wiederholen",
- "Repeated recovery key password does not match the provided recovery key password" : "Das wiederholte Schlüsselpasswort zur Wiederherstellung stimmt nicht mit dem geforderten Schlüsselpasswort zur Wiederherstellung überein",
- "Recovery key successfully enabled" : "Wiederherstellungsschlüssel wurde erfolgreich aktiviert",
- "Could not disable recovery key. Please check your recovery key password!" : "Der Wiederherstellungsschlüssel konnte nicht deaktiviert werden. Überprüfe Dein Wiederherstellungspasswort!",
- "Recovery key successfully disabled" : "Wiederherstellungsschlüssel deaktiviert.",
- "Please provide the old recovery password" : "Bitte das alte Passwort zur Wiederherstellung eingeben",
- "Please provide a new recovery password" : "Bitte das alte Passwort zur Wiederherstellung eingeben",
- "Please repeat the new recovery password" : "Bitte das neue Passwort zur Wiederherstellung wiederholen",
- "Password successfully changed." : "Dein Passwort wurde geändert.",
- "Could not change the password. Maybe the old password was not correct." : "Das Passwort konnte nicht geändert werden. Vielleicht war das alte Passwort falsch.",
- "Could not update the private key password." : "Das Passwort des privaten Schlüssels konnte nicht aktualisiert werden.",
- "The old password was not correct, please try again." : "Das alte Passwort war nicht korrekt, bitte versuche es noch einmal.",
- "The current log-in password was not correct, please try again." : "Das aktuelle Anmeldepasswort war nicht korrekt, bitte versuche es noch einmal.",
- "Private key password successfully updated." : "Passwort des privaten Schlüssels erfolgreich aktualisiert",
- "File recovery settings updated" : "Einstellungen zur Wiederherstellung von Dateien wurden aktualisiert",
- "Could not update file recovery" : "Dateiwiederherstellung konnte nicht aktualisiert werden",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Verschlüsselung-App ist nicht initialisiert! Vielleicht wurde die Verschlüsselung-App in der aktuellen Sitzung reaktiviert. Bitte versuche Dich ab- und wieder anzumelden, um die Verschlüsselung-App zu initialisieren.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Dein privater Schlüssel ist ungültig. Möglicher Weise wurde außerhalb von %s Dein Passwort geändert (z.B. in Deinem gemeinsamen Verzeichnis). Du kannst das Passwort Deines privaten Schlüssels in den persönlichen Einstellungen aktualisieren, um wieder an Deine Dateien zu gelangen.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Die Datei kann nicht entschlüsselt werden, da die Datei möglicherweise eine geteilte Datei ist. Bitte frage den Dateibesitzer, ob er die Datei nochmals mit Dir teilt.",
- "Unknown error. Please check your system settings or contact your administrator" : "Unbekannter Fehler. Bitte prüfe Deine Systemeinstellungen oder kontaktiere Deinen Administrator",
- "Initial encryption started... This can take some time. Please wait." : "Initialverschlüsselung gestartet… Dies kann einige Zeit dauern. Bitte warten.",
- "Initial encryption running... Please try again later." : "Anfangsverschlüsselung läuft … Bitte versuche es später wieder.",
- "Missing requirements." : "Fehlende Vorraussetzungen",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stelle sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.",
- "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:",
- "Go directly to your %spersonal settings%s." : "Direkt zu Deinen %spersonal settings%s wechseln.",
- "Server-side Encryption" : "Serverseitige Verschlüsselung",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Die Verschlüsselung-App ist aktiviert, aber Deine Schlüssel sind nicht initialisiert. Bitte melde Dich nochmals ab und wieder an.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Wiederherstellungsschlüssel aktivieren (ermöglicht das Wiederherstellen von Dateien, falls das Passwort vergessen wurde):",
- "Recovery key password" : "Wiederherstellungsschlüssel-Passwort",
- "Repeat Recovery key password" : "Schlüssel-Passwort zur Wiederherstellung wiederholen",
- "Enabled" : "Aktiviert",
- "Disabled" : "Deaktiviert",
- "Change recovery key password:" : "Wiederherstellungsschlüssel-Passwort ändern:",
- "Old Recovery key password" : "Altes Wiederherstellungsschlüssel-Passwort",
- "New Recovery key password" : "Neues Wiederherstellungsschlüssel-Passwort",
- "Repeat New Recovery key password" : "Neues Schlüssel-Passwort zur Wiederherstellung wiederholen",
- "Change Password" : "Passwort ändern",
- "Your private key password no longer matches your log-in password." : "Dein Passwort für Deinen privaten Schlüssel stimmt nicht mehr mit Deinem Loginpasswort überein.",
- "Set your old private key password to your current log-in password:" : "Dein altes Passwort für Deinen privaten Schlüssel auf Dein aktuelles Anmeldepasswort einstellen:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Wenn Du Dein altes Passwort vergessen hast, könntest Du Deinen Administrator bitten, Deine Daten wiederherzustellen.",
- "Old log-in password" : "Altes Login Passwort",
- "Current log-in password" : "Aktuelles Passwort",
- "Update Private Key Password" : "Passwort für den privaten Schlüssel aktualisieren",
- "Enable password recovery:" : "Passwortwiederherstellung aktivieren:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Wenn Du diese Option aktivierst, kannst Du Deine verschlüsselten Dateien wiederherstellen, falls Du Dein Passwort vergisst"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/de_CH.js b/apps/files_encryption/l10n/de_CH.js
deleted file mode 100644
index 1f5a01e6798..00000000000
--- a/apps/files_encryption/l10n/de_CH.js
+++ /dev/null
@@ -1,33 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Unbekannter Fehler",
- "Recovery key successfully enabled" : "Der Wiederherstellungsschlüssel wurde erfolgreich aktiviert.",
- "Could not disable recovery key. Please check your recovery key password!" : "Der Wiederherstellungsschlüssel konnte nicht deaktiviert werden. Bitte überprüfen Sie das Passwort für den Wiederherstellungsschlüssel!",
- "Recovery key successfully disabled" : "Der Wiederherstellungsschlüssel wurde erfolgreich deaktiviert.",
- "Password successfully changed." : "Das Passwort wurde erfolgreich geändert.",
- "Could not change the password. Maybe the old password was not correct." : "Das Passwort konnte nicht geändert werden. Vielleicht war das alte Passwort nicht richtig.",
- "Private key password successfully updated." : "Das Passwort des privaten Schlüssels wurde erfolgreich aktualisiert.",
- "Could not update the private key password. Maybe the old password was not correct." : "Das Passwort des privaten Schlüssels konnte nicht aktualisiert werden. Vielleicht war das alte Passwort nicht richtig.",
- "File recovery settings updated" : "Die Einstellungen für die Dateiwiederherstellung wurden aktualisiert.",
- "Could not update file recovery" : "Die Dateiwiederherstellung konnte nicht aktualisiert werden.",
- "Missing requirements." : "Fehlende Voraussetzungen",
- "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stellen Sie sicher, dass PHP 5.3.3 oder neuer installiert und das OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Zur Zeit ist die Verschlüsselungs-App deaktiviert.",
- "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:",
- "Encryption" : "Verschlüsselung",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktivieren Sie den Wiederherstellungsschlüssel (erlaubt die Wiederherstellung des Zugangs zu den Benutzerdateien, wenn das Passwort verloren geht).",
- "Recovery key password" : "Wiederherstellungschlüsselpasswort",
- "Enabled" : "Aktiviert",
- "Disabled" : "Deaktiviert",
- "Change recovery key password:" : "Wiederherstellungsschlüsselpasswort ändern",
- "Old Recovery key password" : "Altes Wiederherstellungsschlüsselpasswort",
- "New Recovery key password" : "Neues Wiederherstellungsschlüsselpasswort ",
- "Change Password" : "Passwort ändern",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Falls Sie sich nicht an Ihr altes Passwort erinnern können, fragen Sie bitte Ihren Administrator, um Ihre Dateien wiederherzustellen.",
- "Old log-in password" : "Altes Login-Passwort",
- "Current log-in password" : "Momentanes Login-Passwort",
- "Update Private Key Password" : "Das Passwort des privaten Schlüssels aktualisieren",
- "Enable password recovery:" : "Die Passwort-Wiederherstellung aktivieren:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Durch die Aktivierung dieser Option haben Sie die Möglichkeit, wieder auf Ihre verschlüsselten Dateien zugreifen zu können, wenn Sie Ihr Passwort verloren haben."
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/de_CH.json b/apps/files_encryption/l10n/de_CH.json
deleted file mode 100644
index 244d0946bfe..00000000000
--- a/apps/files_encryption/l10n/de_CH.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{ "translations": {
- "Unknown error" : "Unbekannter Fehler",
- "Recovery key successfully enabled" : "Der Wiederherstellungsschlüssel wurde erfolgreich aktiviert.",
- "Could not disable recovery key. Please check your recovery key password!" : "Der Wiederherstellungsschlüssel konnte nicht deaktiviert werden. Bitte überprüfen Sie das Passwort für den Wiederherstellungsschlüssel!",
- "Recovery key successfully disabled" : "Der Wiederherstellungsschlüssel wurde erfolgreich deaktiviert.",
- "Password successfully changed." : "Das Passwort wurde erfolgreich geändert.",
- "Could not change the password. Maybe the old password was not correct." : "Das Passwort konnte nicht geändert werden. Vielleicht war das alte Passwort nicht richtig.",
- "Private key password successfully updated." : "Das Passwort des privaten Schlüssels wurde erfolgreich aktualisiert.",
- "Could not update the private key password. Maybe the old password was not correct." : "Das Passwort des privaten Schlüssels konnte nicht aktualisiert werden. Vielleicht war das alte Passwort nicht richtig.",
- "File recovery settings updated" : "Die Einstellungen für die Dateiwiederherstellung wurden aktualisiert.",
- "Could not update file recovery" : "Die Dateiwiederherstellung konnte nicht aktualisiert werden.",
- "Missing requirements." : "Fehlende Voraussetzungen",
- "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stellen Sie sicher, dass PHP 5.3.3 oder neuer installiert und das OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Zur Zeit ist die Verschlüsselungs-App deaktiviert.",
- "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:",
- "Encryption" : "Verschlüsselung",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktivieren Sie den Wiederherstellungsschlüssel (erlaubt die Wiederherstellung des Zugangs zu den Benutzerdateien, wenn das Passwort verloren geht).",
- "Recovery key password" : "Wiederherstellungschlüsselpasswort",
- "Enabled" : "Aktiviert",
- "Disabled" : "Deaktiviert",
- "Change recovery key password:" : "Wiederherstellungsschlüsselpasswort ändern",
- "Old Recovery key password" : "Altes Wiederherstellungsschlüsselpasswort",
- "New Recovery key password" : "Neues Wiederherstellungsschlüsselpasswort ",
- "Change Password" : "Passwort ändern",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Falls Sie sich nicht an Ihr altes Passwort erinnern können, fragen Sie bitte Ihren Administrator, um Ihre Dateien wiederherzustellen.",
- "Old log-in password" : "Altes Login-Passwort",
- "Current log-in password" : "Momentanes Login-Passwort",
- "Update Private Key Password" : "Das Passwort des privaten Schlüssels aktualisieren",
- "Enable password recovery:" : "Die Passwort-Wiederherstellung aktivieren:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Durch die Aktivierung dieser Option haben Sie die Möglichkeit, wieder auf Ihre verschlüsselten Dateien zugreifen zu können, wenn Sie Ihr Passwort verloren haben."
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/de_DE.js b/apps/files_encryption/l10n/de_DE.js
deleted file mode 100644
index 9ad50104ea8..00000000000
--- a/apps/files_encryption/l10n/de_DE.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Unbekannter Fehler",
- "Missing recovery key password" : "Schlüsselpasswort zur Wiederherstellung fehlt",
- "Please repeat the recovery key password" : "Schlüsselpasswort zur Wiederherstellung bitte wiederholen",
- "Repeated recovery key password does not match the provided recovery key password" : "Das wiederholte Schlüsselpasswort zur Wiederherstellung stimmt nicht mit dem geforderten Schlüsselpasswort zur Wiederherstellung überein",
- "Recovery key successfully enabled" : "Der Wiederherstellungsschlüssel wurde erfolgreich aktiviert.",
- "Could not disable recovery key. Please check your recovery key password!" : "Der Wiederherstellungsschlüssel konnte nicht deaktiviert werden. Bitte überprüfen Sie das Passwort für den Wiederherstellungsschlüssel!",
- "Recovery key successfully disabled" : "Der Wiederherstellungsschlüssel wurde erfolgreich deaktiviert.",
- "Please provide the old recovery password" : "Bitte das alte Passwort zur Wiederherstellung eingeben",
- "Please provide a new recovery password" : "Bitte das neue Passwort zur Wiederherstellung eingeben",
- "Please repeat the new recovery password" : "Bitte das neue Passwort zur Wiederherstellung wiederholen",
- "Password successfully changed." : "Das Passwort wurde erfolgreich geändert.",
- "Could not change the password. Maybe the old password was not correct." : "Das Passwort konnte nicht geändert werden. Vielleicht war das alte Passwort nicht richtig.",
- "Could not update the private key password." : "Das Passwort des privaten Schlüssels konnte nicht aktualisiert werden.",
- "The old password was not correct, please try again." : "Das alte Passwort war nicht korrekt, bitte versuchen Sie es noch einmal.",
- "The current log-in password was not correct, please try again." : "Das aktuelle Anmeldepasswort war nicht korrekt, bitte versuchen Sie es noch einmal.",
- "Private key password successfully updated." : "Das Passwort des privaten Schlüssels wurde erfolgreich aktualisiert.",
- "File recovery settings updated" : "Die Einstellungen für die Dateiwiederherstellung wurden aktualisiert.",
- "Could not update file recovery" : "Die Dateiwiederherstellung konnte nicht aktualisiert werden.",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Verschlüsselung-App ist nicht initialisiert! Vielleicht wurde die Verschlüsselung-App in der aktuellen Sitzung reaktiviert. Bitte versuchen Sie sich ab- und wieder anzumelden, um die Verschlüsselung-App zu initialisieren.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Ihr privater Schlüssel ist ungültig. Möglicher Weise wurde außerhalb von %s Ihr Passwort geändert (z.B. in Ihrem gemeinsamen Verzeichnis). Sie können das Passwort Ihres privaten Schlüssels in den persönlichen Einstellungen aktualisieren, um wieder an Ihre Dateien zu gelangen.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Die Datei kann nicht entschlüsselt werden, da die Datei möglicherweise eine geteilte Datei ist. Bitte fragen Sie den Dateibesitzer, dass er die Datei nochmals mit Ihnen teilt.",
- "Unknown error. Please check your system settings or contact your administrator" : "Unbekannter Fehler. Bitte prüfen Sie die Systemeinstellungen oder kontaktieren Sie Ihren Administrator",
- "Initial encryption started... This can take some time. Please wait." : "Anfangsverschlüsselung gestartet … Dieses kann einige Zeit dauern. Bitte warten.",
- "Initial encryption running... Please try again later." : "Anfangsverschlüsselung läuft … Bitte versuchen Sie es später wieder.",
- "Missing requirements." : "Fehlende Voraussetzungen",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stellen Sie sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.",
- "Following users are not set up for encryption:" : "Für folgende Benutzer ist keine Verschlüsselung eingerichtet:",
- "Go directly to your %spersonal settings%s." : "Wechseln Sie direkt zu Ihren %spersonal settings%s.",
- "Server-side Encryption" : "Serverseitige Verschlüsselung",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Verschlüsselung-App ist aktiviert, aber Ihre Schlüssel sind nicht initialisiert. Bitte nochmals ab- und wieder anmelden.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktivieren Sie den Wiederherstellungsschlüssel (erlaubt die Wiederherstellung des Zugangs zu den Benutzerdateien, wenn das Passwort verloren geht):",
- "Recovery key password" : "Wiederherstellungschlüsselpasswort",
- "Repeat Recovery key password" : "Schlüsselpasswort zur Wiederherstellung wiederholen",
- "Enabled" : "Aktiviert",
- "Disabled" : "Deaktiviert",
- "Change recovery key password:" : "Wiederherstellungsschlüsselpasswort ändern",
- "Old Recovery key password" : "Altes Wiederherstellungsschlüsselpasswort",
- "New Recovery key password" : "Neues Wiederherstellungsschlüsselpasswort ",
- "Repeat New Recovery key password" : "Neues Schlüsselpasswort zur Wiederherstellung wiederholen",
- "Change Password" : "Passwort ändern",
- "Your private key password no longer matches your log-in password." : "Das Privatschlüsselpasswort stimmt nicht länger mit dem Anmeldepasswort überein.",
- "Set your old private key password to your current log-in password:" : "Ihr altes Privatschlüsselpasswort auf Ihr aktuelles Anmeldepasswort stellen:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Falls Sie sich nicht an Ihr altes Passwort erinnern können, fragen Sie bitte Ihren Administrator, um Ihre Dateien wiederherzustellen.",
- "Old log-in password" : "Altes Anmeldepasswort",
- "Current log-in password" : "Aktuelles Anmeldepasswort",
- "Update Private Key Password" : "Das Passwort des privaten Schlüssels aktualisieren",
- "Enable password recovery:" : "Die Passwort-Wiederherstellung aktivieren:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Durch die Aktivierung dieser Option haben Sie die Möglichkeit, wieder auf Ihre verschlüsselten Dateien zugreifen zu können, wenn Sie Ihr Passwort verloren haben."
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/de_DE.json b/apps/files_encryption/l10n/de_DE.json
deleted file mode 100644
index 135818e290c..00000000000
--- a/apps/files_encryption/l10n/de_DE.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Unbekannter Fehler",
- "Missing recovery key password" : "Schlüsselpasswort zur Wiederherstellung fehlt",
- "Please repeat the recovery key password" : "Schlüsselpasswort zur Wiederherstellung bitte wiederholen",
- "Repeated recovery key password does not match the provided recovery key password" : "Das wiederholte Schlüsselpasswort zur Wiederherstellung stimmt nicht mit dem geforderten Schlüsselpasswort zur Wiederherstellung überein",
- "Recovery key successfully enabled" : "Der Wiederherstellungsschlüssel wurde erfolgreich aktiviert.",
- "Could not disable recovery key. Please check your recovery key password!" : "Der Wiederherstellungsschlüssel konnte nicht deaktiviert werden. Bitte überprüfen Sie das Passwort für den Wiederherstellungsschlüssel!",
- "Recovery key successfully disabled" : "Der Wiederherstellungsschlüssel wurde erfolgreich deaktiviert.",
- "Please provide the old recovery password" : "Bitte das alte Passwort zur Wiederherstellung eingeben",
- "Please provide a new recovery password" : "Bitte das neue Passwort zur Wiederherstellung eingeben",
- "Please repeat the new recovery password" : "Bitte das neue Passwort zur Wiederherstellung wiederholen",
- "Password successfully changed." : "Das Passwort wurde erfolgreich geändert.",
- "Could not change the password. Maybe the old password was not correct." : "Das Passwort konnte nicht geändert werden. Vielleicht war das alte Passwort nicht richtig.",
- "Could not update the private key password." : "Das Passwort des privaten Schlüssels konnte nicht aktualisiert werden.",
- "The old password was not correct, please try again." : "Das alte Passwort war nicht korrekt, bitte versuchen Sie es noch einmal.",
- "The current log-in password was not correct, please try again." : "Das aktuelle Anmeldepasswort war nicht korrekt, bitte versuchen Sie es noch einmal.",
- "Private key password successfully updated." : "Das Passwort des privaten Schlüssels wurde erfolgreich aktualisiert.",
- "File recovery settings updated" : "Die Einstellungen für die Dateiwiederherstellung wurden aktualisiert.",
- "Could not update file recovery" : "Die Dateiwiederherstellung konnte nicht aktualisiert werden.",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Verschlüsselung-App ist nicht initialisiert! Vielleicht wurde die Verschlüsselung-App in der aktuellen Sitzung reaktiviert. Bitte versuchen Sie sich ab- und wieder anzumelden, um die Verschlüsselung-App zu initialisieren.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Ihr privater Schlüssel ist ungültig. Möglicher Weise wurde außerhalb von %s Ihr Passwort geändert (z.B. in Ihrem gemeinsamen Verzeichnis). Sie können das Passwort Ihres privaten Schlüssels in den persönlichen Einstellungen aktualisieren, um wieder an Ihre Dateien zu gelangen.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Die Datei kann nicht entschlüsselt werden, da die Datei möglicherweise eine geteilte Datei ist. Bitte fragen Sie den Dateibesitzer, dass er die Datei nochmals mit Ihnen teilt.",
- "Unknown error. Please check your system settings or contact your administrator" : "Unbekannter Fehler. Bitte prüfen Sie die Systemeinstellungen oder kontaktieren Sie Ihren Administrator",
- "Initial encryption started... This can take some time. Please wait." : "Anfangsverschlüsselung gestartet … Dieses kann einige Zeit dauern. Bitte warten.",
- "Initial encryption running... Please try again later." : "Anfangsverschlüsselung läuft … Bitte versuchen Sie es später wieder.",
- "Missing requirements." : "Fehlende Voraussetzungen",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stellen Sie sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.",
- "Following users are not set up for encryption:" : "Für folgende Benutzer ist keine Verschlüsselung eingerichtet:",
- "Go directly to your %spersonal settings%s." : "Wechseln Sie direkt zu Ihren %spersonal settings%s.",
- "Server-side Encryption" : "Serverseitige Verschlüsselung",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Verschlüsselung-App ist aktiviert, aber Ihre Schlüssel sind nicht initialisiert. Bitte nochmals ab- und wieder anmelden.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktivieren Sie den Wiederherstellungsschlüssel (erlaubt die Wiederherstellung des Zugangs zu den Benutzerdateien, wenn das Passwort verloren geht):",
- "Recovery key password" : "Wiederherstellungschlüsselpasswort",
- "Repeat Recovery key password" : "Schlüsselpasswort zur Wiederherstellung wiederholen",
- "Enabled" : "Aktiviert",
- "Disabled" : "Deaktiviert",
- "Change recovery key password:" : "Wiederherstellungsschlüsselpasswort ändern",
- "Old Recovery key password" : "Altes Wiederherstellungsschlüsselpasswort",
- "New Recovery key password" : "Neues Wiederherstellungsschlüsselpasswort ",
- "Repeat New Recovery key password" : "Neues Schlüsselpasswort zur Wiederherstellung wiederholen",
- "Change Password" : "Passwort ändern",
- "Your private key password no longer matches your log-in password." : "Das Privatschlüsselpasswort stimmt nicht länger mit dem Anmeldepasswort überein.",
- "Set your old private key password to your current log-in password:" : "Ihr altes Privatschlüsselpasswort auf Ihr aktuelles Anmeldepasswort stellen:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Falls Sie sich nicht an Ihr altes Passwort erinnern können, fragen Sie bitte Ihren Administrator, um Ihre Dateien wiederherzustellen.",
- "Old log-in password" : "Altes Anmeldepasswort",
- "Current log-in password" : "Aktuelles Anmeldepasswort",
- "Update Private Key Password" : "Das Passwort des privaten Schlüssels aktualisieren",
- "Enable password recovery:" : "Die Passwort-Wiederherstellung aktivieren:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Durch die Aktivierung dieser Option haben Sie die Möglichkeit, wieder auf Ihre verschlüsselten Dateien zugreifen zu können, wenn Sie Ihr Passwort verloren haben."
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/el.js b/apps/files_encryption/l10n/el.js
deleted file mode 100644
index ad7621545bd..00000000000
--- a/apps/files_encryption/l10n/el.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Άγνωστο σφάλμα",
- "Missing recovery key password" : "Λείπει το κλειδί επαναφοÏάς κωδικοÏ",
- "Please repeat the recovery key password" : "ΠαÏακαλώ επαναλάβετε το κλειδί επαναφοÏάς κωδικοÏ",
- "Repeated recovery key password does not match the provided recovery key password" : "Η επανάληψη του ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï ÎµÏ€Î±Î½Î±Ï†Î¿Ïάς ÎºÏ‰Î´Î¹ÎºÎ¿Ï Î´ÎµÎ½ ταιÏιάζει με το δοσμένο κλειδί επαναφοÏάς κωδικοÏ",
- "Recovery key successfully enabled" : "Επιτυχής ενεÏγοποίηση ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î±Î½Î¬ÎºÏ„Î·ÏƒÎ·Ï‚",
- "Could not disable recovery key. Please check your recovery key password!" : "Αποτυχία απενεÏγοποίησης ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î±Î½Î¬ÎºÏ„Î·ÏƒÎ·Ï‚. ΠαÏακαλώ ελέγξτε τον κωδικό του ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î±Î½Î¬ÎºÏ„Î·ÏƒÎ®Ï‚ σας!",
- "Recovery key successfully disabled" : "Επιτυχής απενεÏγοποίηση ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î±Î½Î¬ÎºÏ„Î·ÏƒÎ·Ï‚",
- "Please provide the old recovery password" : "ΠαÏακαλώ παÏέχετε τον παλιό κωδικό επαναφοÏάς",
- "Please provide a new recovery password" : "ΠαÏακαλώ παÏέχετε ένα νέο κωδικό επαναφοÏάς",
- "Please repeat the new recovery password" : "ΠαÏακαλώ επαναλάβετε το νέο κωδικό επαναφοÏάς",
- "Password successfully changed." : "Ο κωδικός αλλάχτηκε επιτυχώς.",
- "Could not change the password. Maybe the old password was not correct." : "Αποτυχία αλλαγής ÎºÏ‰Î´Î¹ÎºÎ¿Ï Î¯ÏƒÏ‰Ï‚ ο παλιός κωδικός να μην ήταν σωστός.",
- "Could not update the private key password." : "Αποτυχία ενημέÏωσης του Ï€ÏÎ¿ÏƒÏ‰Ï€Î¹ÎºÎ¿Ï ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Ï€Ïόσβασης",
- "The old password was not correct, please try again." : "Το παλαιό συνθηματικό δεν είναι σωστό, παÏακαλώ δοκιμάστε ξανά.",
- "The current log-in password was not correct, please try again." : "Το Ï„Ïέχον συνθηματικό δεν είναι σωστό, παÏακαλώ δοκιμάστε ξανά.",
- "Private key password successfully updated." : "Το ΠÏοσωπικό κλειδί Ï€Ïόσβασης ενημεÏώθηκε επιτυχώς",
- "File recovery settings updated" : "Οι Ïυθμίσεις επαναφοÏάς αÏχείων ανανεώθηκαν",
- "Could not update file recovery" : "Αποτυχία ενημέÏωσης ανάκτησης αÏχείων",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Η εφαÏμογή κÏυπτογÏάφησης δεν έχει εκκινήσει! Ίσως η εφαÏμογή κÏυπτογÏάφησης επανενεÏγοποιήθηκε κατά τη διάÏκεια της Ï„Ïέχουσας σÏνδεσής σας. ΠαÏακαλώ Ï€Ïοσπαθήστε να αποσυνδεθείτε και να ξανασυνδεθείτε για να εκκινήσετε την εφαÏμογή κÏυπτογÏάφησης.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Το Ï€Ïοσωπικό σας κλειδί δεν είναι έγκυÏο! Πιθανόν ο κωδικός σας να άλλαξε έξω από το %s (Ï€.χ. τη λίστα διευθÏνσεων της εταιÏείας σας). ΜποÏείτε να ενημεÏώσετε το Ï€Ïοσωπικό σας κλειδί επαναφοÏάς ÎºÏ‰Î´Î¹ÎºÎ¿Ï ÏƒÏ„Î¹Ï‚ Ï€Ïοσωπικές σας Ïυθμίσεις για να επανακτήσετε Ï€Ïόσβαση στα κÏυπτογÏαφημένα σας αÏχεία.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Δεν ήταν δυνατό να αποκÏυπτογÏαφηθεί αυτό το αÏχείο, πιθανόν Ï€Ïόκειται για κοινόχÏηστο αÏχείο. ΠαÏακαλώ ζητήστε από τον ιδιοκτήτη του αÏχείου να το ξαναμοιÏαστεί μαζί σας.",
- "Unknown error. Please check your system settings or contact your administrator" : "Άγνωστο σφάλμα. ΠαÏακαλώ ελέγξτε τις Ïυθμίσεις του συστήματό σας ή επικοινωνήστε με τον διαχειÏιστή συστημάτων σας",
- "Initial encryption started... This can take some time. Please wait." : "Η αÏχική κÏυπτογÏάφηση άÏχισε... Αυτό μποÏεί να πάÏει κάποια ÏŽÏα. ΠαÏακαλώ πεÏιμένετε.",
- "Initial encryption running... Please try again later." : "Εκτέλεση αÏχικής κÏυπτογÏάφησης... ΠαÏακαλώ Ï€Ïοσπαθήστε αÏγότεÏα.",
- "Missing requirements." : "ΠÏοαπαιτοÏμενα που απουσιάζουν.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "ΠαÏακαλώ επιβεβαιώστε ότι η OpenSSL μαζί με την επέκταση PHP έχουν ενεÏγοποιηθεί και Ïυθμιστεί σωστά. ΠÏος το παÏόν, η εφαÏμογή κÏυπτογÏάφησης είναι απενεÏγοποιημένη.",
- "Following users are not set up for encryption:" : "Οι κάτωθι χÏήστες δεν έχουν Ïυθμιστεί για κÏυπογÏάφηση:",
- "Go directly to your %spersonal settings%s." : "Πηγαίνετε κατ'ευθείαν στις %sÏ€Ïοσωπικές Ïυθμίσεις%s σας.",
- "Server-side Encryption" : "ΚÏυπτογÏάφηση από τον Διακομιστή",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Η εφαÏμογή κÏυπτογÏάφησης είναι ενεÏγοποιημένη αλλά τα κλειδιά σας δεν έχουν καταγÏαφεί, παÏακαλώ αποσυνδεθείτε και επανασυνδεθείτε.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "ΕνεÏγοποίηση ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î±Î½Î¬ÎºÏ„Î·ÏƒÎ·Ï‚ (επιτÏέψτε την ανάκτηση αÏχείων χÏηστών σε πεÏίπτωση απώλειας κωδικοÏ):",
- "Recovery key password" : "ΕπαναφοÏά ÎºÏ‰Î´Î¹ÎºÎ¿Ï ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï",
- "Repeat Recovery key password" : "Επαναλάβετε το κλειδί επαναφοÏάς κωδικοÏ",
- "Enabled" : "ΕνεÏγοποιημένο",
- "Disabled" : "ΑπενεÏγοποιημένο",
- "Change recovery key password:" : "Αλλαγή ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï ÎµÏ€Î±Î½Î±Ï†Î¿Ïάς κωδικοÏ:",
- "Old Recovery key password" : "Παλιό κλειδί επαναφοÏάς κωδικοÏ",
- "New Recovery key password" : "Îέο κλειδί επαναφοÏάς κωδικοÏ",
- "Repeat New Recovery key password" : "Επαναλάβετε νέο κλειδί επαναφοÏάς κωδικοÏ",
- "Change Password" : "Αλλαγή ÎšÏ‰Î´Î¹ÎºÎ¿Ï Î Ïόσβασης",
- "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." : "Εάν δεν θυμάστε τον παλιό σας κωδικό μποÏείτε να ζητήσετε από τον διαχειÏιστή σας να επανακτήσει τα αÏχεία σας.",
- "Old log-in password" : "Παλαιό συνθηματικό εισόδου",
- "Current log-in password" : "ΤÏέχον συνθηματικό Ï€Ïόσβασης",
- "Update Private Key Password" : "ΕνημέÏωση ΠÏÎ¿ÏƒÏ‰Ï€Î¹ÎºÎ¿Ï ÎšÎ»ÎµÎ¹Î´Î¿Ï Î Ïόσβασης",
- "Enable password recovery:" : "ΕνεÏγοποιήστε την ανάκτηση ÎºÏ‰Î´Î¹ÎºÎ¿Ï Ï€Ïόσβασης",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Η ενεÏγοποίηση αυτής της επιλογής θα σας επιτÏέψει να επανακτήσετε Ï€Ïόσβαση στα κÏυπτογÏαφημένα σας αÏχεία σε πεÏίπτωση απώλειας του ÎºÏ‰Î´Î¹ÎºÎ¿Ï ÏƒÎ±Ï‚"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/el.json b/apps/files_encryption/l10n/el.json
deleted file mode 100644
index cbe19731893..00000000000
--- a/apps/files_encryption/l10n/el.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Άγνωστο σφάλμα",
- "Missing recovery key password" : "Λείπει το κλειδί επαναφοÏάς κωδικοÏ",
- "Please repeat the recovery key password" : "ΠαÏακαλώ επαναλάβετε το κλειδί επαναφοÏάς κωδικοÏ",
- "Repeated recovery key password does not match the provided recovery key password" : "Η επανάληψη του ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï ÎµÏ€Î±Î½Î±Ï†Î¿Ïάς ÎºÏ‰Î´Î¹ÎºÎ¿Ï Î´ÎµÎ½ ταιÏιάζει με το δοσμένο κλειδί επαναφοÏάς κωδικοÏ",
- "Recovery key successfully enabled" : "Επιτυχής ενεÏγοποίηση ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î±Î½Î¬ÎºÏ„Î·ÏƒÎ·Ï‚",
- "Could not disable recovery key. Please check your recovery key password!" : "Αποτυχία απενεÏγοποίησης ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î±Î½Î¬ÎºÏ„Î·ÏƒÎ·Ï‚. ΠαÏακαλώ ελέγξτε τον κωδικό του ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î±Î½Î¬ÎºÏ„Î·ÏƒÎ®Ï‚ σας!",
- "Recovery key successfully disabled" : "Επιτυχής απενεÏγοποίηση ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î±Î½Î¬ÎºÏ„Î·ÏƒÎ·Ï‚",
- "Please provide the old recovery password" : "ΠαÏακαλώ παÏέχετε τον παλιό κωδικό επαναφοÏάς",
- "Please provide a new recovery password" : "ΠαÏακαλώ παÏέχετε ένα νέο κωδικό επαναφοÏάς",
- "Please repeat the new recovery password" : "ΠαÏακαλώ επαναλάβετε το νέο κωδικό επαναφοÏάς",
- "Password successfully changed." : "Ο κωδικός αλλάχτηκε επιτυχώς.",
- "Could not change the password. Maybe the old password was not correct." : "Αποτυχία αλλαγής ÎºÏ‰Î´Î¹ÎºÎ¿Ï Î¯ÏƒÏ‰Ï‚ ο παλιός κωδικός να μην ήταν σωστός.",
- "Could not update the private key password." : "Αποτυχία ενημέÏωσης του Ï€ÏÎ¿ÏƒÏ‰Ï€Î¹ÎºÎ¿Ï ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Ï€Ïόσβασης",
- "The old password was not correct, please try again." : "Το παλαιό συνθηματικό δεν είναι σωστό, παÏακαλώ δοκιμάστε ξανά.",
- "The current log-in password was not correct, please try again." : "Το Ï„Ïέχον συνθηματικό δεν είναι σωστό, παÏακαλώ δοκιμάστε ξανά.",
- "Private key password successfully updated." : "Το ΠÏοσωπικό κλειδί Ï€Ïόσβασης ενημεÏώθηκε επιτυχώς",
- "File recovery settings updated" : "Οι Ïυθμίσεις επαναφοÏάς αÏχείων ανανεώθηκαν",
- "Could not update file recovery" : "Αποτυχία ενημέÏωσης ανάκτησης αÏχείων",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Η εφαÏμογή κÏυπτογÏάφησης δεν έχει εκκινήσει! Ίσως η εφαÏμογή κÏυπτογÏάφησης επανενεÏγοποιήθηκε κατά τη διάÏκεια της Ï„Ïέχουσας σÏνδεσής σας. ΠαÏακαλώ Ï€Ïοσπαθήστε να αποσυνδεθείτε και να ξανασυνδεθείτε για να εκκινήσετε την εφαÏμογή κÏυπτογÏάφησης.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Το Ï€Ïοσωπικό σας κλειδί δεν είναι έγκυÏο! Πιθανόν ο κωδικός σας να άλλαξε έξω από το %s (Ï€.χ. τη λίστα διευθÏνσεων της εταιÏείας σας). ΜποÏείτε να ενημεÏώσετε το Ï€Ïοσωπικό σας κλειδί επαναφοÏάς ÎºÏ‰Î´Î¹ÎºÎ¿Ï ÏƒÏ„Î¹Ï‚ Ï€Ïοσωπικές σας Ïυθμίσεις για να επανακτήσετε Ï€Ïόσβαση στα κÏυπτογÏαφημένα σας αÏχεία.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Δεν ήταν δυνατό να αποκÏυπτογÏαφηθεί αυτό το αÏχείο, πιθανόν Ï€Ïόκειται για κοινόχÏηστο αÏχείο. ΠαÏακαλώ ζητήστε από τον ιδιοκτήτη του αÏχείου να το ξαναμοιÏαστεί μαζί σας.",
- "Unknown error. Please check your system settings or contact your administrator" : "Άγνωστο σφάλμα. ΠαÏακαλώ ελέγξτε τις Ïυθμίσεις του συστήματό σας ή επικοινωνήστε με τον διαχειÏιστή συστημάτων σας",
- "Initial encryption started... This can take some time. Please wait." : "Η αÏχική κÏυπτογÏάφηση άÏχισε... Αυτό μποÏεί να πάÏει κάποια ÏŽÏα. ΠαÏακαλώ πεÏιμένετε.",
- "Initial encryption running... Please try again later." : "Εκτέλεση αÏχικής κÏυπτογÏάφησης... ΠαÏακαλώ Ï€Ïοσπαθήστε αÏγότεÏα.",
- "Missing requirements." : "ΠÏοαπαιτοÏμενα που απουσιάζουν.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "ΠαÏακαλώ επιβεβαιώστε ότι η OpenSSL μαζί με την επέκταση PHP έχουν ενεÏγοποιηθεί και Ïυθμιστεί σωστά. ΠÏος το παÏόν, η εφαÏμογή κÏυπτογÏάφησης είναι απενεÏγοποιημένη.",
- "Following users are not set up for encryption:" : "Οι κάτωθι χÏήστες δεν έχουν Ïυθμιστεί για κÏυπογÏάφηση:",
- "Go directly to your %spersonal settings%s." : "Πηγαίνετε κατ'ευθείαν στις %sÏ€Ïοσωπικές Ïυθμίσεις%s σας.",
- "Server-side Encryption" : "ΚÏυπτογÏάφηση από τον Διακομιστή",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Η εφαÏμογή κÏυπτογÏάφησης είναι ενεÏγοποιημένη αλλά τα κλειδιά σας δεν έχουν καταγÏαφεί, παÏακαλώ αποσυνδεθείτε και επανασυνδεθείτε.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "ΕνεÏγοποίηση ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î±Î½Î¬ÎºÏ„Î·ÏƒÎ·Ï‚ (επιτÏέψτε την ανάκτηση αÏχείων χÏηστών σε πεÏίπτωση απώλειας κωδικοÏ):",
- "Recovery key password" : "ΕπαναφοÏά ÎºÏ‰Î´Î¹ÎºÎ¿Ï ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï",
- "Repeat Recovery key password" : "Επαναλάβετε το κλειδί επαναφοÏάς κωδικοÏ",
- "Enabled" : "ΕνεÏγοποιημένο",
- "Disabled" : "ΑπενεÏγοποιημένο",
- "Change recovery key password:" : "Αλλαγή ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï ÎµÏ€Î±Î½Î±Ï†Î¿Ïάς κωδικοÏ:",
- "Old Recovery key password" : "Παλιό κλειδί επαναφοÏάς κωδικοÏ",
- "New Recovery key password" : "Îέο κλειδί επαναφοÏάς κωδικοÏ",
- "Repeat New Recovery key password" : "Επαναλάβετε νέο κλειδί επαναφοÏάς κωδικοÏ",
- "Change Password" : "Αλλαγή ÎšÏ‰Î´Î¹ÎºÎ¿Ï Î Ïόσβασης",
- "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." : "Εάν δεν θυμάστε τον παλιό σας κωδικό μποÏείτε να ζητήσετε από τον διαχειÏιστή σας να επανακτήσει τα αÏχεία σας.",
- "Old log-in password" : "Παλαιό συνθηματικό εισόδου",
- "Current log-in password" : "ΤÏέχον συνθηματικό Ï€Ïόσβασης",
- "Update Private Key Password" : "ΕνημέÏωση ΠÏÎ¿ÏƒÏ‰Ï€Î¹ÎºÎ¿Ï ÎšÎ»ÎµÎ¹Î´Î¿Ï Î Ïόσβασης",
- "Enable password recovery:" : "ΕνεÏγοποιήστε την ανάκτηση ÎºÏ‰Î´Î¹ÎºÎ¿Ï Ï€Ïόσβασης",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Η ενεÏγοποίηση αυτής της επιλογής θα σας επιτÏέψει να επανακτήσετε Ï€Ïόσβαση στα κÏυπτογÏαφημένα σας αÏχεία σε πεÏίπτωση απώλειας του ÎºÏ‰Î´Î¹ÎºÎ¿Ï ÏƒÎ±Ï‚"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/en_GB.js b/apps/files_encryption/l10n/en_GB.js
deleted file mode 100644
index dc0dba85eb2..00000000000
--- a/apps/files_encryption/l10n/en_GB.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Unknown error",
- "Missing recovery key password" : "Missing recovery key password",
- "Please repeat the recovery key password" : "Please repeat the recovery key password",
- "Repeated recovery key password does not match the provided recovery key password" : "Repeated recovery key password does not match the provided recovery key password",
- "Recovery key successfully enabled" : "Recovery key enabled successfully",
- "Could not disable recovery key. Please check your recovery key password!" : "Could not disable recovery key. Please check your recovery key password!",
- "Recovery key successfully disabled" : "Recovery key disabled successfully",
- "Please provide the old recovery password" : "Please provide the old recovery password",
- "Please provide a new recovery password" : "Please provide a new recovery password",
- "Please repeat the new recovery password" : "Please repeat the new recovery password",
- "Password successfully changed." : "Password changed successfully.",
- "Could not change the password. Maybe the old password was not correct." : "Could not change the password. Maybe the old password was incorrect.",
- "Could not update the private key password." : "Could not update the private key password.",
- "The old password was not correct, please try again." : "The old password was not correct, please try again.",
- "The current log-in password was not correct, please try again." : "The current log-in password was not correct, please try again.",
- "Private key password successfully updated." : "Private key password updated successfully.",
- "File recovery settings updated" : "File recovery settings updated",
- "Could not update file recovery" : "Could not update file recovery",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Encryption app not initialised! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialise the encryption app.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Cannot decrypt this file, which is probably a shared file. Please ask the file owner to reshare the file with you.",
- "Unknown error. Please check your system settings or contact your administrator" : "Unknown error. Please check your system settings or contact your administrator",
- "Initial encryption started... This can take some time. Please wait." : "Initial encryption started... This can take some time. Please wait.",
- "Initial encryption running... Please try again later." : "Initial encryption running... Please try again later.",
- "Missing requirements." : "Missing requirements.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Please make sure that OpenSSL together with the PHP extension is enabled and properly configured. For now, the encryption app has been disabled.",
- "Following users are not set up for encryption:" : "Following users are not set up for encryption:",
- "Go directly to your %spersonal settings%s." : "Go directly to your %spersonal settings%s.",
- "Server-side Encryption" : "Server-side Encryption",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Encryption App is enabled but your keys are not initialised, please log-out and log-in again",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Enable recovery key (allow to recover users files in case of password loss):",
- "Recovery key password" : "Recovery key password",
- "Repeat Recovery key password" : "Repeat recovery key password",
- "Enabled" : "Enabled",
- "Disabled" : "Disabled",
- "Change recovery key password:" : "Change recovery key password:",
- "Old Recovery key password" : "Old recovery key password",
- "New Recovery key password" : "New recovery key password",
- "Repeat New Recovery key password" : "Repeat new recovery key password",
- "Change Password" : "Change Password",
- "Your private key password no longer matches your log-in password." : "Your private key password no longer matches your log-in password.",
- "Set your old private key password to your current 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." : " If you don't remember your old password you can ask your administrator to recover your files.",
- "Old log-in password" : "Old login password",
- "Current log-in password" : "Current login password",
- "Update Private Key Password" : "Update Private Key Password",
- "Enable password recovery:" : "Enable password recovery:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/en_GB.json b/apps/files_encryption/l10n/en_GB.json
deleted file mode 100644
index 8afafc4e908..00000000000
--- a/apps/files_encryption/l10n/en_GB.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Unknown error",
- "Missing recovery key password" : "Missing recovery key password",
- "Please repeat the recovery key password" : "Please repeat the recovery key password",
- "Repeated recovery key password does not match the provided recovery key password" : "Repeated recovery key password does not match the provided recovery key password",
- "Recovery key successfully enabled" : "Recovery key enabled successfully",
- "Could not disable recovery key. Please check your recovery key password!" : "Could not disable recovery key. Please check your recovery key password!",
- "Recovery key successfully disabled" : "Recovery key disabled successfully",
- "Please provide the old recovery password" : "Please provide the old recovery password",
- "Please provide a new recovery password" : "Please provide a new recovery password",
- "Please repeat the new recovery password" : "Please repeat the new recovery password",
- "Password successfully changed." : "Password changed successfully.",
- "Could not change the password. Maybe the old password was not correct." : "Could not change the password. Maybe the old password was incorrect.",
- "Could not update the private key password." : "Could not update the private key password.",
- "The old password was not correct, please try again." : "The old password was not correct, please try again.",
- "The current log-in password was not correct, please try again." : "The current log-in password was not correct, please try again.",
- "Private key password successfully updated." : "Private key password updated successfully.",
- "File recovery settings updated" : "File recovery settings updated",
- "Could not update file recovery" : "Could not update file recovery",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Encryption app not initialised! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialise the encryption app.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Cannot decrypt this file, which is probably a shared file. Please ask the file owner to reshare the file with you.",
- "Unknown error. Please check your system settings or contact your administrator" : "Unknown error. Please check your system settings or contact your administrator",
- "Initial encryption started... This can take some time. Please wait." : "Initial encryption started... This can take some time. Please wait.",
- "Initial encryption running... Please try again later." : "Initial encryption running... Please try again later.",
- "Missing requirements." : "Missing requirements.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Please make sure that OpenSSL together with the PHP extension is enabled and properly configured. For now, the encryption app has been disabled.",
- "Following users are not set up for encryption:" : "Following users are not set up for encryption:",
- "Go directly to your %spersonal settings%s." : "Go directly to your %spersonal settings%s.",
- "Server-side Encryption" : "Server-side Encryption",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Encryption App is enabled but your keys are not initialised, please log-out and log-in again",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Enable recovery key (allow to recover users files in case of password loss):",
- "Recovery key password" : "Recovery key password",
- "Repeat Recovery key password" : "Repeat recovery key password",
- "Enabled" : "Enabled",
- "Disabled" : "Disabled",
- "Change recovery key password:" : "Change recovery key password:",
- "Old Recovery key password" : "Old recovery key password",
- "New Recovery key password" : "New recovery key password",
- "Repeat New Recovery key password" : "Repeat new recovery key password",
- "Change Password" : "Change Password",
- "Your private key password no longer matches your log-in password." : "Your private key password no longer matches your log-in password.",
- "Set your old private key password to your current 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." : " If you don't remember your old password you can ask your administrator to recover your files.",
- "Old log-in password" : "Old login password",
- "Current log-in password" : "Current login password",
- "Update Private Key Password" : "Update Private Key Password",
- "Enable password recovery:" : "Enable password recovery:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/eo.js b/apps/files_encryption/l10n/eo.js
deleted file mode 100644
index b99a3f80920..00000000000
--- a/apps/files_encryption/l10n/eo.js
+++ /dev/null
@@ -1,17 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Nekonata eraro",
- "Password successfully changed." : "La pasvorto sukcese ÅanÄiÄis.",
- "Could not change the password. Maybe the old password was not correct." : "Ne eblis ÅanÄi la pasvorton. Eble la malnova pasvorto malÄustis.",
- "Private key password successfully updated." : "La pasvorto de la malpublika klavo sukcese ÄisdatiÄis.",
- "Missing requirements." : "Mankas neproj.",
- "Enabled" : "Kapabligita",
- "Disabled" : "Malkapabligita",
- "Change Password" : "ÅœarÄi pasvorton",
- "Old log-in password" : "Malnova ensaluta pasvorto",
- "Current log-in password" : "Nuna ensaluta pasvorto",
- "Update Private Key Password" : "Äœisdatigi la pasvorton de la malpublika klavo",
- "Enable password recovery:" : "Kapabligi restaÅ­ron de pasvorto:"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/eo.json b/apps/files_encryption/l10n/eo.json
deleted file mode 100644
index 02ba7e2faa1..00000000000
--- a/apps/files_encryption/l10n/eo.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{ "translations": {
- "Unknown error" : "Nekonata eraro",
- "Password successfully changed." : "La pasvorto sukcese ÅanÄiÄis.",
- "Could not change the password. Maybe the old password was not correct." : "Ne eblis ÅanÄi la pasvorton. Eble la malnova pasvorto malÄustis.",
- "Private key password successfully updated." : "La pasvorto de la malpublika klavo sukcese ÄisdatiÄis.",
- "Missing requirements." : "Mankas neproj.",
- "Enabled" : "Kapabligita",
- "Disabled" : "Malkapabligita",
- "Change Password" : "ÅœarÄi pasvorton",
- "Old log-in password" : "Malnova ensaluta pasvorto",
- "Current log-in password" : "Nuna ensaluta pasvorto",
- "Update Private Key Password" : "Äœisdatigi la pasvorton de la malpublika klavo",
- "Enable password recovery:" : "Kapabligi restaÅ­ron de pasvorto:"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/es.js b/apps/files_encryption/l10n/es.js
deleted file mode 100644
index 22c2b02a8e7..00000000000
--- a/apps/files_encryption/l10n/es.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Error desconocido",
- "Missing recovery key password" : "Falta contraseña de recuperación.",
- "Please repeat the recovery key password" : "Por favor, repita la contraseña de recuperación",
- "Repeated recovery key password does not match the provided recovery key password" : "La contraseña de recuperación reintroducida no coincide con la contraseña de recuperación proporcionada.",
- "Recovery key successfully enabled" : "Se ha habilitado la recuperación de archivos",
- "Could not disable recovery key. Please check your recovery key password!" : "No se pudo deshabilitar la clave de recuperación. Por favor, ¡compruebe su contraseña!",
- "Recovery key successfully disabled" : "Clave de recuperación deshabilitada",
- "Please provide the old recovery password" : "Por favor, ingrese su antigua contraseña de recuperación",
- "Please provide a new recovery password" : "Por favor, ingrese una nueva contraseña de recuperación",
- "Please repeat the new recovery password" : "Por favor, repita su nueva contraseña de recuperación",
- "Password successfully changed." : "Su contraseña ha sido cambiada",
- "Could not change the password. Maybe the old password was not correct." : "No se pudo cambiar la contraseña. Compruebe que la contraseña actual sea correcta.",
- "Could not update the private key password." : "No se pudo actualizar la contraseña de la clave privada.",
- "The old password was not correct, please try again." : "La antigua contraseña no es correcta, por favor intente de nuevo.",
- "The current log-in password was not correct, please try again." : "La contraseña de inicio de sesión actual no es correcto, por favor intente de nuevo.",
- "Private key password successfully updated." : "Contraseña de clave privada actualizada con éxito.",
- "File recovery settings updated" : "Opciones de recuperación de archivos actualizada",
- "Could not update file recovery" : "No se pudo actualizar la recuperación de archivos",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "¡La aplicación de cifrado no ha sido inicializada! Quizá se restableció durante su sesión. Por favor intente cerrar la sesión y volver a iniciarla para inicializar la aplicación de cifrado.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡Su clave privada no es válida! Tal vez su contraseña ha sido cambiada desde fuera de %s (Ej: su directorio corporativo). Puede actualizar la contraseña de su clave privada en sus opciones personales para recuperar el acceso a sus archivos.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No fue posible descifrar este archivo, probablemente se trate de un archivo compartido. Solicite al propietario del mismo que vuelva a compartirlo con usted.",
- "Unknown error. Please check your system settings or contact your administrator" : "Error desconocido. Revise la configuración de su sistema o contacte con su administrador",
- "Initial encryption started... This can take some time. Please wait." : "Ha comenzado el cifrado inicial... Esto puede tardar un rato. Por favor, espere.",
- "Initial encryption running... Please try again later." : "Cifrado inicial en curso... Inténtelo más tarde.",
- "Missing requirements." : "Requisitos incompletos.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que OpenSSL y la extensión de PHP estén habilitados y configurados correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.",
- "Following users are not set up for encryption:" : "Los siguientes usuarios no han sido configurados para el cifrado:",
- "Go directly to your %spersonal settings%s." : "Ir directamente a %sOpciones%s.",
- "Server-side Encryption" : "Cifrado en el servidor",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La app de cifrado está habilitada pero sus claves no se han inicializado, por favor, cierre la sesión y vuelva a iniciarla de nuevo.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar la clave de recuperación (permite recuperar los ficheros del usuario en caso de pérdida de la contraseña);",
- "Recovery key password" : "Contraseña de clave de recuperación",
- "Repeat Recovery key password" : "Repite la contraseña de clave de recuperación",
- "Enabled" : "Habilitar",
- "Disabled" : "Deshabilitado",
- "Change recovery key password:" : "Cambiar la contraseña de la clave de recuperación",
- "Old Recovery key password" : "Antigua clave de recuperación",
- "New Recovery key password" : "Nueva clave de recuperación",
- "Repeat New Recovery key password" : "Repetir la nueva clave de recuperación",
- "Change Password" : "Cambiar contraseña",
- "Your private key password no longer matches your log-in password." : "Su contraseña de clave privada ya no coincide con su contraseña de acceso.",
- "Set your old private key password to your current log-in password:" : "Establezca la contraseña de clave privada antigua para su contraseña de inicio de sesión actual:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si no recuerda su antigua contraseña puede pedir a su administrador que le recupere sus ficheros.",
- "Old log-in password" : "Contraseña de acceso antigua",
- "Current log-in password" : "Contraseña de acceso actual",
- "Update Private Key Password" : "Actualizar contraseña de clave 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 le permitirá volver a tener acceso a sus ficheros cifrados en caso de pérdida de contraseña"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/es.json b/apps/files_encryption/l10n/es.json
deleted file mode 100644
index f31c325a239..00000000000
--- a/apps/files_encryption/l10n/es.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Error desconocido",
- "Missing recovery key password" : "Falta contraseña de recuperación.",
- "Please repeat the recovery key password" : "Por favor, repita la contraseña de recuperación",
- "Repeated recovery key password does not match the provided recovery key password" : "La contraseña de recuperación reintroducida no coincide con la contraseña de recuperación proporcionada.",
- "Recovery key successfully enabled" : "Se ha habilitado la recuperación de archivos",
- "Could not disable recovery key. Please check your recovery key password!" : "No se pudo deshabilitar la clave de recuperación. Por favor, ¡compruebe su contraseña!",
- "Recovery key successfully disabled" : "Clave de recuperación deshabilitada",
- "Please provide the old recovery password" : "Por favor, ingrese su antigua contraseña de recuperación",
- "Please provide a new recovery password" : "Por favor, ingrese una nueva contraseña de recuperación",
- "Please repeat the new recovery password" : "Por favor, repita su nueva contraseña de recuperación",
- "Password successfully changed." : "Su contraseña ha sido cambiada",
- "Could not change the password. Maybe the old password was not correct." : "No se pudo cambiar la contraseña. Compruebe que la contraseña actual sea correcta.",
- "Could not update the private key password." : "No se pudo actualizar la contraseña de la clave privada.",
- "The old password was not correct, please try again." : "La antigua contraseña no es correcta, por favor intente de nuevo.",
- "The current log-in password was not correct, please try again." : "La contraseña de inicio de sesión actual no es correcto, por favor intente de nuevo.",
- "Private key password successfully updated." : "Contraseña de clave privada actualizada con éxito.",
- "File recovery settings updated" : "Opciones de recuperación de archivos actualizada",
- "Could not update file recovery" : "No se pudo actualizar la recuperación de archivos",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "¡La aplicación de cifrado no ha sido inicializada! Quizá se restableció durante su sesión. Por favor intente cerrar la sesión y volver a iniciarla para inicializar la aplicación de cifrado.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡Su clave privada no es válida! Tal vez su contraseña ha sido cambiada desde fuera de %s (Ej: su directorio corporativo). Puede actualizar la contraseña de su clave privada en sus opciones personales para recuperar el acceso a sus archivos.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No fue posible descifrar este archivo, probablemente se trate de un archivo compartido. Solicite al propietario del mismo que vuelva a compartirlo con usted.",
- "Unknown error. Please check your system settings or contact your administrator" : "Error desconocido. Revise la configuración de su sistema o contacte con su administrador",
- "Initial encryption started... This can take some time. Please wait." : "Ha comenzado el cifrado inicial... Esto puede tardar un rato. Por favor, espere.",
- "Initial encryption running... Please try again later." : "Cifrado inicial en curso... Inténtelo más tarde.",
- "Missing requirements." : "Requisitos incompletos.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que OpenSSL y la extensión de PHP estén habilitados y configurados correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.",
- "Following users are not set up for encryption:" : "Los siguientes usuarios no han sido configurados para el cifrado:",
- "Go directly to your %spersonal settings%s." : "Ir directamente a %sOpciones%s.",
- "Server-side Encryption" : "Cifrado en el servidor",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La app de cifrado está habilitada pero sus claves no se han inicializado, por favor, cierre la sesión y vuelva a iniciarla de nuevo.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar la clave de recuperación (permite recuperar los ficheros del usuario en caso de pérdida de la contraseña);",
- "Recovery key password" : "Contraseña de clave de recuperación",
- "Repeat Recovery key password" : "Repite la contraseña de clave de recuperación",
- "Enabled" : "Habilitar",
- "Disabled" : "Deshabilitado",
- "Change recovery key password:" : "Cambiar la contraseña de la clave de recuperación",
- "Old Recovery key password" : "Antigua clave de recuperación",
- "New Recovery key password" : "Nueva clave de recuperación",
- "Repeat New Recovery key password" : "Repetir la nueva clave de recuperación",
- "Change Password" : "Cambiar contraseña",
- "Your private key password no longer matches your log-in password." : "Su contraseña de clave privada ya no coincide con su contraseña de acceso.",
- "Set your old private key password to your current log-in password:" : "Establezca la contraseña de clave privada antigua para su contraseña de inicio de sesión actual:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si no recuerda su antigua contraseña puede pedir a su administrador que le recupere sus ficheros.",
- "Old log-in password" : "Contraseña de acceso antigua",
- "Current log-in password" : "Contraseña de acceso actual",
- "Update Private Key Password" : "Actualizar contraseña de clave 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 le permitirá volver a tener acceso a sus ficheros cifrados en caso de pérdida de contraseña"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/es_AR.js b/apps/files_encryption/l10n/es_AR.js
deleted file mode 100644
index 88a7456dbc6..00000000000
--- a/apps/files_encryption/l10n/es_AR.js
+++ /dev/null
@@ -1,38 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Error desconocido",
- "Recovery key successfully enabled" : "Se habilitó la recuperación de archivos",
- "Could not disable recovery key. Please check your recovery key password!" : "No fue posible deshabilitar la clave de recuperación. Por favor, comprobá tu contraseña.",
- "Recovery key successfully disabled" : "Clave de recuperación deshabilitada",
- "Password successfully changed." : "Tu contraseña fue cambiada",
- "Could not change the password. Maybe the old password was not correct." : "No se pudo cambiar la contraseña. Comprobá que la contraseña actual sea correcta.",
- "Private key password successfully updated." : "Contraseña de clave privada actualizada con éxito.",
- "File recovery settings updated" : "Las opciones de recuperación de archivos fueron actualizadas",
- "Could not update file recovery" : "No fue posible actualizar la recuperación de archivos",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "¡La aplicación de encriptación no está inicializada! Es probable que la aplicación fue re-habilitada durante tu sesión. Intenta salir y iniciar sesión para volverla a iniciar.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡Tu llave privada no es válida! Aparenta que tu clave fue cambiada fuera de %s (de tus directorios). Puedes actualizar la contraseña de tu clave privadaen las configuraciones personales para recobrar el acceso a tus archivos encriptados.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No se puede descibrar este archivo, probablemente sea un archivo compartido. Por favor pídele al dueño que recomparta el archivo contigo.",
- "Initial encryption started... This can take some time. Please wait." : "Encriptación inicial comenzada... Esto puede durar un tiempo. Por favor espere.",
- "Initial encryption running... Please try again later." : "Encriptación inicial corriendo... Por favor intente mas tarde. ",
- "Missing requirements." : "Requisitos incompletos.",
- "Following users are not set up for encryption:" : "Los siguientes usuarios no fueron configurados para encriptar:",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La aplicación de encriptación está habilitada pero las llaves no fueron inicializadas, por favor termine y vuelva a iniciar la sesión",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar clave de recuperación (te permite recuperar los archivos de usuario en el caso que pierdas la contraseña):",
- "Recovery key password" : "Contraseña de recuperación de clave",
- "Repeat Recovery key password" : "Repetir la contraseña de la clave de recuperación",
- "Enabled" : "Habilitado",
- "Disabled" : "Deshabilitado",
- "Change recovery key password:" : "Cambiar contraseña para recuperar la clave:",
- "Old Recovery key password" : "Contraseña antigua de recuperación de clave",
- "New Recovery key password" : "Nueva contraseña de recuperación de clave",
- "Repeat New Recovery key password" : "Repetir Nueva contraseña para la clave de recuperación",
- "Change Password" : "Cambiar contraseña",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si no te acordás de tu contraseña antigua, pedile al 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 la clave privada",
- "Enable password recovery:" : "Habilitar recuperación de contraseña:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Habilitando esta opción, vas a tener acceso a tus archivos encriptados, incluso si perdés la contraseña"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/es_AR.json b/apps/files_encryption/l10n/es_AR.json
deleted file mode 100644
index 03495731eca..00000000000
--- a/apps/files_encryption/l10n/es_AR.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{ "translations": {
- "Unknown error" : "Error desconocido",
- "Recovery key successfully enabled" : "Se habilitó la recuperación de archivos",
- "Could not disable recovery key. Please check your recovery key password!" : "No fue posible deshabilitar la clave de recuperación. Por favor, comprobá tu contraseña.",
- "Recovery key successfully disabled" : "Clave de recuperación deshabilitada",
- "Password successfully changed." : "Tu contraseña fue cambiada",
- "Could not change the password. Maybe the old password was not correct." : "No se pudo cambiar la contraseña. Comprobá que la contraseña actual sea correcta.",
- "Private key password successfully updated." : "Contraseña de clave privada actualizada con éxito.",
- "File recovery settings updated" : "Las opciones de recuperación de archivos fueron actualizadas",
- "Could not update file recovery" : "No fue posible actualizar la recuperación de archivos",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "¡La aplicación de encriptación no está inicializada! Es probable que la aplicación fue re-habilitada durante tu sesión. Intenta salir y iniciar sesión para volverla a iniciar.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡Tu llave privada no es válida! Aparenta que tu clave fue cambiada fuera de %s (de tus directorios). Puedes actualizar la contraseña de tu clave privadaen las configuraciones personales para recobrar el acceso a tus archivos encriptados.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No se puede descibrar este archivo, probablemente sea un archivo compartido. Por favor pídele al dueño que recomparta el archivo contigo.",
- "Initial encryption started... This can take some time. Please wait." : "Encriptación inicial comenzada... Esto puede durar un tiempo. Por favor espere.",
- "Initial encryption running... Please try again later." : "Encriptación inicial corriendo... Por favor intente mas tarde. ",
- "Missing requirements." : "Requisitos incompletos.",
- "Following users are not set up for encryption:" : "Los siguientes usuarios no fueron configurados para encriptar:",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La aplicación de encriptación está habilitada pero las llaves no fueron inicializadas, por favor termine y vuelva a iniciar la sesión",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar clave de recuperación (te permite recuperar los archivos de usuario en el caso que pierdas la contraseña):",
- "Recovery key password" : "Contraseña de recuperación de clave",
- "Repeat Recovery key password" : "Repetir la contraseña de la clave de recuperación",
- "Enabled" : "Habilitado",
- "Disabled" : "Deshabilitado",
- "Change recovery key password:" : "Cambiar contraseña para recuperar la clave:",
- "Old Recovery key password" : "Contraseña antigua de recuperación de clave",
- "New Recovery key password" : "Nueva contraseña de recuperación de clave",
- "Repeat New Recovery key password" : "Repetir Nueva contraseña para la clave de recuperación",
- "Change Password" : "Cambiar contraseña",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si no te acordás de tu contraseña antigua, pedile al 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 la clave privada",
- "Enable password recovery:" : "Habilitar recuperación de contraseña:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Habilitando esta opción, vas a tener acceso a tus archivos encriptados, incluso si perdés la contraseña"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/es_CL.js b/apps/files_encryption/l10n/es_CL.js
deleted file mode 100644
index 5863354a6f1..00000000000
--- a/apps/files_encryption/l10n/es_CL.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Error desconocido"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/es_CL.json b/apps/files_encryption/l10n/es_CL.json
deleted file mode 100644
index 8573fba4ca1..00000000000
--- a/apps/files_encryption/l10n/es_CL.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "Error desconocido"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/es_MX.js b/apps/files_encryption/l10n/es_MX.js
deleted file mode 100644
index 29721e7904e..00000000000
--- a/apps/files_encryption/l10n/es_MX.js
+++ /dev/null
@@ -1,37 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Error desconocido",
- "Recovery key successfully enabled" : "Se ha habilitado la recuperación de archivos",
- "Could not disable recovery key. Please check your recovery key password!" : "No se pudo deshabilitar la clave de recuperación. Por favor compruebe su contraseña!",
- "Recovery key successfully disabled" : "Clave de recuperación deshabilitada",
- "Password successfully changed." : "Su contraseña ha sido cambiada",
- "Could not change the password. Maybe the old password was not correct." : "No se pudo cambiar la contraseña. Compruebe que la contraseña actual sea correcta.",
- "Private key password successfully updated." : "Contraseña de clave privada actualizada con éxito.",
- "File recovery settings updated" : "Opciones de recuperación de archivos actualizada",
- "Could not update file recovery" : "No se pudo actualizar la recuperación de archivos",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "¡La aplicación de cifrado no ha sido inicializada! Quizá fue restablecida durante tu sesión. Por favor intenta cerrar la sesión y volver a iniciarla para inicializar la aplicación de cifrado.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡Su clave privada no es válida! Tal vez su contraseña ha sido cambiada desde fuera. de %s (Ej:Su directorio corporativo). Puede actualizar la contraseña de su clave privada en sus opciones personales para recuperar el acceso a sus archivos.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No fue posible descifrar este archivo, probablemente se trate de un archivo compartido. Solicite al propietario del mismo que vuelva a compartirlo con usted.",
- "Initial encryption started... This can take some time. Please wait." : "Encriptación iniciada... Esto puede tomar un tiempo. Por favor espere.",
- "Missing requirements." : "Requisitos incompletos.",
- "Following users are not set up for encryption:" : "Los siguientes usuarios no han sido configurados para el cifrado:",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La aplicación de crifrado está habilitada pero tus claves no han sido inicializadas, por favor, cierra la sesión y vuelva a iniciarla de nuevo.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar la clave de recuperación (permite recuperar los archivos del usuario en caso de pérdida de la contraseña);",
- "Recovery key password" : "Contraseña de clave de recuperación",
- "Repeat Recovery key password" : "Repite la contraseña de clave de recuperación",
- "Enabled" : "Habilitar",
- "Disabled" : "Deshabilitado",
- "Change recovery key password:" : "Cambiar la contraseña de la clave de recuperación",
- "Old Recovery key password" : "Antigua clave de recuperación",
- "New Recovery key password" : "Nueva clave de recuperación",
- "Repeat New Recovery key password" : "Repetir la nueva clave de recuperación",
- "Change Password" : "Cambiar contraseña",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si no recuerda su antigua contraseña puede pedir a su administrador que le recupere sus archivos.",
- "Old log-in password" : "Contraseña de acceso antigua",
- "Current log-in password" : "Contraseña de acceso actual",
- "Update Private Key Password" : "Actualizar Contraseña de Clave 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 le permitirá volver a tener acceso a sus archivos cifrados en caso de pérdida de contraseña"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/es_MX.json b/apps/files_encryption/l10n/es_MX.json
deleted file mode 100644
index e8c5d52d457..00000000000
--- a/apps/files_encryption/l10n/es_MX.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{ "translations": {
- "Unknown error" : "Error desconocido",
- "Recovery key successfully enabled" : "Se ha habilitado la recuperación de archivos",
- "Could not disable recovery key. Please check your recovery key password!" : "No se pudo deshabilitar la clave de recuperación. Por favor compruebe su contraseña!",
- "Recovery key successfully disabled" : "Clave de recuperación deshabilitada",
- "Password successfully changed." : "Su contraseña ha sido cambiada",
- "Could not change the password. Maybe the old password was not correct." : "No se pudo cambiar la contraseña. Compruebe que la contraseña actual sea correcta.",
- "Private key password successfully updated." : "Contraseña de clave privada actualizada con éxito.",
- "File recovery settings updated" : "Opciones de recuperación de archivos actualizada",
- "Could not update file recovery" : "No se pudo actualizar la recuperación de archivos",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "¡La aplicación de cifrado no ha sido inicializada! Quizá fue restablecida durante tu sesión. Por favor intenta cerrar la sesión y volver a iniciarla para inicializar la aplicación de cifrado.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡Su clave privada no es válida! Tal vez su contraseña ha sido cambiada desde fuera. de %s (Ej:Su directorio corporativo). Puede actualizar la contraseña de su clave privada en sus opciones personales para recuperar el acceso a sus archivos.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No fue posible descifrar este archivo, probablemente se trate de un archivo compartido. Solicite al propietario del mismo que vuelva a compartirlo con usted.",
- "Initial encryption started... This can take some time. Please wait." : "Encriptación iniciada... Esto puede tomar un tiempo. Por favor espere.",
- "Missing requirements." : "Requisitos incompletos.",
- "Following users are not set up for encryption:" : "Los siguientes usuarios no han sido configurados para el cifrado:",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La aplicación de crifrado está habilitada pero tus claves no han sido inicializadas, por favor, cierra la sesión y vuelva a iniciarla de nuevo.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar la clave de recuperación (permite recuperar los archivos del usuario en caso de pérdida de la contraseña);",
- "Recovery key password" : "Contraseña de clave de recuperación",
- "Repeat Recovery key password" : "Repite la contraseña de clave de recuperación",
- "Enabled" : "Habilitar",
- "Disabled" : "Deshabilitado",
- "Change recovery key password:" : "Cambiar la contraseña de la clave de recuperación",
- "Old Recovery key password" : "Antigua clave de recuperación",
- "New Recovery key password" : "Nueva clave de recuperación",
- "Repeat New Recovery key password" : "Repetir la nueva clave de recuperación",
- "Change Password" : "Cambiar contraseña",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si no recuerda su antigua contraseña puede pedir a su administrador que le recupere sus archivos.",
- "Old log-in password" : "Contraseña de acceso antigua",
- "Current log-in password" : "Contraseña de acceso actual",
- "Update Private Key Password" : "Actualizar Contraseña de Clave 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 le permitirá volver a tener acceso a sus archivos cifrados en caso de pérdida de contraseña"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/et_EE.js b/apps/files_encryption/l10n/et_EE.js
deleted file mode 100644
index 0e293cc0ee6..00000000000
--- a/apps/files_encryption/l10n/et_EE.js
+++ /dev/null
@@ -1,51 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Tundmatu viga",
- "Missing recovery key password" : "Muuda taastevõtme parool",
- "Please repeat the recovery key password" : "Palun korda uut taastevõtme parooli",
- "Repeated recovery key password does not match the provided recovery key password" : "Lahtritesse sisestatud taastevõtme paroolid ei kattu",
- "Recovery key successfully enabled" : "Taastevõtme lubamine õnnestus",
- "Could not disable recovery key. Please check your recovery key password!" : "Ei suuda keelata taastevõtit. Palun kontrolli oma taastevõtme parooli!",
- "Recovery key successfully disabled" : "Taastevõtme keelamine õnnestus",
- "Please provide the old recovery password" : "Palun sisesta vana taastevõtme parool",
- "Please provide a new recovery password" : "Palun sisesta uus taastevõtme parool",
- "Please repeat the new recovery password" : "Palun korda uut taastevõtme parooli",
- "Password successfully changed." : "Parool edukalt vahetatud.",
- "Could not change the password. Maybe the old password was not correct." : "Ei suutnud vahetada parooli. Võib-olla on vana parool valesti sisestatud.",
- "Could not update the private key password." : "Ei suutnud uuendada privaatse võtme parooli.",
- "The old password was not correct, please try again." : "Vana parool polnud õige, palun proovi uuesti.",
- "The current log-in password was not correct, please try again." : "Praeguse sisselogimise parool polnud õige, palun proovi uuesti.",
- "Private key password successfully updated." : "Privaatse võtme parool edukalt uuendatud.",
- "File recovery settings updated" : "Faili taaste seaded uuendatud",
- "Could not update file recovery" : "Ei suuda uuendada taastefaili",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Krüpteerimise rakend pole käivitatud. Võib-olla krüpteerimise rakend taaskäivitati sinu sessiooni kestel. Palun proovi logida välja ning uuesti sisse käivitamaks krüpteerimise rakendit.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Sinu provaatne võti pole kehtiv! Tõenäoliselt mudueti parooli väljaspool kausta %s (nt. sinu ettevõtte kaust). Sa saad uuendada oma privaatse võtme parooli oma isiklikes seadetes, et taastada ligipääs sinu krüpteeritud failidele.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Sa ei saa seda faili dekrüpteerida, see on tõenäoliselt jagatud fail. Palun lase omanikul seda faili sinuga uuesti jagada.",
- "Unknown error. Please check your system settings or contact your administrator" : "Tundmatu viga. Palun võta ühendust oma administraatoriga.",
- "Initial encryption started... This can take some time. Please wait." : "Algne krüpteerimine käivitati... See võib võtta natuke aega. Palun oota.",
- "Initial encryption running... Please try again later." : "Toimub esmane krüpteerimine... Palun proovi hiljem uuesti.",
- "Missing requirements." : "Nõutavad on puudu.",
- "Following users are not set up for encryption:" : "Järgmised kasutajad pole seadistatud krüpteeringuks:",
- "Go directly to your %spersonal settings%s." : "Liigi otse oma %s isiklike seadete %s juurde.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Krüpteerimisrakend on lubatud, kuid võtmeid pole lähtestatud. Palun logi välja ning uuesti sisse.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Luba taastevõti (võimalda kasutaja failide taastamine parooli kaotuse puhul):",
- "Recovery key password" : "Taastevõtme parool",
- "Repeat Recovery key password" : "Korda taastevõtme parooli",
- "Enabled" : "Sisse lülitatud",
- "Disabled" : "Väljalülitatud",
- "Change recovery key password:" : "Muuda taastevõtme parooli:",
- "Old Recovery key password" : "Vana taastevõtme parool",
- "New Recovery key password" : "Uus taastevõtme parool",
- "Repeat New Recovery key password" : "Korda uut taastevõtme parooli",
- "Change Password" : "Muuda parooli",
- "Your private key password no longer matches your log-in password." : "Sinu provaatvõtme parool ei kattu enam sinu sisselogimise parooliga.",
- "Set your old private key password to your current log-in password:" : "Pane oma vana privaatvõtme parooliks oma praegune sisselogimise parool.",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Kui sa ei mäleta oma vana parooli, siis palu oma süsteemihalduril taastada ligipääs failidele.",
- "Old log-in password" : "Vana sisselogimise parool",
- "Current log-in password" : "Praegune sisselogimise parool",
- "Update Private Key Password" : "Uuenda privaatse võtme parooli",
- "Enable password recovery:" : "Luba parooli taaste:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Valiku lubamine võimaldab taastada ligipääsu krüpteeritud failidele kui parooli kaotuse puhul"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/et_EE.json b/apps/files_encryption/l10n/et_EE.json
deleted file mode 100644
index c63c9e40e97..00000000000
--- a/apps/files_encryption/l10n/et_EE.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{ "translations": {
- "Unknown error" : "Tundmatu viga",
- "Missing recovery key password" : "Muuda taastevõtme parool",
- "Please repeat the recovery key password" : "Palun korda uut taastevõtme parooli",
- "Repeated recovery key password does not match the provided recovery key password" : "Lahtritesse sisestatud taastevõtme paroolid ei kattu",
- "Recovery key successfully enabled" : "Taastevõtme lubamine õnnestus",
- "Could not disable recovery key. Please check your recovery key password!" : "Ei suuda keelata taastevõtit. Palun kontrolli oma taastevõtme parooli!",
- "Recovery key successfully disabled" : "Taastevõtme keelamine õnnestus",
- "Please provide the old recovery password" : "Palun sisesta vana taastevõtme parool",
- "Please provide a new recovery password" : "Palun sisesta uus taastevõtme parool",
- "Please repeat the new recovery password" : "Palun korda uut taastevõtme parooli",
- "Password successfully changed." : "Parool edukalt vahetatud.",
- "Could not change the password. Maybe the old password was not correct." : "Ei suutnud vahetada parooli. Võib-olla on vana parool valesti sisestatud.",
- "Could not update the private key password." : "Ei suutnud uuendada privaatse võtme parooli.",
- "The old password was not correct, please try again." : "Vana parool polnud õige, palun proovi uuesti.",
- "The current log-in password was not correct, please try again." : "Praeguse sisselogimise parool polnud õige, palun proovi uuesti.",
- "Private key password successfully updated." : "Privaatse võtme parool edukalt uuendatud.",
- "File recovery settings updated" : "Faili taaste seaded uuendatud",
- "Could not update file recovery" : "Ei suuda uuendada taastefaili",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Krüpteerimise rakend pole käivitatud. Võib-olla krüpteerimise rakend taaskäivitati sinu sessiooni kestel. Palun proovi logida välja ning uuesti sisse käivitamaks krüpteerimise rakendit.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Sinu provaatne võti pole kehtiv! Tõenäoliselt mudueti parooli väljaspool kausta %s (nt. sinu ettevõtte kaust). Sa saad uuendada oma privaatse võtme parooli oma isiklikes seadetes, et taastada ligipääs sinu krüpteeritud failidele.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Sa ei saa seda faili dekrüpteerida, see on tõenäoliselt jagatud fail. Palun lase omanikul seda faili sinuga uuesti jagada.",
- "Unknown error. Please check your system settings or contact your administrator" : "Tundmatu viga. Palun võta ühendust oma administraatoriga.",
- "Initial encryption started... This can take some time. Please wait." : "Algne krüpteerimine käivitati... See võib võtta natuke aega. Palun oota.",
- "Initial encryption running... Please try again later." : "Toimub esmane krüpteerimine... Palun proovi hiljem uuesti.",
- "Missing requirements." : "Nõutavad on puudu.",
- "Following users are not set up for encryption:" : "Järgmised kasutajad pole seadistatud krüpteeringuks:",
- "Go directly to your %spersonal settings%s." : "Liigi otse oma %s isiklike seadete %s juurde.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Krüpteerimisrakend on lubatud, kuid võtmeid pole lähtestatud. Palun logi välja ning uuesti sisse.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Luba taastevõti (võimalda kasutaja failide taastamine parooli kaotuse puhul):",
- "Recovery key password" : "Taastevõtme parool",
- "Repeat Recovery key password" : "Korda taastevõtme parooli",
- "Enabled" : "Sisse lülitatud",
- "Disabled" : "Väljalülitatud",
- "Change recovery key password:" : "Muuda taastevõtme parooli:",
- "Old Recovery key password" : "Vana taastevõtme parool",
- "New Recovery key password" : "Uus taastevõtme parool",
- "Repeat New Recovery key password" : "Korda uut taastevõtme parooli",
- "Change Password" : "Muuda parooli",
- "Your private key password no longer matches your log-in password." : "Sinu provaatvõtme parool ei kattu enam sinu sisselogimise parooliga.",
- "Set your old private key password to your current log-in password:" : "Pane oma vana privaatvõtme parooliks oma praegune sisselogimise parool.",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Kui sa ei mäleta oma vana parooli, siis palu oma süsteemihalduril taastada ligipääs failidele.",
- "Old log-in password" : "Vana sisselogimise parool",
- "Current log-in password" : "Praegune sisselogimise parool",
- "Update Private Key Password" : "Uuenda privaatse võtme parooli",
- "Enable password recovery:" : "Luba parooli taaste:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Valiku lubamine võimaldab taastada ligipääsu krüpteeritud failidele kui parooli kaotuse puhul"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/eu.js b/apps/files_encryption/l10n/eu.js
deleted file mode 100644
index d1d1b55f73b..00000000000
--- a/apps/files_encryption/l10n/eu.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Errore ezezaguna",
- "Missing recovery key password" : "Berreskurapen gakoaren pasahitza falta da",
- "Please repeat the recovery key password" : "Mesedez errepikatu berreskuratze gakoaren pasahitza",
- "Repeated recovery key password does not match the provided recovery key password" : "Errepikatutako berreskuratze gakoaren pasahitza ez dator bat berreskuratze gakoaren pasahitzarekin",
- "Recovery key successfully enabled" : "Berreskuratze gakoa behar bezala gaitua",
- "Could not disable recovery key. Please check your recovery key password!" : "Ezin da berreskuratze gako desgaitu. Egiaztatu berreskuratze gako pasahitza!",
- "Recovery key successfully disabled" : "Berreskuratze gakoa behar bezala desgaitu da",
- "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.",
- "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.",
- "File recovery settings updated" : "Fitxategi berreskuratze ezarpenak eguneratuak",
- "Could not update file recovery" : "Ezin da fitxategi berreskuratzea eguneratu",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Enkriptazio aplikazioa ez dago hasieratuta! Agian aplikazioa birgaitu egin da zure saioa bitartean. Mesdez atear eta sartu berriz enkriptazio aplikazioa hasierarazteko.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Zure gako pribatua ez da egokia! Seguruaski zure pasahitza %s-tik kanpo aldatu da (adb. zure direktorio korporatiboa). Zure gako pribatuaren pasahitza eguneratu dezakezu zure ezarpen pertsonaletan zure enkriptatutako fitxategiak berreskuratzeko.",
- "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.",
- "Unknown error. Please check your system settings or contact your administrator" : "Errore ezezaguna. Mesedez, egiaztatu zure sistemaren ezarpenak edo jarri zure administrariarekin kontaktuan.",
- "Initial encryption started... This can take some time. Please wait." : "Hasierako enkriptazioa hasi da... Honek denbora har dezake. Mesedez itxaron.",
- "Initial encryption running... Please try again later." : "Hasierako enkriptaketa abian... mesedez, saiatu beranduago.",
- "Missing requirements." : "Eskakizun batzuk ez dira betetzen.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Mesedez ziurtatu OpenSSL eta PHP hedapena instaltuta eta ongi konfiguratuta daudela. Oraingoz enkriptazio aplikazioa desgaitua izan da.",
- "Following users are not set up for encryption:" : "Hurrengo erabiltzaileak ez daude enktriptatzeko konfiguratutak:",
- "Go directly to your %spersonal settings%s." : "Joan zuzenean zure %sezarpen pertsonaletara%s.",
- "Server-side Encryption" : "Zerbitzari aldeko enkriptazioa",
- "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",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Gaitu berreskurapen gakoa (erabiltzaileen fitxategiak berreskuratzea ahalbidetzen du pasahitza galtzen badute ere):",
- "Recovery key password" : "Berreskuratze gako pasahitza",
- "Repeat Recovery key password" : "Errepikatu berreskuratze gakoaren pasahitza",
- "Enabled" : "Gaitua",
- "Disabled" : "Ez-gaitua",
- "Change recovery key password:" : "Aldatu berreskuratze gako pasahitza:",
- "Old Recovery key password" : "Berreskuratze gako pasahitz zaharra",
- "New Recovery key password" : "Berreskuratze gako pasahitz berria",
- "Repeat New Recovery key password" : "Errepikatu berreskuratze gako berriaren pasahitza",
- "Change Password" : "Aldatu Pasahitza",
- "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.",
- "Old log-in password" : "Sartzeko pasahitz zaharra",
- "Current log-in password" : "Sartzeko oraingo pasahitza",
- "Update Private Key Password" : "Eguneratu gako pasahitza pribatua",
- "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"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/eu.json b/apps/files_encryption/l10n/eu.json
deleted file mode 100644
index 3bd66a039f3..00000000000
--- a/apps/files_encryption/l10n/eu.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Errore ezezaguna",
- "Missing recovery key password" : "Berreskurapen gakoaren pasahitza falta da",
- "Please repeat the recovery key password" : "Mesedez errepikatu berreskuratze gakoaren pasahitza",
- "Repeated recovery key password does not match the provided recovery key password" : "Errepikatutako berreskuratze gakoaren pasahitza ez dator bat berreskuratze gakoaren pasahitzarekin",
- "Recovery key successfully enabled" : "Berreskuratze gakoa behar bezala gaitua",
- "Could not disable recovery key. Please check your recovery key password!" : "Ezin da berreskuratze gako desgaitu. Egiaztatu berreskuratze gako pasahitza!",
- "Recovery key successfully disabled" : "Berreskuratze gakoa behar bezala desgaitu da",
- "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.",
- "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.",
- "File recovery settings updated" : "Fitxategi berreskuratze ezarpenak eguneratuak",
- "Could not update file recovery" : "Ezin da fitxategi berreskuratzea eguneratu",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Enkriptazio aplikazioa ez dago hasieratuta! Agian aplikazioa birgaitu egin da zure saioa bitartean. Mesdez atear eta sartu berriz enkriptazio aplikazioa hasierarazteko.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Zure gako pribatua ez da egokia! Seguruaski zure pasahitza %s-tik kanpo aldatu da (adb. zure direktorio korporatiboa). Zure gako pribatuaren pasahitza eguneratu dezakezu zure ezarpen pertsonaletan zure enkriptatutako fitxategiak berreskuratzeko.",
- "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.",
- "Unknown error. Please check your system settings or contact your administrator" : "Errore ezezaguna. Mesedez, egiaztatu zure sistemaren ezarpenak edo jarri zure administrariarekin kontaktuan.",
- "Initial encryption started... This can take some time. Please wait." : "Hasierako enkriptazioa hasi da... Honek denbora har dezake. Mesedez itxaron.",
- "Initial encryption running... Please try again later." : "Hasierako enkriptaketa abian... mesedez, saiatu beranduago.",
- "Missing requirements." : "Eskakizun batzuk ez dira betetzen.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Mesedez ziurtatu OpenSSL eta PHP hedapena instaltuta eta ongi konfiguratuta daudela. Oraingoz enkriptazio aplikazioa desgaitua izan da.",
- "Following users are not set up for encryption:" : "Hurrengo erabiltzaileak ez daude enktriptatzeko konfiguratutak:",
- "Go directly to your %spersonal settings%s." : "Joan zuzenean zure %sezarpen pertsonaletara%s.",
- "Server-side Encryption" : "Zerbitzari aldeko enkriptazioa",
- "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",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Gaitu berreskurapen gakoa (erabiltzaileen fitxategiak berreskuratzea ahalbidetzen du pasahitza galtzen badute ere):",
- "Recovery key password" : "Berreskuratze gako pasahitza",
- "Repeat Recovery key password" : "Errepikatu berreskuratze gakoaren pasahitza",
- "Enabled" : "Gaitua",
- "Disabled" : "Ez-gaitua",
- "Change recovery key password:" : "Aldatu berreskuratze gako pasahitza:",
- "Old Recovery key password" : "Berreskuratze gako pasahitz zaharra",
- "New Recovery key password" : "Berreskuratze gako pasahitz berria",
- "Repeat New Recovery key password" : "Errepikatu berreskuratze gako berriaren pasahitza",
- "Change Password" : "Aldatu Pasahitza",
- "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.",
- "Old log-in password" : "Sartzeko pasahitz zaharra",
- "Current log-in password" : "Sartzeko oraingo pasahitza",
- "Update Private Key Password" : "Eguneratu gako pasahitza pribatua",
- "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"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/fa.js b/apps/files_encryption/l10n/fa.js
deleted file mode 100644
index e05d6e4d3a4..00000000000
--- a/apps/files_encryption/l10n/fa.js
+++ /dev/null
@@ -1,30 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "خطای نامشخص",
- "Recovery key successfully enabled" : "کلید بازیابی با موÙقیت Ùعال شده است.",
- "Could not disable recovery key. Please check your recovery key password!" : "کلید بازیابی را نمی تواند غیرÙعال نماید. لطÙا رمزعبور کلید بازیابی خود را بررسی کنید!",
- "Recovery key successfully disabled" : "کلید بازیابی با موÙقیت غیر Ùعال شده است.",
- "Password successfully changed." : "رمزعبور با موÙقیت تغییر یاÙت.",
- "Could not change the password. Maybe the old password was not correct." : "رمزعبور را نمیتواند تغییر دهد. شاید رمزعبورقدیمی صحیح نمی باشد.",
- "Private key password successfully updated." : "رمزعبور کلید خصوصی با موÙقیت به روز شد.",
- "File recovery settings updated" : "تنظیمات بازیابی Ùایل به روز شده است.",
- "Could not update file recovery" : "به روز رسانی بازیابی Ùایل را نمی تواند انجام دهد.",
- "Missing requirements." : "نیازمندی های گمشده",
- "Following users are not set up for encryption:" : "کاربران زیر برای رمزنگاری تنظیم نشده اند",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Ùعال کردن کلید بازیابی(اجازه بازیابی Ùایل های کاربران در صورت از دست دادن رمزعبور):",
- "Recovery key password" : "رمزعبور کلید بازیابی",
- "Enabled" : "Ùعال شده",
- "Disabled" : "غیرÙعال شده",
- "Change recovery key password:" : "تغییر رمزعبور کلید بازیابی:",
- "Old Recovery key password" : "رمزعبور قدیمی کلید بازیابی ",
- "New Recovery key password" : "رمزعبور جدید کلید بازیابی",
- "Change Password" : "تغییر رمزعبور",
- " If you don't remember your old password you can ask your administrator to recover your files." : "اگر رمزعبور قدیمی را Ùراموش کرده اید میتوانید از مدیر خود برای بازیابی Ùایل هایتان درخواست نمایید.",
- "Old log-in password" : "رمزعبور قدیمی",
- "Current log-in password" : "رمزعبور Ùعلی",
- "Update Private Key Password" : "به روز رسانی رمزعبور کلید خصوصی",
- "Enable password recovery:" : "Ùعال سازی بازیابی رمزعبور:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Ùعال کردن این گزینه به شما اجازه خواهد داد در صورت از دست دادن رمزعبور به Ùایل های رمزگذاری شده خود دسترسی داشته باشید."
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/fa.json b/apps/files_encryption/l10n/fa.json
deleted file mode 100644
index f048a93c1ad..00000000000
--- a/apps/files_encryption/l10n/fa.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{ "translations": {
- "Unknown error" : "خطای نامشخص",
- "Recovery key successfully enabled" : "کلید بازیابی با موÙقیت Ùعال شده است.",
- "Could not disable recovery key. Please check your recovery key password!" : "کلید بازیابی را نمی تواند غیرÙعال نماید. لطÙا رمزعبور کلید بازیابی خود را بررسی کنید!",
- "Recovery key successfully disabled" : "کلید بازیابی با موÙقیت غیر Ùعال شده است.",
- "Password successfully changed." : "رمزعبور با موÙقیت تغییر یاÙت.",
- "Could not change the password. Maybe the old password was not correct." : "رمزعبور را نمیتواند تغییر دهد. شاید رمزعبورقدیمی صحیح نمی باشد.",
- "Private key password successfully updated." : "رمزعبور کلید خصوصی با موÙقیت به روز شد.",
- "File recovery settings updated" : "تنظیمات بازیابی Ùایل به روز شده است.",
- "Could not update file recovery" : "به روز رسانی بازیابی Ùایل را نمی تواند انجام دهد.",
- "Missing requirements." : "نیازمندی های گمشده",
- "Following users are not set up for encryption:" : "کاربران زیر برای رمزنگاری تنظیم نشده اند",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Ùعال کردن کلید بازیابی(اجازه بازیابی Ùایل های کاربران در صورت از دست دادن رمزعبور):",
- "Recovery key password" : "رمزعبور کلید بازیابی",
- "Enabled" : "Ùعال شده",
- "Disabled" : "غیرÙعال شده",
- "Change recovery key password:" : "تغییر رمزعبور کلید بازیابی:",
- "Old Recovery key password" : "رمزعبور قدیمی کلید بازیابی ",
- "New Recovery key password" : "رمزعبور جدید کلید بازیابی",
- "Change Password" : "تغییر رمزعبور",
- " If you don't remember your old password you can ask your administrator to recover your files." : "اگر رمزعبور قدیمی را Ùراموش کرده اید میتوانید از مدیر خود برای بازیابی Ùایل هایتان درخواست نمایید.",
- "Old log-in password" : "رمزعبور قدیمی",
- "Current log-in password" : "رمزعبور Ùعلی",
- "Update Private Key Password" : "به روز رسانی رمزعبور کلید خصوصی",
- "Enable password recovery:" : "Ùعال سازی بازیابی رمزعبور:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Ùعال کردن این گزینه به شما اجازه خواهد داد در صورت از دست دادن رمزعبور به Ùایل های رمزگذاری شده خود دسترسی داشته باشید."
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/fi_FI.js b/apps/files_encryption/l10n/fi_FI.js
deleted file mode 100644
index d72e2da452f..00000000000
--- a/apps/files_encryption/l10n/fi_FI.js
+++ /dev/null
@@ -1,51 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Tuntematon virhe",
- "Missing recovery key password" : "Palautusavaimen salasana puuttuu",
- "Please repeat the recovery key password" : "Toista palautusavaimen salasana",
- "Repeated recovery key password does not match the provided recovery key password" : "Toistamiseen annettu palautusavaimen salasana ei täsmää annettua palautusavaimen salasanaa",
- "Recovery key successfully enabled" : "Palautusavain kytketty päälle onnistuneesti",
- "Could not disable recovery key. Please check your recovery key password!" : "Palautusavaimen poistaminen käytöstä ei onnistunut. Tarkista palautusavaimesi salasana!",
- "Recovery key successfully disabled" : "Palautusavain poistettu onnistuneesti käytöstä",
- "Please provide the old recovery password" : "Anna vanha palautussalasana",
- "Please provide a new recovery password" : "Anna uusi palautussalasana",
- "Please repeat the new recovery password" : "Toista uusi palautussalasana",
- "Password successfully changed." : "Salasana vaihdettiin onnistuneesti.",
- "Could not change the password. Maybe the old password was not correct." : "Salasanan vaihto epäonnistui. Kenties vanha salasana oli väärin.",
- "Could not update the private key password." : "Yksityisen avaimen salasanaa ei voitu päivittää.",
- "The old password was not correct, please try again." : "Vanha salasana oli väärin, yritä uudelleen.",
- "The current log-in password was not correct, please try again." : "Nykyinen kirjautumissalasana ei ollut oikein, yritä uudelleen.",
- "Private key password successfully updated." : "Yksityisen avaimen salasana päivitetty onnistuneesti.",
- "File recovery settings updated" : "Tiedostopalautuksen asetukset päivitetty",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Salaussovellusta ei ole käynnissä! Kenties salaussovellus otettiin uudelleen käyttöön nykyisen istuntosi aikana. Kirjaudu ulos ja takaisin sisään saadaksesi salaussovelluksen käyttöön.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tämän tiedoston salauksen purkaminen ei onnistu. Kyseessä on luultavasti jaettu tiedosto. Pyydä tiedoston omistajaa jakamaan tiedosto kanssasi uudelleen.",
- "Unknown error. Please check your system settings or contact your administrator" : "Tuntematon virhe. Tarkista järjestelmän asetukset tai ole yhteydessä ylläpitäjään.",
- "Initial encryption started... This can take some time. Please wait." : "Ensimmäinen salauskerta käynnistetty... Tämä saattaa kestää hetken.",
- "Initial encryption running... Please try again later." : "Ensimmäinen salauskerta on meneillään... Yritä myöhemmin uudelleen.",
- "Missing requirements." : "Puuttuvat vaatimukset.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Varmista, että OpenSSL ja PHP-laajennus ovat käytössä ja niiden asetukset ovat oikein. Salaussovellus on poistettu toistaiseksi käytöstä.",
- "Following users are not set up for encryption:" : "Seuraavat käyttäjät eivät ole määrittäneet salausta:",
- "Go directly to your %spersonal settings%s." : "Siirry suoraan %shenkilökohtaisiin asetuksiisi%s.",
- "Server-side Encryption" : "Palvelinpuolen salaus",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Salaussovellus on käytössä, mutta salausavaimia ei ole alustettu. Ole hyvä ja kirjaudu sisään uudelleen.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Käytä palautusavainta (salli käyttäjien tiedostojen palauttaminen, jos heidän salasana unohtuu):",
- "Recovery key password" : "Palautusavaimen salasana",
- "Repeat Recovery key password" : "Toista palautusavaimen salasana",
- "Enabled" : "Käytössä",
- "Disabled" : "Ei käytössä",
- "Change recovery key password:" : "Vaihda palautusavaimen salasana:",
- "Old Recovery key password" : "Vanha palautusavaimen salasana",
- "New Recovery key password" : "Uusi palautusavaimen salasana",
- "Repeat New Recovery key password" : "Toista uusi palautusavaimen salasana",
- "Change Password" : "Vaihda salasana",
- "Your private key password no longer matches your log-in password." : "Salaisen avaimesi salasana ei enää vastaa kirjautumissalasanaasi.",
- "Set your old private key password to your current log-in password:" : "Aseta yksityisen avaimen vanha salasana vastaamaan nykyistä kirjautumissalasanaasi:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Jos et muista vanhaa salasanaasi, voit pyytää ylläpitäjää palauttamaan tiedostosi.",
- "Old log-in password" : "Vanha kirjautumissalasana",
- "Current log-in password" : "Nykyinen kirjautumissalasana",
- "Update Private Key Password" : "Päivitä yksityisen avaimen salasana",
- "Enable password recovery:" : "Ota salasanan palautus käyttöön:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Tämän valinnan käyttäminen mahdollistaa pääsyn salattuihin tiedostoihisi, jos salasana unohtuu"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/fi_FI.json b/apps/files_encryption/l10n/fi_FI.json
deleted file mode 100644
index 2b0d92dfd55..00000000000
--- a/apps/files_encryption/l10n/fi_FI.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{ "translations": {
- "Unknown error" : "Tuntematon virhe",
- "Missing recovery key password" : "Palautusavaimen salasana puuttuu",
- "Please repeat the recovery key password" : "Toista palautusavaimen salasana",
- "Repeated recovery key password does not match the provided recovery key password" : "Toistamiseen annettu palautusavaimen salasana ei täsmää annettua palautusavaimen salasanaa",
- "Recovery key successfully enabled" : "Palautusavain kytketty päälle onnistuneesti",
- "Could not disable recovery key. Please check your recovery key password!" : "Palautusavaimen poistaminen käytöstä ei onnistunut. Tarkista palautusavaimesi salasana!",
- "Recovery key successfully disabled" : "Palautusavain poistettu onnistuneesti käytöstä",
- "Please provide the old recovery password" : "Anna vanha palautussalasana",
- "Please provide a new recovery password" : "Anna uusi palautussalasana",
- "Please repeat the new recovery password" : "Toista uusi palautussalasana",
- "Password successfully changed." : "Salasana vaihdettiin onnistuneesti.",
- "Could not change the password. Maybe the old password was not correct." : "Salasanan vaihto epäonnistui. Kenties vanha salasana oli väärin.",
- "Could not update the private key password." : "Yksityisen avaimen salasanaa ei voitu päivittää.",
- "The old password was not correct, please try again." : "Vanha salasana oli väärin, yritä uudelleen.",
- "The current log-in password was not correct, please try again." : "Nykyinen kirjautumissalasana ei ollut oikein, yritä uudelleen.",
- "Private key password successfully updated." : "Yksityisen avaimen salasana päivitetty onnistuneesti.",
- "File recovery settings updated" : "Tiedostopalautuksen asetukset päivitetty",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Salaussovellusta ei ole käynnissä! Kenties salaussovellus otettiin uudelleen käyttöön nykyisen istuntosi aikana. Kirjaudu ulos ja takaisin sisään saadaksesi salaussovelluksen käyttöön.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tämän tiedoston salauksen purkaminen ei onnistu. Kyseessä on luultavasti jaettu tiedosto. Pyydä tiedoston omistajaa jakamaan tiedosto kanssasi uudelleen.",
- "Unknown error. Please check your system settings or contact your administrator" : "Tuntematon virhe. Tarkista järjestelmän asetukset tai ole yhteydessä ylläpitäjään.",
- "Initial encryption started... This can take some time. Please wait." : "Ensimmäinen salauskerta käynnistetty... Tämä saattaa kestää hetken.",
- "Initial encryption running... Please try again later." : "Ensimmäinen salauskerta on meneillään... Yritä myöhemmin uudelleen.",
- "Missing requirements." : "Puuttuvat vaatimukset.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Varmista, että OpenSSL ja PHP-laajennus ovat käytössä ja niiden asetukset ovat oikein. Salaussovellus on poistettu toistaiseksi käytöstä.",
- "Following users are not set up for encryption:" : "Seuraavat käyttäjät eivät ole määrittäneet salausta:",
- "Go directly to your %spersonal settings%s." : "Siirry suoraan %shenkilökohtaisiin asetuksiisi%s.",
- "Server-side Encryption" : "Palvelinpuolen salaus",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Salaussovellus on käytössä, mutta salausavaimia ei ole alustettu. Ole hyvä ja kirjaudu sisään uudelleen.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Käytä palautusavainta (salli käyttäjien tiedostojen palauttaminen, jos heidän salasana unohtuu):",
- "Recovery key password" : "Palautusavaimen salasana",
- "Repeat Recovery key password" : "Toista palautusavaimen salasana",
- "Enabled" : "Käytössä",
- "Disabled" : "Ei käytössä",
- "Change recovery key password:" : "Vaihda palautusavaimen salasana:",
- "Old Recovery key password" : "Vanha palautusavaimen salasana",
- "New Recovery key password" : "Uusi palautusavaimen salasana",
- "Repeat New Recovery key password" : "Toista uusi palautusavaimen salasana",
- "Change Password" : "Vaihda salasana",
- "Your private key password no longer matches your log-in password." : "Salaisen avaimesi salasana ei enää vastaa kirjautumissalasanaasi.",
- "Set your old private key password to your current log-in password:" : "Aseta yksityisen avaimen vanha salasana vastaamaan nykyistä kirjautumissalasanaasi:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Jos et muista vanhaa salasanaasi, voit pyytää ylläpitäjää palauttamaan tiedostosi.",
- "Old log-in password" : "Vanha kirjautumissalasana",
- "Current log-in password" : "Nykyinen kirjautumissalasana",
- "Update Private Key Password" : "Päivitä yksityisen avaimen salasana",
- "Enable password recovery:" : "Ota salasanan palautus käyttöön:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Tämän valinnan käyttäminen mahdollistaa pääsyn salattuihin tiedostoihisi, jos salasana unohtuu"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/fr.js b/apps/files_encryption/l10n/fr.js
deleted file mode 100644
index 09ddd64cb40..00000000000
--- a/apps/files_encryption/l10n/fr.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Erreur Inconnue ",
- "Missing recovery key password" : "Mot de passe de la clef de récupération manquant",
- "Please repeat the recovery key password" : "Répétez le mot de passe de la clef de récupération",
- "Repeated recovery key password does not match the provided recovery key password" : "Le mot de passe de la clef de récupération et sa répétition ne sont pas identiques.",
- "Recovery key successfully enabled" : "Clef de récupération activée avec succès",
- "Could not disable recovery key. Please check your recovery key password!" : "Impossible de désactiver la clef de récupération. Veuillez vérifier le mot de passe de votre clef de récupération !",
- "Recovery key successfully disabled" : "Clef de récupération désactivée avec succès",
- "Please provide the old recovery password" : "Veuillez entrer l'ancien mot de passe de récupération",
- "Please provide a new recovery password" : "Veuillez entrer un nouveau mot de passe de récupération",
- "Please repeat the new recovery password" : "Veuillez répéter le nouveau mot de passe de récupération",
- "Password successfully changed." : "Mot de passe changé avec succès.",
- "Could not change the password. Maybe the old password was not correct." : "Erreur lors du changement de mot de passe. L'ancien mot de passe est peut-être incorrect.",
- "Could not update the private key password." : "Impossible de mettre à jour le mot de passe de la clef privée.",
- "The old password was not correct, please try again." : "L'ancien mot de passe est incorrect. Veuillez réessayer.",
- "The current log-in password was not correct, please try again." : "Le mot de passe actuel n'est pas correct, veuillez réessayer.",
- "Private key password successfully updated." : "Mot de passe de la clef privée mis à jour avec succès.",
- "File recovery settings updated" : "Paramètres de récupération de fichiers mis à jour",
- "Could not update file recovery" : "Impossible de mettre à jour les fichiers de récupération",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "L'application de chiffrement n'est pas initialisée ! Peut-être que cette application a été réactivée pendant votre session. Veuillez essayer de vous déconnecter et ensuite de vous reconnecter pour initialiser l'application de chiffrement.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Votre clef privée n'est pas valide ! Votre mot de passe a probablement été modifié hors de %s (ex. votre annuaire d'entreprise). Vous pouvez mettre à jour le mot de passe de votre clef privée dans les paramètres personnels pour pouvoir récupérer l'accès à vos fichiers chiffrés.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Impossible de déchiffrer ce fichier : il s'agit probablement d'un fichier partagé. Veuillez demander au propriétaire du fichier de le partager à nouveau avec vous.",
- "Unknown error. Please check your system settings or contact your administrator" : "Erreur inconnue. Veuillez vérifier vos paramètres système ou contacter un administrateur.",
- "Initial encryption started... This can take some time. Please wait." : "Chiffrement initial démarré... Cela peut prendre un certain temps. Veuillez patienter.",
- "Initial encryption running... Please try again later." : "Chiffrement initial en cours... Veuillez ré-essayer ultérieurement.",
- "Missing requirements." : "Dépendances manquantes.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Merci de vous assurer que OpenSSL et son extension PHP sont activés et configurés correctement. Pour l'instant, l'application de chiffrement a été désactivée.",
- "Following users are not set up for encryption:" : "Les utilisateurs suivants ne sont pas configurés pour le chiffrement :",
- "Go directly to your %spersonal settings%s." : "Aller à %svos paramètres personnels%s.",
- "Server-side Encryption" : "Chiffrement côté serveur",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'application de chiffrement est activée mais vos clefs ne sont pas initialisées. Veuillez vous déconnecter et ensuite vous reconnecter.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Activer la clef de récupération (permet de récupérer les fichiers des utilisateurs en cas de perte de mot de passe).",
- "Recovery key password" : "Mot de passe de la clef de récupération",
- "Repeat Recovery key password" : "Répétez le mot de passe de la clef de récupération",
- "Enabled" : "Activé",
- "Disabled" : "Désactivé",
- "Change recovery key password:" : "Modifier le mot de passe de la clef de récupération :",
- "Old Recovery key password" : "Ancien mot de passe de la clef de récupération",
- "New Recovery key password" : "Nouveau mot de passe de la clef de récupération",
- "Repeat New Recovery key password" : "Répétez le nouveau mot de passe de la clef de récupération",
- "Change Password" : "Changer de mot de passe",
- "Your private key password no longer matches your log-in password." : "Le mot de passe de votre clef privée ne correspond plus à votre mot de passe de connexion.",
- "Set your old private key password to your current log-in password:" : "Faites de votre mot de passe de connexion le mot de passe de votre clef privée :",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si vous ne vous souvenez plus de votre ancien mot de passe, vous pouvez demander à votre administrateur de récupérer vos fichiers.",
- "Old log-in password" : "Ancien mot de passe de connexion",
- "Current log-in password" : "Actuel mot de passe de connexion",
- "Update Private Key Password" : "Mettre à jour le mot de passe de votre clef privée",
- "Enable password recovery:" : "Activer la récupération du mot de passe :",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Activer cette option vous permettra d'obtenir à nouveau l'accès à vos fichiers chiffrés en cas de perte de mot de passe"
-},
-"nplurals=2; plural=(n > 1);");
diff --git a/apps/files_encryption/l10n/fr.json b/apps/files_encryption/l10n/fr.json
deleted file mode 100644
index 3b439872250..00000000000
--- a/apps/files_encryption/l10n/fr.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Erreur Inconnue ",
- "Missing recovery key password" : "Mot de passe de la clef de récupération manquant",
- "Please repeat the recovery key password" : "Répétez le mot de passe de la clef de récupération",
- "Repeated recovery key password does not match the provided recovery key password" : "Le mot de passe de la clef de récupération et sa répétition ne sont pas identiques.",
- "Recovery key successfully enabled" : "Clef de récupération activée avec succès",
- "Could not disable recovery key. Please check your recovery key password!" : "Impossible de désactiver la clef de récupération. Veuillez vérifier le mot de passe de votre clef de récupération !",
- "Recovery key successfully disabled" : "Clef de récupération désactivée avec succès",
- "Please provide the old recovery password" : "Veuillez entrer l'ancien mot de passe de récupération",
- "Please provide a new recovery password" : "Veuillez entrer un nouveau mot de passe de récupération",
- "Please repeat the new recovery password" : "Veuillez répéter le nouveau mot de passe de récupération",
- "Password successfully changed." : "Mot de passe changé avec succès.",
- "Could not change the password. Maybe the old password was not correct." : "Erreur lors du changement de mot de passe. L'ancien mot de passe est peut-être incorrect.",
- "Could not update the private key password." : "Impossible de mettre à jour le mot de passe de la clef privée.",
- "The old password was not correct, please try again." : "L'ancien mot de passe est incorrect. Veuillez réessayer.",
- "The current log-in password was not correct, please try again." : "Le mot de passe actuel n'est pas correct, veuillez réessayer.",
- "Private key password successfully updated." : "Mot de passe de la clef privée mis à jour avec succès.",
- "File recovery settings updated" : "Paramètres de récupération de fichiers mis à jour",
- "Could not update file recovery" : "Impossible de mettre à jour les fichiers de récupération",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "L'application de chiffrement n'est pas initialisée ! Peut-être que cette application a été réactivée pendant votre session. Veuillez essayer de vous déconnecter et ensuite de vous reconnecter pour initialiser l'application de chiffrement.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Votre clef privée n'est pas valide ! Votre mot de passe a probablement été modifié hors de %s (ex. votre annuaire d'entreprise). Vous pouvez mettre à jour le mot de passe de votre clef privée dans les paramètres personnels pour pouvoir récupérer l'accès à vos fichiers chiffrés.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Impossible de déchiffrer ce fichier : il s'agit probablement d'un fichier partagé. Veuillez demander au propriétaire du fichier de le partager à nouveau avec vous.",
- "Unknown error. Please check your system settings or contact your administrator" : "Erreur inconnue. Veuillez vérifier vos paramètres système ou contacter un administrateur.",
- "Initial encryption started... This can take some time. Please wait." : "Chiffrement initial démarré... Cela peut prendre un certain temps. Veuillez patienter.",
- "Initial encryption running... Please try again later." : "Chiffrement initial en cours... Veuillez ré-essayer ultérieurement.",
- "Missing requirements." : "Dépendances manquantes.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Merci de vous assurer que OpenSSL et son extension PHP sont activés et configurés correctement. Pour l'instant, l'application de chiffrement a été désactivée.",
- "Following users are not set up for encryption:" : "Les utilisateurs suivants ne sont pas configurés pour le chiffrement :",
- "Go directly to your %spersonal settings%s." : "Aller à %svos paramètres personnels%s.",
- "Server-side Encryption" : "Chiffrement côté serveur",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'application de chiffrement est activée mais vos clefs ne sont pas initialisées. Veuillez vous déconnecter et ensuite vous reconnecter.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Activer la clef de récupération (permet de récupérer les fichiers des utilisateurs en cas de perte de mot de passe).",
- "Recovery key password" : "Mot de passe de la clef de récupération",
- "Repeat Recovery key password" : "Répétez le mot de passe de la clef de récupération",
- "Enabled" : "Activé",
- "Disabled" : "Désactivé",
- "Change recovery key password:" : "Modifier le mot de passe de la clef de récupération :",
- "Old Recovery key password" : "Ancien mot de passe de la clef de récupération",
- "New Recovery key password" : "Nouveau mot de passe de la clef de récupération",
- "Repeat New Recovery key password" : "Répétez le nouveau mot de passe de la clef de récupération",
- "Change Password" : "Changer de mot de passe",
- "Your private key password no longer matches your log-in password." : "Le mot de passe de votre clef privée ne correspond plus à votre mot de passe de connexion.",
- "Set your old private key password to your current log-in password:" : "Faites de votre mot de passe de connexion le mot de passe de votre clef privée :",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Si vous ne vous souvenez plus de votre ancien mot de passe, vous pouvez demander à votre administrateur de récupérer vos fichiers.",
- "Old log-in password" : "Ancien mot de passe de connexion",
- "Current log-in password" : "Actuel mot de passe de connexion",
- "Update Private Key Password" : "Mettre à jour le mot de passe de votre clef privée",
- "Enable password recovery:" : "Activer la récupération du mot de passe :",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Activer cette option vous permettra d'obtenir à nouveau l'accès à vos fichiers chiffrés en cas de perte de mot de passe"
-},"pluralForm" :"nplurals=2; plural=(n > 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/gl.js b/apps/files_encryption/l10n/gl.js
deleted file mode 100644
index bd44dc65bc7..00000000000
--- a/apps/files_encryption/l10n/gl.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Produciuse un erro descoñecido",
- "Missing recovery key password" : "Falta a chave de recuperación",
- "Please repeat the recovery key password" : "Repita a chave de recuperación",
- "Repeated recovery key password does not match the provided recovery key password" : "A repetición da chave de recuperación non coincide coa chave de recuperación estabelecida",
- "Recovery key successfully enabled" : "Activada satisfactoriamente a chave de recuperación",
- "Could not disable recovery key. Please check your recovery key password!" : "Non foi posíbel desactivar a chave de recuperación. Comprobe o contrasinal da chave de recuperación!",
- "Recovery key successfully disabled" : "Desactivada satisfactoriamente a chave de recuperación",
- "Please provide the old recovery password" : "Introduza a chave de recuperación antiga",
- "Please provide a new recovery password" : "Introduza a nova chave de recuperación",
- "Please repeat the new recovery password" : "Repita a nova chave de recuperación",
- "Password successfully changed." : "O contrasinal foi cambiado satisfactoriamente",
- "Could not change the password. Maybe the old password was not correct." : "Non foi posíbel cambiar o contrasinal. Probabelmente o contrasinal antigo non é o correcto.",
- "Could not update the private key password." : "Non foi posíbel actualizar o contrasinal da chave privada.",
- "The old password was not correct, please try again." : "O contrasinal antigo non é correcto, ténteo de novo.",
- "The current log-in password was not correct, please try again." : "O actual contrasinal de acceso non é correcto, ténteo de novo.",
- "Private key password successfully updated." : "A chave privada foi actualizada correctamente.",
- "File recovery settings updated" : "Actualizouse o ficheiro de axustes de recuperación",
- "Could not update file recovery" : "Non foi posíbel actualizar o ficheiro de recuperación",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Non se iniciou a aplicación de cifrado! Quizais volva a activarse durante a sesión. Tente pechar a sesión e volver iniciala para que tamén se inicie a aplicación de cifrado.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "A chave privada non é correcta! É probábel que o seu contrasinal teña sido cambiado desde o exterior do %s (p.ex. o seu directorio corporativo). Vostede pode actualizar o contrasinal da súa chave privada nos seus axustes persoais para recuperar o acceso aos seus ficheiros",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Non foi posíbel descifrar o ficheiro, probabelmente tratase dun ficheiro compartido. Pídalle ao propietario do ficheiro que volva compartir o ficheiro con vostede.",
- "Unknown error. Please check your system settings or contact your administrator" : "Produciuse un erro descoñecido. Comprobe os axustes do sistema ou contacte co administrador",
- "Initial encryption started... This can take some time. Please wait." : "Comezou o cifrado inicial... Isto pode levar bastante tempo. Agarde.",
- "Initial encryption running... Please try again later." : "O cifrado inicial está en execución... Tenteo máis tarde.",
- "Missing requirements." : "Non se cumpren os requisitos.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que está instalado o OpenSSL xunto coa extensión PHP e que estean activados e configurados correctamente. Polo de agora foi desactivada a aplicación de cifrado.",
- "Following users are not set up for encryption:" : "Os seguintes usuarios non teñen configuración para o cifrado:",
- "Go directly to your %spersonal settings%s." : "Vaia directamente aos seus %saxustes persoais%s.",
- "Server-side Encryption" : "Cifrado na parte do servidor",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "A aplicación de cifrado está activada, mais as chaves non foron preparadas, saia da sesión e volva a acceder de novo",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Activar a chave de recuperación (permitirá recuperar os ficheiros dos usuarios no caso de perda do contrasinal):",
- "Recovery key password" : "Contrasinal da chave de recuperación",
- "Repeat Recovery key password" : "Repita o contrasinal da chave de recuperación",
- "Enabled" : "Activado",
- "Disabled" : "Desactivado",
- "Change recovery key password:" : "Cambiar o contrasinal da chave de la recuperación:",
- "Old Recovery key password" : "Antigo contrasinal da chave de recuperación",
- "New Recovery key password" : "Novo contrasinal da chave de recuperación",
- "Repeat New Recovery key password" : "Repita o novo contrasinal da chave de recuperación",
- "Change Password" : "Cambiar o contrasinal",
- "Your private key password no longer matches your log-in password." : "O seu contrasinal da chave privada non coincide co seu contrasinal de acceso.",
- "Set your old private key password to your current log-in password:" : "Estabeleza o seu contrasinal antigo da chave de recuperación ao seu contrasinal de acceso actual:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Se non lembra o seu antigo contrasinal pode pedírllelo ao seu administrador para recuperar os seus ficheiros.",
- "Old log-in password" : "Contrasinal antigo de acceso",
- "Current log-in password" : "Contrasinal actual de acceso",
- "Update Private Key Password" : "Actualizar o contrasinal da chave privada",
- "Enable password recovery:" : "Activar o contrasinal de recuperación:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Ao activar esta opción permitiráselle volver a obter acceso aos ficheiros cifrados no caso de perda do contrasinal"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/gl.json b/apps/files_encryption/l10n/gl.json
deleted file mode 100644
index a1a8e606f1c..00000000000
--- a/apps/files_encryption/l10n/gl.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Produciuse un erro descoñecido",
- "Missing recovery key password" : "Falta a chave de recuperación",
- "Please repeat the recovery key password" : "Repita a chave de recuperación",
- "Repeated recovery key password does not match the provided recovery key password" : "A repetición da chave de recuperación non coincide coa chave de recuperación estabelecida",
- "Recovery key successfully enabled" : "Activada satisfactoriamente a chave de recuperación",
- "Could not disable recovery key. Please check your recovery key password!" : "Non foi posíbel desactivar a chave de recuperación. Comprobe o contrasinal da chave de recuperación!",
- "Recovery key successfully disabled" : "Desactivada satisfactoriamente a chave de recuperación",
- "Please provide the old recovery password" : "Introduza a chave de recuperación antiga",
- "Please provide a new recovery password" : "Introduza a nova chave de recuperación",
- "Please repeat the new recovery password" : "Repita a nova chave de recuperación",
- "Password successfully changed." : "O contrasinal foi cambiado satisfactoriamente",
- "Could not change the password. Maybe the old password was not correct." : "Non foi posíbel cambiar o contrasinal. Probabelmente o contrasinal antigo non é o correcto.",
- "Could not update the private key password." : "Non foi posíbel actualizar o contrasinal da chave privada.",
- "The old password was not correct, please try again." : "O contrasinal antigo non é correcto, ténteo de novo.",
- "The current log-in password was not correct, please try again." : "O actual contrasinal de acceso non é correcto, ténteo de novo.",
- "Private key password successfully updated." : "A chave privada foi actualizada correctamente.",
- "File recovery settings updated" : "Actualizouse o ficheiro de axustes de recuperación",
- "Could not update file recovery" : "Non foi posíbel actualizar o ficheiro de recuperación",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Non se iniciou a aplicación de cifrado! Quizais volva a activarse durante a sesión. Tente pechar a sesión e volver iniciala para que tamén se inicie a aplicación de cifrado.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "A chave privada non é correcta! É probábel que o seu contrasinal teña sido cambiado desde o exterior do %s (p.ex. o seu directorio corporativo). Vostede pode actualizar o contrasinal da súa chave privada nos seus axustes persoais para recuperar o acceso aos seus ficheiros",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Non foi posíbel descifrar o ficheiro, probabelmente tratase dun ficheiro compartido. Pídalle ao propietario do ficheiro que volva compartir o ficheiro con vostede.",
- "Unknown error. Please check your system settings or contact your administrator" : "Produciuse un erro descoñecido. Comprobe os axustes do sistema ou contacte co administrador",
- "Initial encryption started... This can take some time. Please wait." : "Comezou o cifrado inicial... Isto pode levar bastante tempo. Agarde.",
- "Initial encryption running... Please try again later." : "O cifrado inicial está en execución... Tenteo máis tarde.",
- "Missing requirements." : "Non se cumpren os requisitos.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que está instalado o OpenSSL xunto coa extensión PHP e que estean activados e configurados correctamente. Polo de agora foi desactivada a aplicación de cifrado.",
- "Following users are not set up for encryption:" : "Os seguintes usuarios non teñen configuración para o cifrado:",
- "Go directly to your %spersonal settings%s." : "Vaia directamente aos seus %saxustes persoais%s.",
- "Server-side Encryption" : "Cifrado na parte do servidor",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "A aplicación de cifrado está activada, mais as chaves non foron preparadas, saia da sesión e volva a acceder de novo",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Activar a chave de recuperación (permitirá recuperar os ficheiros dos usuarios no caso de perda do contrasinal):",
- "Recovery key password" : "Contrasinal da chave de recuperación",
- "Repeat Recovery key password" : "Repita o contrasinal da chave de recuperación",
- "Enabled" : "Activado",
- "Disabled" : "Desactivado",
- "Change recovery key password:" : "Cambiar o contrasinal da chave de la recuperación:",
- "Old Recovery key password" : "Antigo contrasinal da chave de recuperación",
- "New Recovery key password" : "Novo contrasinal da chave de recuperación",
- "Repeat New Recovery key password" : "Repita o novo contrasinal da chave de recuperación",
- "Change Password" : "Cambiar o contrasinal",
- "Your private key password no longer matches your log-in password." : "O seu contrasinal da chave privada non coincide co seu contrasinal de acceso.",
- "Set your old private key password to your current log-in password:" : "Estabeleza o seu contrasinal antigo da chave de recuperación ao seu contrasinal de acceso actual:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Se non lembra o seu antigo contrasinal pode pedírllelo ao seu administrador para recuperar os seus ficheiros.",
- "Old log-in password" : "Contrasinal antigo de acceso",
- "Current log-in password" : "Contrasinal actual de acceso",
- "Update Private Key Password" : "Actualizar o contrasinal da chave privada",
- "Enable password recovery:" : "Activar o contrasinal de recuperación:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Ao activar esta opción permitiráselle volver a obter acceso aos ficheiros cifrados no caso de perda do contrasinal"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/he.js b/apps/files_encryption/l10n/he.js
deleted file mode 100644
index d6a018e358d..00000000000
--- a/apps/files_encryption/l10n/he.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "שגי××” בלתי ידועה"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/he.json b/apps/files_encryption/l10n/he.json
deleted file mode 100644
index 83324968384..00000000000
--- a/apps/files_encryption/l10n/he.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "שגי××” בלתי ידועה"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/hr.js b/apps/files_encryption/l10n/hr.js
deleted file mode 100644
index ec62347f610..00000000000
--- a/apps/files_encryption/l10n/hr.js
+++ /dev/null
@@ -1,42 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Nepoznata pogreška",
- "Recovery key successfully enabled" : "KljuÄ za oporavak uspjeÅ¡no aktiviran",
- "Could not disable recovery key. Please check your recovery key password!" : "KljuÄ za oporavak nije moguće deaktivirati. Molimo provjerite svoju lozinku kljuÄa za oporavak!",
- "Recovery key successfully disabled" : "KljuÄ za ooravak uspjeÅ¡no deaktiviran",
- "Password successfully changed." : "Lozinka uspješno promijenjena.",
- "Could not change the password. Maybe the old password was not correct." : "Lozinku nije moguće promijeniti. Možda je stara lozinka bila neispravna.",
- "Private key password successfully updated." : "Lozinka privatnog kljuÄa uspjeÅ¡no ažurirana.",
- "File recovery settings updated" : "Ažurirane postavke za oporavak datoteke",
- "Could not update file recovery" : "Oporavak datoteke nije moguće ažurirati",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Aplikacija šifriranja nije inicijalizirana! Možda je aplikacija šifriranja bila reaktivirana tijekom vaše sesije.Da biste inicijalizirali aplikaciju šifriranja, molimo, pokušajte se odjaviti i ponovno prijaviti.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "VaÅ¡ privatni kljuÄ nije ispravan! Vjerojatno je vaÅ¡a lozinka promijenjena izvan %s(npr. vaÅ¡ega korporativnog direktorija). Lozinku svoga privatnog kljuÄa možete ažuriratiu svojim osobnim postavkama da biste obnovili pristup svojim Å¡ifriranim datotekama.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ovu datoteku nije moguće deÅ¡ifrirati, vjerojatno je rijeÄ o zajedniÄkoj datoteci. Molimopitajte vlasnika datoteke da je ponovo podijeli s vama.",
- "Unknown error. Please check your system settings or contact your administrator" : "Pogreška nepoznata. Molimo provjerite svoje sistemske postavke ili kontaktirajte svog administratora.",
- "Initial encryption started... This can take some time. Please wait." : "PoÄelo inicijalno Å¡ifriranje... To može potrajati neko vrijeme. Molimo, priÄekajte.",
- "Initial encryption running... Please try again later." : "Inicijalno šifriranje u tijeku... Molimo, pokušajte ponovno kasnije.",
- "Missing requirements." : "Nedostaju preduvjeti.",
- "Following users are not set up for encryption:" : "Sljedeći korisnici nisu određeni za šifriranje:",
- "Go directly to your %spersonal settings%s." : "Idite izravno na svoje %sosobne postavke%s.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikacija Å¡ifriranja je aktivirana ali vaÅ¡i kljuÄevi nisu inicijalizirani, molimo odjavite se iponovno prijavite.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktivirajte kljuÄ za oporavak (u sluÄaju gubitka lozinke dozvolite oporavak korisniÄkih datoteka):",
- "Recovery key password" : "Lozinka kljuÄa za oporavak",
- "Repeat Recovery key password" : "Ponovite lozinku kljuÄa za oporavak",
- "Enabled" : "Aktivirano",
- "Disabled" : "Onemogućeno",
- "Change recovery key password:" : "Promijenite lozinku kljuÄa za oporavak",
- "Old Recovery key password" : "Stara lozinka kljuÄa za oporavak",
- "New Recovery key password" : "Nova lozinka kljuÄa za oporavak",
- "Repeat New Recovery key password" : "Ponovite novu lozinku kljuÄa za oporavak",
- "Change Password" : "Promijenite lozinku",
- "Your private key password no longer matches your log-in password." : "Lozinka vaÅ¡eg privatnog kljuÄa viÅ¡e se ne slaže s vaÅ¡om lozinkom za prijavu.",
- "Set your old private key password to your current log-in password:" : "Postavite svoju staru lozinku privatnog kljuÄa u svoju postojeću lozinku za prijavu.",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Ako se ne sjećate svoje stare lozinke, možete zamoliti administratora da oporavi vaše datoteke.",
- "Old log-in password" : "Stara lozinka za prijavu",
- "Current log-in password" : "Aktualna lozinka za prijavu",
- "Update Private Key Password" : "Ažurirajte lozinku privatnog kljuÄa",
- "Enable password recovery:" : "Omogućite oporavak lozinke:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "U sluÄaju gubitka lozinke, aktiviranje ove opcije ponovno će vam pribaviti pristup vaÅ¡im Å¡ifriranim datotekama"
-},
-"nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;");
diff --git a/apps/files_encryption/l10n/hr.json b/apps/files_encryption/l10n/hr.json
deleted file mode 100644
index ea1cfe5ed03..00000000000
--- a/apps/files_encryption/l10n/hr.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{ "translations": {
- "Unknown error" : "Nepoznata pogreška",
- "Recovery key successfully enabled" : "KljuÄ za oporavak uspjeÅ¡no aktiviran",
- "Could not disable recovery key. Please check your recovery key password!" : "KljuÄ za oporavak nije moguće deaktivirati. Molimo provjerite svoju lozinku kljuÄa za oporavak!",
- "Recovery key successfully disabled" : "KljuÄ za ooravak uspjeÅ¡no deaktiviran",
- "Password successfully changed." : "Lozinka uspješno promijenjena.",
- "Could not change the password. Maybe the old password was not correct." : "Lozinku nije moguće promijeniti. Možda je stara lozinka bila neispravna.",
- "Private key password successfully updated." : "Lozinka privatnog kljuÄa uspjeÅ¡no ažurirana.",
- "File recovery settings updated" : "Ažurirane postavke za oporavak datoteke",
- "Could not update file recovery" : "Oporavak datoteke nije moguće ažurirati",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Aplikacija šifriranja nije inicijalizirana! Možda je aplikacija šifriranja bila reaktivirana tijekom vaše sesije.Da biste inicijalizirali aplikaciju šifriranja, molimo, pokušajte se odjaviti i ponovno prijaviti.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "VaÅ¡ privatni kljuÄ nije ispravan! Vjerojatno je vaÅ¡a lozinka promijenjena izvan %s(npr. vaÅ¡ega korporativnog direktorija). Lozinku svoga privatnog kljuÄa možete ažuriratiu svojim osobnim postavkama da biste obnovili pristup svojim Å¡ifriranim datotekama.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ovu datoteku nije moguće deÅ¡ifrirati, vjerojatno je rijeÄ o zajedniÄkoj datoteci. Molimopitajte vlasnika datoteke da je ponovo podijeli s vama.",
- "Unknown error. Please check your system settings or contact your administrator" : "Pogreška nepoznata. Molimo provjerite svoje sistemske postavke ili kontaktirajte svog administratora.",
- "Initial encryption started... This can take some time. Please wait." : "PoÄelo inicijalno Å¡ifriranje... To može potrajati neko vrijeme. Molimo, priÄekajte.",
- "Initial encryption running... Please try again later." : "Inicijalno šifriranje u tijeku... Molimo, pokušajte ponovno kasnije.",
- "Missing requirements." : "Nedostaju preduvjeti.",
- "Following users are not set up for encryption:" : "Sljedeći korisnici nisu određeni za šifriranje:",
- "Go directly to your %spersonal settings%s." : "Idite izravno na svoje %sosobne postavke%s.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikacija Å¡ifriranja je aktivirana ali vaÅ¡i kljuÄevi nisu inicijalizirani, molimo odjavite se iponovno prijavite.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktivirajte kljuÄ za oporavak (u sluÄaju gubitka lozinke dozvolite oporavak korisniÄkih datoteka):",
- "Recovery key password" : "Lozinka kljuÄa za oporavak",
- "Repeat Recovery key password" : "Ponovite lozinku kljuÄa za oporavak",
- "Enabled" : "Aktivirano",
- "Disabled" : "Onemogućeno",
- "Change recovery key password:" : "Promijenite lozinku kljuÄa za oporavak",
- "Old Recovery key password" : "Stara lozinka kljuÄa za oporavak",
- "New Recovery key password" : "Nova lozinka kljuÄa za oporavak",
- "Repeat New Recovery key password" : "Ponovite novu lozinku kljuÄa za oporavak",
- "Change Password" : "Promijenite lozinku",
- "Your private key password no longer matches your log-in password." : "Lozinka vaÅ¡eg privatnog kljuÄa viÅ¡e se ne slaže s vaÅ¡om lozinkom za prijavu.",
- "Set your old private key password to your current log-in password:" : "Postavite svoju staru lozinku privatnog kljuÄa u svoju postojeću lozinku za prijavu.",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Ako se ne sjećate svoje stare lozinke, možete zamoliti administratora da oporavi vaše datoteke.",
- "Old log-in password" : "Stara lozinka za prijavu",
- "Current log-in password" : "Aktualna lozinka za prijavu",
- "Update Private Key Password" : "Ažurirajte lozinku privatnog kljuÄa",
- "Enable password recovery:" : "Omogućite oporavak lozinke:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "U sluÄaju gubitka lozinke, aktiviranje ove opcije ponovno će vam pribaviti pristup vaÅ¡im Å¡ifriranim datotekama"
-},"pluralForm" :"nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/hu_HU.js b/apps/files_encryption/l10n/hu_HU.js
deleted file mode 100644
index 6d52e85d667..00000000000
--- a/apps/files_encryption/l10n/hu_HU.js
+++ /dev/null
@@ -1,38 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Ismeretlen hiba",
- "Recovery key successfully enabled" : "A helyreállítási kulcs sikeresen bekapcsolva",
- "Could not disable recovery key. Please check your recovery key password!" : "A helyreállítási kulcsot nem lehetett kikapcsolni. Ellenőrizze a helyreállítási kulcsa jelszavát!",
- "Recovery key successfully disabled" : "A helyreállítási kulcs sikeresen kikapcsolva",
- "Password successfully changed." : "A jelszót sikeresen megváltoztattuk.",
- "Could not change the password. Maybe the old password was not correct." : "A jelszót nem lehet megváltoztatni! Lehet, hogy hibás volt a régi jelszó.",
- "Private key password successfully updated." : "A személyes kulcsának jelszava frissítésre került.",
- "File recovery settings updated" : "A fájlhelyreállítási beállítások frissültek",
- "Could not update file recovery" : "A fájlhelyreállítás nem frissíthető",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "A titkosítási modul nincs elindítva! Talán a munkafolyamat közben került engedélyezésre. Kérjük jelentkezzen ki majd ismét jelentkezzen be, hogy a titkosítási modul megfelelően elinduljon!",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Az állományok titkosításához használt titkos kulcsa érvénytelen. Valószínűleg a %s rendszeren kívül változtatta meg a jelszavát (pl. a munkahelyi címtárban). A személyes beállításoknál frissítheti a titkos kulcsát, hogy ismét elérhesse a titkosított állományait.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Az állományt nem sikerült dekódolni, valószínűleg ez egy megosztott fájl. Kérje meg az állomány tulajdonosát, hogy újra ossza meg Önnel ezt az állományt!",
- "Initial encryption started... This can take some time. Please wait." : "A titkosítási folyamat megkezdődött... Ez hosszabb ideig is eltarthat. Kérem várjon.",
- "Initial encryption running... Please try again later." : "Kezedeti titkosítás fut... Próbálja később.",
- "Missing requirements." : "Hiányzó követelmények.",
- "Following users are not set up for encryption:" : "A következő felhasználók nem állították be a titkosítást:",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Az állományok titkosítása engedélyezve van, de az Ön titkos kulcsai nincsenek beállítva. Ezért kérjük, hogy jelentkezzen ki, és lépjen be újra!",
- "Enable recovery key (allow to recover users files in case of password loss):" : "A helyreállítási kulcs beállítása (lehetővé teszi a felhasználók állományainak visszaállítását, ha elfelejtik a jelszavukat):",
- "Recovery key password" : "A helyreállítási kulcs jelszava",
- "Repeat Recovery key password" : "Ismételje meg a helyreállítási kulcs jelszavát",
- "Enabled" : "Bekapcsolva",
- "Disabled" : "Kikapcsolva",
- "Change recovery key password:" : "A helyreállítási kulcs jelszavának módosítása:",
- "Old Recovery key password" : "Régi Helyreállítási Kulcs Jelszava",
- "New Recovery key password" : "Új Helyreállítási kulcs jelszava",
- "Repeat New Recovery key password" : "Ismételje meg az új helyreállítási kulcs jelszavát",
- "Change Password" : "Jelszó megváltoztatása",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Ha nem emlékszik a régi jelszavára akkor megkérheti a rendszergazdát, hogy állítsa vissza az állományait.",
- "Old log-in password" : "Régi bejelentkezési jelszó",
- "Current log-in password" : "Jelenlegi bejelentkezési jelszó",
- "Update Private Key Password" : "A személyest kulcs jelszó frissítése",
- "Enable password recovery:" : "Jelszó-visszaállítás bekapcsolása",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Ez az opció lehetővé teszi, hogy a titkosított állományok tartalmát visszanyerjük abban az esetben, ha elfelejti a jelszavát"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/hu_HU.json b/apps/files_encryption/l10n/hu_HU.json
deleted file mode 100644
index 0bb4c40f396..00000000000
--- a/apps/files_encryption/l10n/hu_HU.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{ "translations": {
- "Unknown error" : "Ismeretlen hiba",
- "Recovery key successfully enabled" : "A helyreállítási kulcs sikeresen bekapcsolva",
- "Could not disable recovery key. Please check your recovery key password!" : "A helyreállítási kulcsot nem lehetett kikapcsolni. Ellenőrizze a helyreállítási kulcsa jelszavát!",
- "Recovery key successfully disabled" : "A helyreállítási kulcs sikeresen kikapcsolva",
- "Password successfully changed." : "A jelszót sikeresen megváltoztattuk.",
- "Could not change the password. Maybe the old password was not correct." : "A jelszót nem lehet megváltoztatni! Lehet, hogy hibás volt a régi jelszó.",
- "Private key password successfully updated." : "A személyes kulcsának jelszava frissítésre került.",
- "File recovery settings updated" : "A fájlhelyreállítási beállítások frissültek",
- "Could not update file recovery" : "A fájlhelyreállítás nem frissíthető",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "A titkosítási modul nincs elindítva! Talán a munkafolyamat közben került engedélyezésre. Kérjük jelentkezzen ki majd ismét jelentkezzen be, hogy a titkosítási modul megfelelően elinduljon!",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Az állományok titkosításához használt titkos kulcsa érvénytelen. Valószínűleg a %s rendszeren kívül változtatta meg a jelszavát (pl. a munkahelyi címtárban). A személyes beállításoknál frissítheti a titkos kulcsát, hogy ismét elérhesse a titkosított állományait.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Az állományt nem sikerült dekódolni, valószínűleg ez egy megosztott fájl. Kérje meg az állomány tulajdonosát, hogy újra ossza meg Önnel ezt az állományt!",
- "Initial encryption started... This can take some time. Please wait." : "A titkosítási folyamat megkezdődött... Ez hosszabb ideig is eltarthat. Kérem várjon.",
- "Initial encryption running... Please try again later." : "Kezedeti titkosítás fut... Próbálja később.",
- "Missing requirements." : "Hiányzó követelmények.",
- "Following users are not set up for encryption:" : "A következő felhasználók nem állították be a titkosítást:",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Az állományok titkosítása engedélyezve van, de az Ön titkos kulcsai nincsenek beállítva. Ezért kérjük, hogy jelentkezzen ki, és lépjen be újra!",
- "Enable recovery key (allow to recover users files in case of password loss):" : "A helyreállítási kulcs beállítása (lehetővé teszi a felhasználók állományainak visszaállítását, ha elfelejtik a jelszavukat):",
- "Recovery key password" : "A helyreállítási kulcs jelszava",
- "Repeat Recovery key password" : "Ismételje meg a helyreállítási kulcs jelszavát",
- "Enabled" : "Bekapcsolva",
- "Disabled" : "Kikapcsolva",
- "Change recovery key password:" : "A helyreállítási kulcs jelszavának módosítása:",
- "Old Recovery key password" : "Régi Helyreállítási Kulcs Jelszava",
- "New Recovery key password" : "Új Helyreállítási kulcs jelszava",
- "Repeat New Recovery key password" : "Ismételje meg az új helyreállítási kulcs jelszavát",
- "Change Password" : "Jelszó megváltoztatása",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Ha nem emlékszik a régi jelszavára akkor megkérheti a rendszergazdát, hogy állítsa vissza az állományait.",
- "Old log-in password" : "Régi bejelentkezési jelszó",
- "Current log-in password" : "Jelenlegi bejelentkezési jelszó",
- "Update Private Key Password" : "A személyest kulcs jelszó frissítése",
- "Enable password recovery:" : "Jelszó-visszaállítás bekapcsolása",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Ez az opció lehetővé teszi, hogy a titkosított állományok tartalmát visszanyerjük abban az esetben, ha elfelejti a jelszavát"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ia.js b/apps/files_encryption/l10n/ia.js
deleted file mode 100644
index 5d480be507c..00000000000
--- a/apps/files_encryption/l10n/ia.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Error Incognite"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/ia.json b/apps/files_encryption/l10n/ia.json
deleted file mode 100644
index de701b407d0..00000000000
--- a/apps/files_encryption/l10n/ia.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "Error Incognite"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/id.js b/apps/files_encryption/l10n/id.js
deleted file mode 100644
index c9137a51a11..00000000000
--- a/apps/files_encryption/l10n/id.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Kesalahan tidak diketahui",
- "Missing recovery key password" : "Sandi kunci pemuliahan hilang",
- "Please repeat the recovery key password" : "Silakan ulangi sandi kunci pemulihan",
- "Repeated recovery key password does not match the provided recovery key password" : "Sandi kunci pemulihan yang diulangi tidak cocok dengan sandi kunci pemulihan yang diberikan",
- "Recovery key successfully enabled" : "Kunci pemulihan berhasil diaktifkan",
- "Could not disable recovery key. Please check your recovery key password!" : "Tidak dapat menonaktifkan kunci pemulihan. Silakan periksa sandi kunci pemulihan Anda!",
- "Recovery key successfully disabled" : "Kunci pemulihan berhasil dinonaktifkan",
- "Please provide the old recovery password" : "Mohon berikan sandi pemulihan lama",
- "Please provide a new recovery password" : "Mohon berikan sandi pemulihan baru",
- "Please repeat the new recovery password" : "Silakan ulangi sandi pemulihan baru",
- "Password successfully changed." : "Sandi berhasil diubah",
- "Could not change the password. Maybe the old password was not correct." : "Tidak dapat mengubah sandi. Kemungkinan sandi lama yang dimasukkan salah.",
- "Could not update the private key password." : "Tidak dapat memperbarui sandi kunci private.",
- "The old password was not correct, please try again." : "Sandi lama salah, mohon coba lagi.",
- "The current log-in password was not correct, please try again." : "Sandi masuk saat ini salah, mohon coba lagi.",
- "Private key password successfully updated." : "Sandi kunci privat berhasil diperbarui.",
- "File recovery settings updated" : "Pengaturan pemulihan berkas diperbarui",
- "Could not update file recovery" : "Tidak dapat memperbarui pemulihan berkas",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Aplikasi enkripsi tidak dimulai! Kemungkinan aplikasi enkripsi telah diaktifkan ulang saat sesi Anda. Silakan coba untuk keluar dan kembali lagi untuk memulai aplikasi enkripsi.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Kunci private Anda tidak sah! Nampaknya sandi Anda telah diubah diluar %s (misal direktori perusahaan Anda). Anda dapat memperbarui sandi kunci private untuk memulihakan akses ke berkas terenkripsi Anda.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tidak dapat mendekripsi berkas ini, mungkin ini adalah berkas bersama. Silakan meminta pemilik berkas ini untuk membagikan kembali dengan Anda.",
- "Unknown error. Please check your system settings or contact your administrator" : "Kesalahan tidak diketahui. Silakan periksa pengaturan sistem Anda atau hubungi administrator",
- "Initial encryption started... This can take some time. Please wait." : "Enskripsi awal dijalankan... Ini dapat memakan waktu. Silakan tunggu.",
- "Initial encryption running... Please try again later." : "Enkripsi awal sedang berjalan... Sialakn coba lagi nanti.",
- "Missing requirements." : "Persyaratan tidak terpenuhi.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Mohon pastikan bahwa OpenSSL bersama ekstensi PHP diaktifkan dan terkonfigurasi dengan benar. Untuk sekarang, aplikasi enkripsi akan dinonaktifkan.",
- "Following users are not set up for encryption:" : "Pengguna berikut belum diatur untuk enkripsi:",
- "Go directly to your %spersonal settings%s." : "Langsung ke %spengaturan pribadi%s Anda.",
- "Server-side Encryption" : "Enkripsi Sisi-Server",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikasi Enskripsi telah diaktifkan tetapi kunci tidak diinisialisasi, silakan log-out dan log-in lagi",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktifkan kunci pemulihan (memungkinkan pengguna untuk memulihkan berkas dalam kasus kehilangan sandi):",
- "Recovery key password" : "Sandi kunci pemulihan",
- "Repeat Recovery key password" : "Ulangi sandi kunci Pemulihan",
- "Enabled" : "Diaktifkan",
- "Disabled" : "Dinonaktifkan",
- "Change recovery key password:" : "Ubah sandi kunci pemulihan:",
- "Old Recovery key password" : "Sandi kunci Pemulihan Lama",
- "New Recovery key password" : "Sandi kunci Pemulihan Baru",
- "Repeat New Recovery key password" : "Ulangi sandi kunci Pemulihan baru",
- "Change Password" : "Ubah Sandi",
- "Your private key password no longer matches your log-in password." : "Sandi kunci private Anda tidak lagi cocok dengan sandi masuk Anda.",
- "Set your old private key password to your current log-in password:" : "Setel sandi kunci private Anda untuk sandi masuk Anda saat ini:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Jika Anda tidak ingat sandi lama, Anda dapat meminta administrator Anda untuk memulihkan berkas.",
- "Old log-in password" : "Sandi masuk yang lama",
- "Current log-in password" : "Sandi masuk saat ini",
- "Update Private Key Password" : "Perbarui Sandi Kunci Private",
- "Enable password recovery:" : "Aktifkan sandi pemulihan:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Mengaktifkan opsi ini memungkinkan Anda untuk mendapatkan kembali akses ke berkas terenkripsi Anda dalam kasus kehilangan sandi"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/id.json b/apps/files_encryption/l10n/id.json
deleted file mode 100644
index 5d77cef0b24..00000000000
--- a/apps/files_encryption/l10n/id.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Kesalahan tidak diketahui",
- "Missing recovery key password" : "Sandi kunci pemuliahan hilang",
- "Please repeat the recovery key password" : "Silakan ulangi sandi kunci pemulihan",
- "Repeated recovery key password does not match the provided recovery key password" : "Sandi kunci pemulihan yang diulangi tidak cocok dengan sandi kunci pemulihan yang diberikan",
- "Recovery key successfully enabled" : "Kunci pemulihan berhasil diaktifkan",
- "Could not disable recovery key. Please check your recovery key password!" : "Tidak dapat menonaktifkan kunci pemulihan. Silakan periksa sandi kunci pemulihan Anda!",
- "Recovery key successfully disabled" : "Kunci pemulihan berhasil dinonaktifkan",
- "Please provide the old recovery password" : "Mohon berikan sandi pemulihan lama",
- "Please provide a new recovery password" : "Mohon berikan sandi pemulihan baru",
- "Please repeat the new recovery password" : "Silakan ulangi sandi pemulihan baru",
- "Password successfully changed." : "Sandi berhasil diubah",
- "Could not change the password. Maybe the old password was not correct." : "Tidak dapat mengubah sandi. Kemungkinan sandi lama yang dimasukkan salah.",
- "Could not update the private key password." : "Tidak dapat memperbarui sandi kunci private.",
- "The old password was not correct, please try again." : "Sandi lama salah, mohon coba lagi.",
- "The current log-in password was not correct, please try again." : "Sandi masuk saat ini salah, mohon coba lagi.",
- "Private key password successfully updated." : "Sandi kunci privat berhasil diperbarui.",
- "File recovery settings updated" : "Pengaturan pemulihan berkas diperbarui",
- "Could not update file recovery" : "Tidak dapat memperbarui pemulihan berkas",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Aplikasi enkripsi tidak dimulai! Kemungkinan aplikasi enkripsi telah diaktifkan ulang saat sesi Anda. Silakan coba untuk keluar dan kembali lagi untuk memulai aplikasi enkripsi.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Kunci private Anda tidak sah! Nampaknya sandi Anda telah diubah diluar %s (misal direktori perusahaan Anda). Anda dapat memperbarui sandi kunci private untuk memulihakan akses ke berkas terenkripsi Anda.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tidak dapat mendekripsi berkas ini, mungkin ini adalah berkas bersama. Silakan meminta pemilik berkas ini untuk membagikan kembali dengan Anda.",
- "Unknown error. Please check your system settings or contact your administrator" : "Kesalahan tidak diketahui. Silakan periksa pengaturan sistem Anda atau hubungi administrator",
- "Initial encryption started... This can take some time. Please wait." : "Enskripsi awal dijalankan... Ini dapat memakan waktu. Silakan tunggu.",
- "Initial encryption running... Please try again later." : "Enkripsi awal sedang berjalan... Sialakn coba lagi nanti.",
- "Missing requirements." : "Persyaratan tidak terpenuhi.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Mohon pastikan bahwa OpenSSL bersama ekstensi PHP diaktifkan dan terkonfigurasi dengan benar. Untuk sekarang, aplikasi enkripsi akan dinonaktifkan.",
- "Following users are not set up for encryption:" : "Pengguna berikut belum diatur untuk enkripsi:",
- "Go directly to your %spersonal settings%s." : "Langsung ke %spengaturan pribadi%s Anda.",
- "Server-side Encryption" : "Enkripsi Sisi-Server",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikasi Enskripsi telah diaktifkan tetapi kunci tidak diinisialisasi, silakan log-out dan log-in lagi",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktifkan kunci pemulihan (memungkinkan pengguna untuk memulihkan berkas dalam kasus kehilangan sandi):",
- "Recovery key password" : "Sandi kunci pemulihan",
- "Repeat Recovery key password" : "Ulangi sandi kunci Pemulihan",
- "Enabled" : "Diaktifkan",
- "Disabled" : "Dinonaktifkan",
- "Change recovery key password:" : "Ubah sandi kunci pemulihan:",
- "Old Recovery key password" : "Sandi kunci Pemulihan Lama",
- "New Recovery key password" : "Sandi kunci Pemulihan Baru",
- "Repeat New Recovery key password" : "Ulangi sandi kunci Pemulihan baru",
- "Change Password" : "Ubah Sandi",
- "Your private key password no longer matches your log-in password." : "Sandi kunci private Anda tidak lagi cocok dengan sandi masuk Anda.",
- "Set your old private key password to your current log-in password:" : "Setel sandi kunci private Anda untuk sandi masuk Anda saat ini:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Jika Anda tidak ingat sandi lama, Anda dapat meminta administrator Anda untuk memulihkan berkas.",
- "Old log-in password" : "Sandi masuk yang lama",
- "Current log-in password" : "Sandi masuk saat ini",
- "Update Private Key Password" : "Perbarui Sandi Kunci Private",
- "Enable password recovery:" : "Aktifkan sandi pemulihan:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Mengaktifkan opsi ini memungkinkan Anda untuk mendapatkan kembali akses ke berkas terenkripsi Anda dalam kasus kehilangan sandi"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/is.js b/apps/files_encryption/l10n/is.js
deleted file mode 100644
index 8dfc249683e..00000000000
--- a/apps/files_encryption/l10n/is.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Encryption" : "Dulkóðun"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/is.json b/apps/files_encryption/l10n/is.json
deleted file mode 100644
index b4d4708f404..00000000000
--- a/apps/files_encryption/l10n/is.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Encryption" : "Dulkóðun"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/it.js b/apps/files_encryption/l10n/it.js
deleted file mode 100644
index 32fe42ae275..00000000000
--- a/apps/files_encryption/l10n/it.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Errore sconosciuto",
- "Missing recovery key password" : "Manca la password della chiave di recupero",
- "Please repeat the recovery key password" : "Ripeti la password della chiave di recupero",
- "Repeated recovery key password does not match the provided recovery key password" : "La password della chiave di recupero ripetuta non corrisponde alla password della chiave di recupero fornita",
- "Recovery key successfully enabled" : "Chiave di recupero abilitata correttamente",
- "Could not disable recovery key. Please check your recovery key password!" : "Impossibile disabilitare la chiave di recupero. Verifica la password della chiave di recupero.",
- "Recovery key successfully disabled" : "Chiave di recupero disabilitata correttamente",
- "Please provide the old recovery password" : "Fornisci la vecchia password di recupero",
- "Please provide a new recovery password" : "Fornisci una nuova password di recupero",
- "Please repeat the new recovery password" : "Ripeti la nuova password di recupero",
- "Password successfully changed." : "Password modificata correttamente.",
- "Could not change the password. Maybe the old password was not correct." : "Impossibile cambiare la password. Forse la vecchia password non era corretta.",
- "Could not update the private key password." : "Impossibile aggiornare la password della chiave privata.",
- "The old password was not correct, please try again." : "La vecchia password non era corretta, prova di nuovo.",
- "The current log-in password was not correct, please try again." : "La password di accesso attuale non era corretta, prova ancora.",
- "Private key password successfully updated." : "Password della chiave privata aggiornata correttamente.",
- "File recovery settings updated" : "Impostazioni di ripristino dei file aggiornate",
- "Could not update file recovery" : "Impossibile aggiornare il ripristino dei file",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Applicazione di cifratura non inizializzata. Forse l'applicazione è stata riabilitata durante la tua sessione. Prova a disconnetterti e ad effettuare nuovamente l'accesso per inizializzarla.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "La tua chiave privata non è valida! Forse la password è stata cambiata al di fuori di %s (ad es. la directory aziendale). Puoi aggiornare la password della chiave privata nelle impostazioni personali per ottenere nuovamente l'accesso ai file cifrati.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Impossibile decifrare questo file, probabilmente è un file condiviso. Chiedi al proprietario del file di condividere nuovamente il file con te.",
- "Unknown error. Please check your system settings or contact your administrator" : "Errore sconosciuto. Controlla le impostazioni di sistema o contatta il tuo amministratore",
- "Initial encryption started... This can take some time. Please wait." : "Cifratura iniziale avviata... Potrebbe richiedere del tempo. Attendi.",
- "Initial encryption running... Please try again later." : "Cifratura iniziale in esecuzione... Riprova più tardi.",
- "Missing requirements." : "Requisiti mancanti.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Assicurati che OpenSSL e l'estensione PHP sia abilitatati e configurati correttamente. Per ora, l'applicazione di cifratura è disabilitata.",
- "Following users are not set up for encryption:" : "I seguenti utenti non sono configurati per la cifratura:",
- "Go directly to your %spersonal settings%s." : "Vai direttamente alle tue %simpostazioni personali%s.",
- "Server-side Encryption" : "Cifratura lato server",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'applicazione di cifratura è abilitata, ma le chiavi non sono state inizializzate, disconnettiti ed effettua nuovamente l'accesso",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Abilita la chiave di recupero (permette di recuperare i file utenti in caso di perdita della password):",
- "Recovery key password" : "Password della chiave di recupero",
- "Repeat Recovery key password" : "Ripeti la password della chiave di recupero",
- "Enabled" : "Abilitata",
- "Disabled" : "Disabilitata",
- "Change recovery key password:" : "Cambia la password della chiave di recupero:",
- "Old Recovery key password" : "Vecchia password della chiave di recupero",
- "New Recovery key password" : "Nuova password della chiave di recupero",
- "Repeat New Recovery key password" : "Ripeti la nuova password della chiave di recupero",
- "Change Password" : "Modifica password",
- "Your private key password no longer matches your log-in password." : "La password della chiave privata non corrisponde più alla password di accesso.",
- "Set your old private key password to your current log-in password:" : "Imposta la vecchia password della chiave privata sull'attuale password di accesso:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Se non ricordi la vecchia password puoi chiedere al tuo amministratore di recuperare i file.",
- "Old log-in password" : "Vecchia password di accesso",
- "Current log-in password" : "Password di accesso attuale",
- "Update Private Key Password" : "Aggiorna la password della chiave privata",
- "Enable password recovery:" : "Abilita il ripristino della password:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "L'abilitazione di questa opzione ti consentirà di accedere nuovamente ai file cifrati in caso di perdita della password"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/it.json b/apps/files_encryption/l10n/it.json
deleted file mode 100644
index e5fa00dca35..00000000000
--- a/apps/files_encryption/l10n/it.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Errore sconosciuto",
- "Missing recovery key password" : "Manca la password della chiave di recupero",
- "Please repeat the recovery key password" : "Ripeti la password della chiave di recupero",
- "Repeated recovery key password does not match the provided recovery key password" : "La password della chiave di recupero ripetuta non corrisponde alla password della chiave di recupero fornita",
- "Recovery key successfully enabled" : "Chiave di recupero abilitata correttamente",
- "Could not disable recovery key. Please check your recovery key password!" : "Impossibile disabilitare la chiave di recupero. Verifica la password della chiave di recupero.",
- "Recovery key successfully disabled" : "Chiave di recupero disabilitata correttamente",
- "Please provide the old recovery password" : "Fornisci la vecchia password di recupero",
- "Please provide a new recovery password" : "Fornisci una nuova password di recupero",
- "Please repeat the new recovery password" : "Ripeti la nuova password di recupero",
- "Password successfully changed." : "Password modificata correttamente.",
- "Could not change the password. Maybe the old password was not correct." : "Impossibile cambiare la password. Forse la vecchia password non era corretta.",
- "Could not update the private key password." : "Impossibile aggiornare la password della chiave privata.",
- "The old password was not correct, please try again." : "La vecchia password non era corretta, prova di nuovo.",
- "The current log-in password was not correct, please try again." : "La password di accesso attuale non era corretta, prova ancora.",
- "Private key password successfully updated." : "Password della chiave privata aggiornata correttamente.",
- "File recovery settings updated" : "Impostazioni di ripristino dei file aggiornate",
- "Could not update file recovery" : "Impossibile aggiornare il ripristino dei file",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Applicazione di cifratura non inizializzata. Forse l'applicazione è stata riabilitata durante la tua sessione. Prova a disconnetterti e ad effettuare nuovamente l'accesso per inizializzarla.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "La tua chiave privata non è valida! Forse la password è stata cambiata al di fuori di %s (ad es. la directory aziendale). Puoi aggiornare la password della chiave privata nelle impostazioni personali per ottenere nuovamente l'accesso ai file cifrati.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Impossibile decifrare questo file, probabilmente è un file condiviso. Chiedi al proprietario del file di condividere nuovamente il file con te.",
- "Unknown error. Please check your system settings or contact your administrator" : "Errore sconosciuto. Controlla le impostazioni di sistema o contatta il tuo amministratore",
- "Initial encryption started... This can take some time. Please wait." : "Cifratura iniziale avviata... Potrebbe richiedere del tempo. Attendi.",
- "Initial encryption running... Please try again later." : "Cifratura iniziale in esecuzione... Riprova più tardi.",
- "Missing requirements." : "Requisiti mancanti.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Assicurati che OpenSSL e l'estensione PHP sia abilitatati e configurati correttamente. Per ora, l'applicazione di cifratura è disabilitata.",
- "Following users are not set up for encryption:" : "I seguenti utenti non sono configurati per la cifratura:",
- "Go directly to your %spersonal settings%s." : "Vai direttamente alle tue %simpostazioni personali%s.",
- "Server-side Encryption" : "Cifratura lato server",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'applicazione di cifratura è abilitata, ma le chiavi non sono state inizializzate, disconnettiti ed effettua nuovamente l'accesso",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Abilita la chiave di recupero (permette di recuperare i file utenti in caso di perdita della password):",
- "Recovery key password" : "Password della chiave di recupero",
- "Repeat Recovery key password" : "Ripeti la password della chiave di recupero",
- "Enabled" : "Abilitata",
- "Disabled" : "Disabilitata",
- "Change recovery key password:" : "Cambia la password della chiave di recupero:",
- "Old Recovery key password" : "Vecchia password della chiave di recupero",
- "New Recovery key password" : "Nuova password della chiave di recupero",
- "Repeat New Recovery key password" : "Ripeti la nuova password della chiave di recupero",
- "Change Password" : "Modifica password",
- "Your private key password no longer matches your log-in password." : "La password della chiave privata non corrisponde più alla password di accesso.",
- "Set your old private key password to your current log-in password:" : "Imposta la vecchia password della chiave privata sull'attuale password di accesso:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Se non ricordi la vecchia password puoi chiedere al tuo amministratore di recuperare i file.",
- "Old log-in password" : "Vecchia password di accesso",
- "Current log-in password" : "Password di accesso attuale",
- "Update Private Key Password" : "Aggiorna la password della chiave privata",
- "Enable password recovery:" : "Abilita il ripristino della password:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "L'abilitazione di questa opzione ti consentirà di accedere nuovamente ai file cifrati in caso di perdita della password"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ja.js b/apps/files_encryption/l10n/ja.js
deleted file mode 100644
index 8fb1364e042..00000000000
--- a/apps/files_encryption/l10n/ja.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "ä¸æ˜Žãªã‚¨ãƒ©ãƒ¼",
- "Missing recovery key password" : "復旧キーã®ãƒ‘スワードãŒã‚ã‚Šã¾ã›ã‚“",
- "Please repeat the recovery key password" : "復旧キーã®ãƒ‘スワードをもã†ä¸€åº¦å…¥åŠ›",
- "Repeated recovery key password does not match the provided recovery key password" : "入力ã•ã‚ŒãŸå¾©æ—§ã‚­ãƒ¼ã®ãƒ‘スワードãŒä¸€è‡´ã—ã¾ã›ã‚“。",
- "Recovery key successfully enabled" : "リカãƒãƒªç”¨ã®ã‚­ãƒ¼ã‚’正常ã«æœ‰åŠ¹ã«ã—ã¾ã—ãŸ",
- "Could not disable recovery key. Please check your recovery key password!" : "リカãƒãƒªç”¨ã®ã‚­ãƒ¼ã‚’無効化ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚リカãƒãƒªç”¨ã®ã‚­ãƒ¼ã®ãƒ‘スワードを確èªã—ã¦ãã ã•ã„ï¼",
- "Recovery key successfully disabled" : "リカãƒãƒªç”¨ã®ã‚­ãƒ¼ã‚’正常ã«ç„¡åŠ¹åŒ–ã—ã¾ã—ãŸ",
- "Please provide the old recovery password" : "å¤ã„復旧キーã®ãƒ‘スワードを入力",
- "Please provide a new recovery password" : "æ–°ã—ã„復旧キーã®ãƒ‘スワードを入力",
- "Please repeat the new recovery password" : "æ–°ã—ã„復旧キーã®ãƒ‘スワードをもã†ä¸€åº¦å…¥åŠ›",
- "Password successfully changed." : "パスワードを変更ã§ãã¾ã—ãŸã€‚",
- "Could not change the password. Maybe the old password was not correct." : "パスワードを変更ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚å¤ã„パスワードãŒé–“é•ã£ã¦ã„ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。",
- "Could not update the private key password." : "秘密éµã®ãƒ‘スワードを更新ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚",
- "The old password was not correct, please try again." : "å¤ã„パスワードãŒä¸€è‡´ã—ã¾ã›ã‚“ã§ã—ãŸã€‚ã‚‚ã†ä¸€åº¦å…¥åŠ›ã—ã¦ãã ã•ã„。",
- "The current log-in password was not correct, please try again." : "ログインパスワードãŒä¸€è‡´ã—ã¾ã›ã‚“ã§ã—ãŸã€‚ã‚‚ã†ä¸€åº¦å…¥åŠ›ã—ã¦ãã ã•ã„。",
- "Private key password successfully updated." : "秘密éµã®ãƒ‘スワードãŒæ­£å¸¸ã«æ›´æ–°ã•ã‚Œã¾ã—ãŸã€‚",
- "File recovery settings updated" : "ファイルリカãƒãƒªè¨­å®šã‚’æ›´æ–°ã—ã¾ã—ãŸ",
- "Could not update file recovery" : "ファイルリカãƒãƒªã‚’æ›´æ–°ã§ãã¾ã›ã‚“ã§ã—ãŸ",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "セッション中ã«æš—å·åŒ–アプリをå†åº¦æœ‰åŠ¹ã«ã•ã‚ŒãŸãŸã‚ã€æš—å·åŒ–アプリãŒåˆæœŸåŒ–ã•ã‚Œã¦ã„ã¾ã›ã‚“。暗å·åŒ–アプリをåˆæœŸåŒ–ã™ã‚‹ãŸã‚ã€ãƒ­ã‚°ã‚¢ã‚¦ãƒˆã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã—ãªãŠã—ã¦ãã ã•ã„。",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "プライベートキーãŒæœ‰åŠ¹ã§ã¯ã‚ã‚Šã¾ã›ã‚“ï¼ãƒ‘スワードãŒ%sã®å¤–部ã§å¤‰æ›´ã•ã‚ŒãŸ(例: å…±åŒãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª)ã¨æ€ã‚ã‚Œã¾ã™ã€‚個人設定ã§ãƒ—ライベートキーã®ãƒ‘スワードを更新ã—ã¦ã€æš—å·åŒ–ファイルã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’回復ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’復å·åŒ–ã§ãã¾ã›ã‚“ã€å…±æœ‰ãƒ•ã‚¡ã‚¤ãƒ«ã®å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ファイルã®æ‰€æœ‰è€…ã«ãŠé¡˜ã„ã—ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’共有ã—ãªãŠã—ã¦ã‚‚らã£ã¦ãã ã•ã„。",
- "Unknown error. Please check your system settings or contact your administrator" : "ä¸æ˜Žãªã‚¨ãƒ©ãƒ¼ã§ã™ã€‚システム設定を確èªã™ã‚‹ã‹ã€ç®¡ç†è€…ã«å•ã„åˆã‚ã›ã¦ãã ã•ã„。",
- "Initial encryption started... This can take some time. Please wait." : "æš—å·åŒ–ã®åˆæœŸåŒ–作業を開始ã—ã¾ã—ãŸ... ã“ã®å‡¦ç†ã«ã¯ã—ã°ã‚‰ã時間ãŒã‹ã‹ã‚Šã¾ã™ã€‚ãŠå¾…ã¡ãã ã•ã„。",
- "Initial encryption running... Please try again later." : "åˆæœŸæš—å·åŒ–実行中... 後ã§ã‚‚ã†ä¸€åº¦ãŠè©¦ã—ãã ã•ã„。",
- "Missing requirements." : "å¿…è¦è¦ä»¶ãŒæº€ãŸã•ã‚Œã¦ã„ã¾ã›ã‚“。",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "å¿…ãšã€OpenSSLåŠã³OpenSSLã®PHPã®æ‹¡å¼µã‚’有効ã«ã—ãŸä¸Šã§ã€é©åˆ‡ã«è¨­å®šã—ã¦ãã ã•ã„。ç¾æ™‚点ã§ã¯æš—å·åŒ–アプリã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚",
- "Following users are not set up for encryption:" : "以下ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€æš—å·åŒ–設定ãŒã•ã‚Œã¦ã„ã¾ã›ã‚“:",
- "Go directly to your %spersonal settings%s." : "直接 %s個人設定%s ã«é€²ã‚€ã€‚",
- "Server-side Encryption" : "サーãƒãƒ¼å´æš—å·",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "æš—å·åŒ–アプリã¯æœ‰åŠ¹ã§ã™ãŒã€ã‚ãªãŸã®æš—å·åŒ–キーã¯åˆæœŸåŒ–ã•ã‚Œã¦ã„ã¾ã›ã‚“。ログアウトã—ãŸå¾Œã«ã€å†åº¦ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ãã ã•ã„",
- "Enable recovery key (allow to recover users files in case of password loss):" : "リカãƒãƒªã‚­ãƒ¼ã‚’有効ã«ã™ã‚‹ (パスワードを忘れãŸå ´åˆã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’回復ã§ãã¾ã™):",
- "Recovery key password" : "リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワード",
- "Repeat Recovery key password" : "リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワードをもã†ä¸€åº¦å…¥åŠ›",
- "Enabled" : "有効",
- "Disabled" : "無効",
- "Change recovery key password:" : "リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワードを変更:",
- "Old Recovery key password" : "å¤ã„リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワード",
- "New Recovery key password" : "æ–°ã—ã„リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワード",
- "Repeat New Recovery key password" : "æ–°ã—ã„リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワードをもã†ä¸€åº¦å…¥åŠ›",
- "Change Password" : "パスワードを変更",
- "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." : "å¤ã„パスワードを覚ãˆã¦ã„ãªã„å ´åˆã€ç®¡ç†è€…ã«å°‹ã­ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‚’回復ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚",
- "Old log-in password" : "å¤ã„ログインパスワード",
- "Current log-in password" : "ç¾åœ¨ã®ãƒ­ã‚°ã‚¤ãƒ³ãƒ‘スワード",
- "Update Private Key Password" : "秘密éµã®ãƒ‘スワードを更新",
- "Enable password recovery:" : "パスワードリカãƒãƒªã‚’有効ã«:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€ãƒ‘スワードを紛失ã—ãŸå ´åˆã‚‚ã€æš—å·åŒ–ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã«å†åº¦ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/ja.json b/apps/files_encryption/l10n/ja.json
deleted file mode 100644
index d88a65fe492..00000000000
--- a/apps/files_encryption/l10n/ja.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "ä¸æ˜Žãªã‚¨ãƒ©ãƒ¼",
- "Missing recovery key password" : "復旧キーã®ãƒ‘スワードãŒã‚ã‚Šã¾ã›ã‚“",
- "Please repeat the recovery key password" : "復旧キーã®ãƒ‘スワードをもã†ä¸€åº¦å…¥åŠ›",
- "Repeated recovery key password does not match the provided recovery key password" : "入力ã•ã‚ŒãŸå¾©æ—§ã‚­ãƒ¼ã®ãƒ‘スワードãŒä¸€è‡´ã—ã¾ã›ã‚“。",
- "Recovery key successfully enabled" : "リカãƒãƒªç”¨ã®ã‚­ãƒ¼ã‚’正常ã«æœ‰åŠ¹ã«ã—ã¾ã—ãŸ",
- "Could not disable recovery key. Please check your recovery key password!" : "リカãƒãƒªç”¨ã®ã‚­ãƒ¼ã‚’無効化ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚リカãƒãƒªç”¨ã®ã‚­ãƒ¼ã®ãƒ‘スワードを確èªã—ã¦ãã ã•ã„ï¼",
- "Recovery key successfully disabled" : "リカãƒãƒªç”¨ã®ã‚­ãƒ¼ã‚’正常ã«ç„¡åŠ¹åŒ–ã—ã¾ã—ãŸ",
- "Please provide the old recovery password" : "å¤ã„復旧キーã®ãƒ‘スワードを入力",
- "Please provide a new recovery password" : "æ–°ã—ã„復旧キーã®ãƒ‘スワードを入力",
- "Please repeat the new recovery password" : "æ–°ã—ã„復旧キーã®ãƒ‘スワードをもã†ä¸€åº¦å…¥åŠ›",
- "Password successfully changed." : "パスワードを変更ã§ãã¾ã—ãŸã€‚",
- "Could not change the password. Maybe the old password was not correct." : "パスワードを変更ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚å¤ã„パスワードãŒé–“é•ã£ã¦ã„ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。",
- "Could not update the private key password." : "秘密éµã®ãƒ‘スワードを更新ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚",
- "The old password was not correct, please try again." : "å¤ã„パスワードãŒä¸€è‡´ã—ã¾ã›ã‚“ã§ã—ãŸã€‚ã‚‚ã†ä¸€åº¦å…¥åŠ›ã—ã¦ãã ã•ã„。",
- "The current log-in password was not correct, please try again." : "ログインパスワードãŒä¸€è‡´ã—ã¾ã›ã‚“ã§ã—ãŸã€‚ã‚‚ã†ä¸€åº¦å…¥åŠ›ã—ã¦ãã ã•ã„。",
- "Private key password successfully updated." : "秘密éµã®ãƒ‘スワードãŒæ­£å¸¸ã«æ›´æ–°ã•ã‚Œã¾ã—ãŸã€‚",
- "File recovery settings updated" : "ファイルリカãƒãƒªè¨­å®šã‚’æ›´æ–°ã—ã¾ã—ãŸ",
- "Could not update file recovery" : "ファイルリカãƒãƒªã‚’æ›´æ–°ã§ãã¾ã›ã‚“ã§ã—ãŸ",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "セッション中ã«æš—å·åŒ–アプリをå†åº¦æœ‰åŠ¹ã«ã•ã‚ŒãŸãŸã‚ã€æš—å·åŒ–アプリãŒåˆæœŸåŒ–ã•ã‚Œã¦ã„ã¾ã›ã‚“。暗å·åŒ–アプリをåˆæœŸåŒ–ã™ã‚‹ãŸã‚ã€ãƒ­ã‚°ã‚¢ã‚¦ãƒˆã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã—ãªãŠã—ã¦ãã ã•ã„。",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "プライベートキーãŒæœ‰åŠ¹ã§ã¯ã‚ã‚Šã¾ã›ã‚“ï¼ãƒ‘スワードãŒ%sã®å¤–部ã§å¤‰æ›´ã•ã‚ŒãŸ(例: å…±åŒãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª)ã¨æ€ã‚ã‚Œã¾ã™ã€‚個人設定ã§ãƒ—ライベートキーã®ãƒ‘スワードを更新ã—ã¦ã€æš—å·åŒ–ファイルã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’回復ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’復å·åŒ–ã§ãã¾ã›ã‚“ã€å…±æœ‰ãƒ•ã‚¡ã‚¤ãƒ«ã®å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ファイルã®æ‰€æœ‰è€…ã«ãŠé¡˜ã„ã—ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’共有ã—ãªãŠã—ã¦ã‚‚らã£ã¦ãã ã•ã„。",
- "Unknown error. Please check your system settings or contact your administrator" : "ä¸æ˜Žãªã‚¨ãƒ©ãƒ¼ã§ã™ã€‚システム設定を確èªã™ã‚‹ã‹ã€ç®¡ç†è€…ã«å•ã„åˆã‚ã›ã¦ãã ã•ã„。",
- "Initial encryption started... This can take some time. Please wait." : "æš—å·åŒ–ã®åˆæœŸåŒ–作業を開始ã—ã¾ã—ãŸ... ã“ã®å‡¦ç†ã«ã¯ã—ã°ã‚‰ã時間ãŒã‹ã‹ã‚Šã¾ã™ã€‚ãŠå¾…ã¡ãã ã•ã„。",
- "Initial encryption running... Please try again later." : "åˆæœŸæš—å·åŒ–実行中... 後ã§ã‚‚ã†ä¸€åº¦ãŠè©¦ã—ãã ã•ã„。",
- "Missing requirements." : "å¿…è¦è¦ä»¶ãŒæº€ãŸã•ã‚Œã¦ã„ã¾ã›ã‚“。",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "å¿…ãšã€OpenSSLåŠã³OpenSSLã®PHPã®æ‹¡å¼µã‚’有効ã«ã—ãŸä¸Šã§ã€é©åˆ‡ã«è¨­å®šã—ã¦ãã ã•ã„。ç¾æ™‚点ã§ã¯æš—å·åŒ–アプリã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚",
- "Following users are not set up for encryption:" : "以下ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€æš—å·åŒ–設定ãŒã•ã‚Œã¦ã„ã¾ã›ã‚“:",
- "Go directly to your %spersonal settings%s." : "直接 %s個人設定%s ã«é€²ã‚€ã€‚",
- "Server-side Encryption" : "サーãƒãƒ¼å´æš—å·",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "æš—å·åŒ–アプリã¯æœ‰åŠ¹ã§ã™ãŒã€ã‚ãªãŸã®æš—å·åŒ–キーã¯åˆæœŸåŒ–ã•ã‚Œã¦ã„ã¾ã›ã‚“。ログアウトã—ãŸå¾Œã«ã€å†åº¦ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ãã ã•ã„",
- "Enable recovery key (allow to recover users files in case of password loss):" : "リカãƒãƒªã‚­ãƒ¼ã‚’有効ã«ã™ã‚‹ (パスワードを忘れãŸå ´åˆã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’回復ã§ãã¾ã™):",
- "Recovery key password" : "リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワード",
- "Repeat Recovery key password" : "リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワードをもã†ä¸€åº¦å…¥åŠ›",
- "Enabled" : "有効",
- "Disabled" : "無効",
- "Change recovery key password:" : "リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワードを変更:",
- "Old Recovery key password" : "å¤ã„リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワード",
- "New Recovery key password" : "æ–°ã—ã„リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワード",
- "Repeat New Recovery key password" : "æ–°ã—ã„リカãƒãƒªã‚­ãƒ¼ã®ãƒ‘スワードをもã†ä¸€åº¦å…¥åŠ›",
- "Change Password" : "パスワードを変更",
- "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." : "å¤ã„パスワードを覚ãˆã¦ã„ãªã„å ´åˆã€ç®¡ç†è€…ã«å°‹ã­ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‚’回復ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚",
- "Old log-in password" : "å¤ã„ログインパスワード",
- "Current log-in password" : "ç¾åœ¨ã®ãƒ­ã‚°ã‚¤ãƒ³ãƒ‘スワード",
- "Update Private Key Password" : "秘密éµã®ãƒ‘スワードを更新",
- "Enable password recovery:" : "パスワードリカãƒãƒªã‚’有効ã«:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€ãƒ‘スワードを紛失ã—ãŸå ´åˆã‚‚ã€æš—å·åŒ–ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã«å†åº¦ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ka_GE.js b/apps/files_encryption/l10n/ka_GE.js
deleted file mode 100644
index 7b95616ccdd..00000000000
--- a/apps/files_encryption/l10n/ka_GE.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "უცნáƒáƒ‘ი შეცდáƒáƒ›áƒ"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/ka_GE.json b/apps/files_encryption/l10n/ka_GE.json
deleted file mode 100644
index a22007f7789..00000000000
--- a/apps/files_encryption/l10n/ka_GE.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "უცნáƒáƒ‘ი შეცდáƒáƒ›áƒ"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/km.js b/apps/files_encryption/l10n/km.js
deleted file mode 100644
index 336b96f96a8..00000000000
--- a/apps/files_encryption/l10n/km.js
+++ /dev/null
@@ -1,11 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "មិន​ស្គាល់​កំហុស",
- "Password successfully changed." : "បាន​ប្ដូរ​ពាក្យ​សម្ងាážáŸ‹â€‹ážŠáŸ„យ​ជោគជáŸáž™áŸ”",
- "Could not change the password. Maybe the old password was not correct." : "មិន​អាច​ប្ដូរ​ពាក្យ​សម្ងាážáŸ‹â€‹áž”ាន​ទáŸáŸ” ប្រហែល​ពាក្យ​សម្ងាážáŸ‹â€‹áž…ាស់​មិន​ážáŸ’រឹម​ážáŸ’រូវ។",
- "Enabled" : "បាន​បើក",
- "Disabled" : "បាន​បិទ",
- "Change Password" : "ប្ដូរ​ពាក្យ​សម្ងាážáŸ‹"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/km.json b/apps/files_encryption/l10n/km.json
deleted file mode 100644
index 26b888c0011..00000000000
--- a/apps/files_encryption/l10n/km.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "translations": {
- "Unknown error" : "មិន​ស្គាល់​កំហុស",
- "Password successfully changed." : "បាន​ប្ដូរ​ពាក្យ​សម្ងាážáŸ‹â€‹ážŠáŸ„យ​ជោគជáŸáž™áŸ”",
- "Could not change the password. Maybe the old password was not correct." : "មិន​អាច​ប្ដូរ​ពាក្យ​សម្ងាážáŸ‹â€‹áž”ាន​ទáŸáŸ” ប្រហែល​ពាក្យ​សម្ងាážáŸ‹â€‹áž…ាស់​មិន​ážáŸ’រឹម​ážáŸ’រូវ។",
- "Enabled" : "បាន​បើក",
- "Disabled" : "បាន​បិទ",
- "Change Password" : "ប្ដូរ​ពាក្យ​សម្ងាážáŸ‹"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/kn.js b/apps/files_encryption/l10n/kn.js
deleted file mode 100644
index e8583cc5a97..00000000000
--- a/apps/files_encryption/l10n/kn.js
+++ /dev/null
@@ -1,8 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "ಗೊತà³à²¤à²¿à²²à³à²²à²¦ ದೋಷ",
- "Enabled" : "ಸಕà³à²°à²¿à²¯à²—ೊಳಿಸಿದೆ",
- "Disabled" : "ನಿಷà³à²•à³à²°à²¿à²¯à²—ೊಳಿಸಲಾಗಿದೆ"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/kn.json b/apps/files_encryption/l10n/kn.json
deleted file mode 100644
index ccb4203c400..00000000000
--- a/apps/files_encryption/l10n/kn.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "translations": {
- "Unknown error" : "ಗೊತà³à²¤à²¿à²²à³à²²à²¦ ದೋಷ",
- "Enabled" : "ಸಕà³à²°à²¿à²¯à²—ೊಳಿಸಿದೆ",
- "Disabled" : "ನಿಷà³à²•à³à²°à²¿à²¯à²—ೊಳಿಸಲಾಗಿದೆ"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ko.js b/apps/files_encryption/l10n/ko.js
deleted file mode 100644
index 3d09c0abff2..00000000000
--- a/apps/files_encryption/l10n/ko.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "알 수 없는 오류",
- "Missing recovery key password" : "잊어버린 복구 키 암호 복구",
- "Please repeat the recovery key password" : "복구 키 암호를 다시 입력하십시오",
- "Repeated recovery key password does not match the provided recovery key password" : "입력한 복구 키 암호가 서로 다릅니다",
- "Recovery key successfully enabled" : "복구 키가 성공ì ìœ¼ë¡œ 활성화ë˜ì—ˆìŠµë‹ˆë‹¤",
- "Could not disable recovery key. Please check your recovery key password!" : "복구 키를 비활성화 í•  수 없습니다. 복구 í‚¤ì˜ ì•”í˜¸ë¥¼ 확ì¸í•´ 주십시오!",
- "Recovery key successfully disabled" : "복구 키가 성공ì ìœ¼ë¡œ 비활성화 ë˜ì—ˆìŠµë‹ˆë‹¤",
- "Please provide the old recovery password" : "ì´ì „ 복구 암호를 입력하십시오",
- "Please provide a new recovery password" : "새 복구 암호를 입력하십시오",
- "Please repeat the new recovery password" : "새 복구 암호를 다시 입력하십시오",
- "Password successfully changed." : "암호가 성공ì ìœ¼ë¡œ 변경ë˜ì—ˆìŠµë‹ˆë‹¤",
- "Could not change the password. Maybe the old password was not correct." : "암호를 변경할 수 없습니다. 예전 암호가 정확하지 ì•Šì€ ê²ƒ 같습니다.",
- "Could not update the private key password." : "ê°œì¸ í‚¤ 암호를 ì—…ë°ì´íŠ¸í•  수 없습니다",
- "The old password was not correct, please try again." : "ì´ì „ 암호가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤. 다시 ì‹œë„하십시오.",
- "The current log-in password was not correct, please try again." : "현재 ë¡œê·¸ì¸ ì•”í˜¸ê°€ 잘못ë˜ì—ˆìŠµë‹ˆë‹¤. 다시 ì‹œë„하십시오.",
- "Private key password successfully updated." : "ê°œì¸ í‚¤ 암호가 성공ì ìœ¼ë¡œ ì—…ë°ì´íŠ¸ ë˜ì—ˆìŠµë‹ˆë‹¤.",
- "File recovery settings updated" : "íŒŒì¼ ë³µêµ¬ 설정 ì—…ë°ì´íŠ¸ë¨",
- "Could not update file recovery" : "íŒŒì¼ ë³µêµ¬ë¥¼ ì—…ë°ì´íŠ¸í•  수 없습니다",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "암호화 ì•±ì´ ì´ˆê¸°í™”ë˜ì§€ 않았습니다! 암호화 ì•±ì´ ë‹¤ì‹œ í™œì„±í™”ëœ ê²ƒ 같습니다. 암호화 ì•±ì„ ì´ˆê¸°í™”í•˜ë ¤ë©´ 로그아웃했다 다시 로그ì¸í•˜ì‹­ì‹œì˜¤.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "ê°œì¸ í‚¤ê°€ 올바르지 않습니다! 암호가 %s 외부ì—ì„œ(예: 회사 디렉터리) ë³€ê²½ëœ ê²ƒ 같습니다. ì•”í˜¸í™”ëœ íŒŒì¼ì— 다시 접근하려면 ê°œì¸ ì„¤ì •ì—ì„œ ê°œì¸ í‚¤ 암호를 수정하십시오.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "ì´ íŒŒì¼ì„ 복호화할 수 없습니다. ê³µìœ ëœ íŒŒì¼ì¼ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. íŒŒì¼ ì†Œìœ ìžì—게 공유를 다시 요청하십시오.",
- "Unknown error. Please check your system settings or contact your administrator" : "ì•Œ 수 없는 오류입니다. 시스템 ì„¤ì •ì„ í™•ì¸í•˜ê±°ë‚˜ 관리ìžì—게 문ì˜í•˜ì‹­ì‹œì˜¤",
- "Initial encryption started... This can take some time. Please wait." : "초기 암호화가 시작ë˜ì—ˆìŠµë‹ˆë‹¤... ì‹œê°„ì´ ê±¸ë¦´ ìˆ˜ë„ ìžˆìœ¼ë‹ˆ 기다려 주십시오.",
- "Initial encryption running... Please try again later." : "초기 암호화가 진행 중입니다... ë‚˜ì¤‘ì— ë‹¤ì‹œ ì‹œë„하십시오.",
- "Missing requirements." : "요구 ì‚¬í•­ì´ ë¶€ì¡±í•©ë‹ˆë‹¤.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "OpenSSL ë° PHP OpenSSL í™•ìž¥ì´ í™œì„±í™”ë˜ì–´ 있고 올바르게 설정ë˜ì–´ 있는지 확ì¸í•˜ì‹­ì‹œì˜¤. 현재 암호화 ì•±ì´ ë¹„í™œì„±í™”ë˜ì—ˆìŠµë‹ˆë‹¤.",
- "Following users are not set up for encryption:" : "ë‹¤ìŒ ì‚¬ìš©ìžëŠ” 암호화를 사용할 수 없습니다:",
- "Go directly to your %spersonal settings%s." : "%sê°œì¸ ì„¤ì •%s으로 ì§ì ‘ ì´ë™í•˜ì‹­ì‹œì˜¤.",
- "Server-side Encryption" : "서버 측 암호화",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "암호화 ì•±ì´ í™œì„±í™”ë˜ì–´ 있지만 키가 초기화ë˜ì§€ 않았습니다. 로그아웃한 후 다시 로그ì¸í•˜ì‹­ì‹œì˜¤",
- "Enable recovery key (allow to recover users files in case of password loss):" : "복구 키 사용 (암호를 ìžŠì—ˆì„ ë•Œ 파ì¼ì„ 복구할 수 있ë„ë¡ í•¨):",
- "Recovery key password" : "복구 키 암호",
- "Repeat Recovery key password" : "복구 키 암호 재입력",
- "Enabled" : "활성화",
- "Disabled" : "비활성화",
- "Change recovery key password:" : "복구 키 암호 변경:",
- "Old Recovery key password" : "ì´ì „ 복구 키 암호",
- "New Recovery key password" : "새 복구 키 암호",
- "Repeat New Recovery key password" : "새 복구 키 암호 재입력",
- "Change Password" : "암호 변경",
- "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." : " ì´ì „ 암호가 기억나지 않으면 시스템 관리ìžì—게 íŒŒì¼ ë³µêµ¬ë¥¼ 요청하십시오.",
- "Old log-in password" : "ì´ì „ ë¡œê·¸ì¸ ì•”í˜¸",
- "Current log-in password" : "현재 ë¡œê·¸ì¸ ì•”í˜¸",
- "Update Private Key Password" : "ê°œì¸ í‚¤ 암호 ì—…ë°ì´íŠ¸",
- "Enable password recovery:" : "암호 복구 사용:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "ì´ ì˜µì…˜ì„ ì‚¬ìš©í•˜ë©´ 암호를 ìžŠì—ˆì„ ë•Œ ì•”í˜¸í™”ëœ íŒŒì¼ì— 다시 접근할 수 있습니다"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/ko.json b/apps/files_encryption/l10n/ko.json
deleted file mode 100644
index 6e6c6f162c0..00000000000
--- a/apps/files_encryption/l10n/ko.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "알 수 없는 오류",
- "Missing recovery key password" : "잊어버린 복구 키 암호 복구",
- "Please repeat the recovery key password" : "복구 키 암호를 다시 입력하십시오",
- "Repeated recovery key password does not match the provided recovery key password" : "입력한 복구 키 암호가 서로 다릅니다",
- "Recovery key successfully enabled" : "복구 키가 성공ì ìœ¼ë¡œ 활성화ë˜ì—ˆìŠµë‹ˆë‹¤",
- "Could not disable recovery key. Please check your recovery key password!" : "복구 키를 비활성화 í•  수 없습니다. 복구 í‚¤ì˜ ì•”í˜¸ë¥¼ 확ì¸í•´ 주십시오!",
- "Recovery key successfully disabled" : "복구 키가 성공ì ìœ¼ë¡œ 비활성화 ë˜ì—ˆìŠµë‹ˆë‹¤",
- "Please provide the old recovery password" : "ì´ì „ 복구 암호를 입력하십시오",
- "Please provide a new recovery password" : "새 복구 암호를 입력하십시오",
- "Please repeat the new recovery password" : "새 복구 암호를 다시 입력하십시오",
- "Password successfully changed." : "암호가 성공ì ìœ¼ë¡œ 변경ë˜ì—ˆìŠµë‹ˆë‹¤",
- "Could not change the password. Maybe the old password was not correct." : "암호를 변경할 수 없습니다. 예전 암호가 정확하지 ì•Šì€ ê²ƒ 같습니다.",
- "Could not update the private key password." : "ê°œì¸ í‚¤ 암호를 ì—…ë°ì´íŠ¸í•  수 없습니다",
- "The old password was not correct, please try again." : "ì´ì „ 암호가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤. 다시 ì‹œë„하십시오.",
- "The current log-in password was not correct, please try again." : "현재 ë¡œê·¸ì¸ ì•”í˜¸ê°€ 잘못ë˜ì—ˆìŠµë‹ˆë‹¤. 다시 ì‹œë„하십시오.",
- "Private key password successfully updated." : "ê°œì¸ í‚¤ 암호가 성공ì ìœ¼ë¡œ ì—…ë°ì´íŠ¸ ë˜ì—ˆìŠµë‹ˆë‹¤.",
- "File recovery settings updated" : "íŒŒì¼ ë³µêµ¬ 설정 ì—…ë°ì´íŠ¸ë¨",
- "Could not update file recovery" : "íŒŒì¼ ë³µêµ¬ë¥¼ ì—…ë°ì´íŠ¸í•  수 없습니다",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "암호화 ì•±ì´ ì´ˆê¸°í™”ë˜ì§€ 않았습니다! 암호화 ì•±ì´ ë‹¤ì‹œ í™œì„±í™”ëœ ê²ƒ 같습니다. 암호화 ì•±ì„ ì´ˆê¸°í™”í•˜ë ¤ë©´ 로그아웃했다 다시 로그ì¸í•˜ì‹­ì‹œì˜¤.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "ê°œì¸ í‚¤ê°€ 올바르지 않습니다! 암호가 %s 외부ì—ì„œ(예: 회사 디렉터리) ë³€ê²½ëœ ê²ƒ 같습니다. ì•”í˜¸í™”ëœ íŒŒì¼ì— 다시 접근하려면 ê°œì¸ ì„¤ì •ì—ì„œ ê°œì¸ í‚¤ 암호를 수정하십시오.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "ì´ íŒŒì¼ì„ 복호화할 수 없습니다. ê³µìœ ëœ íŒŒì¼ì¼ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. íŒŒì¼ ì†Œìœ ìžì—게 공유를 다시 요청하십시오.",
- "Unknown error. Please check your system settings or contact your administrator" : "ì•Œ 수 없는 오류입니다. 시스템 ì„¤ì •ì„ í™•ì¸í•˜ê±°ë‚˜ 관리ìžì—게 문ì˜í•˜ì‹­ì‹œì˜¤",
- "Initial encryption started... This can take some time. Please wait." : "초기 암호화가 시작ë˜ì—ˆìŠµë‹ˆë‹¤... ì‹œê°„ì´ ê±¸ë¦´ ìˆ˜ë„ ìžˆìœ¼ë‹ˆ 기다려 주십시오.",
- "Initial encryption running... Please try again later." : "초기 암호화가 진행 중입니다... ë‚˜ì¤‘ì— ë‹¤ì‹œ ì‹œë„하십시오.",
- "Missing requirements." : "요구 ì‚¬í•­ì´ ë¶€ì¡±í•©ë‹ˆë‹¤.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "OpenSSL ë° PHP OpenSSL í™•ìž¥ì´ í™œì„±í™”ë˜ì–´ 있고 올바르게 설정ë˜ì–´ 있는지 확ì¸í•˜ì‹­ì‹œì˜¤. 현재 암호화 ì•±ì´ ë¹„í™œì„±í™”ë˜ì—ˆìŠµë‹ˆë‹¤.",
- "Following users are not set up for encryption:" : "ë‹¤ìŒ ì‚¬ìš©ìžëŠ” 암호화를 사용할 수 없습니다:",
- "Go directly to your %spersonal settings%s." : "%sê°œì¸ ì„¤ì •%s으로 ì§ì ‘ ì´ë™í•˜ì‹­ì‹œì˜¤.",
- "Server-side Encryption" : "서버 측 암호화",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "암호화 ì•±ì´ í™œì„±í™”ë˜ì–´ 있지만 키가 초기화ë˜ì§€ 않았습니다. 로그아웃한 후 다시 로그ì¸í•˜ì‹­ì‹œì˜¤",
- "Enable recovery key (allow to recover users files in case of password loss):" : "복구 키 사용 (암호를 ìžŠì—ˆì„ ë•Œ 파ì¼ì„ 복구할 수 있ë„ë¡ í•¨):",
- "Recovery key password" : "복구 키 암호",
- "Repeat Recovery key password" : "복구 키 암호 재입력",
- "Enabled" : "활성화",
- "Disabled" : "비활성화",
- "Change recovery key password:" : "복구 키 암호 변경:",
- "Old Recovery key password" : "ì´ì „ 복구 키 암호",
- "New Recovery key password" : "새 복구 키 암호",
- "Repeat New Recovery key password" : "새 복구 키 암호 재입력",
- "Change Password" : "암호 변경",
- "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." : " ì´ì „ 암호가 기억나지 않으면 시스템 관리ìžì—게 íŒŒì¼ ë³µêµ¬ë¥¼ 요청하십시오.",
- "Old log-in password" : "ì´ì „ ë¡œê·¸ì¸ ì•”í˜¸",
- "Current log-in password" : "현재 ë¡œê·¸ì¸ ì•”í˜¸",
- "Update Private Key Password" : "ê°œì¸ í‚¤ 암호 ì—…ë°ì´íŠ¸",
- "Enable password recovery:" : "암호 복구 사용:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "ì´ ì˜µì…˜ì„ ì‚¬ìš©í•˜ë©´ 암호를 ìžŠì—ˆì„ ë•Œ ì•”í˜¸í™”ëœ íŒŒì¼ì— 다시 접근할 수 있습니다"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ku_IQ.js b/apps/files_encryption/l10n/ku_IQ.js
deleted file mode 100644
index 5a036cc5252..00000000000
--- a/apps/files_encryption/l10n/ku_IQ.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Encryption" : "نهێنیکردن"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/ku_IQ.json b/apps/files_encryption/l10n/ku_IQ.json
deleted file mode 100644
index ab30a5a485b..00000000000
--- a/apps/files_encryption/l10n/ku_IQ.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Encryption" : "نهێنیکردن"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/lb.js b/apps/files_encryption/l10n/lb.js
deleted file mode 100644
index d5e206fddb0..00000000000
--- a/apps/files_encryption/l10n/lb.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Et ass en onbekannte Fehler opgetrueden"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/lb.json b/apps/files_encryption/l10n/lb.json
deleted file mode 100644
index 8cfee6638f4..00000000000
--- a/apps/files_encryption/l10n/lb.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "Et ass en onbekannte Fehler opgetrueden"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/lo.js b/apps/files_encryption/l10n/lo.js
deleted file mode 100644
index b5b586d1028..00000000000
--- a/apps/files_encryption/l10n/lo.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "ຂà»à»‰àºœàº´àº”ພາດທີ່ບà»à»ˆàº®àº¹à»‰àºªàº²à»€àº«àº”"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/lo.json b/apps/files_encryption/l10n/lo.json
deleted file mode 100644
index 1a02813027d..00000000000
--- a/apps/files_encryption/l10n/lo.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "ຂà»à»‰àºœàº´àº”ພາດທີ່ບà»à»ˆàº®àº¹à»‰àºªàº²à»€àº«àº”"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/lt_LT.js b/apps/files_encryption/l10n/lt_LT.js
deleted file mode 100644
index eb28b3933df..00000000000
--- a/apps/files_encryption/l10n/lt_LT.js
+++ /dev/null
@@ -1,37 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Neatpažinta klaida",
- "Recovery key successfully enabled" : "Atkūrimo raktas sėkmingai įjungtas",
- "Could not disable recovery key. Please check your recovery key password!" : "Neišėjo išjungti jūsų atkūrimo rakto. Prašome jį patikrinti!",
- "Recovery key successfully disabled" : "Atkūrimo raktas sėkmingai išjungtas",
- "Password successfully changed." : "Slaptažodis sėkmingai pakeistas",
- "Could not change the password. Maybe the old password was not correct." : "Slaptažodis nebuvo pakeistas. Gali būti, kad buvo neteisingai suvestas senasis.",
- "Private key password successfully updated." : "Privataus rakto slaptažodis buvo sėkmingai atnaujintas.",
- "File recovery settings updated" : "Failų atkūrimo nustatymai pakeisti",
- "Could not update file recovery" : "Neišėjo atnaujinti failų atkūrimo",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Šifravimo programa nepaleista! Galbūt šifravimo programa buvo įjungta dar kartą Jūsų sesijos metu. Prašome atsijungti ir vėl prisijungti, kad paleisti šifravimo programą.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Jūsų privatus raktas yra netinkamas! Panašu, kad Jūsų slaptažodis buvo pakeistas už %s (pvz. Jūsų organizacijos kataloge). Galite atnaujinti savo privataus rakto slaptažodį savo asmeniniuose nustatymuose, kad atkurti prieigą prie savo šifruotų failų.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Failo iššifruoti nepavyko, gali būti jog jis yra pasidalintas su jumis. Paprašykite failo savininko, kad jums iš naujo pateiktų šį failą.",
- "Initial encryption started... This can take some time. Please wait." : "Pradėtas pirminis šifravimas... Tai gali užtrukti. Prašome palaukti.",
- "Missing requirements." : "Trūkstami laukai.",
- "Following users are not set up for encryption:" : "Sekantys naudotojai nenustatyti Å¡ifravimui:",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Šifravimo programa įjungta, bet Jūsų raktai nėra pritaikyti. Prašome atsijungti ir vėl prisijungti",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Įjunkite atkūrimo raktą, (leisti atkurti naudotojų failus praradus slaptažodį):",
- "Recovery key password" : "Atkūrimo rakto slaptažodis",
- "Repeat Recovery key password" : "Pakartokite atkūrimo rakto slaptažodį",
- "Enabled" : "Įjungta",
- "Disabled" : "IÅ¡jungta",
- "Change recovery key password:" : "Pakeisti atkūrimo rakto slaptažodį:",
- "Old Recovery key password" : "Senas atkūrimo rakto slaptažodis",
- "New Recovery key password" : "Naujas atkūrimo rakto slaptažodis",
- "Repeat New Recovery key password" : "Pakartokite naują atkūrimo rakto slaptažodį",
- "Change Password" : "Pakeisti slaptažodį",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Jei nepamenate savo seno slaptažodžio, galite paprašyti administratoriaus atkurti Jūsų failus.",
- "Old log-in password" : "Senas prisijungimo slaptažodis",
- "Current log-in password" : "Dabartinis prisijungimo slaptažodis",
- "Update Private Key Password" : "Atnaujinti privataus rakto slaptažodį",
- "Enable password recovery:" : "Įjungti slaptažodžio atkūrimą:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Įjungus šią funkciją jums bus suteiktas pakartotinis priėjimas prie Jūsų šifruotų failų pamiršus slaptažodį."
-},
-"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/files_encryption/l10n/lt_LT.json b/apps/files_encryption/l10n/lt_LT.json
deleted file mode 100644
index f77575b5df4..00000000000
--- a/apps/files_encryption/l10n/lt_LT.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{ "translations": {
- "Unknown error" : "Neatpažinta klaida",
- "Recovery key successfully enabled" : "Atkūrimo raktas sėkmingai įjungtas",
- "Could not disable recovery key. Please check your recovery key password!" : "Neišėjo išjungti jūsų atkūrimo rakto. Prašome jį patikrinti!",
- "Recovery key successfully disabled" : "Atkūrimo raktas sėkmingai išjungtas",
- "Password successfully changed." : "Slaptažodis sėkmingai pakeistas",
- "Could not change the password. Maybe the old password was not correct." : "Slaptažodis nebuvo pakeistas. Gali būti, kad buvo neteisingai suvestas senasis.",
- "Private key password successfully updated." : "Privataus rakto slaptažodis buvo sėkmingai atnaujintas.",
- "File recovery settings updated" : "Failų atkūrimo nustatymai pakeisti",
- "Could not update file recovery" : "Neišėjo atnaujinti failų atkūrimo",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Šifravimo programa nepaleista! Galbūt šifravimo programa buvo įjungta dar kartą Jūsų sesijos metu. Prašome atsijungti ir vėl prisijungti, kad paleisti šifravimo programą.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Jūsų privatus raktas yra netinkamas! Panašu, kad Jūsų slaptažodis buvo pakeistas už %s (pvz. Jūsų organizacijos kataloge). Galite atnaujinti savo privataus rakto slaptažodį savo asmeniniuose nustatymuose, kad atkurti prieigą prie savo šifruotų failų.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Failo iššifruoti nepavyko, gali būti jog jis yra pasidalintas su jumis. Paprašykite failo savininko, kad jums iš naujo pateiktų šį failą.",
- "Initial encryption started... This can take some time. Please wait." : "Pradėtas pirminis šifravimas... Tai gali užtrukti. Prašome palaukti.",
- "Missing requirements." : "Trūkstami laukai.",
- "Following users are not set up for encryption:" : "Sekantys naudotojai nenustatyti Å¡ifravimui:",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Šifravimo programa įjungta, bet Jūsų raktai nėra pritaikyti. Prašome atsijungti ir vėl prisijungti",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Įjunkite atkūrimo raktą, (leisti atkurti naudotojų failus praradus slaptažodį):",
- "Recovery key password" : "Atkūrimo rakto slaptažodis",
- "Repeat Recovery key password" : "Pakartokite atkūrimo rakto slaptažodį",
- "Enabled" : "Įjungta",
- "Disabled" : "IÅ¡jungta",
- "Change recovery key password:" : "Pakeisti atkūrimo rakto slaptažodį:",
- "Old Recovery key password" : "Senas atkūrimo rakto slaptažodis",
- "New Recovery key password" : "Naujas atkūrimo rakto slaptažodis",
- "Repeat New Recovery key password" : "Pakartokite naują atkūrimo rakto slaptažodį",
- "Change Password" : "Pakeisti slaptažodį",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Jei nepamenate savo seno slaptažodžio, galite paprašyti administratoriaus atkurti Jūsų failus.",
- "Old log-in password" : "Senas prisijungimo slaptažodis",
- "Current log-in password" : "Dabartinis prisijungimo slaptažodis",
- "Update Private Key Password" : "Atnaujinti privataus rakto slaptažodį",
- "Enable password recovery:" : "Įjungti slaptažodžio atkūrimą:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Įjungus šią funkciją jums bus suteiktas pakartotinis priėjimas prie Jūsų šifruotų failų pamiršus slaptažodį."
-},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/lv.js b/apps/files_encryption/l10n/lv.js
deleted file mode 100644
index 4c9fd2adad8..00000000000
--- a/apps/files_encryption/l10n/lv.js
+++ /dev/null
@@ -1,8 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "NezinÄma kļūda",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Å ifrÄ“Å¡anas lietotnes ir pieslÄ“gta, bet Å¡ifrÄ“Å¡anas atslÄ“gas nav uzstÄdÄ«tas. LÅ«dzu izejiet no sistÄ“mas un ieejiet sistÄ“mÄ atpakaļ.",
- "Enabled" : "Pievienots"
-},
-"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);");
diff --git a/apps/files_encryption/l10n/lv.json b/apps/files_encryption/l10n/lv.json
deleted file mode 100644
index bacaccd6b92..00000000000
--- a/apps/files_encryption/l10n/lv.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "translations": {
- "Unknown error" : "NezinÄma kļūda",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Å ifrÄ“Å¡anas lietotnes ir pieslÄ“gta, bet Å¡ifrÄ“Å¡anas atslÄ“gas nav uzstÄdÄ«tas. LÅ«dzu izejiet no sistÄ“mas un ieejiet sistÄ“mÄ atpakaļ.",
- "Enabled" : "Pievienots"
-},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/mk.js b/apps/files_encryption/l10n/mk.js
deleted file mode 100644
index 7996856033b..00000000000
--- a/apps/files_encryption/l10n/mk.js
+++ /dev/null
@@ -1,18 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Ðепозната грешка",
- "Password successfully changed." : "Лозинката е уÑпешно променета.",
- "Could not change the password. Maybe the old password was not correct." : "Лозинката не можеше да Ñе промени. Можеби Ñтарата лозинка не беше иÑправна.",
- "Missing requirements." : "Барања кои недоÑтаÑуваат.",
- "Repeat Recovery key password" : "Повтори ја лозинката за клучот на обновување",
- "Enabled" : "Овозможен",
- "Disabled" : "Оневозможен",
- "Old Recovery key password" : "Старата лозинка за клучот на обновување ",
- "Repeat New Recovery key password" : "Повтори ја лозинката за клучот на обновувањето",
- "Change Password" : "Смени лозинка",
- "Old log-in password" : "Старата лозинка за најавување",
- "Current log-in password" : "Тековната лозинка за најавување",
- "Enable password recovery:" : "Овозможи го обновувањето на лозинката:"
-},
-"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;");
diff --git a/apps/files_encryption/l10n/mk.json b/apps/files_encryption/l10n/mk.json
deleted file mode 100644
index e1929bcfa64..00000000000
--- a/apps/files_encryption/l10n/mk.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{ "translations": {
- "Unknown error" : "Ðепозната грешка",
- "Password successfully changed." : "Лозинката е уÑпешно променета.",
- "Could not change the password. Maybe the old password was not correct." : "Лозинката не можеше да Ñе промени. Можеби Ñтарата лозинка не беше иÑправна.",
- "Missing requirements." : "Барања кои недоÑтаÑуваат.",
- "Repeat Recovery key password" : "Повтори ја лозинката за клучот на обновување",
- "Enabled" : "Овозможен",
- "Disabled" : "Оневозможен",
- "Old Recovery key password" : "Старата лозинка за клучот на обновување ",
- "Repeat New Recovery key password" : "Повтори ја лозинката за клучот на обновувањето",
- "Change Password" : "Смени лозинка",
- "Old log-in password" : "Старата лозинка за најавување",
- "Current log-in password" : "Тековната лозинка за најавување",
- "Enable password recovery:" : "Овозможи го обновувањето на лозинката:"
-},"pluralForm" :"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/nb_NO.js b/apps/files_encryption/l10n/nb_NO.js
deleted file mode 100644
index ff52350f98a..00000000000
--- a/apps/files_encryption/l10n/nb_NO.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Ukjent feil",
- "Missing recovery key password" : "Passord for gjenopprettingsnøkkel mangler",
- "Please repeat the recovery key password" : "Gjenta passord for gjenopprettingsnøkkel",
- "Repeated recovery key password does not match the provided recovery key password" : "Gjentatt passord for gjenopprettingsnøkkel stemmer ikke med oppgitt passord for gjenopprettingsnøkkel",
- "Recovery key successfully enabled" : "Gjenopprettingsnøkkel aktivert",
- "Could not disable recovery key. Please check your recovery key password!" : "Klarte ikke å deaktivere gjenopprettingsnøkkel. Sjekk passordet for gjenopprettingsnøkkelen.",
- "Recovery key successfully disabled" : "Gjenopprettingsnøkkel ble deaktivert",
- "Please provide the old recovery password" : "Oppgi det gamle gjenopprettingspassordet",
- "Please provide a new recovery password" : "Oppgi et nytt gjenopprettingspassord",
- "Please repeat the new recovery password" : "Gjenta det nye gjenopprettingspassordet",
- "Password successfully changed." : "Passordet ble endret.",
- "Could not change the password. Maybe the old password was not correct." : "Klarte ikke å endre passordet. Kanskje gammelt passord ikke var korrekt.",
- "Could not update the private key password." : "Klarte ikke å oppdatere privatnøkkelpassordet.",
- "The old password was not correct, please try again." : "Det gamle passordet var feil. Prøv igjen.",
- "The current log-in password was not correct, please try again." : "Det nåværende innloggingspassordet var feil. Prøv igjen.",
- "Private key password successfully updated." : "Passord for privat nøkkel ble oppdatert.",
- "File recovery settings updated" : "Innstillinger for gjenoppretting av filer ble oppdatert",
- "Could not update file recovery" : "Klarte ikke å oppdatere gjenoppretting av filer",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Krypterings-app ikke initialisert! Kanskje krypterings-appen ble aktivert på nytt i løpet av økten din. Prøv å logge ut og logge inn igjen for å initialisere krypterings-appen.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Din private nøkkel er ikke gyldig! Sannsynligvis ble passordet ditt endret utenfor %s. (f.eks. din bedriftskatalog). Du kan oppdatere passordet for din private nøkkel i dine personlige innstillinger for å gjenvinne tilgang til de krypterte filene dine.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ikke dekryptere denne filen. Dette er sannsynligvis en delt fil. Spør eieren av filen om å dele den med deg på nytt.",
- "Unknown error. Please check your system settings or contact your administrator" : "Ukjent feil. Sjekk systeminnstillingene eller kontakt administratoren.",
- "Initial encryption started... This can take some time. Please wait." : "Førstegangs kryptering startet... Dette kan ta litt tid. Vennligst vent.",
- "Initial encryption running... Please try again later." : "Førstegangs kryptering kjører... Prøv igjen senere.",
- "Missing requirements." : "Manglende krav.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Vennligst se til at OpenSSL sammen med PHP-utvidelsen er aktivert og riktig konfigurert. Krypterings-appen er foreløpig deaktivert.",
- "Following users are not set up for encryption:" : "Følgende brukere er ikke satt opp for kryptering:",
- "Go directly to your %spersonal settings%s." : "GÃ¥ direkte til dine %spersonlige innstillinger%s.",
- "Server-side Encryption" : "Serverkryptering",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "App for kryptering er aktivert men nøklene dine er ikke satt opp. Logg ut og logg inn igjen.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktiver gjenopprettingsnøkkel (tillat å gjenopprette brukerfiler i tilfelle tap av passord):",
- "Recovery key password" : "Passord for gjenopprettingsnøkkel",
- "Repeat Recovery key password" : "Gjenta passord for gjenopprettingsnøkkel",
- "Enabled" : "Aktiv",
- "Disabled" : "Inaktiv",
- "Change recovery key password:" : "Endre passord for gjenopprettingsnøkkel:",
- "Old Recovery key password" : "Gammelt passord for gjenopprettingsnøkkel",
- "New Recovery key password" : "Nytt passord for gjenopprettingsnøkkel",
- "Repeat New Recovery key password" : "Gjenta nytt passord for gjenopprettingsnøkkel",
- "Change Password" : "Endre passord",
- "Your private key password no longer matches your log-in password." : "Passordet for din private nøkkel stemmer ikke lenger med påloggingspassordet ditt.",
- "Set your old private key password to your current log-in password:" : "Sett ditt gamle passord for privat nøkkel til ditt nåværende påloggingspassord:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Hvis du ikke husker det gamle passordet ditt kan du spørre administratoren om å gjenopprette filene dine.",
- "Old log-in password" : "Gammelt påloggingspassord",
- "Current log-in password" : "Nåværende påloggingspassord",
- "Update Private Key Password" : "Oppdater passord for privat nøkkel",
- "Enable password recovery:" : "Aktiver gjenoppretting av passord:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Aktivering av dette valget tillater deg å gjenerobre tilgang til dine krypterte filer i tilfelle du mister passordet ditt."
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/nb_NO.json b/apps/files_encryption/l10n/nb_NO.json
deleted file mode 100644
index 3aa4ec9e868..00000000000
--- a/apps/files_encryption/l10n/nb_NO.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Ukjent feil",
- "Missing recovery key password" : "Passord for gjenopprettingsnøkkel mangler",
- "Please repeat the recovery key password" : "Gjenta passord for gjenopprettingsnøkkel",
- "Repeated recovery key password does not match the provided recovery key password" : "Gjentatt passord for gjenopprettingsnøkkel stemmer ikke med oppgitt passord for gjenopprettingsnøkkel",
- "Recovery key successfully enabled" : "Gjenopprettingsnøkkel aktivert",
- "Could not disable recovery key. Please check your recovery key password!" : "Klarte ikke å deaktivere gjenopprettingsnøkkel. Sjekk passordet for gjenopprettingsnøkkelen.",
- "Recovery key successfully disabled" : "Gjenopprettingsnøkkel ble deaktivert",
- "Please provide the old recovery password" : "Oppgi det gamle gjenopprettingspassordet",
- "Please provide a new recovery password" : "Oppgi et nytt gjenopprettingspassord",
- "Please repeat the new recovery password" : "Gjenta det nye gjenopprettingspassordet",
- "Password successfully changed." : "Passordet ble endret.",
- "Could not change the password. Maybe the old password was not correct." : "Klarte ikke å endre passordet. Kanskje gammelt passord ikke var korrekt.",
- "Could not update the private key password." : "Klarte ikke å oppdatere privatnøkkelpassordet.",
- "The old password was not correct, please try again." : "Det gamle passordet var feil. Prøv igjen.",
- "The current log-in password was not correct, please try again." : "Det nåværende innloggingspassordet var feil. Prøv igjen.",
- "Private key password successfully updated." : "Passord for privat nøkkel ble oppdatert.",
- "File recovery settings updated" : "Innstillinger for gjenoppretting av filer ble oppdatert",
- "Could not update file recovery" : "Klarte ikke å oppdatere gjenoppretting av filer",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Krypterings-app ikke initialisert! Kanskje krypterings-appen ble aktivert på nytt i løpet av økten din. Prøv å logge ut og logge inn igjen for å initialisere krypterings-appen.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Din private nøkkel er ikke gyldig! Sannsynligvis ble passordet ditt endret utenfor %s. (f.eks. din bedriftskatalog). Du kan oppdatere passordet for din private nøkkel i dine personlige innstillinger for å gjenvinne tilgang til de krypterte filene dine.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ikke dekryptere denne filen. Dette er sannsynligvis en delt fil. Spør eieren av filen om å dele den med deg på nytt.",
- "Unknown error. Please check your system settings or contact your administrator" : "Ukjent feil. Sjekk systeminnstillingene eller kontakt administratoren.",
- "Initial encryption started... This can take some time. Please wait." : "Førstegangs kryptering startet... Dette kan ta litt tid. Vennligst vent.",
- "Initial encryption running... Please try again later." : "Førstegangs kryptering kjører... Prøv igjen senere.",
- "Missing requirements." : "Manglende krav.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Vennligst se til at OpenSSL sammen med PHP-utvidelsen er aktivert og riktig konfigurert. Krypterings-appen er foreløpig deaktivert.",
- "Following users are not set up for encryption:" : "Følgende brukere er ikke satt opp for kryptering:",
- "Go directly to your %spersonal settings%s." : "GÃ¥ direkte til dine %spersonlige innstillinger%s.",
- "Server-side Encryption" : "Serverkryptering",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "App for kryptering er aktivert men nøklene dine er ikke satt opp. Logg ut og logg inn igjen.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktiver gjenopprettingsnøkkel (tillat å gjenopprette brukerfiler i tilfelle tap av passord):",
- "Recovery key password" : "Passord for gjenopprettingsnøkkel",
- "Repeat Recovery key password" : "Gjenta passord for gjenopprettingsnøkkel",
- "Enabled" : "Aktiv",
- "Disabled" : "Inaktiv",
- "Change recovery key password:" : "Endre passord for gjenopprettingsnøkkel:",
- "Old Recovery key password" : "Gammelt passord for gjenopprettingsnøkkel",
- "New Recovery key password" : "Nytt passord for gjenopprettingsnøkkel",
- "Repeat New Recovery key password" : "Gjenta nytt passord for gjenopprettingsnøkkel",
- "Change Password" : "Endre passord",
- "Your private key password no longer matches your log-in password." : "Passordet for din private nøkkel stemmer ikke lenger med påloggingspassordet ditt.",
- "Set your old private key password to your current log-in password:" : "Sett ditt gamle passord for privat nøkkel til ditt nåværende påloggingspassord:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Hvis du ikke husker det gamle passordet ditt kan du spørre administratoren om å gjenopprette filene dine.",
- "Old log-in password" : "Gammelt påloggingspassord",
- "Current log-in password" : "Nåværende påloggingspassord",
- "Update Private Key Password" : "Oppdater passord for privat nøkkel",
- "Enable password recovery:" : "Aktiver gjenoppretting av passord:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Aktivering av dette valget tillater deg å gjenerobre tilgang til dine krypterte filer i tilfelle du mister passordet ditt."
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/nl.js b/apps/files_encryption/l10n/nl.js
deleted file mode 100644
index 1100abd76fd..00000000000
--- a/apps/files_encryption/l10n/nl.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Onbekende fout",
- "Missing recovery key password" : "Ontbrekende wachtwoord herstelsleutel",
- "Please repeat the recovery key password" : "Herhaal het herstelsleutel wachtwoord",
- "Repeated recovery key password does not match the provided recovery key password" : "Het herhaalde herstelsleutel wachtwoord kwam niet overeen met het eerdere herstelsleutel wachtwoord ",
- "Recovery key successfully enabled" : "Herstelsleutel succesvol geactiveerd",
- "Could not disable recovery key. Please check your recovery key password!" : "Kon herstelsleutel niet deactiveren. Controleer het wachtwoord van uw herstelsleutel!",
- "Recovery key successfully disabled" : "Herstelsleutel succesvol gedeactiveerd",
- "Please provide the old recovery password" : "Geef het oude herstelwachtwoord op",
- "Please provide a new recovery password" : "Geef een nieuw herstelwachtwoord op",
- "Please repeat the new recovery password" : "Herhaal het nieuwe herstelwachtwoord",
- "Password successfully changed." : "Wachtwoord succesvol gewijzigd.",
- "Could not change the password. Maybe the old password was not correct." : "Kon wachtwoord niet wijzigen. Wellicht oude wachtwoord niet juist ingevoerd.",
- "Could not update the private key password." : "Kon het wachtwoord van de privésleutel niet bijwerken.",
- "The old password was not correct, please try again." : "Het oude wachtwoord was onjuist, probeer het opnieuw.",
- "The current log-in password was not correct, please try again." : "Het huidige inlogwachtwoord was niet juist, probeer het opnieuw.",
- "Private key password successfully updated." : "Privésleutel succesvol bijgewerkt.",
- "File recovery settings updated" : "Bestandsherstel instellingen bijgewerkt",
- "Could not update file recovery" : "Kon bestandsherstel niet bijwerken",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Crypto app niet geïnitialiseerd. Misschien werd de crypto app geheractiveerd tijdens de sessie. Log uit en log daarna opnieuw in om de crypto app te initialiseren.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Uw privésleutel is niet geldig! Waarschijnlijk is uw wachtwoord gewijzigd buiten %s (bijv. uw corporate directory). U kunt uw privésleutel wachtwoord in uw persoonlijke instellingen bijwerken om toegang te krijgen tot uw versleutelde bestanden.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan dit bestand niet ontcijferen, waarschijnlijk is het een gedeeld bestand, Vraag de eigenaar om het bestand opnieuw met u te delen.",
- "Unknown error. Please check your system settings or contact your administrator" : "Onbekende fout. Controleer uw systeeminstellingen of neem contact op met de beheerder",
- "Initial encryption started... This can take some time. Please wait." : "initiële versleuteling gestart... Dit kan even duren, geduld a.u.b.",
- "Initial encryption running... Please try again later." : "Initiële versleuteling bezig... Probeer het later opnieuw.",
- "Missing requirements." : "Missende benodigdheden.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Weed er zeker van dat OpenSSL met de PHP extensie is ingeschakeld en goed geconfigureerd. Op dit moment is de encryptie app uitgeschakeld.",
- "Following users are not set up for encryption:" : "De volgende gebruikers hebben geen configuratie voor encryptie:",
- "Go directly to your %spersonal settings%s." : "Ga direct naar uw %spersoonlijke instellingen%s.",
- "Server-side Encryption" : "Server-side versleuteling",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is geactiveerd, maar uw sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Activeren herstelsleutel (maakt het mogelijk om gebruikersbestanden terug te halen in geval van verlies van het wachtwoord):",
- "Recovery key password" : "Wachtwoord herstelsleulel",
- "Repeat Recovery key password" : "Herhaal het herstelsleutel wachtwoord",
- "Enabled" : "Geactiveerd",
- "Disabled" : "Gedeactiveerd",
- "Change recovery key password:" : "Wijzig wachtwoord herstelsleutel:",
- "Old Recovery key password" : "Oude wachtwoord herstelsleutel",
- "New Recovery key password" : "Nieuwe wachtwoord herstelsleutel",
- "Repeat New Recovery key password" : "Herhaal het nieuwe herstelsleutel wachtwoord",
- "Change Password" : "Wijzigen wachtwoord",
- "Your private key password no longer matches your log-in password." : "Het wachtwoord van uw privésleutel komt niet meer overeen met uw inlogwachtwoord.",
- "Set your old private key password to your current log-in password:" : "Stel het wachtwoord van uw oude privésleutel in op uw huidige inlogwachtwoord.",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Als u uw oude wachtwoord niet meer weet, kunt u uw beheerder vragen uw bestanden terug te halen.",
- "Old log-in password" : "Oude wachtwoord",
- "Current log-in password" : "Huidige wachtwoord",
- "Update Private Key Password" : "Bijwerken wachtwoord Privésleutel",
- "Enable password recovery:" : "Activeren wachtwoord herstel:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Het activeren van deze optie maakt het mogelijk om uw versleutelde bestanden te benaderen als uw wachtwoord kwijt is"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/nl.json b/apps/files_encryption/l10n/nl.json
deleted file mode 100644
index dab88f4a2e2..00000000000
--- a/apps/files_encryption/l10n/nl.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Onbekende fout",
- "Missing recovery key password" : "Ontbrekende wachtwoord herstelsleutel",
- "Please repeat the recovery key password" : "Herhaal het herstelsleutel wachtwoord",
- "Repeated recovery key password does not match the provided recovery key password" : "Het herhaalde herstelsleutel wachtwoord kwam niet overeen met het eerdere herstelsleutel wachtwoord ",
- "Recovery key successfully enabled" : "Herstelsleutel succesvol geactiveerd",
- "Could not disable recovery key. Please check your recovery key password!" : "Kon herstelsleutel niet deactiveren. Controleer het wachtwoord van uw herstelsleutel!",
- "Recovery key successfully disabled" : "Herstelsleutel succesvol gedeactiveerd",
- "Please provide the old recovery password" : "Geef het oude herstelwachtwoord op",
- "Please provide a new recovery password" : "Geef een nieuw herstelwachtwoord op",
- "Please repeat the new recovery password" : "Herhaal het nieuwe herstelwachtwoord",
- "Password successfully changed." : "Wachtwoord succesvol gewijzigd.",
- "Could not change the password. Maybe the old password was not correct." : "Kon wachtwoord niet wijzigen. Wellicht oude wachtwoord niet juist ingevoerd.",
- "Could not update the private key password." : "Kon het wachtwoord van de privésleutel niet bijwerken.",
- "The old password was not correct, please try again." : "Het oude wachtwoord was onjuist, probeer het opnieuw.",
- "The current log-in password was not correct, please try again." : "Het huidige inlogwachtwoord was niet juist, probeer het opnieuw.",
- "Private key password successfully updated." : "Privésleutel succesvol bijgewerkt.",
- "File recovery settings updated" : "Bestandsherstel instellingen bijgewerkt",
- "Could not update file recovery" : "Kon bestandsherstel niet bijwerken",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Crypto app niet geïnitialiseerd. Misschien werd de crypto app geheractiveerd tijdens de sessie. Log uit en log daarna opnieuw in om de crypto app te initialiseren.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Uw privésleutel is niet geldig! Waarschijnlijk is uw wachtwoord gewijzigd buiten %s (bijv. uw corporate directory). U kunt uw privésleutel wachtwoord in uw persoonlijke instellingen bijwerken om toegang te krijgen tot uw versleutelde bestanden.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan dit bestand niet ontcijferen, waarschijnlijk is het een gedeeld bestand, Vraag de eigenaar om het bestand opnieuw met u te delen.",
- "Unknown error. Please check your system settings or contact your administrator" : "Onbekende fout. Controleer uw systeeminstellingen of neem contact op met de beheerder",
- "Initial encryption started... This can take some time. Please wait." : "initiële versleuteling gestart... Dit kan even duren, geduld a.u.b.",
- "Initial encryption running... Please try again later." : "Initiële versleuteling bezig... Probeer het later opnieuw.",
- "Missing requirements." : "Missende benodigdheden.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Weed er zeker van dat OpenSSL met de PHP extensie is ingeschakeld en goed geconfigureerd. Op dit moment is de encryptie app uitgeschakeld.",
- "Following users are not set up for encryption:" : "De volgende gebruikers hebben geen configuratie voor encryptie:",
- "Go directly to your %spersonal settings%s." : "Ga direct naar uw %spersoonlijke instellingen%s.",
- "Server-side Encryption" : "Server-side versleuteling",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is geactiveerd, maar uw sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Activeren herstelsleutel (maakt het mogelijk om gebruikersbestanden terug te halen in geval van verlies van het wachtwoord):",
- "Recovery key password" : "Wachtwoord herstelsleulel",
- "Repeat Recovery key password" : "Herhaal het herstelsleutel wachtwoord",
- "Enabled" : "Geactiveerd",
- "Disabled" : "Gedeactiveerd",
- "Change recovery key password:" : "Wijzig wachtwoord herstelsleutel:",
- "Old Recovery key password" : "Oude wachtwoord herstelsleutel",
- "New Recovery key password" : "Nieuwe wachtwoord herstelsleutel",
- "Repeat New Recovery key password" : "Herhaal het nieuwe herstelsleutel wachtwoord",
- "Change Password" : "Wijzigen wachtwoord",
- "Your private key password no longer matches your log-in password." : "Het wachtwoord van uw privésleutel komt niet meer overeen met uw inlogwachtwoord.",
- "Set your old private key password to your current log-in password:" : "Stel het wachtwoord van uw oude privésleutel in op uw huidige inlogwachtwoord.",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Als u uw oude wachtwoord niet meer weet, kunt u uw beheerder vragen uw bestanden terug te halen.",
- "Old log-in password" : "Oude wachtwoord",
- "Current log-in password" : "Huidige wachtwoord",
- "Update Private Key Password" : "Bijwerken wachtwoord Privésleutel",
- "Enable password recovery:" : "Activeren wachtwoord herstel:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Het activeren van deze optie maakt het mogelijk om uw versleutelde bestanden te benaderen als uw wachtwoord kwijt is"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/nn_NO.js b/apps/files_encryption/l10n/nn_NO.js
deleted file mode 100644
index 9cfe232080c..00000000000
--- a/apps/files_encryption/l10n/nn_NO.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Ukjend feil"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/nn_NO.json b/apps/files_encryption/l10n/nn_NO.json
deleted file mode 100644
index 347c2088148..00000000000
--- a/apps/files_encryption/l10n/nn_NO.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "Ukjend feil"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/pa.js b/apps/files_encryption/l10n/pa.js
deleted file mode 100644
index f61063e9459..00000000000
--- a/apps/files_encryption/l10n/pa.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "ਅਣਜਾਣ ਗਲਤੀ"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/pa.json b/apps/files_encryption/l10n/pa.json
deleted file mode 100644
index 41690f3aa32..00000000000
--- a/apps/files_encryption/l10n/pa.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "ਅਣਜਾਣ ਗਲਤੀ"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/pl.js b/apps/files_encryption/l10n/pl.js
deleted file mode 100644
index c53d1e12cc6..00000000000
--- a/apps/files_encryption/l10n/pl.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Nieznany błąd",
- "Missing recovery key password" : "Brakujące hasło klucza odzyskiwania",
- "Please repeat the recovery key password" : "Proszę powtórz nowe hasło klucza odzyskiwania",
- "Repeated recovery key password does not match the provided recovery key password" : "Hasła klucza odzyskiwania nie zgadzają się",
- "Recovery key successfully enabled" : "Klucz odzyskiwania włączony",
- "Could not disable recovery key. Please check your recovery key password!" : "Nie można wyłączyć klucza odzyskiwania. Proszę sprawdzić swoje hasło odzyskiwania!",
- "Recovery key successfully disabled" : "Klucz odzyskiwania wyłączony",
- "Please provide the old recovery password" : "Podaj stare hasło odzyskiwania",
- "Please provide a new recovery password" : "Podaj nowe hasło odzyskiwania",
- "Please repeat the new recovery password" : "Proszę powtórz nowe hasło odzyskiwania",
- "Password successfully changed." : "Zmiana hasła udana.",
- "Could not change the password. Maybe the old password was not correct." : "Nie można zmienić hasła. Może stare hasło nie było poprawne.",
- "Could not update the private key password." : "Nie można zmienić hasła klucza prywatnego.",
- "The old password was not correct, please try again." : "Stare hasło nie było poprawne. Spróbuj jeszcze raz.",
- "The current log-in password was not correct, please try again." : "Obecne hasło logowania nie było poprawne. Spróbuj ponownie.",
- "Private key password successfully updated." : "Pomyślnie zaktualizowano hasło klucza prywatnego.",
- "File recovery settings updated" : "Ustawienia odzyskiwania plików zmienione",
- "Could not update file recovery" : "Nie można zmienić pliku odzyskiwania",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Szyfrowanie aplikacja nie została zainicjowane! Może szyfrowanie aplikacji zostało ponownie włączone podczas tej sesji. Spróbuj się wylogować i zalogować ponownie aby zainicjować szyfrowanie aplikacji.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Klucz prywatny nie jest poprawny! Prawdopodobnie Twoje hasło zostało zmienione poza %s (np. w katalogu firmy). Aby odzyskać dostęp do zaszyfrowanych plików można zaktualizować hasło klucza prywatnego w ustawieniach osobistych.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Nie można odszyfrować tego pliku, prawdopodobnie jest to plik udostępniony. Poproś właściciela pliku o ponowne udostępnianie pliku Tobie.",
- "Unknown error. Please check your system settings or contact your administrator" : "Nieznany błąd. Proszę sprawdzić ustawienia systemowe lub skontaktować się z administratorem",
- "Initial encryption started... This can take some time. Please wait." : "Rozpoczęto szyfrowanie... To może chwilę potrwać. Proszę czekać.",
- "Initial encryption running... Please try again later." : "Trwa szyfrowanie początkowe...Spróbuj ponownie.",
- "Missing requirements." : "Brak wymagań.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Upewnij się, że OpenSSL jest włączony razem z rozszerzeniem PHP i poprawnie skonfigurowany, Obecnie aplikacja szyfrowania została wyłączona.",
- "Following users are not set up for encryption:" : "Następujący użytkownicy nie mają skonfigurowanego szyfrowania:",
- "Go directly to your %spersonal settings%s." : "Przejdź bezpośrednio do %spersonal settings%s.",
- "Server-side Encryption" : "Szyfrowanie po stronie serwera",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikacja szyfrująca jest aktywna, ale twoje klucze nie zostały zainicjowane, prosze wyloguj się i zaloguj ponownie.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Włączhasło klucza odzyskiwania (pozwala odzyskać pliki użytkowników w przypadku utraty hasła):",
- "Recovery key password" : "Hasło klucza odzyskiwania",
- "Repeat Recovery key password" : "Powtórz hasło klucza odzyskiwania",
- "Enabled" : "WÅ‚Ä…czone",
- "Disabled" : "Wyłączone",
- "Change recovery key password:" : "Zmień hasło klucza odzyskiwania",
- "Old Recovery key password" : "Stare hasło klucza odzyskiwania",
- "New Recovery key password" : "Nowe hasło klucza odzyskiwania",
- "Repeat New Recovery key password" : "Powtórz nowe hasło klucza odzyskiwania",
- "Change Password" : "Zmień hasło",
- "Your private key password no longer matches your log-in password." : "Hasło Twojego klucza prywatnego nie pasuje już do Twojego hasła logowania.",
- "Set your old private key password to your current log-in password:" : "Ustaw stare hasło klucza prywatnego na aktualne hasło logowania:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Jeśli nie pamiętasz swojego starego hasła, poproś swojego administratora, aby odzyskać pliki.",
- "Old log-in password" : "Stare hasło logowania",
- "Current log-in password" : "Bieżące hasło logowania",
- "Update Private Key Password" : "Aktualizacja hasła klucza prywatnego",
- "Enable password recovery:" : "Włącz hasło odzyskiwania:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Włączenie tej opcji umożliwia otrzymać dostęp do zaszyfrowanych plików w przypadku utraty hasła"
-},
-"nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/files_encryption/l10n/pl.json b/apps/files_encryption/l10n/pl.json
deleted file mode 100644
index d9d22b2c327..00000000000
--- a/apps/files_encryption/l10n/pl.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Nieznany błąd",
- "Missing recovery key password" : "Brakujące hasło klucza odzyskiwania",
- "Please repeat the recovery key password" : "Proszę powtórz nowe hasło klucza odzyskiwania",
- "Repeated recovery key password does not match the provided recovery key password" : "Hasła klucza odzyskiwania nie zgadzają się",
- "Recovery key successfully enabled" : "Klucz odzyskiwania włączony",
- "Could not disable recovery key. Please check your recovery key password!" : "Nie można wyłączyć klucza odzyskiwania. Proszę sprawdzić swoje hasło odzyskiwania!",
- "Recovery key successfully disabled" : "Klucz odzyskiwania wyłączony",
- "Please provide the old recovery password" : "Podaj stare hasło odzyskiwania",
- "Please provide a new recovery password" : "Podaj nowe hasło odzyskiwania",
- "Please repeat the new recovery password" : "Proszę powtórz nowe hasło odzyskiwania",
- "Password successfully changed." : "Zmiana hasła udana.",
- "Could not change the password. Maybe the old password was not correct." : "Nie można zmienić hasła. Może stare hasło nie było poprawne.",
- "Could not update the private key password." : "Nie można zmienić hasła klucza prywatnego.",
- "The old password was not correct, please try again." : "Stare hasło nie było poprawne. Spróbuj jeszcze raz.",
- "The current log-in password was not correct, please try again." : "Obecne hasło logowania nie było poprawne. Spróbuj ponownie.",
- "Private key password successfully updated." : "Pomyślnie zaktualizowano hasło klucza prywatnego.",
- "File recovery settings updated" : "Ustawienia odzyskiwania plików zmienione",
- "Could not update file recovery" : "Nie można zmienić pliku odzyskiwania",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Szyfrowanie aplikacja nie została zainicjowane! Może szyfrowanie aplikacji zostało ponownie włączone podczas tej sesji. Spróbuj się wylogować i zalogować ponownie aby zainicjować szyfrowanie aplikacji.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Klucz prywatny nie jest poprawny! Prawdopodobnie Twoje hasło zostało zmienione poza %s (np. w katalogu firmy). Aby odzyskać dostęp do zaszyfrowanych plików można zaktualizować hasło klucza prywatnego w ustawieniach osobistych.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Nie można odszyfrować tego pliku, prawdopodobnie jest to plik udostępniony. Poproś właściciela pliku o ponowne udostępnianie pliku Tobie.",
- "Unknown error. Please check your system settings or contact your administrator" : "Nieznany błąd. Proszę sprawdzić ustawienia systemowe lub skontaktować się z administratorem",
- "Initial encryption started... This can take some time. Please wait." : "Rozpoczęto szyfrowanie... To może chwilę potrwać. Proszę czekać.",
- "Initial encryption running... Please try again later." : "Trwa szyfrowanie początkowe...Spróbuj ponownie.",
- "Missing requirements." : "Brak wymagań.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Upewnij się, że OpenSSL jest włączony razem z rozszerzeniem PHP i poprawnie skonfigurowany, Obecnie aplikacja szyfrowania została wyłączona.",
- "Following users are not set up for encryption:" : "Następujący użytkownicy nie mają skonfigurowanego szyfrowania:",
- "Go directly to your %spersonal settings%s." : "Przejdź bezpośrednio do %spersonal settings%s.",
- "Server-side Encryption" : "Szyfrowanie po stronie serwera",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikacja szyfrująca jest aktywna, ale twoje klucze nie zostały zainicjowane, prosze wyloguj się i zaloguj ponownie.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Włączhasło klucza odzyskiwania (pozwala odzyskać pliki użytkowników w przypadku utraty hasła):",
- "Recovery key password" : "Hasło klucza odzyskiwania",
- "Repeat Recovery key password" : "Powtórz hasło klucza odzyskiwania",
- "Enabled" : "WÅ‚Ä…czone",
- "Disabled" : "Wyłączone",
- "Change recovery key password:" : "Zmień hasło klucza odzyskiwania",
- "Old Recovery key password" : "Stare hasło klucza odzyskiwania",
- "New Recovery key password" : "Nowe hasło klucza odzyskiwania",
- "Repeat New Recovery key password" : "Powtórz nowe hasło klucza odzyskiwania",
- "Change Password" : "Zmień hasło",
- "Your private key password no longer matches your log-in password." : "Hasło Twojego klucza prywatnego nie pasuje już do Twojego hasła logowania.",
- "Set your old private key password to your current log-in password:" : "Ustaw stare hasło klucza prywatnego na aktualne hasło logowania:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Jeśli nie pamiętasz swojego starego hasła, poproś swojego administratora, aby odzyskać pliki.",
- "Old log-in password" : "Stare hasło logowania",
- "Current log-in password" : "Bieżące hasło logowania",
- "Update Private Key Password" : "Aktualizacja hasła klucza prywatnego",
- "Enable password recovery:" : "Włącz hasło odzyskiwania:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Włączenie tej opcji umożliwia otrzymać dostęp do zaszyfrowanych plików w przypadku utraty hasła"
-},"pluralForm" :"nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/pt_BR.js b/apps/files_encryption/l10n/pt_BR.js
deleted file mode 100644
index 4dd588929e3..00000000000
--- a/apps/files_encryption/l10n/pt_BR.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Erro desconhecido",
- "Missing recovery key password" : "Senha da chave de recuperação em falta",
- "Please repeat the recovery key password" : "Por favor, repita a senha da chave de recuperação",
- "Repeated recovery key password does not match the provided recovery key password" : "A senha repetidas da chave de valorização não corresponde a senha da chave de recuperação prevista",
- "Recovery key successfully enabled" : "Recuperação de chave habilitada com sucesso",
- "Could not disable recovery key. Please check your recovery key password!" : "Impossível desabilitar recuperação de chave. Por favor verifique sua senha para recuperação de chave!",
- "Recovery key successfully disabled" : "Recuperação de chave desabilitada com sucesso",
- "Please provide the old recovery password" : "Por favor, forneça a antiga senha de recuperação",
- "Please provide a new recovery password" : "Por favor, forneça a nova senha de recuperação",
- "Please repeat the new recovery password" : "Por favor, repita a nova senha de recuperação",
- "Password successfully changed." : "Senha alterada com sucesso.",
- "Could not change the password. Maybe the old password was not correct." : "Não foi possível alterar a senha. Talvez a senha antiga não estava correta.",
- "Could not update the private key password." : "Não foi possível atualizar a senha da chave privada.",
- "The old password was not correct, please try again." : "A senha antiga não estava correta, por favor, tente novamente.",
- "The current log-in password was not correct, please try again." : "A senha atual do log-in não estava correta, por favor, tente novamente.",
- "Private key password successfully updated." : "Senha de chave privada atualizada com sucesso.",
- "File recovery settings updated" : "Configurações de recuperação de arquivo atualizado",
- "Could not update file recovery" : "Não foi possível atualizar a recuperação de arquivos",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Aplicativo de criptografia não foi inicializado! Talvez o aplicativo de criptografia tenha sido reativado durante essa sessão. Por favor, tente fazer logoff e login novamente para inicializar o aplicativo de criptografia.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Sua chave privada não é válida! Provavelmente sua senha foi alterada fora de %s (por exemplo, seu diretório corporativo). Você pode atualizar sua senha de chave privada em suas configurações pessoais para recuperar o acesso a seus arquivos criptografados.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Este arquivo não pode ser decriptado, provavelmente este é um arquivo compartilhado. Poe favoe peça ao dono do arquivo para compartilha-lo com você.",
- "Unknown error. Please check your system settings or contact your administrator" : "Erro desconhecido. Por favor, verifique as configurações do sistema ou entre em contato com o administrador",
- "Initial encryption started... This can take some time. Please wait." : "Criptografia inicial inicializada... Isto pode tomar algum tempo. Por favor espere.",
- "Initial encryption running... Please try again later." : "Criptografia inicial em execução ... Por favor, tente novamente mais tarde.",
- "Missing requirements." : "Requisitos não encontrados.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se de que o OpenSSL em conjunto com a extensão PHP está habilitado e configurado corretamente. Por enquanto, o aplicativo de criptografia foi desativado.",
- "Following users are not set up for encryption:" : "Seguintes usuários não estão configurados para criptografia:",
- "Go directly to your %spersonal settings%s." : "Ir direto para suas %spersonal settings%s.",
- "Server-side Encryption" : "Criptografia do lado do servidor",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "App de criptografia está ativado, mas as chaves não estão inicializadas, por favor log-out e faça login novamente",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar chave de recuperação (permite recuperar arquivos de usuários em caso de perda de senha):",
- "Recovery key password" : "Senha da chave de recuperação",
- "Repeat Recovery key password" : "Repita Recuperação de senha da chave",
- "Enabled" : "Habilitado",
- "Disabled" : "Desabilitado",
- "Change recovery key password:" : "Mudar a senha da chave de recuperação:",
- "Old Recovery key password" : "Senha antiga da chave de recuperação",
- "New Recovery key password" : "Nova senha da chave de recuperação",
- "Repeat New Recovery key password" : "Repita Nova senha da chave de recuperação",
- "Change Password" : "Trocar Senha",
- "Your private key password no longer matches your log-in password." : "A sua senha de chave privada não corresponde a sua senha de login.",
- "Set your old private key password to your current log-in password:" : "Defina a sua antiga senha da chave privada para sua senha de login atual:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Se você não se lembra de sua antiga senha você pode pedir ao administrador que recupere seus arquivos.",
- "Old log-in password" : "Senha antiga de login",
- "Current log-in password" : "Senha de login atual",
- "Update Private Key Password" : "Atualizar Senha de Chave Privada",
- "Enable password recovery:" : "Habilitar recuperação de senha:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Habilitar essa opção vai permitir que você obtenha novamente acesso aos seus arquivos encriptados em caso de perda de senha"
-},
-"nplurals=2; plural=(n > 1);");
diff --git a/apps/files_encryption/l10n/pt_BR.json b/apps/files_encryption/l10n/pt_BR.json
deleted file mode 100644
index 59484331a50..00000000000
--- a/apps/files_encryption/l10n/pt_BR.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Erro desconhecido",
- "Missing recovery key password" : "Senha da chave de recuperação em falta",
- "Please repeat the recovery key password" : "Por favor, repita a senha da chave de recuperação",
- "Repeated recovery key password does not match the provided recovery key password" : "A senha repetidas da chave de valorização não corresponde a senha da chave de recuperação prevista",
- "Recovery key successfully enabled" : "Recuperação de chave habilitada com sucesso",
- "Could not disable recovery key. Please check your recovery key password!" : "Impossível desabilitar recuperação de chave. Por favor verifique sua senha para recuperação de chave!",
- "Recovery key successfully disabled" : "Recuperação de chave desabilitada com sucesso",
- "Please provide the old recovery password" : "Por favor, forneça a antiga senha de recuperação",
- "Please provide a new recovery password" : "Por favor, forneça a nova senha de recuperação",
- "Please repeat the new recovery password" : "Por favor, repita a nova senha de recuperação",
- "Password successfully changed." : "Senha alterada com sucesso.",
- "Could not change the password. Maybe the old password was not correct." : "Não foi possível alterar a senha. Talvez a senha antiga não estava correta.",
- "Could not update the private key password." : "Não foi possível atualizar a senha da chave privada.",
- "The old password was not correct, please try again." : "A senha antiga não estava correta, por favor, tente novamente.",
- "The current log-in password was not correct, please try again." : "A senha atual do log-in não estava correta, por favor, tente novamente.",
- "Private key password successfully updated." : "Senha de chave privada atualizada com sucesso.",
- "File recovery settings updated" : "Configurações de recuperação de arquivo atualizado",
- "Could not update file recovery" : "Não foi possível atualizar a recuperação de arquivos",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Aplicativo de criptografia não foi inicializado! Talvez o aplicativo de criptografia tenha sido reativado durante essa sessão. Por favor, tente fazer logoff e login novamente para inicializar o aplicativo de criptografia.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Sua chave privada não é válida! Provavelmente sua senha foi alterada fora de %s (por exemplo, seu diretório corporativo). Você pode atualizar sua senha de chave privada em suas configurações pessoais para recuperar o acesso a seus arquivos criptografados.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Este arquivo não pode ser decriptado, provavelmente este é um arquivo compartilhado. Poe favoe peça ao dono do arquivo para compartilha-lo com você.",
- "Unknown error. Please check your system settings or contact your administrator" : "Erro desconhecido. Por favor, verifique as configurações do sistema ou entre em contato com o administrador",
- "Initial encryption started... This can take some time. Please wait." : "Criptografia inicial inicializada... Isto pode tomar algum tempo. Por favor espere.",
- "Initial encryption running... Please try again later." : "Criptografia inicial em execução ... Por favor, tente novamente mais tarde.",
- "Missing requirements." : "Requisitos não encontrados.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se de que o OpenSSL em conjunto com a extensão PHP está habilitado e configurado corretamente. Por enquanto, o aplicativo de criptografia foi desativado.",
- "Following users are not set up for encryption:" : "Seguintes usuários não estão configurados para criptografia:",
- "Go directly to your %spersonal settings%s." : "Ir direto para suas %spersonal settings%s.",
- "Server-side Encryption" : "Criptografia do lado do servidor",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "App de criptografia está ativado, mas as chaves não estão inicializadas, por favor log-out e faça login novamente",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar chave de recuperação (permite recuperar arquivos de usuários em caso de perda de senha):",
- "Recovery key password" : "Senha da chave de recuperação",
- "Repeat Recovery key password" : "Repita Recuperação de senha da chave",
- "Enabled" : "Habilitado",
- "Disabled" : "Desabilitado",
- "Change recovery key password:" : "Mudar a senha da chave de recuperação:",
- "Old Recovery key password" : "Senha antiga da chave de recuperação",
- "New Recovery key password" : "Nova senha da chave de recuperação",
- "Repeat New Recovery key password" : "Repita Nova senha da chave de recuperação",
- "Change Password" : "Trocar Senha",
- "Your private key password no longer matches your log-in password." : "A sua senha de chave privada não corresponde a sua senha de login.",
- "Set your old private key password to your current log-in password:" : "Defina a sua antiga senha da chave privada para sua senha de login atual:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Se você não se lembra de sua antiga senha você pode pedir ao administrador que recupere seus arquivos.",
- "Old log-in password" : "Senha antiga de login",
- "Current log-in password" : "Senha de login atual",
- "Update Private Key Password" : "Atualizar Senha de Chave Privada",
- "Enable password recovery:" : "Habilitar recuperação de senha:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Habilitar essa opção vai permitir que você obtenha novamente acesso aos seus arquivos encriptados em caso de perda de senha"
-},"pluralForm" :"nplurals=2; plural=(n > 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/pt_PT.js b/apps/files_encryption/l10n/pt_PT.js
deleted file mode 100644
index 7d392923094..00000000000
--- a/apps/files_encryption/l10n/pt_PT.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Erro desconhecido",
- "Missing recovery key password" : "Senha da chave de recuperação em falta",
- "Please repeat the recovery key password" : "Por favor, insira a contrassenha da chave de recuperação",
- "Repeated recovery key password does not match the provided recovery key password" : "A palavra-passe de recuperação repetida não corresponde à palavra-passe fornecida",
- "Recovery key successfully enabled" : "A chave de recuperação foi ativada com sucesso",
- "Could not disable recovery key. Please check your recovery key password!" : "Não foi possível desativar a chave de recuperação. Por favor, verifique a senha da chave de recuperação.",
- "Recovery key successfully disabled" : "A chave de recuperação foi desativada com sucesso",
- "Please provide the old recovery password" : "Escreva a palavra-passe de recuperação antiga",
- "Please provide a new recovery password" : "Escreva a nova palavra-passe de recuperação",
- "Please repeat the new recovery password" : "Escreva de novo a nova palavra-passe de recuperação",
- "Password successfully changed." : "Palavra-passe alterada com sucesso.",
- "Could not change the password. Maybe the old password was not correct." : "Não foi possível alterar a senha. Possivelmente a senha antiga não está correta.",
- "Could not update the private key password." : "Não foi possível atualizar a senha da chave privada.",
- "The old password was not correct, please try again." : "A senha antiga não estava correta, por favor, tente de novo.",
- "The current log-in password was not correct, please try again." : "A senha de iniciar a sessão atual não estava correta, por favor, tente de novo.",
- "Private key password successfully updated." : "A senha da chave privada foi atualizada com sucesso. ",
- "File recovery settings updated" : "As definições da recuperação de ficheiro foram atualizadas",
- "Could not update file recovery" : "Não foi possível atualizar a recuperação de ficheiro",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "A app de encriptação não foi inicializada! A app de encriptação poderá ter sido reativada durante a sua sessão. Por favor, tente terminar a sessão e iniciá-la de seguida para inicializar a app de encriptação.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "A sua chave privada não é válida! Provavelmente a senha foi alterada fora do %s (ex. a sua diretoria corporativa). Pode atualizar a sua senha da chave privada nas definições pessoais para recuperar o acesso aos seus ficheiros encriptados. ",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Não é possível desencriptar este ficheiro, provavelmente é um ficheiro partilhado. Por favor, peça ao proprietário do ficheiro para voltar a partilhar o ficheiro consigo.",
- "Unknown error. Please check your system settings or contact your administrator" : "Erro desconhecido. Por favor, verifique as configurações do sistema ou entre em contacto com o seu administrador ",
- "Initial encryption started... This can take some time. Please wait." : "A encriptação inicial foi iniciada ... Esta pode demorar algum tempo. Aguarde, por favor.",
- "Initial encryption running... Please try again later." : "A encriptação inicial está em execução ... Por favor, tente de novo mais tarde.",
- "Missing requirements." : "Requisitos em falta.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se de que o OpenSSL, em conjunto com a extensão PHP, está ativado e configurado corretamente. Por agora, a aplicação de encriptação está desactivada.",
- "Following users are not set up for encryption:" : "Os utilizadores seguintes não estão configurados para encriptação:",
- "Go directly to your %spersonal settings%s." : "Ir diretamente para as %sdefinições pessoais%s.",
- "Server-side Encryption" : "Encriptação do lado do Servidor",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "A Aplicação de Encriptação está ativada, mas as suas chaves não inicializaram. Por favor termine e inicie a sessão novamente",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Ativar a chave de recuperação (permite recuperar os ficheiros do utilizador, se perder a senha):",
- "Recovery key password" : "Senha da chave de recuperação",
- "Repeat Recovery key password" : "Contrassenha da chave de recuperação",
- "Enabled" : "Ativada",
- "Disabled" : "Desactivada",
- "Change recovery key password:" : "Alterar a senha da chave de recuperação:",
- "Old Recovery key password" : "Senha da chave de recuperação antiga",
- "New Recovery key password" : "Nova senha da chave de recuperação",
- "Repeat New Recovery key password" : "Contrassenha da nova chave de recuperação",
- "Change Password" : "Alterar a Senha",
- "Your private key password no longer matches your log-in password." : "A Password da sua chave privada não coincide mais com a password do seu login.",
- "Set your old private key password to your current log-in password:" : "Altere a password antiga da chave privada para a nova password do login:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Se não se lembra da senha antiga pode pedir ao administrador para recuperar os seus ficheiros. ",
- "Old log-in password" : "Senha de iniciar sessão antiga",
- "Current log-in password" : "Senha de iniciar sessão atual",
- "Update Private Key Password" : "Atualizar Senha da Chave Privada ",
- "Enable password recovery:" : "Ativar a recuperação da senha:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Ao ativar esta opção, irá poder obter o acesso aos seus ficheiros encriptados, se perder a senha"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/pt_PT.json b/apps/files_encryption/l10n/pt_PT.json
deleted file mode 100644
index 5f7d0a22f34..00000000000
--- a/apps/files_encryption/l10n/pt_PT.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Erro desconhecido",
- "Missing recovery key password" : "Senha da chave de recuperação em falta",
- "Please repeat the recovery key password" : "Por favor, insira a contrassenha da chave de recuperação",
- "Repeated recovery key password does not match the provided recovery key password" : "A palavra-passe de recuperação repetida não corresponde à palavra-passe fornecida",
- "Recovery key successfully enabled" : "A chave de recuperação foi ativada com sucesso",
- "Could not disable recovery key. Please check your recovery key password!" : "Não foi possível desativar a chave de recuperação. Por favor, verifique a senha da chave de recuperação.",
- "Recovery key successfully disabled" : "A chave de recuperação foi desativada com sucesso",
- "Please provide the old recovery password" : "Escreva a palavra-passe de recuperação antiga",
- "Please provide a new recovery password" : "Escreva a nova palavra-passe de recuperação",
- "Please repeat the new recovery password" : "Escreva de novo a nova palavra-passe de recuperação",
- "Password successfully changed." : "Palavra-passe alterada com sucesso.",
- "Could not change the password. Maybe the old password was not correct." : "Não foi possível alterar a senha. Possivelmente a senha antiga não está correta.",
- "Could not update the private key password." : "Não foi possível atualizar a senha da chave privada.",
- "The old password was not correct, please try again." : "A senha antiga não estava correta, por favor, tente de novo.",
- "The current log-in password was not correct, please try again." : "A senha de iniciar a sessão atual não estava correta, por favor, tente de novo.",
- "Private key password successfully updated." : "A senha da chave privada foi atualizada com sucesso. ",
- "File recovery settings updated" : "As definições da recuperação de ficheiro foram atualizadas",
- "Could not update file recovery" : "Não foi possível atualizar a recuperação de ficheiro",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "A app de encriptação não foi inicializada! A app de encriptação poderá ter sido reativada durante a sua sessão. Por favor, tente terminar a sessão e iniciá-la de seguida para inicializar a app de encriptação.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "A sua chave privada não é válida! Provavelmente a senha foi alterada fora do %s (ex. a sua diretoria corporativa). Pode atualizar a sua senha da chave privada nas definições pessoais para recuperar o acesso aos seus ficheiros encriptados. ",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Não é possível desencriptar este ficheiro, provavelmente é um ficheiro partilhado. Por favor, peça ao proprietário do ficheiro para voltar a partilhar o ficheiro consigo.",
- "Unknown error. Please check your system settings or contact your administrator" : "Erro desconhecido. Por favor, verifique as configurações do sistema ou entre em contacto com o seu administrador ",
- "Initial encryption started... This can take some time. Please wait." : "A encriptação inicial foi iniciada ... Esta pode demorar algum tempo. Aguarde, por favor.",
- "Initial encryption running... Please try again later." : "A encriptação inicial está em execução ... Por favor, tente de novo mais tarde.",
- "Missing requirements." : "Requisitos em falta.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se de que o OpenSSL, em conjunto com a extensão PHP, está ativado e configurado corretamente. Por agora, a aplicação de encriptação está desactivada.",
- "Following users are not set up for encryption:" : "Os utilizadores seguintes não estão configurados para encriptação:",
- "Go directly to your %spersonal settings%s." : "Ir diretamente para as %sdefinições pessoais%s.",
- "Server-side Encryption" : "Encriptação do lado do Servidor",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "A Aplicação de Encriptação está ativada, mas as suas chaves não inicializaram. Por favor termine e inicie a sessão novamente",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Ativar a chave de recuperação (permite recuperar os ficheiros do utilizador, se perder a senha):",
- "Recovery key password" : "Senha da chave de recuperação",
- "Repeat Recovery key password" : "Contrassenha da chave de recuperação",
- "Enabled" : "Ativada",
- "Disabled" : "Desactivada",
- "Change recovery key password:" : "Alterar a senha da chave de recuperação:",
- "Old Recovery key password" : "Senha da chave de recuperação antiga",
- "New Recovery key password" : "Nova senha da chave de recuperação",
- "Repeat New Recovery key password" : "Contrassenha da nova chave de recuperação",
- "Change Password" : "Alterar a Senha",
- "Your private key password no longer matches your log-in password." : "A Password da sua chave privada não coincide mais com a password do seu login.",
- "Set your old private key password to your current log-in password:" : "Altere a password antiga da chave privada para a nova password do login:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Se não se lembra da senha antiga pode pedir ao administrador para recuperar os seus ficheiros. ",
- "Old log-in password" : "Senha de iniciar sessão antiga",
- "Current log-in password" : "Senha de iniciar sessão atual",
- "Update Private Key Password" : "Atualizar Senha da Chave Privada ",
- "Enable password recovery:" : "Ativar a recuperação da senha:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Ao ativar esta opção, irá poder obter o acesso aos seus ficheiros encriptados, se perder a senha"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ro.js b/apps/files_encryption/l10n/ro.js
deleted file mode 100644
index 242d7c26ecc..00000000000
--- a/apps/files_encryption/l10n/ro.js
+++ /dev/null
@@ -1,18 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Eroare necunoscută",
- "Recovery key successfully enabled" : "Cheia de recupeare a fost activata cu succes",
- "Could not disable recovery key. Please check your recovery key password!" : "Nu am putut dezactiva cheia de recuperare. Verifica parola de recuperare!",
- "Recovery key successfully disabled" : "Cheia de recuperare dezactivata cu succes",
- "Password successfully changed." : "Parola a fost modificată cu succes.",
- "Could not change the password. Maybe the old password was not correct." : "Parola nu a putut fi schimbata. Poate ca parola veche este incorecta.",
- "Private key password successfully updated." : "Cheia privata a fost actualizata cu succes",
- "File recovery settings updated" : "Setarile pentru recuperarea fisierelor au fost actualizate",
- "Could not update file recovery" : "Nu am putut actualiza recuperarea de fisiere",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplicatia de criptare este activata dar tastatura nu este initializata , va rugam deconectati-va si reconectati-va",
- "Enabled" : "Activat",
- "Disabled" : "Dezactivat",
- "Change Password" : "Schimbă parola"
-},
-"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));");
diff --git a/apps/files_encryption/l10n/ro.json b/apps/files_encryption/l10n/ro.json
deleted file mode 100644
index 950bf395d73..00000000000
--- a/apps/files_encryption/l10n/ro.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{ "translations": {
- "Unknown error" : "Eroare necunoscută",
- "Recovery key successfully enabled" : "Cheia de recupeare a fost activata cu succes",
- "Could not disable recovery key. Please check your recovery key password!" : "Nu am putut dezactiva cheia de recuperare. Verifica parola de recuperare!",
- "Recovery key successfully disabled" : "Cheia de recuperare dezactivata cu succes",
- "Password successfully changed." : "Parola a fost modificată cu succes.",
- "Could not change the password. Maybe the old password was not correct." : "Parola nu a putut fi schimbata. Poate ca parola veche este incorecta.",
- "Private key password successfully updated." : "Cheia privata a fost actualizata cu succes",
- "File recovery settings updated" : "Setarile pentru recuperarea fisierelor au fost actualizate",
- "Could not update file recovery" : "Nu am putut actualiza recuperarea de fisiere",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplicatia de criptare este activata dar tastatura nu este initializata , va rugam deconectati-va si reconectati-va",
- "Enabled" : "Activat",
- "Disabled" : "Dezactivat",
- "Change Password" : "Schimbă parola"
-},"pluralForm" :"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ru.js b/apps/files_encryption/l10n/ru.js
deleted file mode 100644
index bda0d26d80b..00000000000
--- a/apps/files_encryption/l10n/ru.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°",
- "Missing recovery key password" : "ОтÑутÑтвует пароль воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÐºÐ»ÑŽÑ‡Ð°",
- "Please repeat the recovery key password" : "Повторите ввод Ð¿Ð°Ñ€Ð¾Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° воÑÑтановлениÑ",
- "Repeated recovery key password does not match the provided recovery key password" : "Пароль ключа воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¸ повтор Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð½Ðµ Ñовпадают",
- "Recovery key successfully enabled" : "Ключ воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÑƒÑпешно уÑтановлен",
- "Could not disable recovery key. Please check your recovery key password!" : "Ðевозможно выключить ключ воÑÑтановлениÑ. Проверьте правильноÑÑ‚ÑŒ Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð¾Ñ‚ ключа!",
- "Recovery key successfully disabled" : "Ключ воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÑƒÑпешно отключен",
- "Please provide the old recovery password" : "Введите Ñтарый пароль воÑÑтановлениÑ",
- "Please provide a new recovery password" : "Введите новый пароль воÑÑтановлениÑ",
- "Please repeat the new recovery password" : "Повторите новый пароль воÑÑтановлениÑ",
- "Password successfully changed." : "Пароль уÑпешно изменен.",
- "Could not change the password. Maybe the old password was not correct." : "Ðевозможно изменить пароль. Возможно, указанный Ñтарый пароль не верен.",
- "Could not update the private key password." : "Ðевозможно обновить пароль закрытого ключа.",
- "The old password was not correct, please try again." : "Указан неверный Ñтарый пароль, повторите попытку.",
- "The current log-in password was not correct, please try again." : "Текущий пароль Ð´Ð»Ñ ÑƒÑ‡Ñ‘Ñ‚Ð½Ð¾Ð¹ запиÑи введён неверно, пожалуйÑта повторите попытку.",
- "Private key password successfully updated." : "Пароль закрытого ключа уÑпешно обновлён.",
- "File recovery settings updated" : "ÐаÑтройки воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² обновлены",
- "Could not update file recovery" : "Ðевозможно обновить наÑтройки воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Приложение ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ðµ инициализировано! Возможно приложение ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±Ñ‹Ð»Ð¾ выключено и включено Ñнова во Ð²Ñ€ÐµÐ¼Ñ Ð²Ð°ÑˆÐµÐ¹ ÑеÑÑии. Попробуйте выйти и войти Ñнова чтобы инициализировать приложение шифрованиÑ.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Закрытый ключ недейÑтвителен! ВероÑтно, пароль был изменен вне %s (например, корпоративный каталог). Ð’Ñ‹ можете обновить закрытый ключ в личных наÑтройках на Ñтранице воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð¾Ñтупа к зашифрованным файлам. ",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ðе удалоÑÑŒ раÑшифровать файл, возможно Ñто опубликованный файл. ПопроÑите владельца файла повторно открыть к нему доÑтуп.",
- "Unknown error. Please check your system settings or contact your administrator" : "ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°. Проверьте ÑиÑтемные наÑтройки или ÑвÑжитеÑÑŒ Ñ Ð²Ð°ÑˆÐ¸Ð¼ админиÑтратором",
- "Initial encryption started... This can take some time. Please wait." : "Запущено первоначальное шифрование... Это может занÑÑ‚ÑŒ некоторое времÑ. ПожалуйÑта, подождите.",
- "Initial encryption running... Please try again later." : "Работает первоначальное шифрование... ПожалуйÑта, повторите попытку позже.",
- "Missing requirements." : "ОтÑутÑтвуют завиÑимоÑти.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "УбедитеÑÑŒ, что OpenSSL и ÑоответÑтвующее раÑширение PHP включены и правильно наÑтроены. Ðа данный момент приложение ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð²Ñ‹ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¾.",
- "Following users are not set up for encryption:" : "Ð”Ð»Ñ Ñледующих пользователей шифрование не наÑтроено:",
- "Go directly to your %spersonal settings%s." : "Перейти к вашим %sличным наÑтройкам%s.",
- "Server-side Encryption" : "Шифрование на Ñтороне Ñервера",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Приложение ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾, но ваши ключи не инициализированы, выйдите из ÑиÑтемы и войдите заново",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Включить ключ воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ (позволÑет пользователÑм воÑÑтановить файлы при потере паролÑ):",
- "Recovery key password" : "Пароль ключа воÑÑтановлениÑ",
- "Repeat Recovery key password" : "Повторите пароль ключа воÑÑтановлениÑ",
- "Enabled" : "Включено",
- "Disabled" : "Отключено",
- "Change recovery key password:" : "Смена Ð¿Ð°Ñ€Ð¾Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° воÑÑтановлениÑ:",
- "Old Recovery key password" : "Старый пароль ключа воÑÑтановлениÑ",
- "New Recovery key password" : "Ðовый пароль ключа воÑÑтановлениÑ",
- "Repeat New Recovery key password" : "Повторите новый пароль ключа воÑÑтановлениÑ",
- "Change Password" : "Изменить пароль",
- "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." : "ЕÑли вы не помните Ñвой Ñтарый пароль, вы можете попроÑить Ñвоего админиÑтратора воÑÑтановить ваши файлы",
- "Old log-in password" : "Старый пароль учётной запиÑи",
- "Current log-in password" : "Текущий пароль учётной запиÑи",
- "Update Private Key Password" : "Обновить пароль закрытого ключа",
- "Enable password recovery:" : "Включить воÑÑтановление паролÑ:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Включение Ñтой опции позволит вам получить доÑтуп к Ñвоим зашифрованным файлам в Ñлучае утери паролÑ"
-},
-"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/files_encryption/l10n/ru.json b/apps/files_encryption/l10n/ru.json
deleted file mode 100644
index 3fe5bea497a..00000000000
--- a/apps/files_encryption/l10n/ru.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°",
- "Missing recovery key password" : "ОтÑутÑтвует пароль воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÐºÐ»ÑŽÑ‡Ð°",
- "Please repeat the recovery key password" : "Повторите ввод Ð¿Ð°Ñ€Ð¾Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° воÑÑтановлениÑ",
- "Repeated recovery key password does not match the provided recovery key password" : "Пароль ключа воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¸ повтор Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð½Ðµ Ñовпадают",
- "Recovery key successfully enabled" : "Ключ воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÑƒÑпешно уÑтановлен",
- "Could not disable recovery key. Please check your recovery key password!" : "Ðевозможно выключить ключ воÑÑтановлениÑ. Проверьте правильноÑÑ‚ÑŒ Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð¾Ñ‚ ключа!",
- "Recovery key successfully disabled" : "Ключ воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÑƒÑпешно отключен",
- "Please provide the old recovery password" : "Введите Ñтарый пароль воÑÑтановлениÑ",
- "Please provide a new recovery password" : "Введите новый пароль воÑÑтановлениÑ",
- "Please repeat the new recovery password" : "Повторите новый пароль воÑÑтановлениÑ",
- "Password successfully changed." : "Пароль уÑпешно изменен.",
- "Could not change the password. Maybe the old password was not correct." : "Ðевозможно изменить пароль. Возможно, указанный Ñтарый пароль не верен.",
- "Could not update the private key password." : "Ðевозможно обновить пароль закрытого ключа.",
- "The old password was not correct, please try again." : "Указан неверный Ñтарый пароль, повторите попытку.",
- "The current log-in password was not correct, please try again." : "Текущий пароль Ð´Ð»Ñ ÑƒÑ‡Ñ‘Ñ‚Ð½Ð¾Ð¹ запиÑи введён неверно, пожалуйÑта повторите попытку.",
- "Private key password successfully updated." : "Пароль закрытого ключа уÑпешно обновлён.",
- "File recovery settings updated" : "ÐаÑтройки воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² обновлены",
- "Could not update file recovery" : "Ðевозможно обновить наÑтройки воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Приложение ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ðµ инициализировано! Возможно приложение ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±Ñ‹Ð»Ð¾ выключено и включено Ñнова во Ð²Ñ€ÐµÐ¼Ñ Ð²Ð°ÑˆÐµÐ¹ ÑеÑÑии. Попробуйте выйти и войти Ñнова чтобы инициализировать приложение шифрованиÑ.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Закрытый ключ недейÑтвителен! ВероÑтно, пароль был изменен вне %s (например, корпоративный каталог). Ð’Ñ‹ можете обновить закрытый ключ в личных наÑтройках на Ñтранице воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð¾Ñтупа к зашифрованным файлам. ",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ðе удалоÑÑŒ раÑшифровать файл, возможно Ñто опубликованный файл. ПопроÑите владельца файла повторно открыть к нему доÑтуп.",
- "Unknown error. Please check your system settings or contact your administrator" : "ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°. Проверьте ÑиÑтемные наÑтройки или ÑвÑжитеÑÑŒ Ñ Ð²Ð°ÑˆÐ¸Ð¼ админиÑтратором",
- "Initial encryption started... This can take some time. Please wait." : "Запущено первоначальное шифрование... Это может занÑÑ‚ÑŒ некоторое времÑ. ПожалуйÑта, подождите.",
- "Initial encryption running... Please try again later." : "Работает первоначальное шифрование... ПожалуйÑта, повторите попытку позже.",
- "Missing requirements." : "ОтÑутÑтвуют завиÑимоÑти.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "УбедитеÑÑŒ, что OpenSSL и ÑоответÑтвующее раÑширение PHP включены и правильно наÑтроены. Ðа данный момент приложение ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð²Ñ‹ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¾.",
- "Following users are not set up for encryption:" : "Ð”Ð»Ñ Ñледующих пользователей шифрование не наÑтроено:",
- "Go directly to your %spersonal settings%s." : "Перейти к вашим %sличным наÑтройкам%s.",
- "Server-side Encryption" : "Шифрование на Ñтороне Ñервера",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Приложение ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¾, но ваши ключи не инициализированы, выйдите из ÑиÑтемы и войдите заново",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Включить ключ воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ (позволÑет пользователÑм воÑÑтановить файлы при потере паролÑ):",
- "Recovery key password" : "Пароль ключа воÑÑтановлениÑ",
- "Repeat Recovery key password" : "Повторите пароль ключа воÑÑтановлениÑ",
- "Enabled" : "Включено",
- "Disabled" : "Отключено",
- "Change recovery key password:" : "Смена Ð¿Ð°Ñ€Ð¾Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° воÑÑтановлениÑ:",
- "Old Recovery key password" : "Старый пароль ключа воÑÑтановлениÑ",
- "New Recovery key password" : "Ðовый пароль ключа воÑÑтановлениÑ",
- "Repeat New Recovery key password" : "Повторите новый пароль ключа воÑÑтановлениÑ",
- "Change Password" : "Изменить пароль",
- "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." : "ЕÑли вы не помните Ñвой Ñтарый пароль, вы можете попроÑить Ñвоего админиÑтратора воÑÑтановить ваши файлы",
- "Old log-in password" : "Старый пароль учётной запиÑи",
- "Current log-in password" : "Текущий пароль учётной запиÑи",
- "Update Private Key Password" : "Обновить пароль закрытого ключа",
- "Enable password recovery:" : "Включить воÑÑтановление паролÑ:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Включение Ñтой опции позволит вам получить доÑтуп к Ñвоим зашифрованным файлам в Ñлучае утери паролÑ"
-},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/si_LK.js b/apps/files_encryption/l10n/si_LK.js
deleted file mode 100644
index befc19388e0..00000000000
--- a/apps/files_encryption/l10n/si_LK.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Encryption" : "ගුප්ත කේතනය"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/si_LK.json b/apps/files_encryption/l10n/si_LK.json
deleted file mode 100644
index 3c619c7d8c4..00000000000
--- a/apps/files_encryption/l10n/si_LK.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Encryption" : "ගුප්ත කේතනය"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/sk_SK.js b/apps/files_encryption/l10n/sk_SK.js
deleted file mode 100644
index 799a2c1d21f..00000000000
--- a/apps/files_encryption/l10n/sk_SK.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Neznáma chyba",
- "Missing recovery key password" : "Chýba kÄ¾ÃºÄ pre obnovu hesla",
- "Please repeat the recovery key password" : "Prosím zopakujte heslo kľúÄa pre obnovu",
- "Repeated recovery key password does not match the provided recovery key password" : "Zopakované heslo kľúÄa pre obnovenie nesúhlasí zo zadaným heslom",
- "Recovery key successfully enabled" : "Záchranný kÄ¾ÃºÄ bol úspeÅ¡ne povolený",
- "Could not disable recovery key. Please check your recovery key password!" : "Nepodarilo sa zakázaÅ¥ záchranný kľúÄ. Skontrolujte prosím VaÅ¡e heslo záchranného kľúÄa!",
- "Recovery key successfully disabled" : "Záchranný kÄ¾ÃºÄ bol úspeÅ¡ne zakázaný",
- "Please provide the old recovery password" : "Zadajte prosím staré heslo pre obnovenie",
- "Please provide a new recovery password" : "Zadajte prosím nové heslo pre obnovenie",
- "Please repeat the new recovery password" : "Zopakujte prosím nové heslo pre obnovenie",
- "Password successfully changed." : "Heslo úspešne zmenené.",
- "Could not change the password. Maybe the old password was not correct." : "Nemožno zmeniť heslo. Pravdepodobne nebolo staré heslo zadané správne.",
- "Could not update the private key password." : "Nemožno aktualizovaÅ¥ heslo súkromného kľúÄa.",
- "The old password was not correct, please try again." : "Staré heslo nebolo zadané správne, prosím skúste to ešte raz.",
- "The current log-in password was not correct, please try again." : "Toto heslo nebolo správne, prosím skúste to ešte raz.",
- "Private key password successfully updated." : "Heslo súkromného kľúÄa je úspeÅ¡ne aktualizované.",
- "File recovery settings updated" : "Nastavenie obnovy súborov aktualizované",
- "Could not update file recovery" : "Nemožno aktualizovať obnovenie súborov",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Å ifrovacia aplikácia nie je inicializovaná. Je možné, že aplikácia bola znova aktivovaná poÄas vášho prihlasovania. Pokúste sa odhlásiÅ¥ a znova prihlásiÅ¥ pre inicializáciu Å¡ifrovania.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Váš súkromný kÄ¾ÃºÄ nie je platný! Možno bolo vaÅ¡e heslo zmenené mimo %s (napr. firemný prieÄinok). Môžete si aktualizovaÅ¥ heslo svojho ​​súkromného kľúÄa vo vaÅ¡om osobnom nastavení, ak si chcete obnoviÅ¥ prístup k Å¡ifrovaným súborom.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tento súbor sa nepodarilo dešifrovať, pravdepodobne je zdieľaný. Požiadajte majiteľa súboru, aby ho s vami znovu vyzdieľal.",
- "Unknown error. Please check your system settings or contact your administrator" : "Neznáma chyba. Skontrolujte si vaše systémové nastavenia alebo kontaktujte administrátora",
- "Initial encryption started... This can take some time. Please wait." : "PoÄiatoÄné Å¡ifrovanie zapoÄalo ... To môže nejakú dobu trvaÅ¥. ÄŒakajte prosím.",
- "Initial encryption running... Please try again later." : "PoÄiatoÄné Å¡ifrovanie beží... Skúste to neskôr znovu.",
- "Missing requirements." : "Chýbajúce požiadavky.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Uistite sa, že OpenSSL spoloÄne s rozšírením pre PHP je povolené a správne nakonfigurované. V tejto chvíli je Å¡ifrovanie doÄasne vypnuté.",
- "Following users are not set up for encryption:" : "Nasledujúci používatelia nie sú nastavení pre šifrovanie:",
- "Go directly to your %spersonal settings%s." : "Prejsť priamo do svojho %sosobného nastavenia%s.",
- "Server-side Encryption" : "Å ifrovanie na serveri",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikácia na Å¡ifrovanie je zapnutá, ale vaÅ¡e kľúÄe nie sú inicializované. Odhláste sa a znovu sa prihláste.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "PovoliÅ¥ obnovovací kÄ¾ÃºÄ (umožňuje obnoviÅ¥ používateľské súbory v prípade straty hesla):",
- "Recovery key password" : "Heslo obnovovacieho kľúÄa",
- "Repeat Recovery key password" : "Zopakujte heslo kľúÄa pre obnovu",
- "Enabled" : "Povolené",
- "Disabled" : "Zakázané",
- "Change recovery key password:" : "ZmeniÅ¥ heslo obnovovacieho kľúÄa:",
- "Old Recovery key password" : "Staré heslo obnovovacieho kľúÄa",
- "New Recovery key password" : "Nové heslo obnovovacieho kľúÄa",
- "Repeat New Recovery key password" : "Zopakujte nové heslo kľúÄa pre obnovu",
- "Change Password" : "Zmeniť heslo",
- "Your private key password no longer matches your log-in password." : "Heslo vášho súkromného kľúÄa sa nezhoduje v vaÅ¡im prihlasovacím heslom.",
- "Set your old private key password to your current log-in password:" : "Zmeňte si vaÅ¡e staré heslo súkromného kľúÄa na rovnaké, aké je vaÅ¡e aktuálne prihlasovacie heslo:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Ak si nepamätáte svoje staré heslo, môžete požiadať administrátora o obnovenie svojich súborov.",
- "Old log-in password" : "Staré prihlasovacie heslo",
- "Current log-in password" : "SúÄasné prihlasovacie heslo",
- "Update Private Key Password" : "AktualizovaÅ¥ heslo súkromného kľúÄa",
- "Enable password recovery:" : "Povoliť obnovu hesla:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Povolenie Vám umožní znovu získať prístup k Vašim zašifrovaným súborom, ak stratíte heslo"
-},
-"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;");
diff --git a/apps/files_encryption/l10n/sk_SK.json b/apps/files_encryption/l10n/sk_SK.json
deleted file mode 100644
index 08e9d42638f..00000000000
--- a/apps/files_encryption/l10n/sk_SK.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Neznáma chyba",
- "Missing recovery key password" : "Chýba kÄ¾ÃºÄ pre obnovu hesla",
- "Please repeat the recovery key password" : "Prosím zopakujte heslo kľúÄa pre obnovu",
- "Repeated recovery key password does not match the provided recovery key password" : "Zopakované heslo kľúÄa pre obnovenie nesúhlasí zo zadaným heslom",
- "Recovery key successfully enabled" : "Záchranný kÄ¾ÃºÄ bol úspeÅ¡ne povolený",
- "Could not disable recovery key. Please check your recovery key password!" : "Nepodarilo sa zakázaÅ¥ záchranný kľúÄ. Skontrolujte prosím VaÅ¡e heslo záchranného kľúÄa!",
- "Recovery key successfully disabled" : "Záchranný kÄ¾ÃºÄ bol úspeÅ¡ne zakázaný",
- "Please provide the old recovery password" : "Zadajte prosím staré heslo pre obnovenie",
- "Please provide a new recovery password" : "Zadajte prosím nové heslo pre obnovenie",
- "Please repeat the new recovery password" : "Zopakujte prosím nové heslo pre obnovenie",
- "Password successfully changed." : "Heslo úspešne zmenené.",
- "Could not change the password. Maybe the old password was not correct." : "Nemožno zmeniť heslo. Pravdepodobne nebolo staré heslo zadané správne.",
- "Could not update the private key password." : "Nemožno aktualizovaÅ¥ heslo súkromného kľúÄa.",
- "The old password was not correct, please try again." : "Staré heslo nebolo zadané správne, prosím skúste to ešte raz.",
- "The current log-in password was not correct, please try again." : "Toto heslo nebolo správne, prosím skúste to ešte raz.",
- "Private key password successfully updated." : "Heslo súkromného kľúÄa je úspeÅ¡ne aktualizované.",
- "File recovery settings updated" : "Nastavenie obnovy súborov aktualizované",
- "Could not update file recovery" : "Nemožno aktualizovať obnovenie súborov",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Å ifrovacia aplikácia nie je inicializovaná. Je možné, že aplikácia bola znova aktivovaná poÄas vášho prihlasovania. Pokúste sa odhlásiÅ¥ a znova prihlásiÅ¥ pre inicializáciu Å¡ifrovania.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Váš súkromný kÄ¾ÃºÄ nie je platný! Možno bolo vaÅ¡e heslo zmenené mimo %s (napr. firemný prieÄinok). Môžete si aktualizovaÅ¥ heslo svojho ​​súkromného kľúÄa vo vaÅ¡om osobnom nastavení, ak si chcete obnoviÅ¥ prístup k Å¡ifrovaným súborom.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tento súbor sa nepodarilo dešifrovať, pravdepodobne je zdieľaný. Požiadajte majiteľa súboru, aby ho s vami znovu vyzdieľal.",
- "Unknown error. Please check your system settings or contact your administrator" : "Neznáma chyba. Skontrolujte si vaše systémové nastavenia alebo kontaktujte administrátora",
- "Initial encryption started... This can take some time. Please wait." : "PoÄiatoÄné Å¡ifrovanie zapoÄalo ... To môže nejakú dobu trvaÅ¥. ÄŒakajte prosím.",
- "Initial encryption running... Please try again later." : "PoÄiatoÄné Å¡ifrovanie beží... Skúste to neskôr znovu.",
- "Missing requirements." : "Chýbajúce požiadavky.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Uistite sa, že OpenSSL spoloÄne s rozšírením pre PHP je povolené a správne nakonfigurované. V tejto chvíli je Å¡ifrovanie doÄasne vypnuté.",
- "Following users are not set up for encryption:" : "Nasledujúci používatelia nie sú nastavení pre šifrovanie:",
- "Go directly to your %spersonal settings%s." : "Prejsť priamo do svojho %sosobného nastavenia%s.",
- "Server-side Encryption" : "Å ifrovanie na serveri",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikácia na Å¡ifrovanie je zapnutá, ale vaÅ¡e kľúÄe nie sú inicializované. Odhláste sa a znovu sa prihláste.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "PovoliÅ¥ obnovovací kÄ¾ÃºÄ (umožňuje obnoviÅ¥ používateľské súbory v prípade straty hesla):",
- "Recovery key password" : "Heslo obnovovacieho kľúÄa",
- "Repeat Recovery key password" : "Zopakujte heslo kľúÄa pre obnovu",
- "Enabled" : "Povolené",
- "Disabled" : "Zakázané",
- "Change recovery key password:" : "ZmeniÅ¥ heslo obnovovacieho kľúÄa:",
- "Old Recovery key password" : "Staré heslo obnovovacieho kľúÄa",
- "New Recovery key password" : "Nové heslo obnovovacieho kľúÄa",
- "Repeat New Recovery key password" : "Zopakujte nové heslo kľúÄa pre obnovu",
- "Change Password" : "Zmeniť heslo",
- "Your private key password no longer matches your log-in password." : "Heslo vášho súkromného kľúÄa sa nezhoduje v vaÅ¡im prihlasovacím heslom.",
- "Set your old private key password to your current log-in password:" : "Zmeňte si vaÅ¡e staré heslo súkromného kľúÄa na rovnaké, aké je vaÅ¡e aktuálne prihlasovacie heslo:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Ak si nepamätáte svoje staré heslo, môžete požiadať administrátora o obnovenie svojich súborov.",
- "Old log-in password" : "Staré prihlasovacie heslo",
- "Current log-in password" : "SúÄasné prihlasovacie heslo",
- "Update Private Key Password" : "AktualizovaÅ¥ heslo súkromného kľúÄa",
- "Enable password recovery:" : "Povoliť obnovu hesla:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Povolenie Vám umožní znovu získať prístup k Vašim zašifrovaným súborom, ak stratíte heslo"
-},"pluralForm" :"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/sl.js b/apps/files_encryption/l10n/sl.js
deleted file mode 100644
index 529e5652187..00000000000
--- a/apps/files_encryption/l10n/sl.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Neznana napaka",
- "Missing recovery key password" : "Manjka kljuÄ za obnovitev",
- "Please repeat the recovery key password" : "Ponovite vpis kljuÄa za obnovitev",
- "Repeated recovery key password does not match the provided recovery key password" : "Ponovljen vpis kljuÄa za obnovitev ni enak prvemu vpisu tega kljuÄa",
- "Recovery key successfully enabled" : "KljuÄ za obnovitev gesla je uspeÅ¡no nastavljen",
- "Could not disable recovery key. Please check your recovery key password!" : "KljuÄa za obnovitev gesla ni mogoÄe onemogoÄiti. Preverite kljuÄ!",
- "Recovery key successfully disabled" : "KljuÄ za obnovitev gesla je uspeÅ¡no onemogoÄen",
- "Please provide the old recovery password" : "VpiÅ¡ite star kljuÄ za obnovitev",
- "Please provide a new recovery password" : "VpiÅ¡ite nov kljuÄ za obnovitev",
- "Please repeat the new recovery password" : "Ponovno vpiÅ¡ite nov kljuÄ za obnovitev",
- "Password successfully changed." : "Geslo je uspešno spremenjeno.",
- "Could not change the password. Maybe the old password was not correct." : "Gesla ni mogoÄe spremeniti. Morda vnos starega gesla ni pravilen.",
- "Could not update the private key password." : "Ni mogoÄe posodobiti gesla zasebnega kljuÄa.",
- "The old password was not correct, please try again." : "Staro geslo ni vpisana pravilno. Poskusite znova.",
- "The current log-in password was not correct, please try again." : "Trenutno geslo za prijavo ni vpisano pravilno. Poskusite znova.",
- "Private key password successfully updated." : "Zasebni kljuÄ za geslo je uspeÅ¡no posodobljen.",
- "File recovery settings updated" : "Nastavitve obnavljanja dokumentov so posodobljene",
- "Could not update file recovery" : "Nastavitev za obnavljanje dokumentov ni mogoÄe posodobiti",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Program za Å¡ifriranje ni zaÄet. Morda je bil program ponovno omogoÄen Å¡ele med zagonom trenutne seje. Odjavite se in se nato prijavite nazaj. S tem morda razreÅ¡ite napako.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Zasebni kljuÄ ni veljaven. Najverjetneje je bilo geslo spremenjeno izven %s (najverjetneje je to poslovna mapa). Geslo lahko posodobite med osebnimi nastavitvami in s tem obnovite dostop do Å¡ifriranih datotek.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Te datoteke ni mogoÄe Å¡ifrirati, ker je to najverjetneje datoteka v souporabi. Prosite lastnika datoteke, da jo da ponovno v souporabo.",
- "Unknown error. Please check your system settings or contact your administrator" : "Neznana napaka. Preverite nastavitve sistema ali pa stopite v stik s skrbnikom sistema.",
- "Initial encryption started... This can take some time. Please wait." : "ZaÄetno Å¡ifriranje je zaÄeto ... Opravilo je lahko dolgotrajno.",
- "Initial encryption running... Please try again later." : "ZaÄetno Å¡ifriranje je v teku ... Poskusite kasneje.",
- "Missing requirements." : "ManjkajoÄe zahteve",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Preverite, ali je OpenSSL z ustrezno razÅ¡iritvijo PHP omogoÄen in ustrezno nastavljen. Trenutno je Å¡ifriranje onemogoÄeno.",
- "Following users are not set up for encryption:" : "Navedeni uporabniki Å¡e nimajo nastavljenega Å¡ifriranja:",
- "Go directly to your %spersonal settings%s." : "Oglejte si %sosebne nastavitve%s.",
- "Server-side Encryption" : "Strežniško šifriranje",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Program za Å¡ifriranje je omogoÄen, vendar ni zaÄet. Odjavite se in nato ponovno prijavite.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "OmogoÄi kljuÄ za obnovitev datotek (v primeru izgube gesla):",
- "Recovery key password" : "KljuÄ za obnovitev gesla",
- "Repeat Recovery key password" : "Ponovi kljuÄ za obnovitev gesla",
- "Enabled" : "OmogoÄeno",
- "Disabled" : "OnemogoÄeno",
- "Change recovery key password:" : "Spremeni kljuÄ za obnovitev gesla:",
- "Old Recovery key password" : "Stari kljuÄ za obnovitev gesla",
- "New Recovery key password" : "Novi kljuÄ za obnovitev gesla",
- "Repeat New Recovery key password" : "Ponovi novi kljuÄ za obnovitev gesla",
- "Change Password" : "Spremeni geslo",
- "Your private key password no longer matches your log-in password." : "Zasebno geslo ni veÄ skladno s prijavnim geslom.",
- "Set your old private key password to your current log-in password:" : "Nastavite star zasebni kljuÄ na trenutno prijavno geslo:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Če ste pozabili svoje geslo, lahko vaše datoteke obnovi le skrbnik sistema.",
- "Old log-in password" : "Staro geslo",
- "Current log-in password" : "Trenutno geslo",
- "Update Private Key Password" : "Posodobi zasebni kljuÄ",
- "Enable password recovery:" : "OmogoÄi obnovitev gesla:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Nastavitev te možnosti omogoÄa ponovno pridobitev dostopa do Å¡ifriranih datotek, v primeru, da boste geslo pozabili."
-},
-"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);");
diff --git a/apps/files_encryption/l10n/sl.json b/apps/files_encryption/l10n/sl.json
deleted file mode 100644
index 6c3ffd97b89..00000000000
--- a/apps/files_encryption/l10n/sl.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Neznana napaka",
- "Missing recovery key password" : "Manjka kljuÄ za obnovitev",
- "Please repeat the recovery key password" : "Ponovite vpis kljuÄa za obnovitev",
- "Repeated recovery key password does not match the provided recovery key password" : "Ponovljen vpis kljuÄa za obnovitev ni enak prvemu vpisu tega kljuÄa",
- "Recovery key successfully enabled" : "KljuÄ za obnovitev gesla je uspeÅ¡no nastavljen",
- "Could not disable recovery key. Please check your recovery key password!" : "KljuÄa za obnovitev gesla ni mogoÄe onemogoÄiti. Preverite kljuÄ!",
- "Recovery key successfully disabled" : "KljuÄ za obnovitev gesla je uspeÅ¡no onemogoÄen",
- "Please provide the old recovery password" : "VpiÅ¡ite star kljuÄ za obnovitev",
- "Please provide a new recovery password" : "VpiÅ¡ite nov kljuÄ za obnovitev",
- "Please repeat the new recovery password" : "Ponovno vpiÅ¡ite nov kljuÄ za obnovitev",
- "Password successfully changed." : "Geslo je uspešno spremenjeno.",
- "Could not change the password. Maybe the old password was not correct." : "Gesla ni mogoÄe spremeniti. Morda vnos starega gesla ni pravilen.",
- "Could not update the private key password." : "Ni mogoÄe posodobiti gesla zasebnega kljuÄa.",
- "The old password was not correct, please try again." : "Staro geslo ni vpisana pravilno. Poskusite znova.",
- "The current log-in password was not correct, please try again." : "Trenutno geslo za prijavo ni vpisano pravilno. Poskusite znova.",
- "Private key password successfully updated." : "Zasebni kljuÄ za geslo je uspeÅ¡no posodobljen.",
- "File recovery settings updated" : "Nastavitve obnavljanja dokumentov so posodobljene",
- "Could not update file recovery" : "Nastavitev za obnavljanje dokumentov ni mogoÄe posodobiti",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Program za Å¡ifriranje ni zaÄet. Morda je bil program ponovno omogoÄen Å¡ele med zagonom trenutne seje. Odjavite se in se nato prijavite nazaj. S tem morda razreÅ¡ite napako.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Zasebni kljuÄ ni veljaven. Najverjetneje je bilo geslo spremenjeno izven %s (najverjetneje je to poslovna mapa). Geslo lahko posodobite med osebnimi nastavitvami in s tem obnovite dostop do Å¡ifriranih datotek.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Te datoteke ni mogoÄe Å¡ifrirati, ker je to najverjetneje datoteka v souporabi. Prosite lastnika datoteke, da jo da ponovno v souporabo.",
- "Unknown error. Please check your system settings or contact your administrator" : "Neznana napaka. Preverite nastavitve sistema ali pa stopite v stik s skrbnikom sistema.",
- "Initial encryption started... This can take some time. Please wait." : "ZaÄetno Å¡ifriranje je zaÄeto ... Opravilo je lahko dolgotrajno.",
- "Initial encryption running... Please try again later." : "ZaÄetno Å¡ifriranje je v teku ... Poskusite kasneje.",
- "Missing requirements." : "ManjkajoÄe zahteve",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Preverite, ali je OpenSSL z ustrezno razÅ¡iritvijo PHP omogoÄen in ustrezno nastavljen. Trenutno je Å¡ifriranje onemogoÄeno.",
- "Following users are not set up for encryption:" : "Navedeni uporabniki Å¡e nimajo nastavljenega Å¡ifriranja:",
- "Go directly to your %spersonal settings%s." : "Oglejte si %sosebne nastavitve%s.",
- "Server-side Encryption" : "Strežniško šifriranje",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Program za Å¡ifriranje je omogoÄen, vendar ni zaÄet. Odjavite se in nato ponovno prijavite.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "OmogoÄi kljuÄ za obnovitev datotek (v primeru izgube gesla):",
- "Recovery key password" : "KljuÄ za obnovitev gesla",
- "Repeat Recovery key password" : "Ponovi kljuÄ za obnovitev gesla",
- "Enabled" : "OmogoÄeno",
- "Disabled" : "OnemogoÄeno",
- "Change recovery key password:" : "Spremeni kljuÄ za obnovitev gesla:",
- "Old Recovery key password" : "Stari kljuÄ za obnovitev gesla",
- "New Recovery key password" : "Novi kljuÄ za obnovitev gesla",
- "Repeat New Recovery key password" : "Ponovi novi kljuÄ za obnovitev gesla",
- "Change Password" : "Spremeni geslo",
- "Your private key password no longer matches your log-in password." : "Zasebno geslo ni veÄ skladno s prijavnim geslom.",
- "Set your old private key password to your current log-in password:" : "Nastavite star zasebni kljuÄ na trenutno prijavno geslo:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Če ste pozabili svoje geslo, lahko vaše datoteke obnovi le skrbnik sistema.",
- "Old log-in password" : "Staro geslo",
- "Current log-in password" : "Trenutno geslo",
- "Update Private Key Password" : "Posodobi zasebni kljuÄ",
- "Enable password recovery:" : "OmogoÄi obnovitev gesla:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Nastavitev te možnosti omogoÄa ponovno pridobitev dostopa do Å¡ifriranih datotek, v primeru, da boste geslo pozabili."
-},"pluralForm" :"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/sq.js b/apps/files_encryption/l10n/sq.js
deleted file mode 100644
index 61d02be4a15..00000000000
--- a/apps/files_encryption/l10n/sq.js
+++ /dev/null
@@ -1,7 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Gabim panjohur",
- "Enabled" : "Aktivizuar"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/sq.json b/apps/files_encryption/l10n/sq.json
deleted file mode 100644
index 2fd483d1689..00000000000
--- a/apps/files_encryption/l10n/sq.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{ "translations": {
- "Unknown error" : "Gabim panjohur",
- "Enabled" : "Aktivizuar"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/sr.js b/apps/files_encryption/l10n/sr.js
deleted file mode 100644
index dec2970e359..00000000000
--- a/apps/files_encryption/l10n/sr.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Ðепозната грешка",
- "Missing recovery key password" : "ÐедоÑтаје лозинка кључа за опоравак",
- "Please repeat the recovery key password" : "Поновите лозинку кључа за опоравак",
- "Repeated recovery key password does not match the provided recovery key password" : "Поновљена лозинка кључа за опоравак Ñе не поклапа",
- "Recovery key successfully enabled" : "Кључ за опоравак уÑпешно укључен",
- "Could not disable recovery key. Please check your recovery key password!" : "Ðе могу да иÑкључим кључ за опоравак. Проверите лозинку!",
- "Recovery key successfully disabled" : "Кључ за опоравак уÑпешно иÑкључен",
- "Please provide the old recovery password" : "УнеÑите Ñтару лозинку опоравка",
- "Please provide a new recovery password" : "УнеÑите нову лозинку опоравка",
- "Please repeat the new recovery password" : "Поновите нову лозинку опоравка",
- "Password successfully changed." : "Лозинка уÑпешно промењена.",
- "Could not change the password. Maybe the old password was not correct." : "Ðе могу да променим лозинку. Можда Ñтара лозинка није иÑправна.",
- "Could not update the private key password." : "Ðе могу да ажурирам лозинку личног кључа.",
- "The old password was not correct, please try again." : "Стара лозинка није иÑправна. Покушајте поново.",
- "The current log-in password was not correct, please try again." : "Лозинка за пријаву није иÑправна. Покушајте поново.",
- "Private key password successfully updated." : "Лозинка личног кључа је уÑпешно ажурирана.",
- "File recovery settings updated" : "ПоÑтавке опоравка фајла Ñу ажуриране",
- "Could not update file recovery" : "Ðе могу да ажурирам опоравак фајла",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Ðпликација шифровања није иницијализована! Можда је поновно покренута током ÑеÑије. Покушајте да Ñе одјавите па пријавите да Ñе иницијализује поново.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Ваш лични кључ није иÑправан! Вероватно Ñте лозинку променили изван %s (нпр. ваш корпоративни директоријум). Лозинку личног кључа можете ажурирати у личним поÑтавкама да биÑте опоравили приÑтуп вашим шифрованим фајловима.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ðе могу да дешифрујем фајл. Вероватно је то дељен фајл. Затражите од влаÑника фајла да га поново подели Ñа вама.",
- "Unknown error. Please check your system settings or contact your administrator" : "Ðепозната грешка. Проверите поÑтавке вашег ÑиÑтема или контактирајте админиÑтратора.",
- "Initial encryption started... This can take some time. Please wait." : "Почетно шифровање је покренуто... Ово може потрајати. Молим, Ñачекајте.",
- "Initial encryption running... Please try again later." : "Почетно шифровање ради... Покушајте каÑније.",
- "Missing requirements." : "Захтеви ниÑу иÑпуњени.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Проверите да је ОпенССЛ заједно Ñа ПХП проширењем, укључен и пропиÑно подешен. За Ñада, шифровање је иÑкључено.",
- "Following users are not set up for encryption:" : "Следећи кориÑници ниÑу подешени за шифровање:",
- "Go directly to your %spersonal settings%s." : "Идите право на ваше %sличне поÑтавке%s.",
- "Server-side Encryption" : "Шифровање на Ñтрани Ñервера",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Ðпликација шифровања је укључена али ваши кључеви ниÑу иницијализовани. Одјавите Ñе и поново Ñе пријавите.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Омогући кључ за опоравак (омогућава опоравак кориÑничких фајлова у Ñлучају губитка лозинке):",
- "Recovery key password" : "Лозинка кључа за опоравак",
- "Repeat Recovery key password" : "Поновите лозинку кључа за опоравак",
- "Enabled" : "укључено",
- "Disabled" : "иÑкључено",
- "Change recovery key password:" : "Измена лозинке кључа опоравка:",
- "Old Recovery key password" : "Стара лозинка кључа опоравка",
- "New Recovery key password" : "Ðова лозинка кључа опоравка",
- "Repeat New Recovery key password" : "Поновите лозинку кључа опоравка",
- "Change Password" : "Измени лозинку",
- "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." : "Ðко Ñе не Ñећате Ñтаре лозинке, можете затражити од админиÑтратора да опорави ваше фајлове.",
- "Old log-in password" : "Стара лозинка за пријаву",
- "Current log-in password" : "Тренутна лозинка за пријаву",
- "Update Private Key Password" : "Ðжурирај лозинку личног кључа",
- "Enable password recovery:" : "Укључи опоравак лозинке:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Укључивање ове опције омогућиће поновно добијање приÑтупа вашим шифрованим фајловима у Ñлучају губитка лозинке"
-},
-"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/files_encryption/l10n/sr.json b/apps/files_encryption/l10n/sr.json
deleted file mode 100644
index 6c39d417e38..00000000000
--- a/apps/files_encryption/l10n/sr.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Ðепозната грешка",
- "Missing recovery key password" : "ÐедоÑтаје лозинка кључа за опоравак",
- "Please repeat the recovery key password" : "Поновите лозинку кључа за опоравак",
- "Repeated recovery key password does not match the provided recovery key password" : "Поновљена лозинка кључа за опоравак Ñе не поклапа",
- "Recovery key successfully enabled" : "Кључ за опоравак уÑпешно укључен",
- "Could not disable recovery key. Please check your recovery key password!" : "Ðе могу да иÑкључим кључ за опоравак. Проверите лозинку!",
- "Recovery key successfully disabled" : "Кључ за опоравак уÑпешно иÑкључен",
- "Please provide the old recovery password" : "УнеÑите Ñтару лозинку опоравка",
- "Please provide a new recovery password" : "УнеÑите нову лозинку опоравка",
- "Please repeat the new recovery password" : "Поновите нову лозинку опоравка",
- "Password successfully changed." : "Лозинка уÑпешно промењена.",
- "Could not change the password. Maybe the old password was not correct." : "Ðе могу да променим лозинку. Можда Ñтара лозинка није иÑправна.",
- "Could not update the private key password." : "Ðе могу да ажурирам лозинку личног кључа.",
- "The old password was not correct, please try again." : "Стара лозинка није иÑправна. Покушајте поново.",
- "The current log-in password was not correct, please try again." : "Лозинка за пријаву није иÑправна. Покушајте поново.",
- "Private key password successfully updated." : "Лозинка личног кључа је уÑпешно ажурирана.",
- "File recovery settings updated" : "ПоÑтавке опоравка фајла Ñу ажуриране",
- "Could not update file recovery" : "Ðе могу да ажурирам опоравак фајла",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Ðпликација шифровања није иницијализована! Можда је поновно покренута током ÑеÑије. Покушајте да Ñе одјавите па пријавите да Ñе иницијализује поново.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Ваш лични кључ није иÑправан! Вероватно Ñте лозинку променили изван %s (нпр. ваш корпоративни директоријум). Лозинку личног кључа можете ажурирати у личним поÑтавкама да биÑте опоравили приÑтуп вашим шифрованим фајловима.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ðе могу да дешифрујем фајл. Вероватно је то дељен фајл. Затражите од влаÑника фајла да га поново подели Ñа вама.",
- "Unknown error. Please check your system settings or contact your administrator" : "Ðепозната грешка. Проверите поÑтавке вашег ÑиÑтема или контактирајте админиÑтратора.",
- "Initial encryption started... This can take some time. Please wait." : "Почетно шифровање је покренуто... Ово може потрајати. Молим, Ñачекајте.",
- "Initial encryption running... Please try again later." : "Почетно шифровање ради... Покушајте каÑније.",
- "Missing requirements." : "Захтеви ниÑу иÑпуњени.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Проверите да је ОпенССЛ заједно Ñа ПХП проширењем, укључен и пропиÑно подешен. За Ñада, шифровање је иÑкључено.",
- "Following users are not set up for encryption:" : "Следећи кориÑници ниÑу подешени за шифровање:",
- "Go directly to your %spersonal settings%s." : "Идите право на ваше %sличне поÑтавке%s.",
- "Server-side Encryption" : "Шифровање на Ñтрани Ñервера",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Ðпликација шифровања је укључена али ваши кључеви ниÑу иницијализовани. Одјавите Ñе и поново Ñе пријавите.",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Омогући кључ за опоравак (омогућава опоравак кориÑничких фајлова у Ñлучају губитка лозинке):",
- "Recovery key password" : "Лозинка кључа за опоравак",
- "Repeat Recovery key password" : "Поновите лозинку кључа за опоравак",
- "Enabled" : "укључено",
- "Disabled" : "иÑкључено",
- "Change recovery key password:" : "Измена лозинке кључа опоравка:",
- "Old Recovery key password" : "Стара лозинка кључа опоравка",
- "New Recovery key password" : "Ðова лозинка кључа опоравка",
- "Repeat New Recovery key password" : "Поновите лозинку кључа опоравка",
- "Change Password" : "Измени лозинку",
- "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." : "Ðко Ñе не Ñећате Ñтаре лозинке, можете затражити од админиÑтратора да опорави ваше фајлове.",
- "Old log-in password" : "Стара лозинка за пријаву",
- "Current log-in password" : "Тренутна лозинка за пријаву",
- "Update Private Key Password" : "Ðжурирај лозинку личног кључа",
- "Enable password recovery:" : "Укључи опоравак лозинке:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Укључивање ове опције омогућиће поновно добијање приÑтупа вашим шифрованим фајловима у Ñлучају губитка лозинке"
-},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/sr@latin.js b/apps/files_encryption/l10n/sr@latin.js
deleted file mode 100644
index e89299ed05b..00000000000
--- a/apps/files_encryption/l10n/sr@latin.js
+++ /dev/null
@@ -1,8 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Nepoznata greška",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikacija za Å¡ifrovanje je omogućena ali VaÅ¡i kljuÄevi nisu inicijalizovani, molimo Vas da se izlogujete i ulogujete ponovo.",
- "Disabled" : "Onemogućeno"
-},
-"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/files_encryption/l10n/sr@latin.json b/apps/files_encryption/l10n/sr@latin.json
deleted file mode 100644
index 34f0264e031..00000000000
--- a/apps/files_encryption/l10n/sr@latin.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "translations": {
- "Unknown error" : "Nepoznata greška",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikacija za Å¡ifrovanje je omogućena ali VaÅ¡i kljuÄevi nisu inicijalizovani, molimo Vas da se izlogujete i ulogujete ponovo.",
- "Disabled" : "Onemogućeno"
-},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/sv.js b/apps/files_encryption/l10n/sv.js
deleted file mode 100644
index 023fa92d36c..00000000000
--- a/apps/files_encryption/l10n/sv.js
+++ /dev/null
@@ -1,52 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Okänt fel",
- "Missing recovery key password" : "Saknar lösenord för återställningsnyckel",
- "Please repeat the recovery key password" : "Vänligen upprepa lösenordet för återställningsnyckel",
- "Repeated recovery key password does not match the provided recovery key password" : "Det upprepade lösenordet för återställningsnyckeln matchar inte tillhandahållna lösenordet för återställningsnyckeln",
- "Recovery key successfully enabled" : "Återställningsnyckeln har framgångsrikt aktiverats",
- "Could not disable recovery key. Please check your recovery key password!" : "Kunde inte inaktivera återställningsnyckeln. Vänligen kontrollera ditt lösenord för återställningsnyckeln!",
- "Recovery key successfully disabled" : "Återställningsnyckeln har framgångsrikt inaktiverats",
- "Please provide the old recovery password" : "Vänligen tillhandahåll det gamla återställningslösenordet ",
- "Please provide a new recovery password" : "Vänligen tillhandahåll ett nytt återställningslösenord",
- "Please repeat the new recovery password" : "Vänligen upprepa det nya återställningslösenordet",
- "Password successfully changed." : "Ändringen av lösenordet lyckades.",
- "Could not change the password. Maybe the old password was not correct." : "Kunde inte ändra lösenordet. Kanske det gamla lösenordet inte var rätt.",
- "Could not update the private key password." : "Kunde inte uppdatera lösenord för den privata nyckeln",
- "The old password was not correct, please try again." : "Det gamla lösenordet var inte korrekt. Vänligen försök igen.",
- "The current log-in password was not correct, please try again." : "Det nuvarande inloggningslösenordet var inte korrekt. Vänligen försök igen.",
- "Private key password successfully updated." : "Den privata nyckelns lösenord uppdaterades utan problem.",
- "File recovery settings updated" : "Inställningarna för filåterställning har uppdaterats",
- "Could not update file recovery" : "Kunde inte uppdatera filåterställning",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Krypteringsprogrammet kunde inte initieras! Möjligen blev krypteringsprogrammet återaktiverad under din session. Försök med att logga ut och in igen för att initiera krypteringsprogrammet.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Din privata lösenordsnyckel är inte giltig! Troligen har ditt lösenord ändrats utanför %s (t.ex. i företagets katalogtjänst). Du kan uppdatera den privata lösenordsnyckeln under dina personliga inställningar för att återfå tillgång till dina filer.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ej dekryptera denna fil, förmodligen är det en delad fil. Be ägaren av filen att dela den med dig.",
- "Unknown error. Please check your system settings or contact your administrator" : "Okänt fel. Kontrollera dina systeminställningar eller kontakta din administratör",
- "Initial encryption started... This can take some time. Please wait." : "Initiala krypteringen har påbörjats... Detta kan ta lite tid. Var god vänta.",
- "Initial encryption running... Please try again later." : "Initiala krypteringen körs... Var god försök igen senare.",
- "Missing requirements." : "Krav som saknas",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Se till att OpenSSL tillsammans med PHP-tillägget är aktiverat och korrekt konfigurerat. För nu har krypteringsappen inaktiverats.",
- "Following users are not set up for encryption:" : "Följande användare har inte aktiverat kryptering:",
- "Go directly to your %spersonal settings%s." : "Gå direkt till dina %segna inställningar%s.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Krypteringsprogrammet är aktiverat men dina nycklar är inte initierade. Vänligen logga ut och in igen",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktivera återställningsnyckel (för att kunna återfå användarens filer vid glömt eller förlorat lösenord):",
- "Recovery key password" : "Lösenord för återställningsnyckel",
- "Repeat Recovery key password" : "Upprepa återställningsnyckelns lösenord",
- "Enabled" : "Aktiverad",
- "Disabled" : "Inaktiverad",
- "Change recovery key password:" : "Ändra lösenord för återställningsnyckel:",
- "Old Recovery key password" : "Gammalt lösenord för återställningsnyckel",
- "New Recovery key password" : "Nytt lösenord för återställningsnyckel",
- "Repeat New Recovery key password" : "Upprepa lösenord för ny återställningsnyckel",
- "Change Password" : "Byt lösenord",
- "Your private key password no longer matches your log-in password." : "Ditt lösenord för din privata nyckel matchar inte längre ditt inloggningslösenord.",
- "Set your old private key password to your current log-in password:" : "Sätt ditt gamla privatnyckellösenord till ditt aktuella inloggningslösenord:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Om du inte kommer ihåg ditt gamla lösenord kan du be din administratör att återställa dina filer.",
- "Old log-in password" : "Gammalt inloggningslösenord",
- "Current log-in password" : "Nuvarande inloggningslösenord",
- "Update Private Key Password" : "Uppdatera lösenordet för din privata nyckel",
- "Enable password recovery:" : "Aktivera lösenordsåterställning",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Genom att aktivera detta alternativ kommer du kunna återfå tillgång till dina krypterade filer om du skulle förlora/glömma ditt lösenord"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/sv.json b/apps/files_encryption/l10n/sv.json
deleted file mode 100644
index 1d69d8255d8..00000000000
--- a/apps/files_encryption/l10n/sv.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{ "translations": {
- "Unknown error" : "Okänt fel",
- "Missing recovery key password" : "Saknar lösenord för återställningsnyckel",
- "Please repeat the recovery key password" : "Vänligen upprepa lösenordet för återställningsnyckel",
- "Repeated recovery key password does not match the provided recovery key password" : "Det upprepade lösenordet för återställningsnyckeln matchar inte tillhandahållna lösenordet för återställningsnyckeln",
- "Recovery key successfully enabled" : "Återställningsnyckeln har framgångsrikt aktiverats",
- "Could not disable recovery key. Please check your recovery key password!" : "Kunde inte inaktivera återställningsnyckeln. Vänligen kontrollera ditt lösenord för återställningsnyckeln!",
- "Recovery key successfully disabled" : "Återställningsnyckeln har framgångsrikt inaktiverats",
- "Please provide the old recovery password" : "Vänligen tillhandahåll det gamla återställningslösenordet ",
- "Please provide a new recovery password" : "Vänligen tillhandahåll ett nytt återställningslösenord",
- "Please repeat the new recovery password" : "Vänligen upprepa det nya återställningslösenordet",
- "Password successfully changed." : "Ändringen av lösenordet lyckades.",
- "Could not change the password. Maybe the old password was not correct." : "Kunde inte ändra lösenordet. Kanske det gamla lösenordet inte var rätt.",
- "Could not update the private key password." : "Kunde inte uppdatera lösenord för den privata nyckeln",
- "The old password was not correct, please try again." : "Det gamla lösenordet var inte korrekt. Vänligen försök igen.",
- "The current log-in password was not correct, please try again." : "Det nuvarande inloggningslösenordet var inte korrekt. Vänligen försök igen.",
- "Private key password successfully updated." : "Den privata nyckelns lösenord uppdaterades utan problem.",
- "File recovery settings updated" : "Inställningarna för filåterställning har uppdaterats",
- "Could not update file recovery" : "Kunde inte uppdatera filåterställning",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Krypteringsprogrammet kunde inte initieras! Möjligen blev krypteringsprogrammet återaktiverad under din session. Försök med att logga ut och in igen för att initiera krypteringsprogrammet.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Din privata lösenordsnyckel är inte giltig! Troligen har ditt lösenord ändrats utanför %s (t.ex. i företagets katalogtjänst). Du kan uppdatera den privata lösenordsnyckeln under dina personliga inställningar för att återfå tillgång till dina filer.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ej dekryptera denna fil, förmodligen är det en delad fil. Be ägaren av filen att dela den med dig.",
- "Unknown error. Please check your system settings or contact your administrator" : "Okänt fel. Kontrollera dina systeminställningar eller kontakta din administratör",
- "Initial encryption started... This can take some time. Please wait." : "Initiala krypteringen har påbörjats... Detta kan ta lite tid. Var god vänta.",
- "Initial encryption running... Please try again later." : "Initiala krypteringen körs... Var god försök igen senare.",
- "Missing requirements." : "Krav som saknas",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Se till att OpenSSL tillsammans med PHP-tillägget är aktiverat och korrekt konfigurerat. För nu har krypteringsappen inaktiverats.",
- "Following users are not set up for encryption:" : "Följande användare har inte aktiverat kryptering:",
- "Go directly to your %spersonal settings%s." : "Gå direkt till dina %segna inställningar%s.",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Krypteringsprogrammet är aktiverat men dina nycklar är inte initierade. Vänligen logga ut och in igen",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Aktivera återställningsnyckel (för att kunna återfå användarens filer vid glömt eller förlorat lösenord):",
- "Recovery key password" : "Lösenord för återställningsnyckel",
- "Repeat Recovery key password" : "Upprepa återställningsnyckelns lösenord",
- "Enabled" : "Aktiverad",
- "Disabled" : "Inaktiverad",
- "Change recovery key password:" : "Ändra lösenord för återställningsnyckel:",
- "Old Recovery key password" : "Gammalt lösenord för återställningsnyckel",
- "New Recovery key password" : "Nytt lösenord för återställningsnyckel",
- "Repeat New Recovery key password" : "Upprepa lösenord för ny återställningsnyckel",
- "Change Password" : "Byt lösenord",
- "Your private key password no longer matches your log-in password." : "Ditt lösenord för din privata nyckel matchar inte längre ditt inloggningslösenord.",
- "Set your old private key password to your current log-in password:" : "Sätt ditt gamla privatnyckellösenord till ditt aktuella inloggningslösenord:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Om du inte kommer ihåg ditt gamla lösenord kan du be din administratör att återställa dina filer.",
- "Old log-in password" : "Gammalt inloggningslösenord",
- "Current log-in password" : "Nuvarande inloggningslösenord",
- "Update Private Key Password" : "Uppdatera lösenordet för din privata nyckel",
- "Enable password recovery:" : "Aktivera lösenordsåterställning",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Genom att aktivera detta alternativ kommer du kunna återfå tillgång till dina krypterade filer om du skulle förlora/glömma ditt lösenord"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ta_LK.js b/apps/files_encryption/l10n/ta_LK.js
deleted file mode 100644
index e37ff4a78c4..00000000000
--- a/apps/files_encryption/l10n/ta_LK.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Encryption" : "மறைகà¯à®•à¯à®±à®¿à®¯à¯€à®Ÿà¯"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/ta_LK.json b/apps/files_encryption/l10n/ta_LK.json
deleted file mode 100644
index a52ff1c3215..00000000000
--- a/apps/files_encryption/l10n/ta_LK.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Encryption" : "மறைகà¯à®•à¯à®±à®¿à®¯à¯€à®Ÿà¯"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/th_TH.js b/apps/files_encryption/l10n/th_TH.js
deleted file mode 100644
index ce8a64ef9c2..00000000000
--- a/apps/files_encryption/l10n/th_TH.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "ข้อผิดพลาดที่ไม่ทราบสาเหตุ"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/th_TH.json b/apps/files_encryption/l10n/th_TH.json
deleted file mode 100644
index 2f6f34edf72..00000000000
--- a/apps/files_encryption/l10n/th_TH.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "ข้อผิดพลาดที่ไม่ทราบสาเหตุ"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/tr.js b/apps/files_encryption/l10n/tr.js
deleted file mode 100644
index 0ff5a227b54..00000000000
--- a/apps/files_encryption/l10n/tr.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Bilinmeyen hata",
- "Missing recovery key password" : "Eksik kurtarma anahtarı parolası",
- "Please repeat the recovery key password" : "Lütfen kurtarma anahtarı parolasını yenileyin",
- "Repeated recovery key password does not match the provided recovery key password" : "Yenilenen kurtarma anahtarı parolası, belirtilen kurtarma anahtarı parolası ile eşleşmiyor",
- "Recovery key successfully enabled" : "Kurtarma anahtarı başarıyla etkinleştirildi",
- "Could not disable recovery key. Please check your recovery key password!" : "Kurtarma anahtarı devre dışı bırakılamadı. Lütfen kurtarma anahtarı parolanızı kontrol edin!",
- "Recovery key successfully disabled" : "Kurtarma anahtarı başarıyla devre dışı bırakıldı",
- "Please provide the old recovery password" : "Lütfen eski kurtarma parolasını girin",
- "Please provide a new recovery password" : "Lütfen yeni bir kurtarma parolası girin",
- "Please repeat the new recovery password" : "Lütfen yeni kurtarma parolasını yenileyin",
- "Password successfully changed." : "Parola başarıyla değiştirildi.",
- "Could not change the password. Maybe the old password was not correct." : "Parola değiştirilemedi. Eski parolanız doğru olmayabilir.",
- "Could not update the private key password." : "Özel anahtar parolası güncellenemedi",
- "The old password was not correct, please try again." : "Eski parola doğru değil, lütfen yeniden deneyin.",
- "The current log-in password was not correct, please try again." : "Geçerli oturum parolası doğru değil, lütfen yeniden deneyin.",
- "Private key password successfully updated." : "Özel anahtar parolası başarıyla güncellendi.",
- "File recovery settings updated" : "Dosya kurtarma ayarları güncellendi",
- "Could not update file recovery" : "Dosya kurtarma güncellenemedi",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Şifreleme uygulaması başlatılamadı! Oturumunuz sırasında şifreleme uygulaması tekrar etkinleştirilmiş olabilir. Lütfen şifreleme uygulamasını başlatmak için oturumu kapatıp yeniden oturum açmayı deneyin.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Özel anahtarınız geçerli değil! Muhtemelen parolanız %s dışarısında değiştirildi (örn. şirket dizininde). Gizli anahtar parolanızı kişisel ayarlarınızda güncelleyerek şifreli dosyalarınıza erişimi kurtarabilirsiniz.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Bu dosya muhtemelen bir paylaşılan dosya olduğundan şifrelemesi kaldırılamıyor. Lütfen dosyayı sizinle bir daha paylaşması için dosya sahibi ile iletişime geçin.",
- "Unknown error. Please check your system settings or contact your administrator" : "Bilinmeyen hata. Lütfen sistem ayarlarınızı denetleyin veya yöneticiniz ile iletişime geçin",
- "Initial encryption started... This can take some time. Please wait." : "İlk şifreleme başladı... Bu biraz zaman alabilir. Lütfen bekleyin.",
- "Initial encryption running... Please try again later." : "İlk şifreleme çalışıyor... Lütfen daha sonra tekrar deneyin.",
- "Missing requirements." : "Gereklilikler eksik.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "OpenSSL'nin PHP uzantısıyla birlikte etkin ve düzgün yapılandırılmış olduğundan emin olun. Şimdilik şifreleme uygulaması devre dışı bırakıldı.",
- "Following users are not set up for encryption:" : "Aşağıdaki kullanıcılar şifreleme için ayarlanmamış:",
- "Go directly to your %spersonal settings%s." : "Doğrudan %skişisel ayarlarınıza%s gidin.",
- "Server-side Encryption" : "Sunucu Taraflı Şifreleme",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Şifreleme Uygulaması etkin ancak anahtarlarınız başlatılmamış. Lütfen oturumu kapatıp yeniden açın",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Kurtarma anahtarını etkinleştir (parola kaybı durumunda kullanıcı dosyalarının kurtarılmasına izin verir):",
- "Recovery key password" : "Kurtarma anahtarı parolası",
- "Repeat Recovery key password" : "Kurtarma anahtarı parolasını yineleyin",
- "Enabled" : "Etkin",
- "Disabled" : "Devre Dışı",
- "Change recovery key password:" : "Kurtarma anahtarı parolasını değiştir:",
- "Old Recovery key password" : "Eski Kurtarma anahtarı parolası",
- "New Recovery key password" : "Yeni Kurtarma anahtarı parolası",
- "Repeat New Recovery key password" : "Yeni Kurtarma anahtarı parolasını yineleyin",
- "Change Password" : "Parola DeÄŸiÅŸtir",
- "Your private key password no longer matches your log-in password." : "Özel anahtar parolanız artık oturum açma parolanız ile eşleşmiyor.",
- "Set your old private key password to your current log-in password:" : "Eski özel anahtar parolanızı, geçerli oturum açma parolanız olarak ayarlayın:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Eğer eski parolanızı hatırlamıyorsanız, yöneticinizden dosyalarınızı kurtarmasını talep edebilirsiniz.",
- "Old log-in password" : "Eski oturum açma parolası",
- "Current log-in password" : "Geçerli oturum açma parolası",
- "Update Private Key Password" : "Özel Anahtar Parolasını Güncelle",
- "Enable password recovery:" : "Parola kurtarmayı etkinleştir:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Bu seçeneği etkinleştirmek, parola kaybı durumunda şifrelenmiş dosyalarınıza erişimi yeniden kazanmanızı sağlayacaktır"
-},
-"nplurals=2; plural=(n > 1);");
diff --git a/apps/files_encryption/l10n/tr.json b/apps/files_encryption/l10n/tr.json
deleted file mode 100644
index c35db71b49b..00000000000
--- a/apps/files_encryption/l10n/tr.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Bilinmeyen hata",
- "Missing recovery key password" : "Eksik kurtarma anahtarı parolası",
- "Please repeat the recovery key password" : "Lütfen kurtarma anahtarı parolasını yenileyin",
- "Repeated recovery key password does not match the provided recovery key password" : "Yenilenen kurtarma anahtarı parolası, belirtilen kurtarma anahtarı parolası ile eşleşmiyor",
- "Recovery key successfully enabled" : "Kurtarma anahtarı başarıyla etkinleştirildi",
- "Could not disable recovery key. Please check your recovery key password!" : "Kurtarma anahtarı devre dışı bırakılamadı. Lütfen kurtarma anahtarı parolanızı kontrol edin!",
- "Recovery key successfully disabled" : "Kurtarma anahtarı başarıyla devre dışı bırakıldı",
- "Please provide the old recovery password" : "Lütfen eski kurtarma parolasını girin",
- "Please provide a new recovery password" : "Lütfen yeni bir kurtarma parolası girin",
- "Please repeat the new recovery password" : "Lütfen yeni kurtarma parolasını yenileyin",
- "Password successfully changed." : "Parola başarıyla değiştirildi.",
- "Could not change the password. Maybe the old password was not correct." : "Parola değiştirilemedi. Eski parolanız doğru olmayabilir.",
- "Could not update the private key password." : "Özel anahtar parolası güncellenemedi",
- "The old password was not correct, please try again." : "Eski parola doğru değil, lütfen yeniden deneyin.",
- "The current log-in password was not correct, please try again." : "Geçerli oturum parolası doğru değil, lütfen yeniden deneyin.",
- "Private key password successfully updated." : "Özel anahtar parolası başarıyla güncellendi.",
- "File recovery settings updated" : "Dosya kurtarma ayarları güncellendi",
- "Could not update file recovery" : "Dosya kurtarma güncellenemedi",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Şifreleme uygulaması başlatılamadı! Oturumunuz sırasında şifreleme uygulaması tekrar etkinleştirilmiş olabilir. Lütfen şifreleme uygulamasını başlatmak için oturumu kapatıp yeniden oturum açmayı deneyin.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Özel anahtarınız geçerli değil! Muhtemelen parolanız %s dışarısında değiştirildi (örn. şirket dizininde). Gizli anahtar parolanızı kişisel ayarlarınızda güncelleyerek şifreli dosyalarınıza erişimi kurtarabilirsiniz.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Bu dosya muhtemelen bir paylaşılan dosya olduğundan şifrelemesi kaldırılamıyor. Lütfen dosyayı sizinle bir daha paylaşması için dosya sahibi ile iletişime geçin.",
- "Unknown error. Please check your system settings or contact your administrator" : "Bilinmeyen hata. Lütfen sistem ayarlarınızı denetleyin veya yöneticiniz ile iletişime geçin",
- "Initial encryption started... This can take some time. Please wait." : "İlk şifreleme başladı... Bu biraz zaman alabilir. Lütfen bekleyin.",
- "Initial encryption running... Please try again later." : "İlk şifreleme çalışıyor... Lütfen daha sonra tekrar deneyin.",
- "Missing requirements." : "Gereklilikler eksik.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "OpenSSL'nin PHP uzantısıyla birlikte etkin ve düzgün yapılandırılmış olduğundan emin olun. Şimdilik şifreleme uygulaması devre dışı bırakıldı.",
- "Following users are not set up for encryption:" : "Aşağıdaki kullanıcılar şifreleme için ayarlanmamış:",
- "Go directly to your %spersonal settings%s." : "Doğrudan %skişisel ayarlarınıza%s gidin.",
- "Server-side Encryption" : "Sunucu Taraflı Şifreleme",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Şifreleme Uygulaması etkin ancak anahtarlarınız başlatılmamış. Lütfen oturumu kapatıp yeniden açın",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Kurtarma anahtarını etkinleştir (parola kaybı durumunda kullanıcı dosyalarının kurtarılmasına izin verir):",
- "Recovery key password" : "Kurtarma anahtarı parolası",
- "Repeat Recovery key password" : "Kurtarma anahtarı parolasını yineleyin",
- "Enabled" : "Etkin",
- "Disabled" : "Devre Dışı",
- "Change recovery key password:" : "Kurtarma anahtarı parolasını değiştir:",
- "Old Recovery key password" : "Eski Kurtarma anahtarı parolası",
- "New Recovery key password" : "Yeni Kurtarma anahtarı parolası",
- "Repeat New Recovery key password" : "Yeni Kurtarma anahtarı parolasını yineleyin",
- "Change Password" : "Parola DeÄŸiÅŸtir",
- "Your private key password no longer matches your log-in password." : "Özel anahtar parolanız artık oturum açma parolanız ile eşleşmiyor.",
- "Set your old private key password to your current log-in password:" : "Eski özel anahtar parolanızı, geçerli oturum açma parolanız olarak ayarlayın:",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Eğer eski parolanızı hatırlamıyorsanız, yöneticinizden dosyalarınızı kurtarmasını talep edebilirsiniz.",
- "Old log-in password" : "Eski oturum açma parolası",
- "Current log-in password" : "Geçerli oturum açma parolası",
- "Update Private Key Password" : "Özel Anahtar Parolasını Güncelle",
- "Enable password recovery:" : "Parola kurtarmayı etkinleştir:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Bu seçeneği etkinleştirmek, parola kaybı durumunda şifrelenmiş dosyalarınıza erişimi yeniden kazanmanızı sağlayacaktır"
-},"pluralForm" :"nplurals=2; plural=(n > 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ug.js b/apps/files_encryption/l10n/ug.js
deleted file mode 100644
index c712dd03209..00000000000
--- a/apps/files_encryption/l10n/ug.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "يوچۇن خاتالىق"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/ug.json b/apps/files_encryption/l10n/ug.json
deleted file mode 100644
index f42ffe18018..00000000000
--- a/apps/files_encryption/l10n/ug.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "يوچۇن خاتالىق"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/uk.js b/apps/files_encryption/l10n/uk.js
deleted file mode 100644
index a5f70cf8589..00000000000
--- a/apps/files_encryption/l10n/uk.js
+++ /dev/null
@@ -1,53 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Ðевідома помилка",
- "Missing recovery key password" : "ВідÑутній пароль ключа відновленнÑ",
- "Please repeat the recovery key password" : "Введіть ще раз пароль Ð´Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° відновленнÑ",
- "Repeated recovery key password does not match the provided recovery key password" : "Введені паролі ключа Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð½Ðµ Ñпівпадають",
- "Recovery key successfully enabled" : "Ключ Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ñ–Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¾",
- "Could not disable recovery key. Please check your recovery key password!" : "Ðе вдалоÑÑ Ð²Ñ–Ð´ÐºÐ»ÑŽÑ‡Ð¸Ñ‚Ð¸ ключ відновленнÑ. Будь лаÑка, перевірте пароль ключа відновленнÑ!",
- "Recovery key successfully disabled" : "Ключ Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð²Ñ–Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¾",
- "Please provide the old recovery password" : "Будь лаÑка, введіть Ñтарий пароль відновленнÑ",
- "Please provide a new recovery password" : "Будь лаÑка, введіть новий пароль відновленнÑ",
- "Please repeat the new recovery password" : "Будь лаÑка, введіть новий пароль Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ‰Ðµ раз",
- "Password successfully changed." : "Пароль змінено.",
- "Could not change the password. Maybe the old password was not correct." : "Ðе вдалоÑÑ Ð·Ð¼Ñ–Ð½Ð¸Ñ‚Ð¸ пароль. Можливо ви неправильно ввели Ñтарий пароль.",
- "Could not update the private key password." : "Ðе вдалоÑÑ Ð¾Ð½Ð¾Ð²Ð¸Ñ‚Ð¸ пароль Ñекретного ключа.",
- "The old password was not correct, please try again." : "Старий пароль введено не вірно, Ñпробуйте ще раз.",
- "The current log-in password was not correct, please try again." : "Ðевірний пароль входу, будь лаÑка, Ñпробуйте ще раз.",
- "Private key password successfully updated." : "Пароль Ñекретного ключа оновлено.",
- "File recovery settings updated" : "ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð° Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð¾",
- "Could not update file recovery" : "Ðе вдалоÑÑ Ð¾Ð½Ð¾Ð²Ð¸Ñ‚Ð¸ файл Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ ",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Додаток ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð½Ð½Ñ Ð½Ðµ ініціалізовано! Можливо цей додаток редагувавÑÑ Ð¿Ñ–Ð´ Ñ‡Ð°Ñ Ð²Ð°ÑˆÐ¾Ñ— ÑеÑÑ–Ñ—. Будь лаÑка, Ñпробуйте вийти Ñ– зайти знову щоб проініціалізувати додаток шифруваннÑ.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Ваш Ñекретний ключ не дійÑний! Ймовірно ваш пароль був змінений ззовні %s (наприклад, корпоративний каталог). Ви можете оновити Ñекретний ключ в оÑобиÑтих налаштуваннÑÑ… на Ñторінці Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð´Ð¾Ñтупу до зашифрованих файлів.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ðе можу розшифрувати цей файл, можливо він опублікований. Будь лаÑка, попроÑÑ–Ñ‚ÑŒ влаÑника опублікувати його заново.",
- "Unknown error. Please check your system settings or contact your administrator" : "Ðевідома помилка. Будь лаÑка, перевірте Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ ÑиÑтеми або звернітьÑÑ Ð´Ð¾ адмініÑтратора.",
- "Initial encryption started... This can take some time. Please wait." : "Початкове ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‡Ð°Ð»Ð¾ÑÑ... Це може зайнÑти деÑкий чаÑ. Будь лаÑка, почекайте.",
- "Initial encryption running... Please try again later." : "Початкове ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð°Ñ†ÑŽÑ”... Це може зайнÑти деÑкий чаÑ. Будь лаÑка, почекайте.",
- "Missing requirements." : "ВідÑутні вимоги.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Будь лаÑка, переконайтеÑÑ, що OpenSSL разом з розширеннÑм PHP включена Ñ– налаштована належним чином. Ð’ даний чаÑ, ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð¾Ð´Ð°Ñ‚ÐºÑƒ було відключено.",
- "Following users are not set up for encryption:" : "Ð”Ð»Ñ Ð½Ð°Ñтупних кориÑтувачів ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ налаштоване:",
- "Go directly to your %spersonal settings%s." : "Перейти навпроÑтець до ваших %spersonal settings%s.",
- "Server-side Encryption" : "Серверне шіфруваннÑ",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Доданок ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð²Ñ–Ð¼ÐºÐ½ÐµÐ½Ð¾, але ваші ключі не ініціалізовано, вийдіть та зайдіть знову",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Ввімкнути ключ Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ (дозволÑÑ” кориÑтувачам відновлювати файли при втраті паролю):",
- "Recovery key password" : "Пароль ключа відновленнÑ",
- "Repeat Recovery key password" : "Введіть ще раз пароль ключа відновленнÑ",
- "Enabled" : "Увімкнено",
- "Disabled" : "Вимкнено",
- "Change recovery key password:" : "Змінити пароль ключа відновленнÑ:",
- "Old Recovery key password" : "Старий пароль ключа відновленнÑ",
- "New Recovery key password" : "Ðовий пароль ключа відновленнÑ",
- "Repeat New Recovery key password" : "Введіть ще раз новий пароль ключа відновленнÑ",
- "Change Password" : "Змінити Пароль",
- "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." : "Якщо ви не пам'Ñтаєте ваш Ñтарий пароль, ви можете звернутиÑÑ Ð´Ð¾ адмініÑтратора щоб його відновити.",
- "Old log-in password" : "Старий пароль входу",
- "Current log-in password" : "Поточний пароль входу",
- "Update Private Key Password" : "Оновити пароль Ð´Ð»Ñ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ð¾Ð³Ð¾ ключа",
- "Enable password recovery:" : "Ввімкнути Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»ÑŽ:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Ð’ÐºÐ»ÑŽÑ‡ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— опції дозволить вам отримати доÑтуп до Ñвоїх зашифрованих файлів у випадку втрати паролю"
-},
-"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/files_encryption/l10n/uk.json b/apps/files_encryption/l10n/uk.json
deleted file mode 100644
index 69c44021eae..00000000000
--- a/apps/files_encryption/l10n/uk.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{ "translations": {
- "Unknown error" : "Ðевідома помилка",
- "Missing recovery key password" : "ВідÑутній пароль ключа відновленнÑ",
- "Please repeat the recovery key password" : "Введіть ще раз пароль Ð´Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° відновленнÑ",
- "Repeated recovery key password does not match the provided recovery key password" : "Введені паролі ключа Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð½Ðµ Ñпівпадають",
- "Recovery key successfully enabled" : "Ключ Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ñ–Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¾",
- "Could not disable recovery key. Please check your recovery key password!" : "Ðе вдалоÑÑ Ð²Ñ–Ð´ÐºÐ»ÑŽÑ‡Ð¸Ñ‚Ð¸ ключ відновленнÑ. Будь лаÑка, перевірте пароль ключа відновленнÑ!",
- "Recovery key successfully disabled" : "Ключ Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð²Ñ–Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¾",
- "Please provide the old recovery password" : "Будь лаÑка, введіть Ñтарий пароль відновленнÑ",
- "Please provide a new recovery password" : "Будь лаÑка, введіть новий пароль відновленнÑ",
- "Please repeat the new recovery password" : "Будь лаÑка, введіть новий пароль Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ‰Ðµ раз",
- "Password successfully changed." : "Пароль змінено.",
- "Could not change the password. Maybe the old password was not correct." : "Ðе вдалоÑÑ Ð·Ð¼Ñ–Ð½Ð¸Ñ‚Ð¸ пароль. Можливо ви неправильно ввели Ñтарий пароль.",
- "Could not update the private key password." : "Ðе вдалоÑÑ Ð¾Ð½Ð¾Ð²Ð¸Ñ‚Ð¸ пароль Ñекретного ключа.",
- "The old password was not correct, please try again." : "Старий пароль введено не вірно, Ñпробуйте ще раз.",
- "The current log-in password was not correct, please try again." : "Ðевірний пароль входу, будь лаÑка, Ñпробуйте ще раз.",
- "Private key password successfully updated." : "Пароль Ñекретного ключа оновлено.",
- "File recovery settings updated" : "ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð° Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð¾",
- "Could not update file recovery" : "Ðе вдалоÑÑ Ð¾Ð½Ð¾Ð²Ð¸Ñ‚Ð¸ файл Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ ",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "Додаток ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð½Ð½Ñ Ð½Ðµ ініціалізовано! Можливо цей додаток редагувавÑÑ Ð¿Ñ–Ð´ Ñ‡Ð°Ñ Ð²Ð°ÑˆÐ¾Ñ— ÑеÑÑ–Ñ—. Будь лаÑка, Ñпробуйте вийти Ñ– зайти знову щоб проініціалізувати додаток шифруваннÑ.",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Ваш Ñекретний ключ не дійÑний! Ймовірно ваш пароль був змінений ззовні %s (наприклад, корпоративний каталог). Ви можете оновити Ñекретний ключ в оÑобиÑтих налаштуваннÑÑ… на Ñторінці Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð´Ð¾Ñтупу до зашифрованих файлів.",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ðе можу розшифрувати цей файл, можливо він опублікований. Будь лаÑка, попроÑÑ–Ñ‚ÑŒ влаÑника опублікувати його заново.",
- "Unknown error. Please check your system settings or contact your administrator" : "Ðевідома помилка. Будь лаÑка, перевірте Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ ÑиÑтеми або звернітьÑÑ Ð´Ð¾ адмініÑтратора.",
- "Initial encryption started... This can take some time. Please wait." : "Початкове ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‡Ð°Ð»Ð¾ÑÑ... Це може зайнÑти деÑкий чаÑ. Будь лаÑка, почекайте.",
- "Initial encryption running... Please try again later." : "Початкове ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð°Ñ†ÑŽÑ”... Це може зайнÑти деÑкий чаÑ. Будь лаÑка, почекайте.",
- "Missing requirements." : "ВідÑутні вимоги.",
- "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Будь лаÑка, переконайтеÑÑ, що OpenSSL разом з розширеннÑм PHP включена Ñ– налаштована належним чином. Ð’ даний чаÑ, ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð¾Ð´Ð°Ñ‚ÐºÑƒ було відключено.",
- "Following users are not set up for encryption:" : "Ð”Ð»Ñ Ð½Ð°Ñтупних кориÑтувачів ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ налаштоване:",
- "Go directly to your %spersonal settings%s." : "Перейти навпроÑтець до ваших %spersonal settings%s.",
- "Server-side Encryption" : "Серверне шіфруваннÑ",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Доданок ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð²Ñ–Ð¼ÐºÐ½ÐµÐ½Ð¾, але ваші ключі не ініціалізовано, вийдіть та зайдіть знову",
- "Enable recovery key (allow to recover users files in case of password loss):" : "Ввімкнути ключ Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ (дозволÑÑ” кориÑтувачам відновлювати файли при втраті паролю):",
- "Recovery key password" : "Пароль ключа відновленнÑ",
- "Repeat Recovery key password" : "Введіть ще раз пароль ключа відновленнÑ",
- "Enabled" : "Увімкнено",
- "Disabled" : "Вимкнено",
- "Change recovery key password:" : "Змінити пароль ключа відновленнÑ:",
- "Old Recovery key password" : "Старий пароль ключа відновленнÑ",
- "New Recovery key password" : "Ðовий пароль ключа відновленнÑ",
- "Repeat New Recovery key password" : "Введіть ще раз новий пароль ключа відновленнÑ",
- "Change Password" : "Змінити Пароль",
- "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." : "Якщо ви не пам'Ñтаєте ваш Ñтарий пароль, ви можете звернутиÑÑ Ð´Ð¾ адмініÑтратора щоб його відновити.",
- "Old log-in password" : "Старий пароль входу",
- "Current log-in password" : "Поточний пароль входу",
- "Update Private Key Password" : "Оновити пароль Ð´Ð»Ñ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ð¾Ð³Ð¾ ключа",
- "Enable password recovery:" : "Ввімкнути Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»ÑŽ:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Ð’ÐºÐ»ÑŽÑ‡ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— опції дозволить вам отримати доÑтуп до Ñвоїх зашифрованих файлів у випадку втрати паролю"
-},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/ur_PK.js b/apps/files_encryption/l10n/ur_PK.js
deleted file mode 100644
index f2fd4d3419d..00000000000
--- a/apps/files_encryption/l10n/ur_PK.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "غیر معرو٠خرابی"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_encryption/l10n/ur_PK.json b/apps/files_encryption/l10n/ur_PK.json
deleted file mode 100644
index 7d7738b3811..00000000000
--- a/apps/files_encryption/l10n/ur_PK.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Unknown error" : "غیر معرو٠خرابی"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/vi.js b/apps/files_encryption/l10n/vi.js
deleted file mode 100644
index 5b660cbf5b8..00000000000
--- a/apps/files_encryption/l10n/vi.js
+++ /dev/null
@@ -1,24 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "Lỗi chưa biết",
- "Recovery key successfully enabled" : "Khóa khôi phục kích hoạt thành công",
- "Could not disable recovery key. Please check your recovery key password!" : "Không thể vô hiệu hóa khóa khôi phục. Vui lòng kiểm tra mật khẩu khóa khôi phục!",
- "Recovery key successfully disabled" : "Vô hiệu hóa khóa khôi phục thành công",
- "Password successfully changed." : "Äã đổi mật khẩu.",
- "Could not change the password. Maybe the old password was not correct." : "Không thể đổi mật khẩu. Có lẽ do mật khẩu cũ không đúng.",
- "Private key password successfully updated." : "Cập nhật thành công mật khẩu khóa cá nhân",
- "File recovery settings updated" : "Äã cập nhật thiết lập khôi phục tập tin ",
- "Could not update file recovery" : "Không thể cập nhật khôi phục tập tin",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Ứng dụng mã hóa đã được kích hoạt nhưng bạn chưa khởi tạo khóa. Vui lòng đăng xuất ra và đăng nhập lại",
- "Enabled" : "Bật",
- "Disabled" : "Tắt",
- "Change Password" : "Äổi Mật khẩu",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Nếu bạn không nhớ mật khẩu cũ, bạn có thể yêu cầu quản trị viên khôi phục tập tin của bạn.",
- "Old log-in password" : "Mật khẩu đăng nhập cũ",
- "Current log-in password" : "Mật khẩu đăng nhập hiện tại",
- "Update Private Key Password" : "Cập nhật mật khẩu khóa cá nhân",
- "Enable password recovery:" : "Kích hoạt khôi phục mật khẩu:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Tùy chá»n này sẽ cho phép bạn tái truy cập đến các tập tin mã hóa trong trÆ°á»ng hợp mất mật khẩu"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/vi.json b/apps/files_encryption/l10n/vi.json
deleted file mode 100644
index 85c2f363664..00000000000
--- a/apps/files_encryption/l10n/vi.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{ "translations": {
- "Unknown error" : "Lỗi chưa biết",
- "Recovery key successfully enabled" : "Khóa khôi phục kích hoạt thành công",
- "Could not disable recovery key. Please check your recovery key password!" : "Không thể vô hiệu hóa khóa khôi phục. Vui lòng kiểm tra mật khẩu khóa khôi phục!",
- "Recovery key successfully disabled" : "Vô hiệu hóa khóa khôi phục thành công",
- "Password successfully changed." : "Äã đổi mật khẩu.",
- "Could not change the password. Maybe the old password was not correct." : "Không thể đổi mật khẩu. Có lẽ do mật khẩu cũ không đúng.",
- "Private key password successfully updated." : "Cập nhật thành công mật khẩu khóa cá nhân",
- "File recovery settings updated" : "Äã cập nhật thiết lập khôi phục tập tin ",
- "Could not update file recovery" : "Không thể cập nhật khôi phục tập tin",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Ứng dụng mã hóa đã được kích hoạt nhưng bạn chưa khởi tạo khóa. Vui lòng đăng xuất ra và đăng nhập lại",
- "Enabled" : "Bật",
- "Disabled" : "Tắt",
- "Change Password" : "Äổi Mật khẩu",
- " If you don't remember your old password you can ask your administrator to recover your files." : "Nếu bạn không nhớ mật khẩu cũ, bạn có thể yêu cầu quản trị viên khôi phục tập tin của bạn.",
- "Old log-in password" : "Mật khẩu đăng nhập cũ",
- "Current log-in password" : "Mật khẩu đăng nhập hiện tại",
- "Update Private Key Password" : "Cập nhật mật khẩu khóa cá nhân",
- "Enable password recovery:" : "Kích hoạt khôi phục mật khẩu:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Tùy chá»n này sẽ cho phép bạn tái truy cập đến các tập tin mã hóa trong trÆ°á»ng hợp mất mật khẩu"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/zh_CN.js b/apps/files_encryption/l10n/zh_CN.js
deleted file mode 100644
index f6038cc6fdf..00000000000
--- a/apps/files_encryption/l10n/zh_CN.js
+++ /dev/null
@@ -1,48 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "未知错误",
- "Missing recovery key password" : "丢失的回å¤å¯†é’¥",
- "Please repeat the recovery key password" : "请替æ¢æ¢å¤å¯†é’¥",
- "Recovery key successfully enabled" : "æ¢å¤å¯†é’¥æˆåŠŸå¯ç”¨",
- "Could not disable recovery key. Please check your recovery key password!" : "ä¸èƒ½ç¦ç”¨æ¢å¤å¯†é’¥ã€‚请检查æ¢å¤å¯†é’¥å¯†ç ï¼",
- "Recovery key successfully disabled" : "æ¢å¤å¯†é’¥æˆåŠŸç¦ç”¨",
- "Please provide the old recovery password" : "请æ供原æ¥çš„æ¢å¤å¯†ç ",
- "Please provide a new recovery password" : "请æ供一个新的æ¢å¤å¯†ç ",
- "Please repeat the new recovery password" : "请替æ¢æ–°çš„æ¢å¤å¯†ç ",
- "Password successfully changed." : "密ç ä¿®æ”¹æˆåŠŸã€‚",
- "Could not change the password. Maybe the old password was not correct." : "ä¸èƒ½ä¿®æ”¹å¯†ç ã€‚旧密ç å¯èƒ½ä¸æ­£ç¡®ã€‚",
- "Could not update the private key password." : "ä¸èƒ½æ›´æ–°ç§æœ‰å¯†é’¥ã€‚",
- "The old password was not correct, please try again." : "原始密ç é”™è¯¯ï¼Œè¯·é‡è¯•ã€‚",
- "Private key password successfully updated." : "ç§é’¥å¯†ç æˆåŠŸæ›´æ–°ã€‚",
- "File recovery settings updated" : "文件æ¢å¤è®¾ç½®å·²æ›´æ–°",
- "Could not update file recovery" : "ä¸èƒ½æ›´æ–°æ–‡ä»¶æ¢å¤",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "加密应用还没有åˆå§‹åŒ–ï¼å¯èƒ½åŠ å¯†åº”用在你会è¯æœŸé—´å·²è¢«é‡æ–°å¯ç”¨ã€‚请注销并é‡æ–°ç™»å½•ï¼Œä»¥åˆå§‹åŒ–加密应用。",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "您的ç§æœ‰å¯†é’¥æ— æ•ˆï¼ä¹Ÿè®¸æ˜¯æ‚¨åœ¨ %s å¤–æ›´æ”¹äº†å¯†ç  (比如,在您的公å¸ç›®å½•)。您å¯ä»¥åœ¨ä¸ªäººè®¾ç½®é‡Œæ›´æ–°æ‚¨çš„ç§é’¥å¯†ç æ¥æ¢å¤è®¿é—®ä½ çš„加密文件。",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : " 无法解密这个文件(或许这是一个共享文件?),请询问文件所有者é‡æ–°ä¸Žæ‚¨åˆ†äº«è¿™ä¸ªæ–‡ä»¶ã€‚",
- "Unknown error. Please check your system settings or contact your administrator" : "未知错误。请检查系统设置或è”系您的管ç†å‘˜",
- "Initial encryption started... This can take some time. Please wait." : "åˆå§‹åŠ å¯†å¯åŠ¨ä¸­....è¿™å¯èƒ½ä¼šèŠ±ä¸€äº›æ—¶é—´ï¼Œè¯·ç¨åŽå†è¯•ã€‚",
- "Initial encryption running... Please try again later." : "åˆå§‹åŠ å¯†è¿è¡Œä¸­....请ç¨åŽå†è¯•ã€‚",
- "Missing requirements." : "必填项未填写。",
- "Following users are not set up for encryption:" : "以下用户还没有设置加密:",
- "Go directly to your %spersonal settings%s." : "直接访问您的%s个人设置%s。",
- "Server-side Encryption" : "æœåŠ¡å™¨ç«¯åŠ å¯†",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "加密应用被å¯ç”¨äº†ï¼Œä½†æ˜¯ä½ çš„加密密钥没有åˆå§‹åŒ–,请é‡æ–°ç™»å‡ºç™»å½•ç³»ç»Ÿä¸€æ¬¡ã€‚",
- "Enable recovery key (allow to recover users files in case of password loss):" : "å¯ç”¨æ¢å¤å¯†é’¥ï¼ˆå…许你在密ç ä¸¢å¤±åŽæ¢å¤æ–‡ä»¶ï¼‰ï¼š",
- "Recovery key password" : "æ¢å¤å¯†é’¥å¯†ç ",
- "Repeat Recovery key password" : "é‡å¤æ¢å¤å¯†é’¥å¯†ç ",
- "Enabled" : "å¼€å¯",
- "Disabled" : "ç¦ç”¨",
- "Change recovery key password:" : "更改æ¢å¤å¯†é’¥å¯†ç ",
- "Old Recovery key password" : "旧的æ¢å¤å¯†é’¥å¯†ç ",
- "New Recovery key password" : "æ–°çš„æ¢å¤å¯†é’¥å¯†ç ",
- "Repeat New Recovery key password" : "é‡å¤æ–°çš„密钥æ¢å¤å¯†ç ",
- "Change Password" : "修改密ç ",
- " If you don't remember your old password you can ask your administrator to recover your files." : "如果您记ä¸ä½æ—§çš„密ç ï¼Œæ‚¨å¯ä»¥è¯·æ±‚管ç†å‘˜æ¢å¤æ‚¨çš„文件。",
- "Old log-in password" : "旧登录密ç ",
- "Current log-in password" : "当å‰ç™»å½•å¯†ç ",
- "Update Private Key Password" : "æ›´æ–°ç§é’¥å¯†ç ",
- "Enable password recovery:" : "å¯ç”¨å¯†ç æ¢å¤ï¼š",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "å¯ç”¨è¯¥é¡¹å°†å…许你在密ç ä¸¢å¤±åŽå–回您的加密文件"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/zh_CN.json b/apps/files_encryption/l10n/zh_CN.json
deleted file mode 100644
index 0a98a5d858b..00000000000
--- a/apps/files_encryption/l10n/zh_CN.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{ "translations": {
- "Unknown error" : "未知错误",
- "Missing recovery key password" : "丢失的回å¤å¯†é’¥",
- "Please repeat the recovery key password" : "请替æ¢æ¢å¤å¯†é’¥",
- "Recovery key successfully enabled" : "æ¢å¤å¯†é’¥æˆåŠŸå¯ç”¨",
- "Could not disable recovery key. Please check your recovery key password!" : "ä¸èƒ½ç¦ç”¨æ¢å¤å¯†é’¥ã€‚请检查æ¢å¤å¯†é’¥å¯†ç ï¼",
- "Recovery key successfully disabled" : "æ¢å¤å¯†é’¥æˆåŠŸç¦ç”¨",
- "Please provide the old recovery password" : "请æ供原æ¥çš„æ¢å¤å¯†ç ",
- "Please provide a new recovery password" : "请æ供一个新的æ¢å¤å¯†ç ",
- "Please repeat the new recovery password" : "请替æ¢æ–°çš„æ¢å¤å¯†ç ",
- "Password successfully changed." : "密ç ä¿®æ”¹æˆåŠŸã€‚",
- "Could not change the password. Maybe the old password was not correct." : "ä¸èƒ½ä¿®æ”¹å¯†ç ã€‚旧密ç å¯èƒ½ä¸æ­£ç¡®ã€‚",
- "Could not update the private key password." : "ä¸èƒ½æ›´æ–°ç§æœ‰å¯†é’¥ã€‚",
- "The old password was not correct, please try again." : "原始密ç é”™è¯¯ï¼Œè¯·é‡è¯•ã€‚",
- "Private key password successfully updated." : "ç§é’¥å¯†ç æˆåŠŸæ›´æ–°ã€‚",
- "File recovery settings updated" : "文件æ¢å¤è®¾ç½®å·²æ›´æ–°",
- "Could not update file recovery" : "ä¸èƒ½æ›´æ–°æ–‡ä»¶æ¢å¤",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "加密应用还没有åˆå§‹åŒ–ï¼å¯èƒ½åŠ å¯†åº”用在你会è¯æœŸé—´å·²è¢«é‡æ–°å¯ç”¨ã€‚请注销并é‡æ–°ç™»å½•ï¼Œä»¥åˆå§‹åŒ–加密应用。",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "您的ç§æœ‰å¯†é’¥æ— æ•ˆï¼ä¹Ÿè®¸æ˜¯æ‚¨åœ¨ %s å¤–æ›´æ”¹äº†å¯†ç  (比如,在您的公å¸ç›®å½•)。您å¯ä»¥åœ¨ä¸ªäººè®¾ç½®é‡Œæ›´æ–°æ‚¨çš„ç§é’¥å¯†ç æ¥æ¢å¤è®¿é—®ä½ çš„加密文件。",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : " 无法解密这个文件(或许这是一个共享文件?),请询问文件所有者é‡æ–°ä¸Žæ‚¨åˆ†äº«è¿™ä¸ªæ–‡ä»¶ã€‚",
- "Unknown error. Please check your system settings or contact your administrator" : "未知错误。请检查系统设置或è”系您的管ç†å‘˜",
- "Initial encryption started... This can take some time. Please wait." : "åˆå§‹åŠ å¯†å¯åŠ¨ä¸­....è¿™å¯èƒ½ä¼šèŠ±ä¸€äº›æ—¶é—´ï¼Œè¯·ç¨åŽå†è¯•ã€‚",
- "Initial encryption running... Please try again later." : "åˆå§‹åŠ å¯†è¿è¡Œä¸­....请ç¨åŽå†è¯•ã€‚",
- "Missing requirements." : "必填项未填写。",
- "Following users are not set up for encryption:" : "以下用户还没有设置加密:",
- "Go directly to your %spersonal settings%s." : "直接访问您的%s个人设置%s。",
- "Server-side Encryption" : "æœåŠ¡å™¨ç«¯åŠ å¯†",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "加密应用被å¯ç”¨äº†ï¼Œä½†æ˜¯ä½ çš„加密密钥没有åˆå§‹åŒ–,请é‡æ–°ç™»å‡ºç™»å½•ç³»ç»Ÿä¸€æ¬¡ã€‚",
- "Enable recovery key (allow to recover users files in case of password loss):" : "å¯ç”¨æ¢å¤å¯†é’¥ï¼ˆå…许你在密ç ä¸¢å¤±åŽæ¢å¤æ–‡ä»¶ï¼‰ï¼š",
- "Recovery key password" : "æ¢å¤å¯†é’¥å¯†ç ",
- "Repeat Recovery key password" : "é‡å¤æ¢å¤å¯†é’¥å¯†ç ",
- "Enabled" : "å¼€å¯",
- "Disabled" : "ç¦ç”¨",
- "Change recovery key password:" : "更改æ¢å¤å¯†é’¥å¯†ç ",
- "Old Recovery key password" : "旧的æ¢å¤å¯†é’¥å¯†ç ",
- "New Recovery key password" : "æ–°çš„æ¢å¤å¯†é’¥å¯†ç ",
- "Repeat New Recovery key password" : "é‡å¤æ–°çš„密钥æ¢å¤å¯†ç ",
- "Change Password" : "修改密ç ",
- " If you don't remember your old password you can ask your administrator to recover your files." : "如果您记ä¸ä½æ—§çš„密ç ï¼Œæ‚¨å¯ä»¥è¯·æ±‚管ç†å‘˜æ¢å¤æ‚¨çš„文件。",
- "Old log-in password" : "旧登录密ç ",
- "Current log-in password" : "当å‰ç™»å½•å¯†ç ",
- "Update Private Key Password" : "æ›´æ–°ç§é’¥å¯†ç ",
- "Enable password recovery:" : "å¯ç”¨å¯†ç æ¢å¤ï¼š",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "å¯ç”¨è¯¥é¡¹å°†å…许你在密ç ä¸¢å¤±åŽå–回您的加密文件"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/zh_HK.js b/apps/files_encryption/l10n/zh_HK.js
deleted file mode 100644
index 071be6c554c..00000000000
--- a/apps/files_encryption/l10n/zh_HK.js
+++ /dev/null
@@ -1,9 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "ä¸æ˜ŽéŒ¯èª¤",
- "Enabled" : "啟用",
- "Disabled" : "åœç”¨",
- "Change Password" : "更改密碼"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/zh_HK.json b/apps/files_encryption/l10n/zh_HK.json
deleted file mode 100644
index eea42097843..00000000000
--- a/apps/files_encryption/l10n/zh_HK.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{ "translations": {
- "Unknown error" : "ä¸æ˜ŽéŒ¯èª¤",
- "Enabled" : "啟用",
- "Disabled" : "åœç”¨",
- "Change Password" : "更改密碼"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/l10n/zh_TW.js b/apps/files_encryption/l10n/zh_TW.js
deleted file mode 100644
index fb80249b709..00000000000
--- a/apps/files_encryption/l10n/zh_TW.js
+++ /dev/null
@@ -1,39 +0,0 @@
-OC.L10N.register(
- "files_encryption",
- {
- "Unknown error" : "未知的錯誤",
- "Recovery key successfully enabled" : "還原金鑰已æˆåŠŸé–‹å•Ÿ",
- "Could not disable recovery key. Please check your recovery key password!" : "無法åœç”¨é‚„原金鑰。請檢查您的還原金鑰密碼!",
- "Recovery key successfully disabled" : "還原金鑰已æˆåŠŸåœç”¨",
- "Password successfully changed." : "æˆåŠŸè®Šæ›´å¯†ç¢¼ã€‚",
- "Could not change the password. Maybe the old password was not correct." : "無法變更密碼,或許是輸入的舊密碼ä¸æ­£ç¢ºã€‚",
- "Private key password successfully updated." : "ç§äººé‡‘鑰密碼已æˆåŠŸæ›´æ–°ã€‚",
- "File recovery settings updated" : "檔案還原設定已更新",
- "Could not update file recovery" : "無法更新檔案還原設定",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "加密功能未åˆå§‹åŒ–!å¯èƒ½åŠ å¯†åŠŸèƒ½éœ€è¦é‡æ–°å•Ÿç”¨åœ¨ç¾åœ¨çš„連線上。請試著登出å†ç™»å…¥ä¾†åˆå§‹åŒ–加密功能。",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "您的ç§äººé‡‘é‘°ä¸æ­£ç¢º!å¯èƒ½æ‚¨çš„密碼已經變更在外部的 %s (例如:您的ä¼æ¥­ç›®éŒ„)。您å¯ä»¥åœ¨æ‚¨çš„個人設定中更新ç§äººé‡‘鑰密碼來還原存å–您的加密檔案。",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "無法解密這個檔案,也許這是分享的檔案。請詢å•æª”案所有人é‡æ–°åˆ†äº«æª”案給您。",
- "Unknown error. Please check your system settings or contact your administrator" : "未知錯誤請檢查您的系統設定或是è¯çµ¡æ‚¨çš„管ç†å“¡",
- "Initial encryption started... This can take some time. Please wait." : "加密åˆå§‹å·²å•Ÿç”¨...這個需è¦ä¸€äº›æ™‚間。請ç¨ç­‰ã€‚",
- "Initial encryption running... Please try again later." : "加密åˆå§‹åŸ·è¡Œä¸­...請晚點å†è©¦ã€‚",
- "Missing requirements." : "éºå¤±å¿…è¦æ¢ä»¶ã€‚",
- "Following users are not set up for encryption:" : "以下的使用者無法設定加密:",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "檔案加密已啓用,但是您的金鑰尚未åˆå§‹åŒ–,請é‡æ–°ç™»å…¥ä¸€æ¬¡",
- "Enable recovery key (allow to recover users files in case of password loss):" : "啟用還原金鑰 (因忘記密碼ä»å…許還原使用者檔案):",
- "Recovery key password" : "還原金鑰密碼",
- "Repeat Recovery key password" : "å†è¼¸å…¥é‚„原金鑰密碼一次",
- "Enabled" : "已啓用",
- "Disabled" : "å·²åœç”¨",
- "Change recovery key password:" : "變更還原金鑰密碼:",
- "Old Recovery key password" : "舊的還原金鑰密碼",
- "New Recovery key password" : "新的還原金鑰密碼",
- "Repeat New Recovery key password" : "å†è¼¸å…¥æ–°çš„還原金鑰密碼一次",
- "Change Password" : "變更密碼",
- " If you don't remember your old password you can ask your administrator to recover your files." : "如果您忘記舊密碼,å¯ä»¥è«‹æ±‚管ç†å“¡å”助å–回檔案。",
- "Old log-in password" : "舊登入密碼",
- "Current log-in password" : "ç›®å‰çš„登入密碼",
- "Update Private Key Password" : "æ›´æ–°ç§äººé‡‘鑰密碼",
- "Enable password recovery:" : "啟用密碼還原:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "啟用這個é¸é …將會å…許您因忘記密碼但需è¦å­˜å–您的加密檔案"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/files_encryption/l10n/zh_TW.json b/apps/files_encryption/l10n/zh_TW.json
deleted file mode 100644
index 06ff2ed3fe3..00000000000
--- a/apps/files_encryption/l10n/zh_TW.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{ "translations": {
- "Unknown error" : "未知的錯誤",
- "Recovery key successfully enabled" : "還原金鑰已æˆåŠŸé–‹å•Ÿ",
- "Could not disable recovery key. Please check your recovery key password!" : "無法åœç”¨é‚„原金鑰。請檢查您的還原金鑰密碼!",
- "Recovery key successfully disabled" : "還原金鑰已æˆåŠŸåœç”¨",
- "Password successfully changed." : "æˆåŠŸè®Šæ›´å¯†ç¢¼ã€‚",
- "Could not change the password. Maybe the old password was not correct." : "無法變更密碼,或許是輸入的舊密碼ä¸æ­£ç¢ºã€‚",
- "Private key password successfully updated." : "ç§äººé‡‘鑰密碼已æˆåŠŸæ›´æ–°ã€‚",
- "File recovery settings updated" : "檔案還原設定已更新",
- "Could not update file recovery" : "無法更新檔案還原設定",
- "Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." : "加密功能未åˆå§‹åŒ–!å¯èƒ½åŠ å¯†åŠŸèƒ½éœ€è¦é‡æ–°å•Ÿç”¨åœ¨ç¾åœ¨çš„連線上。請試著登出å†ç™»å…¥ä¾†åˆå§‹åŒ–加密功能。",
- "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "您的ç§äººé‡‘é‘°ä¸æ­£ç¢º!å¯èƒ½æ‚¨çš„密碼已經變更在外部的 %s (例如:您的ä¼æ¥­ç›®éŒ„)。您å¯ä»¥åœ¨æ‚¨çš„個人設定中更新ç§äººé‡‘鑰密碼來還原存å–您的加密檔案。",
- "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "無法解密這個檔案,也許這是分享的檔案。請詢å•æª”案所有人é‡æ–°åˆ†äº«æª”案給您。",
- "Unknown error. Please check your system settings or contact your administrator" : "未知錯誤請檢查您的系統設定或是è¯çµ¡æ‚¨çš„管ç†å“¡",
- "Initial encryption started... This can take some time. Please wait." : "加密åˆå§‹å·²å•Ÿç”¨...這個需è¦ä¸€äº›æ™‚間。請ç¨ç­‰ã€‚",
- "Initial encryption running... Please try again later." : "加密åˆå§‹åŸ·è¡Œä¸­...請晚點å†è©¦ã€‚",
- "Missing requirements." : "éºå¤±å¿…è¦æ¢ä»¶ã€‚",
- "Following users are not set up for encryption:" : "以下的使用者無法設定加密:",
- "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "檔案加密已啓用,但是您的金鑰尚未åˆå§‹åŒ–,請é‡æ–°ç™»å…¥ä¸€æ¬¡",
- "Enable recovery key (allow to recover users files in case of password loss):" : "啟用還原金鑰 (因忘記密碼ä»å…許還原使用者檔案):",
- "Recovery key password" : "還原金鑰密碼",
- "Repeat Recovery key password" : "å†è¼¸å…¥é‚„原金鑰密碼一次",
- "Enabled" : "已啓用",
- "Disabled" : "å·²åœç”¨",
- "Change recovery key password:" : "變更還原金鑰密碼:",
- "Old Recovery key password" : "舊的還原金鑰密碼",
- "New Recovery key password" : "新的還原金鑰密碼",
- "Repeat New Recovery key password" : "å†è¼¸å…¥æ–°çš„還原金鑰密碼一次",
- "Change Password" : "變更密碼",
- " If you don't remember your old password you can ask your administrator to recover your files." : "如果您忘記舊密碼,å¯ä»¥è«‹æ±‚管ç†å“¡å”助å–回檔案。",
- "Old log-in password" : "舊登入密碼",
- "Current log-in password" : "ç›®å‰çš„登入密碼",
- "Update Private Key Password" : "æ›´æ–°ç§äººé‡‘鑰密碼",
- "Enable password recovery:" : "啟用密碼還原:",
- "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "啟用這個é¸é …將會å…許您因忘記密碼但需è¦å­˜å–您的加密檔案"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
deleted file mode 100644
index 784121c7ed1..00000000000
--- a/apps/files_encryption/lib/crypt.php
+++ /dev/null
@@ -1,581 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Owen Winkler <a_github@midnightcircus.com>
- * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Scott Arciszewski <scott@arciszewski.me>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption;
-
-/**
- * Class for common cryptography functionality
- */
-
-class Crypt {
-
- const ENCRYPTION_UNKNOWN_ERROR = -1;
- const ENCRYPTION_NOT_INITIALIZED_ERROR = 1;
- const ENCRYPTION_PRIVATE_KEY_NOT_VALID_ERROR = 2;
- const ENCRYPTION_NO_SHARE_KEY_FOUND = 3;
-
- const BLOCKSIZE = 8192; // block size will always be 8192 for a PHP stream https://bugs.php.net/bug.php?id=21641
- const DEFAULT_CIPHER = 'AES-256-CFB';
-
- const HEADERSTART = 'HBEGIN';
- const HEADEREND = 'HEND';
-
- /**
- * return encryption mode client or server side encryption
- * @param string $user name (use system wide setting if name=null)
- * @return string 'client' or 'server'
- * @note at the moment we only support server side encryption
- */
- public static function mode($user = null) {
-
- return 'server';
-
- }
-
- /**
- * Create a new encryption keypair
- * @return array publicKey, privatekey
- */
- public static function createKeypair() {
-
- $return = false;
-
- $res = Helper::getOpenSSLPkey();
-
- if ($res === false) {
- \OCP\Util::writeLog('Encryption library', 'couldn\'t generate users key-pair for ' . \OCP\User::getUser(), \OCP\Util::ERROR);
- while ($msg = openssl_error_string()) {
- \OCP\Util::writeLog('Encryption library', 'openssl_pkey_new() fails: ' . $msg, \OCP\Util::ERROR);
- }
- } elseif (openssl_pkey_export($res, $privateKey, null, Helper::getOpenSSLConfig())) {
- // Get public key
- $keyDetails = openssl_pkey_get_details($res);
- $publicKey = $keyDetails['key'];
-
- $return = array(
- 'publicKey' => $publicKey,
- 'privateKey' => $privateKey
- );
- } else {
- \OCP\Util::writeLog('Encryption library', 'couldn\'t export users private key, please check your servers openSSL configuration.' . \OCP\User::getUser(), \OCP\Util::ERROR);
- while($errMsg = openssl_error_string()) {
- \OCP\Util::writeLog('Encryption library', $errMsg, \OCP\Util::ERROR);
- }
- }
-
- return $return;
- }
-
- /**
- * Add arbitrary padding to encrypted data
- * @param string $data data to be padded
- * @return string padded data
- * @note In order to end up with data exactly 8192 bytes long we must
- * add two letters. It is impossible to achieve exactly 8192 length
- * blocks with encryption alone, hence padding is added to achieve the
- * required length.
- */
- private static function addPadding($data) {
-
- $padded = $data . 'xx';
-
- return $padded;
-
- }
-
- /**
- * Remove arbitrary padding to encrypted data
- * @param string $padded padded data to remove padding from
- * @return string unpadded data on success, false on error
- */
- private static function removePadding($padded) {
-
- if (substr($padded, -2) === 'xx') {
-
- $data = substr($padded, 0, -2);
-
- return $data;
-
- } else {
-
- // TODO: log the fact that unpadded data was submitted for removal of padding
- return false;
-
- }
-
- }
-
- /**
- * Check if a file's contents contains an IV and is symmetrically encrypted
- * @param string $content
- * @return boolean
- * @note see also \OCA\Files_Encryption\Util->isEncryptedPath()
- */
- public static function isCatfileContent($content) {
-
- if (!$content) {
-
- return false;
-
- }
-
- $noPadding = self::removePadding($content);
-
- // Fetch encryption metadata from end of file
- $meta = substr($noPadding, -22);
-
- // Fetch identifier from start of metadata
- $identifier = substr($meta, 0, 6);
-
- if ($identifier === '00iv00') {
-
- return true;
-
- } else {
-
- return false;
-
- }
-
- }
-
- /**
- * Check if a file is encrypted according to database file cache
- * @param string $path
- * @return bool
- */
- public static function isEncryptedMeta($path) {
-
- // TODO: Use DI to get \OC\Files\Filesystem out of here
-
- // Fetch all file metadata from DB
- $metadata = \OC\Files\Filesystem::getFileInfo($path);
-
- // Return encryption status
- return isset($metadata['encrypted']) && ( bool )$metadata['encrypted'];
-
- }
-
- /**
- * Symmetrically encrypt a string
- * @param string $plainContent
- * @param string $iv
- * @param string $passphrase
- * @param string $cypher used for encryption, currently we support AES-128-CFB and AES-256-CFB
- * @return string encrypted file content
- * @throws \OCA\Files_Encryption\Exception\EncryptionException
- */
- private static function encrypt($plainContent, $iv, $passphrase = '', $cipher = Crypt::DEFAULT_CIPHER) {
-
- $encryptedContent = openssl_encrypt($plainContent, $cipher, $passphrase, false, $iv);
-
- if (!$encryptedContent) {
- $error = "Encryption (symmetric) of content failed: " . openssl_error_string();
- \OCP\Util::writeLog('Encryption library', $error, \OCP\Util::ERROR);
- throw new Exception\EncryptionException($error, Exception\EncryptionException::ENCRYPTION_FAILED);
- }
-
- return $encryptedContent;
-
- }
-
- /**
- * Symmetrically decrypt a string
- * @param string $encryptedContent
- * @param string $iv
- * @param string $passphrase
- * @param string $cipher cipher user for decryption, currently we support aes128 and aes256
- * @throws \Exception
- * @return string decrypted file content
- */
- private static function decrypt($encryptedContent, $iv, $passphrase, $cipher = Crypt::DEFAULT_CIPHER) {
-
- $plainContent = openssl_decrypt($encryptedContent, $cipher, $passphrase, false, $iv);
-
- if ($plainContent) {
- return $plainContent;
- } else {
- throw new \Exception('Encryption library: Decryption (symmetric) of content failed');
- }
-
- }
-
- /**
- * Concatenate encrypted data with its IV and padding
- * @param string $content content to be concatenated
- * @param string $iv IV to be concatenated
- * @return string concatenated content
- */
- private static function concatIv($content, $iv) {
-
- $combined = $content . '00iv00' . $iv;
-
- return $combined;
-
- }
-
- /**
- * Split concatenated data and IV into respective parts
- * @param string $catFile concatenated data to be split
- * @return array keys: encrypted, iv
- */
- private static function splitIv($catFile) {
-
- // Fetch encryption metadata from end of file
- $meta = substr($catFile, -22);
-
- // Fetch IV from end of file
- $iv = substr($meta, -16);
-
- // Remove IV and IV identifier text to expose encrypted content
- $encrypted = substr($catFile, 0, -22);
-
- $split = array(
- 'encrypted' => $encrypted,
- 'iv' => $iv
- );
-
- return $split;
-
- }
-
- /**
- * Symmetrically encrypts a string and returns keyfile content
- * @param string $plainContent content to be encrypted in keyfile
- * @param string $passphrase
- * @param string $cypher used for encryption, currently we support AES-128-CFB and AES-256-CFB
- * @return false|string encrypted content combined with IV
- * @note IV need not be specified, as it will be stored in the returned keyfile
- * and remain accessible therein.
- */
- public static function symmetricEncryptFileContent($plainContent, $passphrase = '', $cipher = Crypt::DEFAULT_CIPHER) {
-
- if (!$plainContent) {
- \OCP\Util::writeLog('Encryption library', 'symmetrically encryption failed, no content given.', \OCP\Util::ERROR);
- return false;
- }
-
- $iv = self::generateIv();
-
- try {
- $encryptedContent = self::encrypt($plainContent, $iv, $passphrase, $cipher);
- // Combine content to encrypt with IV identifier and actual IV
- $catfile = self::concatIv($encryptedContent, $iv);
- $padded = self::addPadding($catfile);
-
- return $padded;
- } catch (Exception\EncryptionException $e) {
- $message = 'Could not encrypt file content (code: ' . $e->getCode() . '): ';
- \OCP\Util::writeLog('files_encryption', $message . $e->getMessage(), \OCP\Util::ERROR);
- return false;
- }
-
- }
-
-
- /**
- * Symmetrically decrypts keyfile content
- * @param string $keyfileContent
- * @param string $passphrase
- * @param string $cipher cipher used for decryption, currently aes128 and aes256 is supported.
- * @throws \Exception
- * @return string|false
- * @internal param string $source
- * @internal param string $target
- * @internal param string $key the decryption key
- * @return string decrypted content
- *
- * This function decrypts a file
- */
- public static function symmetricDecryptFileContent($keyfileContent, $passphrase = '', $cipher = Crypt::DEFAULT_CIPHER) {
-
- if (!$keyfileContent) {
-
- throw new \Exception('Encryption library: no data provided for decryption');
-
- }
-
- // Remove padding
- $noPadding = self::removePadding($keyfileContent);
-
- // Split into enc data and catfile
- $catfile = self::splitIv($noPadding);
-
- if ($plainContent = self::decrypt($catfile['encrypted'], $catfile['iv'], $passphrase, $cipher)) {
-
- return $plainContent;
-
- } else {
- return false;
- }
-
- }
-
- /**
- * Decrypt private key and check if the result is a valid keyfile
- *
- * @param string $encryptedKey encrypted keyfile
- * @param string $passphrase to decrypt keyfile
- * @return string|false encrypted private key or false
- *
- * This function decrypts a file
- */
- public static function decryptPrivateKey($encryptedKey, $passphrase) {
-
- $header = self::parseHeader($encryptedKey);
- $cipher = self::getCipher($header);
-
- // if we found a header we need to remove it from the key we want to decrypt
- if (!empty($header)) {
- $encryptedKey = substr($encryptedKey, strpos($encryptedKey, self::HEADEREND) + strlen(self::HEADEREND));
- }
-
- $plainKey = self::symmetricDecryptFileContent($encryptedKey, $passphrase, $cipher);
-
- // check if this a valid private key
- $res = openssl_pkey_get_private($plainKey);
- if (is_resource($res)) {
- $sslInfo = openssl_pkey_get_details($res);
- if (!isset($sslInfo['key'])) {
- $plainKey = false;
- }
- } else {
- $plainKey = false;
- }
-
- return $plainKey;
-
- }
-
- /**
- * Create asymmetrically encrypted keyfile content using a generated key
- * @param string $plainContent content to be encrypted
- * @param array $publicKeys array keys must be the userId of corresponding user
- * @return array keys: keys (array, key = userId), data
- * @throws \OCA\Files_Encryption\Exception\MultiKeyEncryptException if encryption failed
- * @note symmetricDecryptFileContent() can decrypt files created using this method
- */
- public static function multiKeyEncrypt($plainContent, array $publicKeys) {
-
- // openssl_seal returns false without errors if $plainContent
- // is empty, so trigger our own error
- if (empty($plainContent)) {
- throw new Exception\MultiKeyEncryptException('Cannot multiKeyEncrypt empty plain content', Exception\MultiKeyEncryptException::EMPTY_DATA);
- }
-
- // Set empty vars to be set by openssl by reference
- $sealed = '';
- $shareKeys = array();
- $mappedShareKeys = array();
-
- if (openssl_seal($plainContent, $sealed, $shareKeys, $publicKeys)) {
-
- $i = 0;
-
- // Ensure each shareKey is labelled with its
- // corresponding userId
- foreach ($publicKeys as $userId => $publicKey) {
-
- $mappedShareKeys[$userId] = $shareKeys[$i];
- $i++;
-
- }
-
- return array(
- 'keys' => $mappedShareKeys,
- 'data' => $sealed
- );
-
- } else {
- throw new Exception\MultiKeyEncryptException('multi key encryption failed: ' . openssl_error_string(),
- Exception\MultiKeyEncryptException::OPENSSL_SEAL_FAILED);
- }
-
- }
-
- /**
- * Asymmetrically encrypt a file using multiple public keys
- * @param string $encryptedContent
- * @param string $shareKey
- * @param mixed $privateKey
- * @throws \OCA\Files_Encryption\Exception\MultiKeyDecryptException if decryption failed
- * @internal param string $plainContent contains decrypted content
- * @return string $plainContent decrypted string
- * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
- *
- * This function decrypts a file
- */
- public static function multiKeyDecrypt($encryptedContent, $shareKey, $privateKey) {
-
- if (!$encryptedContent) {
- throw new Exception\MultiKeyDecryptException('Cannot mutliKeyDecrypt empty plain content',
- Exception\MultiKeyDecryptException::EMPTY_DATA);
- }
-
- if (openssl_open($encryptedContent, $plainContent, $shareKey, $privateKey)) {
-
- return $plainContent;
-
- } else {
- throw new Exception\MultiKeyDecryptException('multiKeyDecrypt with share-key' . $shareKey . 'failed: ' . openssl_error_string(),
- Exception\MultiKeyDecryptException::OPENSSL_OPEN_FAILED);
- }
-
- }
-
- /**
- * Generates a pseudo random initialisation vector
- * @return String $iv generated IV
- */
- private static function generateIv() {
-
- if ($random = openssl_random_pseudo_bytes(12, $strong)) {
-
- if (!$strong) {
-
- // If OpenSSL indicates randomness is insecure, log error
- \OCP\Util::writeLog('Encryption library', 'Insecure symmetric key was generated using openssl_random_pseudo_bytes()', \OCP\Util::WARN);
-
- }
-
- // We encode the iv purely for string manipulation
- // purposes - it gets decoded before use
- $iv = base64_encode($random);
-
- return $iv;
-
- } else {
-
- throw new \Exception('Generating IV failed');
-
- }
-
- }
-
- /**
- * Generate a pseudo random 256-bit ASCII key, used as file key
- * @return string|false Generated key
- */
- public static function generateKey() {
-
- // Generate key
- if ($key = base64_encode(openssl_random_pseudo_bytes(32, $strong))) {
-
- if (!$strong) {
-
- // If OpenSSL indicates randomness is insecure, log error
- throw new \Exception('Encryption library, Insecure symmetric key was generated using openssl_random_pseudo_bytes()');
-
- }
-
- return $key;
-
- } else {
-
- return false;
-
- }
-
- }
-
- /**
- * read header into array
- *
- * @param string $data
- * @return array
- */
- public static function parseHeader($data) {
-
- $result = array();
-
- if (substr($data, 0, strlen(self::HEADERSTART)) === self::HEADERSTART) {
- $endAt = strpos($data, self::HEADEREND);
- $header = substr($data, 0, $endAt + strlen(self::HEADEREND));
-
- // +1 to not start with an ':' which would result in empty element at the beginning
- $exploded = explode(':', substr($header, strlen(self::HEADERSTART)+1));
-
- $element = array_shift($exploded);
- while ($element !== self::HEADEREND) {
-
- $result[$element] = array_shift($exploded);
-
- $element = array_shift($exploded);
-
- }
- }
-
- return $result;
- }
-
- /**
- * check if data block is the header
- *
- * @param string $data
- * @return boolean
- */
- public static function isHeader($data) {
-
- if (substr($data, 0, strlen(self::HEADERSTART)) === self::HEADERSTART) {
- return true;
- }
-
- return false;
- }
-
- /**
- * get chiper from header
- *
- * @param array $header
- * @throws \OCA\Files_Encryption\Exception\EncryptionException
- */
- public static function getCipher($header) {
- $cipher = isset($header['cipher']) ? $header['cipher'] : 'AES-128-CFB';
-
- if ($cipher !== 'AES-256-CFB' && $cipher !== 'AES-128-CFB') {
-
- throw new Exception\EncryptionException('file header broken, no supported cipher defined',
- Exception\EncryptionException::UNKNOWN_CIPHER);
- }
-
- return $cipher;
- }
-
- /**
- * generate header for encrypted file
- */
- public static function generateHeader() {
- $cipher = Helper::getCipher();
- $header = self::HEADERSTART . ':cipher:' . $cipher . ':' . self::HEADEREND;
-
- return $header;
- }
-
-}
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
deleted file mode 100644
index 1ae161ce99e..00000000000
--- a/apps/files_encryption/lib/helper.php
+++ /dev/null
@@ -1,532 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Owen Winkler <a_github@midnightcircus.com>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption;
-
-/**
- * Class to manage registration of hooks an various helper methods
- * @package OCA\Files_Encryption
- */
-class Helper {
-
- private static $tmpFileMapping; // Map tmp files to files in data/user/files
-
- /**
- * register share related hooks
- *
- */
- public static function registerShareHooks() {
-
- \OCP\Util::connectHook('OCP\Share', 'pre_shared', 'OCA\Files_Encryption\Hooks', 'preShared');
- \OCP\Util::connectHook('OCP\Share', 'post_shared', 'OCA\Files_Encryption\Hooks', 'postShared');
- \OCP\Util::connectHook('OCP\Share', 'post_unshare', 'OCA\Files_Encryption\Hooks', 'postUnshare');
- }
-
- /**
- * register user related hooks
- *
- */
- public static function registerUserHooks() {
-
- \OCP\Util::connectHook('OC_User', 'post_login', 'OCA\Files_Encryption\Hooks', 'login');
- \OCP\Util::connectHook('OC_User', 'logout', 'OCA\Files_Encryption\Hooks', 'logout');
- \OCP\Util::connectHook('OC_User', 'post_setPassword', 'OCA\Files_Encryption\Hooks', 'setPassphrase');
- \OCP\Util::connectHook('OC_User', 'pre_setPassword', 'OCA\Files_Encryption\Hooks', 'preSetPassphrase');
- \OCP\Util::connectHook('OC_User', 'post_createUser', 'OCA\Files_Encryption\Hooks', 'postCreateUser');
- \OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OCA\Files_Encryption\Hooks', 'postDeleteUser');
- }
-
- /**
- * register filesystem related hooks
- *
- */
- public static function registerFilesystemHooks() {
-
- \OCP\Util::connectHook('OC_Filesystem', 'rename', 'OCA\Files_Encryption\Hooks', 'preRename');
- \OCP\Util::connectHook('OC_Filesystem', 'post_rename', 'OCA\Files_Encryption\Hooks', 'postRenameOrCopy');
- \OCP\Util::connectHook('OC_Filesystem', 'copy', 'OCA\Files_Encryption\Hooks', 'preCopy');
- \OCP\Util::connectHook('OC_Filesystem', 'post_copy', 'OCA\Files_Encryption\Hooks', 'postRenameOrCopy');
- \OCP\Util::connectHook('OC_Filesystem', 'post_delete', 'OCA\Files_Encryption\Hooks', 'postDelete');
- \OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\Files_Encryption\Hooks', 'preDelete');
- \OCP\Util::connectHook('\OC\Core\LostPassword\Controller\LostController', 'post_passwordReset', 'OCA\Files_Encryption\Hooks', 'postPasswordReset');
- \OCP\Util::connectHook('OC_Filesystem', 'post_umount', 'OCA\Files_Encryption\Hooks', 'postUnmount');
- \OCP\Util::connectHook('OC_Filesystem', 'umount', 'OCA\Files_Encryption\Hooks', 'preUnmount');
- }
-
- /**
- * register app management related hooks
- *
- */
- public static function registerAppHooks() {
-
- \OCP\Util::connectHook('OC_App', 'pre_disable', 'OCA\Files_Encryption\Hooks', 'preDisable');
- \OCP\Util::connectHook('OC_App', 'post_disable', 'OCA\Files_Encryption\Hooks', 'postEnable');
- }
-
- /**
- * setup user for files_encryption
- *
- * @param Util $util
- * @param string $password
- * @return bool
- */
- public static function setupUser(Util $util, $password) {
- // Check files_encryption infrastructure is ready for action
- if (!$util->ready()) {
-
- \OCP\Util::writeLog('Encryption library', 'User account "' . $util->getUserId()
- . '" is not ready for encryption; configuration started', \OCP\Util::DEBUG);
-
- if (!$util->setupServerSide($password)) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * get recovery key id
- *
- * @return string|bool recovery key ID or false
- */
- public static function getRecoveryKeyId() {
- $appConfig = \OC::$server->getAppConfig();
- $key = $appConfig->getValue('files_encryption', 'recoveryKeyId');
-
- return ($key === null) ? false : $key;
- }
-
- public static function getPublicShareKeyId() {
- $appConfig = \OC::$server->getAppConfig();
- $key = $appConfig->getValue('files_encryption', 'publicShareKeyId');
-
- return ($key === null) ? false : $key;
- }
-
- /**
- * enable recovery
- *
- * @param string $recoveryKeyId
- * @param string $recoveryPassword
- * @return bool
- */
- public static function adminEnableRecovery($recoveryKeyId, $recoveryPassword) {
-
- $view = new \OC\Files\View('/');
- $appConfig = \OC::$server->getAppConfig();
-
- if ($recoveryKeyId === null) {
- $recoveryKeyId = 'recovery_' . substr(md5(time()), 0, 8);
- $appConfig->setValue('files_encryption', 'recoveryKeyId', $recoveryKeyId);
- }
-
- if (!Keymanager::recoveryKeyExists($view)) {
-
- $keypair = Crypt::createKeypair();
-
- // Save public key
- Keymanager::setPublicKey($keypair['publicKey'], $recoveryKeyId);
-
- $cipher = Helper::getCipher();
- $encryptedKey = Crypt::symmetricEncryptFileContent($keypair['privateKey'], $recoveryPassword, $cipher);
- if ($encryptedKey) {
- Keymanager::setPrivateSystemKey($encryptedKey, $recoveryKeyId);
- // Set recoveryAdmin as enabled
- $appConfig->setValue('files_encryption', 'recoveryAdminEnabled', 1);
- $return = true;
- }
-
- } else { // get recovery key and check the password
- $util = new Util(new \OC\Files\View('/'), \OCP\User::getUser());
- $return = $util->checkRecoveryPassword($recoveryPassword);
- if ($return) {
- $appConfig->setValue('files_encryption', 'recoveryAdminEnabled', 1);
- }
- }
-
- return $return;
- }
-
- /**
- * Check if a path is a .part file
- * @param string $path Path that may identify a .part file
- * @return bool
- */
- public static function isPartialFilePath($path) {
-
- $extension = pathinfo($path, PATHINFO_EXTENSION);
- if ( $extension === 'part') {
- return true;
- } else {
- return false;
- }
-
- }
-
-
- /**
- * Remove .path extension from a file path
- * @param string $path Path that may identify a .part file
- * @return string File path without .part extension
- * @note this is needed for reusing keys
- */
- public static function stripPartialFileExtension($path) {
- $extension = pathinfo($path, PATHINFO_EXTENSION);
-
- if ( $extension === 'part') {
-
- $newLength = strlen($path) - 5; // 5 = strlen(".part") = strlen(".etmp")
- $fPath = substr($path, 0, $newLength);
-
- // if path also contains a transaction id, we remove it too
- $extension = pathinfo($fPath, PATHINFO_EXTENSION);
- if(substr($extension, 0, 12) === 'ocTransferId') { // 12 = strlen("ocTransferId")
- $newLength = strlen($fPath) - strlen($extension) -1;
- $fPath = substr($fPath, 0, $newLength);
- }
- return $fPath;
-
- } else {
- return $path;
- }
- }
-
- /**
- * disable recovery
- *
- * @param string $recoveryPassword
- * @return bool
- */
- public static function adminDisableRecovery($recoveryPassword) {
- $util = new Util(new \OC\Files\View('/'), \OCP\User::getUser());
- $return = $util->checkRecoveryPassword($recoveryPassword);
-
- if ($return) {
- // Set recoveryAdmin as disabled
- \OC::$server->getAppConfig()->setValue('files_encryption', 'recoveryAdminEnabled', 0);
- }
-
- return $return;
- }
-
- /**
- * checks if access is public/anonymous user
- * @return bool
- */
- public static function isPublicAccess() {
- if (\OCP\User::getUser() === false) {
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * Format a path to be relative to the /user/files/ directory
- * @param string $path the absolute path
- * @return string e.g. turns '/admin/files/test.txt' into 'test.txt'
- */
- public static function stripUserFilesPath($path) {
- $split = self::splitPath($path);
-
- // it is not a file relative to data/user/files
- if (count($split) < 4 || $split[2] !== 'files') {
- return false;
- }
-
- $sliced = array_slice($split, 3);
- $relPath = implode('/', $sliced);
-
- return $relPath;
- }
-
- /**
- * try to get the user from the path if no user is logged in
- * @param string $path
- * @return string user
- */
- public static function getUser($path) {
-
- $user = \OCP\User::getUser();
-
-
- // if we are logged in, then we return the userid
- if ($user) {
- return $user;
- }
-
- // if no user is logged in we try to access a publicly shared files.
- // In this case we need to try to get the user from the path
- return self::getUserFromPath($path);
- }
-
- /**
- * extract user from path
- *
- * @param string $path
- * @return string user id
- * @throws Exception\EncryptionException
- */
- public static function getUserFromPath($path) {
- $split = self::splitPath($path);
-
- if (count($split) > 2 && (
- $split[2] === 'files' || $split[2] === 'files_versions' || $split[2] === 'cache' || $split[2] === 'files_trashbin')) {
-
- $user = $split[1];
-
- if (\OCP\User::userExists($user)) {
- return $user;
- }
- }
-
- throw new Exception\EncryptionException('Could not determine user', Exception\EncryptionException::GENERIC);
- }
-
- /**
- * get path to the corresponding file in data/user/files if path points
- * to a file in cache
- *
- * @param string $path path to a file in cache
- * @return string path to corresponding file relative to data/user/files
- * @throws Exception\EncryptionException
- */
- public static function getPathFromCachedFile($path) {
- $split = self::splitPath($path);
-
- if (count($split) < 5) {
- throw new Exception\EncryptionException('no valid cache file path', Exception\EncryptionException::GENERIC);
- }
-
- // we skip /user/cache/transactionId
- $sliced = array_slice($split, 4);
-
- return implode('/', $sliced);
- }
-
-
- /**
- * get path to the corresponding file in data/user/files for a version
- *
- * @param string $path path to a version
- * @return string path to corresponding file relative to data/user/files
- * @throws Exception\EncryptionException
- */
- public static function getPathFromVersion($path) {
- $split = self::splitPath($path);
-
- if (count($split) < 4) {
- throw new Exception\EncryptionException('no valid path to a version', Exception\EncryptionException::GENERIC);
- }
-
- // we skip user/files_versions
- $sliced = array_slice($split, 3);
- $relPath = implode('/', $sliced);
- //remove the last .v
- $realPath = substr($relPath, 0, strrpos($relPath, '.v'));
-
- return $realPath;
- }
-
- /**
- * create directory recursively
- *
- * @param string $path
- * @param \OC\Files\View $view
- */
- public static function mkdirr($path, \OC\Files\View $view) {
- $dirParts = self::splitPath(dirname($path));
- $dir = "";
- foreach ($dirParts as $part) {
- $dir = $dir . '/' . $part;
- if (!$view->file_exists($dir)) {
- $view->mkdir($dir);
- }
- }
- }
-
- /**
- * redirect to a error page
- * @param Session $session
- * @param int|null $errorCode
- * @throws \Exception
- */
- public static function redirectToErrorPage(Session $session, $errorCode = null) {
-
- if ($errorCode === null) {
- $init = $session->getInitialized();
- switch ($init) {
- case Session::INIT_EXECUTED:
- $errorCode = Crypt::ENCRYPTION_PRIVATE_KEY_NOT_VALID_ERROR;
- break;
- case Session::NOT_INITIALIZED:
- $errorCode = Crypt::ENCRYPTION_NOT_INITIALIZED_ERROR;
- break;
- default:
- $errorCode = Crypt::ENCRYPTION_UNKNOWN_ERROR;
- }
- }
-
- $location = \OCP\Util::linkToAbsolute('apps/files_encryption/files', 'error.php');
- $post = 0;
- if(count($_POST) > 0) {
- $post = 1;
- }
-
- if(defined('PHPUNIT_RUN') and PHPUNIT_RUN) {
- throw new \Exception("Encryption error: $errorCode");
- }
-
- header('Location: ' . $location . '?p=' . $post . '&errorCode=' . $errorCode);
- exit();
- }
-
- /**
- * check requirements for encryption app.
- * @return bool true if requirements are met
- */
- public static function checkRequirements() {
-
- //openssl extension needs to be loaded
- return extension_loaded("openssl");
-
- }
-
- /**
- * check some common errors if the server isn't configured properly for encryption
- * @return bool true if configuration seems to be OK
- */
- public static function checkConfiguration() {
- if(self::getOpenSSLPkey()) {
- return true;
- } else {
- while ($msg = openssl_error_string()) {
- \OCP\Util::writeLog('Encryption library', 'openssl_pkey_new() fails: ' . $msg, \OCP\Util::ERROR);
- }
- return false;
- }
- }
-
- /**
- * Create an openssl pkey with config-supplied settings
- * WARNING: This initializes a new private keypair, which is computationally expensive
- * @return resource The pkey resource created
- */
- public static function getOpenSSLPkey() {
- return openssl_pkey_new(self::getOpenSSLConfig());
- }
-
- /**
- * Return an array of OpenSSL config options, default + config
- * Used for multiple OpenSSL functions
- * @return array The combined defaults and config settings
- */
- public static function getOpenSSLConfig() {
- $config = array('private_key_bits' => 4096);
- $config = array_merge(\OC::$server->getConfig()->getSystemValue('openssl', array()), $config);
- return $config;
- }
-
- /**
- * remember from which file the tmp file (getLocalFile() call) was created
- * @param string $tmpFile path of tmp file
- * @param string $originalFile path of the original file relative to data/
- */
- public static function addTmpFileToMapper($tmpFile, $originalFile) {
- self::$tmpFileMapping[$tmpFile] = $originalFile;
- }
-
- /**
- * get the path of the original file
- * @param string $tmpFile path of the tmp file
- * @return string|false path of the original file or false
- */
- public static function getPathFromTmpFile($tmpFile) {
- if (isset(self::$tmpFileMapping[$tmpFile])) {
- return self::$tmpFileMapping[$tmpFile];
- }
-
- return false;
- }
-
- /**
- * detect file type, encryption can read/write regular files, versions
- * and cached files
- *
- * @param string $path
- * @return int
- * @throws Exception\EncryptionException
- */
- public static function detectFileType($path) {
- $parts = self::splitPath($path);
-
- if (count($parts) > 2) {
- switch ($parts[2]) {
- case 'files':
- return Util::FILE_TYPE_FILE;
- case 'files_versions':
- return Util::FILE_TYPE_VERSION;
- case 'cache':
- return Util::FILE_TYPE_CACHE;
- }
- }
-
- // thow exception if we couldn't detect a valid file type
- throw new Exception\EncryptionException('Could not detect file type', Exception\EncryptionException::GENERIC);
- }
-
- /**
- * read the cipher used for encryption from the config.php
- *
- * @return string
- */
- public static function getCipher() {
-
- $cipher = \OC::$server->getConfig()->getSystemValue('cipher', Crypt::DEFAULT_CIPHER);
-
- if ($cipher !== 'AES-256-CFB' && $cipher !== 'AES-128-CFB') {
- \OCP\Util::writeLog('files_encryption',
- 'wrong cipher defined in config.php, only AES-128-CFB and AES-256-CFB is supported. Fall back ' . Crypt::DEFAULT_CIPHER,
- \OCP\Util::WARN);
-
- $cipher = Crypt::DEFAULT_CIPHER;
- }
-
- return $cipher;
- }
-
- public static function splitPath($path) {
- $normalized = \OC\Files\Filesystem::normalizePath($path);
- return explode('/', $normalized);
- }
-
-}
-
diff --git a/apps/files_encryption/lib/hooks.php b/apps/files_encryption/lib/hooks.php
deleted file mode 100644
index 4a29ffaaedf..00000000000
--- a/apps/files_encryption/lib/hooks.php
+++ /dev/null
@@ -1,625 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption;
-
-/**
- * Class for hook specific logic
- */
-class Hooks {
-
- // file for which we want to rename the keys after the rename operation was successful
- private static $renamedFiles = array();
- // file for which we want to delete the keys after the delete operation was successful
- private static $deleteFiles = array();
- // file for which we want to delete the keys after the delete operation was successful
- private static $unmountedFiles = array();
-
- /**
- * Startup encryption backend upon user login
- * @note This method should never be called for users using client side encryption
- */
- public static function login($params) {
-
- if (\OCP\App::isEnabled('files_encryption') === false) {
- return true;
- }
-
-
- $l = new \OC_L10N('files_encryption');
-
- $view = new \OC\Files\View('/');
-
- // ensure filesystem is loaded
- if (!\OC\Files\Filesystem::$loaded) {
- \OC_Util::setupFS($params['uid']);
- }
-
- $privateKey = Keymanager::getPrivateKey($view, $params['uid']);
-
- // if no private key exists, check server configuration
- if (!$privateKey) {
- //check if all requirements are met
- if (!Helper::checkRequirements() || !Helper::checkConfiguration()) {
- $error_msg = $l->t("Missing requirements.");
- $hint = $l->t('Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.');
- \OC_App::disable('files_encryption');
- \OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR);
- \OCP\Template::printErrorPage($error_msg, $hint);
- }
- }
-
- $util = new Util($view, $params['uid']);
-
- // setup user, if user not ready force relogin
- if (Helper::setupUser($util, $params['password']) === false) {
- return false;
- }
-
- $session = $util->initEncryption($params);
-
- // Check if first-run file migration has already been performed
- $ready = false;
- $migrationStatus = $util->getMigrationStatus();
- if ($migrationStatus === Util::MIGRATION_OPEN && $session !== false) {
- $ready = $util->beginMigration();
- } elseif ($migrationStatus === Util::MIGRATION_IN_PROGRESS) {
- // refuse login as long as the initial encryption is running
- sleep(5);
- \OCP\User::logout();
- return false;
- }
-
- $result = true;
-
- // If migration not yet done
- if ($ready) {
-
- // Encrypt existing user files
- try {
- $result = $util->encryptAll('/' . $params['uid'] . '/' . 'files');
- } catch (\Exception $ex) {
- \OCP\Util::writeLog('Encryption library', 'Initial encryption failed! Error: ' . $ex->getMessage(), \OCP\Util::FATAL);
- $result = false;
- }
-
- if ($result) {
- \OC_Log::write(
- 'Encryption library', 'Encryption of existing files belonging to "' . $params['uid'] . '" completed'
- , \OC_Log::INFO
- );
- // Register successful migration in DB
- $util->finishMigration();
- } else {
- \OCP\Util::writeLog('Encryption library', 'Initial encryption failed!', \OCP\Util::FATAL);
- $util->resetMigrationStatus();
- \OCP\User::logout();
- }
- }
-
- return $result;
- }
-
- /**
- * remove keys from session during logout
- */
- public static function logout() {
- $session = new Session(new \OC\Files\View());
- $session->removeKeys();
- }
-
- /**
- * setup encryption backend upon user created
- * @note This method should never be called for users using client side encryption
- */
- public static function postCreateUser($params) {
-
- if (\OCP\App::isEnabled('files_encryption')) {
- $view = new \OC\Files\View('/');
- $util = new Util($view, $params['uid']);
- Helper::setupUser($util, $params['password']);
- }
- }
-
- /**
- * cleanup encryption backend upon user deleted
- * @note This method should never be called for users using client side encryption
- */
- public static function postDeleteUser($params) {
-
- if (\OCP\App::isEnabled('files_encryption')) {
- Keymanager::deletePublicKey(new \OC\Files\View(), $params['uid']);
- }
- }
-
- /**
- * If the password can't be changed within ownCloud, than update the key password in advance.
- */
- public static function preSetPassphrase($params) {
- if (\OCP\App::isEnabled('files_encryption')) {
- if ( ! \OC_User::canUserChangePassword($params['uid']) ) {
- self::setPassphrase($params);
- }
- }
- }
-
- /**
- * Change a user's encryption passphrase
- * @param array $params keys: uid, password
- */
- public static function setPassphrase($params) {
- if (\OCP\App::isEnabled('files_encryption') === false) {
- return true;
- }
-
- // Only attempt to change passphrase if server-side encryption
- // is in use (client-side encryption does not have access to
- // the necessary keys)
- if (Crypt::mode() === 'server') {
-
- $view = new \OC\Files\View('/');
- $session = new Session($view);
-
- // Get existing decrypted private key
- $privateKey = $session->getPrivateKey();
-
- if ($params['uid'] === \OCP\User::getUser() && $privateKey) {
-
- // Encrypt private key with new user pwd as passphrase
- $encryptedPrivateKey = Crypt::symmetricEncryptFileContent($privateKey, $params['password'], Helper::getCipher());
-
- // Save private key
- if ($encryptedPrivateKey) {
- Keymanager::setPrivateKey($encryptedPrivateKey, \OCP\User::getUser());
- } else {
- \OCP\Util::writeLog('files_encryption', 'Could not update users encryption password', \OCP\Util::ERROR);
- }
-
- // NOTE: Session does not need to be updated as the
- // private key has not changed, only the passphrase
- // used to decrypt it has changed
-
-
- } else { // admin changed the password for a different user, create new keys and reencrypt file keys
-
- $user = $params['uid'];
- $util = new Util($view, $user);
- $recoveryPassword = isset($params['recoveryPassword']) ? $params['recoveryPassword'] : null;
-
- // we generate new keys if...
- // ...we have a recovery password and the user enabled the recovery key
- // ...encryption was activated for the first time (no keys exists)
- // ...the user doesn't have any files
- if (($util->recoveryEnabledForUser() && $recoveryPassword)
- || !$util->userKeysExists()
- || !$view->file_exists($user . '/files')) {
-
- // backup old keys
- $util->backupAllKeys('recovery');
-
- $newUserPassword = $params['password'];
-
- // make sure that the users home is mounted
- \OC\Files\Filesystem::initMountPoints($user);
-
- $keypair = Crypt::createKeypair();
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // Save public key
- Keymanager::setPublicKey($keypair['publicKey'], $user);
-
- // Encrypt private key with new password
- $encryptedKey = Crypt::symmetricEncryptFileContent($keypair['privateKey'], $newUserPassword, Helper::getCipher());
- if ($encryptedKey) {
- Keymanager::setPrivateKey($encryptedKey, $user);
-
- if ($recoveryPassword) { // if recovery key is set we can re-encrypt the key files
- $util = new Util($view, $user);
- $util->recoverUsersFiles($recoveryPassword);
- }
- } else {
- \OCP\Util::writeLog('files_encryption', 'Could not update users encryption password', \OCP\Util::ERROR);
- }
-
- \OC_FileProxy::$enabled = $proxyStatus;
- }
- }
- }
- }
-
- /**
- * after password reset we create a new key pair for the user
- *
- * @param array $params
- */
- public static function postPasswordReset($params) {
- $uid = $params['uid'];
- $password = $params['password'];
-
- $util = new Util(new \OC\Files\View(), $uid);
- $util->replaceUserKeys($password);
- }
-
- /*
- * check if files can be encrypted to every user.
- */
- /**
- * @param array $params
- */
- public static function preShared($params) {
-
- if (\OCP\App::isEnabled('files_encryption') === false) {
- return true;
- }
-
- $l = new \OC_L10N('files_encryption');
- $users = array();
- $view = new \OC\Files\View('/');
-
- switch ($params['shareType']) {
- case \OCP\Share::SHARE_TYPE_USER:
- $users[] = $params['shareWith'];
- break;
- case \OCP\Share::SHARE_TYPE_GROUP:
- $users = \OC_Group::usersInGroup($params['shareWith']);
- break;
- }
-
- $notConfigured = array();
- foreach ($users as $user) {
- if (!Keymanager::publicKeyExists($view, $user)) {
- $notConfigured[] = $user;
- }
- }
-
- if (count($notConfigured) > 0) {
- $params['run'] = false;
- $params['error'] = $l->t('Following users are not set up for encryption:') . ' ' . join(', ' , $notConfigured);
- }
-
- }
-
- /**
- * update share keys if a file was shared
- */
- public static function postShared($params) {
-
- if (\OCP\App::isEnabled('files_encryption') === false) {
- return true;
- }
-
- if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
-
- $path = \OC\Files\Filesystem::getPath($params['fileSource']);
-
- self::updateKeyfiles($path);
- }
- }
-
- /**
- * update keyfiles and share keys recursively
- *
- * @param string $path to the file/folder
- */
- private static function updateKeyfiles($path) {
- $view = new \OC\Files\View('/');
- $userId = \OCP\User::getUser();
- $session = new Session($view);
- $util = new Util($view, $userId);
- $sharingEnabled = \OCP\Share::isEnabled();
-
- $mountManager = \OC\Files\Filesystem::getMountManager();
- $mount = $mountManager->find('/' . $userId . '/files' . $path);
- $mountPoint = $mount->getMountPoint();
-
- // if a folder was shared, get a list of all (sub-)folders
- if ($view->is_dir('/' . $userId . '/files' . $path)) {
- $allFiles = $util->getAllFiles($path, $mountPoint);
- } else {
- $allFiles = array($path);
- }
-
- foreach ($allFiles as $path) {
- $usersSharing = $util->getSharingUsersArray($sharingEnabled, $path);
- $util->setSharedFileKeyfiles($session, $usersSharing, $path);
- }
- }
-
- /**
- * unshare file/folder from a user with whom you shared the file before
- */
- public static function postUnshare($params) {
-
- if (\OCP\App::isEnabled('files_encryption') === false) {
- return true;
- }
-
- if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
-
- $view = new \OC\Files\View('/');
- $userId = $params['uidOwner'];
- $userView = new \OC\Files\View('/' . $userId . '/files');
- $util = new Util($view, $userId);
- $path = $userView->getPath($params['fileSource']);
-
- // for group shares get a list of the group members
- if ($params['shareType'] === \OCP\Share::SHARE_TYPE_GROUP) {
- $userIds = \OC_Group::usersInGroup($params['shareWith']);
- } else {
- if ($params['shareType'] === \OCP\Share::SHARE_TYPE_LINK || $params['shareType'] === \OCP\Share::SHARE_TYPE_REMOTE) {
- $userIds = array($util->getPublicShareKeyId());
- } else {
- $userIds = array($params['shareWith']);
- }
- }
-
- $mountManager = \OC\Files\Filesystem::getMountManager();
- $mount = $mountManager->find('/' . $userId . '/files' . $path);
- $mountPoint = $mount->getMountPoint();
-
- // if we unshare a folder we need a list of all (sub-)files
- if ($params['itemType'] === 'folder') {
- $allFiles = $util->getAllFiles($path, $mountPoint);
- } else {
- $allFiles = array($path);
- }
-
- foreach ($allFiles as $path) {
-
- // check if the user still has access to the file, otherwise delete share key
- $sharingUsers = $util->getSharingUsersArray(true, $path);
-
- // Unshare every user who no longer has access to the file
- $delUsers = array_diff($userIds, $sharingUsers);
- $keyPath = Keymanager::getKeyPath($view, $util, $path);
-
- // delete share key
- Keymanager::delShareKey($view, $delUsers, $keyPath, $userId, $path);
- }
-
- }
- }
-
- /**
- * mark file as renamed so that we know the original source after the file was renamed
- * @param array $params with the old path and the new path
- */
- public static function preRename($params) {
- self::preRenameOrCopy($params, 'rename');
- }
-
- /**
- * mark file as copied so that we know the original source after the file was copied
- * @param array $params with the old path and the new path
- */
- public static function preCopy($params) {
- self::preRenameOrCopy($params, 'copy');
- }
-
- private static function preRenameOrCopy($params, $operation) {
- $user = \OCP\User::getUser();
- $view = new \OC\Files\View('/');
- $util = new Util($view, $user);
-
- // we only need to rename the keys if the rename happens on the same mountpoint
- // otherwise we perform a stream copy, so we get a new set of keys
- $oldPath = \OC\Files\Filesystem::normalizePath('/' . $user . '/files/' . $params['oldpath']);
- $newPath = \OC\Files\Filesystem::normalizePath('/' . $user . '/files/' . $params['newpath']);
- $mp1 = $view->getMountPoint($oldPath);
- $mp2 = $view->getMountPoint($newPath);
-
- $oldKeysPath = Keymanager::getKeyPath($view, $util, $params['oldpath']);
-
- if ($mp1 === $mp2) {
- self::$renamedFiles[$params['oldpath']] = array(
- 'operation' => $operation,
- 'oldKeysPath' => $oldKeysPath,
- );
- } elseif ($mp1 !== $oldPath . '/') {
- self::$renamedFiles[$params['oldpath']] = array(
- 'operation' => 'cleanup',
- 'oldKeysPath' => $oldKeysPath,
- );
- }
- }
-
- /**
- * after a file is renamed/copied, rename/copy its keyfile and share-keys also fix the file size and fix also the sharing
- *
- * @param array $params array with oldpath and newpath
- */
- public static function postRenameOrCopy($params) {
-
- if (\OCP\App::isEnabled('files_encryption') === false) {
- return true;
- }
-
- $view = new \OC\Files\View('/');
- $userId = \OCP\User::getUser();
- $util = new Util($view, $userId);
-
- if (isset(self::$renamedFiles[$params['oldpath']]['operation']) &&
- isset(self::$renamedFiles[$params['oldpath']]['oldKeysPath'])) {
- $operation = self::$renamedFiles[$params['oldpath']]['operation'];
- $oldKeysPath = self::$renamedFiles[$params['oldpath']]['oldKeysPath'];
- unset(self::$renamedFiles[$params['oldpath']]);
- if ($operation === 'cleanup') {
- return $view->unlink($oldKeysPath);
- }
- } else {
- \OCP\Util::writeLog('Encryption library', "can't get path and owner from the file before it was renamed", \OCP\Util::DEBUG);
- return false;
- }
-
- list($ownerNew, $pathNew) = $util->getUidAndFilename($params['newpath']);
-
- if ($util->isSystemWideMountPoint($pathNew)) {
- $newKeysPath = 'files_encryption/keys/' . $pathNew;
- } else {
- $newKeysPath = $ownerNew . '/files_encryption/keys/' . $pathNew;
- }
-
- // create key folders if it doesn't exists
- if (!$view->file_exists(dirname($newKeysPath))) {
- $view->mkdir(dirname($newKeysPath));
- }
-
- $view->$operation($oldKeysPath, $newKeysPath);
-
- // update sharing-keys
- self::updateKeyfiles($params['newpath']);
- }
-
- /**
- * set migration status and the init status back to '0' so that all new files get encrypted
- * if the app gets enabled again
- * @param array $params contains the app ID
- */
- public static function preDisable($params) {
- if ($params['app'] === 'files_encryption') {
-
- \OC::$server->getConfig()->deleteAppFromAllUsers('files_encryption');
-
- $session = new Session(new \OC\Files\View('/'));
- $session->setInitialized(Session::NOT_INITIALIZED);
- }
- }
-
- /**
- * set the init status to 'NOT_INITIALIZED' (0) if the app gets enabled
- * @param array $params contains the app ID
- */
- public static function postEnable($params) {
- if ($params['app'] === 'files_encryption') {
- $session = new Session(new \OC\Files\View('/'));
- $session->setInitialized(Session::NOT_INITIALIZED);
- }
- }
-
- /**
- * if the file was really deleted we remove the encryption keys
- * @param array $params
- * @return boolean|null
- */
- public static function postDelete($params) {
-
- $path = $params[\OC\Files\Filesystem::signal_param_path];
-
- if (!isset(self::$deleteFiles[$path])) {
- return true;
- }
-
- $deletedFile = self::$deleteFiles[$path];
- $keyPath = $deletedFile['keyPath'];
-
- // we don't need to remember the file any longer
- unset(self::$deleteFiles[$path]);
-
- $view = new \OC\Files\View('/');
-
- // return if the file still exists and wasn't deleted correctly
- if ($view->file_exists('/' . \OCP\User::getUser() . '/files/' . $path)) {
- return true;
- }
-
- // Delete keyfile & shareKey so it isn't orphaned
- $view->unlink($keyPath);
-
- }
-
- /**
- * remember the file which should be deleted and it's owner
- * @param array $params
- * @return boolean|null
- */
- public static function preDelete($params) {
- $view = new \OC\Files\View('/');
- $path = $params[\OC\Files\Filesystem::signal_param_path];
-
- // skip this method if the trash bin is enabled or if we delete a file
- // outside of /data/user/files
- if (\OCP\App::isEnabled('files_trashbin')) {
- return true;
- }
-
- $util = new Util($view, \OCP\USER::getUser());
-
- $keysPath = Keymanager::getKeyPath($view, $util, $path);
-
- self::$deleteFiles[$path] = array(
- 'keyPath' => $keysPath);
- }
-
- /**
- * unmount file from yourself
- * remember files/folders which get unmounted
- */
- public static function preUnmount($params) {
- $view = new \OC\Files\View('/');
- $user = \OCP\User::getUser();
- $path = $params[\OC\Files\Filesystem::signal_param_path];
-
- $util = new Util($view, $user);
- list($owner, $ownerPath) = $util->getUidAndFilename($path);
-
- $keysPath = Keymanager::getKeyPath($view, $util, $path);
-
- self::$unmountedFiles[$path] = array(
- 'keyPath' => $keysPath,
- 'owner' => $owner,
- 'ownerPath' => $ownerPath
- );
- }
-
- /**
- * unmount file from yourself
- */
- public static function postUnmount($params) {
-
- $path = $params[\OC\Files\Filesystem::signal_param_path];
- $user = \OCP\User::getUser();
-
- if (!isset(self::$unmountedFiles[$path])) {
- return true;
- }
-
- $umountedFile = self::$unmountedFiles[$path];
- $keyPath = $umountedFile['keyPath'];
- $owner = $umountedFile['owner'];
- $ownerPath = $umountedFile['ownerPath'];
-
- $view = new \OC\Files\View();
-
- // we don't need to remember the file any longer
- unset(self::$unmountedFiles[$path]);
-
- // check if the user still has access to the file, otherwise delete share key
- $sharingUsers = \OCP\Share::getUsersSharingFile($path, $user);
- if (!in_array($user, $sharingUsers['users'])) {
- Keymanager::delShareKey($view, array($user), $keyPath, $owner, $ownerPath);
- }
- }
-
-}
diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php
deleted file mode 100644
index 5e33372e9c6..00000000000
--- a/apps/files_encryption/lib/keymanager.php
+++ /dev/null
@@ -1,500 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Christopher Schäpers <kondou@ts.unde.re>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption;
-
-/**
- * Class to manage storage and retrieval of encryption keys
- * @note Where a method requires a view object, it's root must be '/'
- */
-class Keymanager {
-
- // base dir where all the file related keys are stored
- private static $keys_base_dir = '/files_encryption/keys/';
- private static $encryption_base_dir = '/files_encryption';
- private static $public_key_dir = '/files_encryption/public_keys';
-
- private static $key_cache = array(); // cache keys
-
- /**
- * read key from hard disk
- *
- * @param string $path to key
- * @param \OC\Files\View $view
- * @return string|bool either the key or false
- */
- private static function getKey($path, $view) {
-
- $key = false;
-
- if (isset(self::$key_cache[$path])) {
- $key = self::$key_cache[$path];
- } else {
-
- /** @var \OCP\Files\Storage $storage */
- list($storage, $internalPath) = $view->resolvePath($path);
-
- if ($storage->file_exists($internalPath)) {
- $key = $storage->file_get_contents($internalPath);
- self::$key_cache[$path] = $key;
- }
-
- }
-
- return $key;
- }
-
- /**
- * write key to disk
- *
- *
- * @param string $path path to key directory
- * @param string $name key name
- * @param string $key key
- * @param \OC\Files\View $view
- * @return bool
- */
- private static function setKey($path, $name, $key, $view) {
- self::keySetPreparation($view, $path);
-
- /** @var \OCP\Files\Storage $storage */
- $pathToKey = \OC\Files\Filesystem::normalizePath($path . '/' . $name);
- list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($pathToKey);
- $result = $storage->file_put_contents($internalPath, $key);
-
- if (is_int($result) && $result > 0) {
- self::$key_cache[$pathToKey] = $key;
- return true;
- }
-
- return false;
- }
-
- /**
- * retrieve the ENCRYPTED private key from a user
- *
- * @param \OC\Files\View $view
- * @param string $user
- * @return string private key or false (hopefully)
- * @note the key returned by this method must be decrypted before use
- */
- public static function getPrivateKey(\OC\Files\View $view, $user) {
- $path = '/' . $user . '/' . 'files_encryption' . '/' . $user . '.privateKey';
- return self::getKey($path, $view);
- }
-
- /**
- * retrieve public key for a specified user
- * @param \OC\Files\View $view
- * @param string $userId
- * @return string public key or false
- */
- public static function getPublicKey(\OC\Files\View $view, $userId) {
- $path = self::$public_key_dir . '/' . $userId . '.publicKey';
- return self::getKey($path, $view);
- }
-
- public static function getPublicKeyPath() {
- return self::$public_key_dir;
- }
-
- /**
- * Retrieve a user's public and private key
- * @param \OC\Files\View $view
- * @param string $userId
- * @return array keys: privateKey, publicKey
- */
- public static function getUserKeys(\OC\Files\View $view, $userId) {
-
- return array(
- 'publicKey' => self::getPublicKey($view, $userId),
- 'privateKey' => self::getPrivateKey($view, $userId)
- );
-
- }
-
- /**
- * Retrieve public keys for given users
- * @param \OC\Files\View $view
- * @param array $userIds
- * @return array of public keys for the specified users
- */
- public static function getPublicKeys(\OC\Files\View $view, array $userIds) {
-
- $keys = array();
- foreach ($userIds as $userId) {
- $keys[$userId] = self::getPublicKey($view, $userId);
- }
-
- return $keys;
-
- }
-
- /**
- * store file encryption key
- *
- * @param \OC\Files\View $view
- * @param \OCA\Files_Encryption\Util $util
- * @param string $path relative path of the file, including filename
- * @param string $catfile keyfile content
- * @return bool true/false
- * @note The keyfile is not encrypted here. Client code must
- * asymmetrically encrypt the keyfile before passing it to this method
- */
- public static function setFileKey(\OC\Files\View $view, $util, $path, $catfile) {
- $path = self::getKeyPath($view, $util, $path);
- return self::setKey($path, 'fileKey', $catfile, $view);
-
- }
-
- /**
- * get path to key folder for a given file
- *
- * @param \OC\Files\View $view relative to data directory
- * @param \OCA\Files_Encryption\Util $util
- * @param string $path path to the file, relative to the users file directory
- * @return string
- */
- public static function getKeyPath($view, $util, $path) {
-
- if ($view->is_dir('/' . \OCP\User::getUser() . '/' . $path)) {
- throw new Exception\EncryptionException('file was expected but directoy was given', Exception\EncryptionException::GENERIC);
- }
-
- list($owner, $filename) = $util->getUidAndFilename($path);
- $filename = Helper::stripPartialFileExtension($filename);
- $filePath_f = ltrim($filename, '/');
-
- // in case of system wide mount points the keys are stored directly in the data directory
- if ($util->isSystemWideMountPoint($filename)) {
- $keyPath = self::$keys_base_dir . $filePath_f . '/';
- } else {
- $keyPath = '/' . $owner . self::$keys_base_dir . $filePath_f . '/';
- }
-
- return $keyPath;
- }
-
- /**
- * get path to file key for a given file
- *
- * @param \OC\Files\View $view relative to data directory
- * @param \OCA\Files_Encryption\Util $util
- * @param string $path path to the file, relative to the users file directory
- * @return string
- */
- public static function getFileKeyPath($view, $util, $path) {
- $keyDir = self::getKeyPath($view, $util, $path);
- return $keyDir . 'fileKey';
- }
-
- /**
- * get path to share key for a given user
- *
- * @param \OC\Files\View $view relateive to data directory
- * @param \OCA\Files_Encryption\Util $util
- * @param string $path path to file relative to the users files directoy
- * @param string $uid user for whom we want the share-key path
- * @retrun string
- */
- public static function getShareKeyPath($view, $util, $path, $uid) {
- $keyDir = self::getKeyPath($view, $util, $path);
- return $keyDir . $uid . '.shareKey';
- }
-
- /**
- * delete key
- *
- * @param \OC\Files\View $view
- * @param string $path
- * @return boolean
- */
- private static function deleteKey($view, $path) {
- $normalizedPath = \OC\Files\Filesystem::normalizePath($path);
- $result = $view->unlink($normalizedPath);
-
- if ($result) {
- unset(self::$key_cache[$normalizedPath]);
- return true;
- }
-
- return false;
- }
-
- /**
- * delete public key from a given user
- *
- * @param \OC\Files\View $view
- * @param string $uid user
- * @return bool
- */
- public static function deletePublicKey($view, $uid) {
-
- $result = false;
-
- if (!\OCP\User::userExists($uid)) {
- $publicKey = self::$public_key_dir . '/' . $uid . '.publicKey';
- self::deleteKey($view, $publicKey);
- }
-
- return $result;
- }
-
- /**
- * check if public key for user exists
- *
- * @param \OC\Files\View $view
- * @param string $uid
- */
- public static function publicKeyExists($view, $uid) {
- return $view->file_exists(self::$public_key_dir . '/'. $uid . '.publicKey');
- }
-
-
-
- /**
- * retrieve keyfile for an encrypted file
- * @param \OC\Files\View $view
- * @param \OCA\Files_Encryption\Util $util
- * @param string|false $filePath
- * @return string file key or false
- * @note The keyfile returned is asymmetrically encrypted. Decryption
- * of the keyfile must be performed by client code
- */
- public static function getFileKey($view, $util, $filePath) {
- $path = self::getFileKeyPath($view, $util, $filePath);
- return self::getKey($path, $view);
- }
-
- /**
- * store private key from the user
- * @param string $key
- * @return bool
- * @note Encryption of the private key must be performed by client code
- * as no encryption takes place here
- */
- public static function setPrivateKey($key, $user = '') {
-
- $user = $user === '' ? \OCP\User::getUser() : $user;
- $path = '/' . $user . '/files_encryption';
- $header = Crypt::generateHeader();
-
- return self::setKey($path, $user . '.privateKey', $header . $key, new \OC\Files\View());
-
- }
-
- /**
- * check if recovery key exists
- *
- * @param \OC\Files\View $view
- * @return bool
- */
- public static function recoveryKeyExists($view) {
-
- $result = false;
-
- $recoveryKeyId = Helper::getRecoveryKeyId();
- if ($recoveryKeyId) {
- $result = ($view->file_exists(self::$public_key_dir . '/' . $recoveryKeyId . ".publicKey")
- && $view->file_exists(self::$encryption_base_dir . '/' . $recoveryKeyId . ".privateKey"));
- }
-
- return $result;
- }
-
- public static function publicShareKeyExists($view) {
- $result = false;
-
- $publicShareKeyId = Helper::getPublicShareKeyId();
- if ($publicShareKeyId) {
- $result = ($view->file_exists(self::$public_key_dir . '/' . $publicShareKeyId . ".publicKey")
- && $view->file_exists(self::$encryption_base_dir . '/' . $publicShareKeyId . ".privateKey"));
-
- }
-
- return $result;
- }
-
- /**
- * store public key from the user
- * @param string $key
- * @param string $user
- *
- * @return bool
- */
- public static function setPublicKey($key, $user = '') {
-
- $user = $user === '' ? \OCP\User::getUser() : $user;
-
- return self::setKey(self::$public_key_dir, $user . '.publicKey', $key, new \OC\Files\View('/'));
- }
-
- /**
- * write private system key (recovery and public share key) to disk
- *
- * @param string $key encrypted key
- * @param string $keyName name of the key
- * @return boolean
- */
- public static function setPrivateSystemKey($key, $keyName) {
-
- $keyName = $keyName . '.privateKey';
- $header = Crypt::generateHeader();
-
- return self::setKey(self::$encryption_base_dir, $keyName,$header . $key, new \OC\Files\View());
- }
-
- /**
- * read private system key (recovery and public share key) from disk
- *
- * @param string $keyName name of the key
- * @return string|boolean private system key or false
- */
- public static function getPrivateSystemKey($keyName) {
- $path = $keyName . '.privateKey';
- return self::getKey($path, new \OC\Files\View(self::$encryption_base_dir));
- }
-
- /**
- * store multiple share keys for a single file
- * @param \OC\Files\View $view
- * @param \OCA\Files_Encryption\Util $util
- * @param string $path
- * @param array $shareKeys
- * @return bool
- */
- public static function setShareKeys($view, $util, $path, array $shareKeys) {
-
- // in case of system wide mount points the keys are stored directly in the data directory
- $basePath = Keymanager::getKeyPath($view, $util, $path);
-
- self::keySetPreparation($view, $basePath);
-
- $result = true;
-
- foreach ($shareKeys as $userId => $shareKey) {
- if (!self::setKey($basePath, $userId . '.shareKey', $shareKey, $view)) {
- // If any of the keys are not set, flag false
- $result = false;
- }
- }
-
- // Returns false if any of the keys weren't set
- return $result;
- }
-
- /**
- * retrieve shareKey for an encrypted file
- * @param \OC\Files\View $view
- * @param string $userId
- * @param \OCA\Files_Encryption\Util $util
- * @param string $filePath
- * @return string file key or false
- * @note The sharekey returned is encrypted. Decryption
- * of the keyfile must be performed by client code
- */
- public static function getShareKey($view, $userId, $util, $filePath) {
- $path = self::getShareKeyPath($view, $util, $filePath, $userId);
- return self::getKey($path, $view);
- }
-
- /**
- * Delete a single user's shareKey for a single file
- *
- * @param \OC\Files\View $view relative to data/
- * @param array $userIds list of users we want to remove
- * @param string $keyPath
- * @param string $owner the owner of the file
- * @param string $ownerPath the owners name of the file for which we want to remove the users relative to data/user/files
- */
- public static function delShareKey($view, $userIds, $keysPath, $owner, $ownerPath) {
-
- $key = array_search($owner, $userIds, true);
- if ($key !== false && $view->file_exists('/' . $owner . '/files/' . $ownerPath)) {
- unset($userIds[$key]);
- }
-
- self::recursiveDelShareKeys($keysPath, $userIds, $view);
-
- }
-
- /**
- * recursively delete share keys from given users
- *
- * @param string $dir directory
- * @param array $userIds user ids for which the share keys should be deleted
- * @param \OC\Files\View $view view relative to data/
- */
- private static function recursiveDelShareKeys($dir, $userIds, $view) {
-
- $dirContent = $view->opendir($dir);
-
- if (is_resource($dirContent)) {
- while (($file = readdir($dirContent)) !== false) {
- if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
- if ($view->is_dir($dir . '/' . $file)) {
- self::recursiveDelShareKeys($dir . '/' . $file, $userIds, $view);
- } else {
- foreach ($userIds as $userId) {
- if ($userId . '.shareKey' === $file) {
- \OCP\Util::writeLog('files_encryption', 'recursiveDelShareKey: delete share key: ' . $file, \OCP\Util::DEBUG);
- self::deleteKey($view, $dir . '/' . $file);
- }
- }
- }
- }
- }
- closedir($dirContent);
- }
- }
-
- /**
- * Make preparations to vars and filesystem for saving a keyfile
- *
- * @param \OC\Files\View $view
- * @param string $path relatvie to the views root
- * @param string $basePath
- */
- protected static function keySetPreparation($view, $path) {
- // If the file resides within a subdirectory, create it
- if (!$view->file_exists($path)) {
- $sub_dirs = explode('/', $path);
- $dir = '';
- foreach ($sub_dirs as $sub_dir) {
- $dir .= '/' . $sub_dir;
- if (!$view->is_dir($dir)) {
- $view->mkdir($dir);
- }
- }
- }
- }
-
-}
diff --git a/apps/files_encryption/lib/migration.php b/apps/files_encryption/lib/migration.php
deleted file mode 100644
index 3f8ca9f4e23..00000000000
--- a/apps/files_encryption/lib/migration.php
+++ /dev/null
@@ -1,302 +0,0 @@
-<?php
-/**
- * @author Arthur Schiwon <blizzz@owncloud.com>
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption;
-
-
-class Migration {
-
- /**
- * @var \OC\Files\View
- */
- private $view;
- private $public_share_key_id;
- private $recovery_key_id;
-
- public function __construct() {
- $this->view = new \OC\Files\View();
- $this->view->getUpdater()->disable();
- $this->public_share_key_id = Helper::getPublicShareKeyId();
- $this->recovery_key_id = Helper::getRecoveryKeyId();
- }
-
- public function reorganizeFolderStructure() {
- $this->reorganizeSystemFolderStructure();
-
- $limit = 500;
- $offset = 0;
- do {
- $users = \OCP\User::getUsers('', $limit, $offset);
- foreach ($users as $user) {
- $this->reorganizeFolderStructureForUser($user);
- }
- $offset += $limit;
- } while (count($users) >= $limit);
- }
-
- public function reorganizeSystemFolderStructure() {
-
- $this->createPathForKeys('/files_encryption');
-
- // backup system wide folders
- $this->backupSystemWideKeys();
-
- // rename public keys
- $this->renamePublicKeys();
-
- // rename system wide mount point
- $this->renameFileKeys('', '/files_encryption/keyfiles');
-
- // rename system private keys
- $this->renameSystemPrivateKeys();
-
- // delete old system wide folders
- $this->view->deleteAll('/public-keys');
- $this->view->deleteAll('/owncloud_private_key');
- $this->view->deleteAll('/files_encryption/share-keys');
- $this->view->deleteAll('/files_encryption/keyfiles');
- $storage = $this->view->getMount('')->getStorage();
- $storage->getScanner()->scan('files_encryption');
- $storage->getCache()->remove('owncloud_private_key');
- $storage->getCache()->remove('public-keys');
- }
-
-
- public function reorganizeFolderStructureForUser($user) {
- // backup all keys
- \OC_Util::tearDownFS();
- \OC_Util::setupFS($user);
- if ($this->backupUserKeys($user)) {
- // create new 'key' folder
- $this->view->mkdir($user . '/files_encryption/keys');
- // rename users private key
- $this->renameUsersPrivateKey($user);
- // rename file keys
- $path = $user . '/files_encryption/keyfiles';
- $this->renameFileKeys($user, $path);
- $trashPath = $user . '/files_trashbin/keyfiles';
- if (\OC_App::isEnabled('files_trashbin') && $this->view->is_dir($trashPath)) {
- $this->renameFileKeys($user, $trashPath, true);
- $this->view->deleteAll($trashPath);
- $this->view->deleteAll($user . '/files_trashbin/share-keys');
- }
- // delete old folders
- $this->deleteOldKeys($user);
- $this->view->getMount('/' . $user)->getStorage()->getScanner()->scan('files_encryption');
- }
- }
-
- private function backupSystemWideKeys() {
- $backupDir = 'encryption_migration_backup_' . date("Y-m-d_H-i-s");
- $this->view->mkdir($backupDir);
- $this->view->copy('owncloud_private_key', $backupDir . '/owncloud_private_key');
- $this->view->copy('public-keys', $backupDir . '/public-keys');
- $this->view->copy('files_encryption', $backupDir . '/files_encryption');
- }
-
- private function backupUserKeys($user) {
- $encryptionDir = $user . '/files_encryption';
- if ($this->view->is_dir($encryptionDir)) {
- $backupDir = $user . '/encryption_migration_backup_' . date("Y-m-d_H-i-s");
- $this->view->mkdir($backupDir);
- $this->view->copy($encryptionDir, $backupDir);
- return true;
- }
- return false;
- }
-
- private function renamePublicKeys() {
- $dh = $this->view->opendir('public-keys');
-
- $this->createPathForKeys('files_encryption/public_keys');
-
- if (is_resource($dh)) {
- while (($oldPublicKey = readdir($dh)) !== false) {
- if (!\OC\Files\Filesystem::isIgnoredDir($oldPublicKey)) {
- $newPublicKey = substr($oldPublicKey, 0, strlen($oldPublicKey) - strlen('.public.key')) . '.publicKey';
- $this->view->rename('public-keys/' . $oldPublicKey, 'files_encryption/public_keys/' . $newPublicKey);
- }
- }
- closedir($dh);
- }
- }
-
- private function renameSystemPrivateKeys() {
- $dh = $this->view->opendir('owncloud_private_key');
-
- if (is_resource($dh)) {
- while (($oldPrivateKey = readdir($dh)) !== false) {
- if (!\OC\Files\Filesystem::isIgnoredDir($oldPrivateKey)) {
- $newPrivateKey = substr($oldPrivateKey, 0, strlen($oldPrivateKey) - strlen('.private.key')) . '.privateKey';
- $this->view->rename('owncloud_private_key/' . $oldPrivateKey, 'files_encryption/' . $newPrivateKey);
- }
- }
- closedir($dh);
- }
- }
-
- private function renameUsersPrivateKey($user) {
- $oldPrivateKey = $user . '/files_encryption/' . $user . '.private.key';
- $newPrivateKey = substr($oldPrivateKey, 0, strlen($oldPrivateKey) - strlen('.private.key')) . '.privateKey';
-
- $this->view->rename($oldPrivateKey, $newPrivateKey);
- }
-
- private function getFileName($file, $trash) {
-
- $extLength = strlen('.key');
-
- if ($trash) {
- $parts = explode('.', $file);
- if ($parts[count($parts) - 1] !== 'key') {
- $extLength = $extLength + strlen('.' . $parts[count($parts) - 1]);
- }
- }
-
- $filename = substr($file, 0, strlen($file) - $extLength);
-
- return $filename;
- }
-
- private function getExtension($file, $trash) {
-
- $extension = '';
-
- if ($trash) {
- $parts = explode('.', $file);
- if ($parts[count($parts) - 1] !== 'key') {
- $extension = '.' . $parts[count($parts) - 1];
- }
- }
-
- return $extension;
- }
-
- private function getFilePath($path, $user, $trash) {
- $offset = $trash ? strlen($user . '/files_trashbin/keyfiles') : strlen($user . '/files_encryption/keyfiles');
- return substr($path, $offset);
- }
-
- private function getTargetDir($user, $filePath, $filename, $extension, $trash) {
- if ($trash) {
- $targetDir = $user . '/files_trashbin/keys/' . $filePath . '/' . $filename . $extension;
- } else {
- $targetDir = $user . '/files_encryption/keys/' . $filePath . '/' . $filename . $extension;
- }
-
- return $targetDir;
- }
-
- private function renameFileKeys($user, $path, $trash = false) {
-
- $dh = $this->view->opendir($path);
-
- if (is_resource($dh)) {
- while (($file = readdir($dh)) !== false) {
- if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
- if ($this->view->is_dir($path . '/' . $file)) {
- $this->renameFileKeys($user, $path . '/' . $file, $trash);
- } else {
- $filename = $this->getFileName($file, $trash);
- $filePath = $this->getFilePath($path, $user, $trash);
- $extension = $this->getExtension($file, $trash);
- $targetDir = $this->getTargetDir($user, $filePath, $filename, $extension, $trash);
- $this->createPathForKeys($targetDir);
- $this->view->rename($path . '/' . $file, $targetDir . '/fileKey');
- $this->renameShareKeys($user, $filePath, $filename, $targetDir, $trash);
- }
- }
- }
- closedir($dh);
- }
- }
-
- private function getOldShareKeyPath($user, $filePath, $trash) {
- if ($trash) {
- $oldShareKeyPath = $user . '/files_trashbin/share-keys/' . $filePath;
- } else {
- $oldShareKeyPath = $user . '/files_encryption/share-keys/' . $filePath;
- }
-
- return $oldShareKeyPath;
- }
-
- private function getUidFromShareKey($file, $filename, $trash) {
- $extLength = strlen('.shareKey');
- if ($trash) {
- $parts = explode('.', $file);
- if ($parts[count($parts) - 1] !== 'shareKey') {
- $extLength = $extLength + strlen('.' . $parts[count($parts) - 1]);
- }
- }
-
- $uid = substr($file, strlen($filename) + 1, $extLength * -1);
-
- return $uid;
- }
-
- private function renameShareKeys($user, $filePath, $filename, $target, $trash) {
- $oldShareKeyPath = $this->getOldShareKeyPath($user, $filePath, $trash);
- $dh = $this->view->opendir($oldShareKeyPath);
-
- if (is_resource($dh)) {
- while (($file = readdir($dh)) !== false) {
- if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
- if ($this->view->is_dir($oldShareKeyPath . '/' . $file)) {
- continue;
- } else {
- if (substr($file, 0, strlen($filename) + 1) === $filename . '.') {
-
- $uid = $this->getUidFromShareKey($file, $filename, $trash);
- $this->view->rename($oldShareKeyPath . '/' . $file, $target . '/' . $uid . '.shareKey');
- }
- }
-
- }
- }
- closedir($dh);
- }
- }
-
- private function deleteOldKeys($user) {
- $this->view->deleteAll($user . '/files_encryption/keyfiles');
- $this->view->deleteAll($user . '/files_encryption/share-keys');
- }
-
- private function createPathForKeys($path) {
- if (!$this->view->file_exists($path)) {
- $sub_dirs = explode('/', $path);
- $dir = '';
- foreach ($sub_dirs as $sub_dir) {
- $dir .= '/' . $sub_dir;
- if (!$this->view->is_dir($dir)) {
- $this->view->mkdir($dir);
- }
- }
- }
- }
-}
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
deleted file mode 100644
index b452c0d4e27..00000000000
--- a/apps/files_encryption/lib/proxy.php
+++ /dev/null
@@ -1,401 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-/**
- * Encryption proxy which handles filesystem operations before and after
- * execution and encrypts, and handles keyfiles accordingly. Used for
- * webui.
- */
-
-namespace OCA\Files_Encryption;
-
-/**
- * Class Proxy
- * @package OCA\Files_Encryption
- */
-class Proxy extends \OC_FileProxy {
-
- private static $unencryptedSizes = array(); // remember unencrypted size
- private static $fopenMode = array(); // remember the fopen mode
- private static $enableEncryption = false; // Enable encryption for the given path
-
-
- /**
- * check if path is excluded from encryption
- *
- * @param string $path relative to data/
- * @return boolean
- */
- protected function isExcludedPath($path) {
-
- $view = new \OC\Files\View();
-
- $normalizedPath = \OC\Files\Filesystem::normalizePath($path);
-
- $parts = explode('/', $normalizedPath);
-
- // we only encrypt/decrypt files in the files and files_versions folder
- if (sizeof($parts) < 3) {
- /**
- * Less then 3 parts means, we can't match:
- * - /{$uid}/files/* nor
- * - /{$uid}/files_versions/*
- * So this is not a path we are looking for.
- */
- return true;
- }
- if(
- !($parts[2] === 'files' && \OCP\User::userExists($parts[1])) &&
- !($parts[2] === 'files_versions' && \OCP\User::userExists($parts[1]))) {
-
- return true;
- }
-
- if (!$view->file_exists($normalizedPath)) {
- $normalizedPath = dirname($normalizedPath);
- }
-
- // we don't encrypt server-to-server shares
- list($storage, ) = \OC\Files\Filesystem::resolvePath($normalizedPath);
- /**
- * @var \OCP\Files\Storage $storage
- */
- if ($storage->instanceOfStorage('OCA\Files_Sharing\External\Storage')) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Check if a file requires encryption
- * @param string $path
- * @param string $mode type of access
- * @return bool
- *
- * Tests if server side encryption is enabled, and if we should call the
- * crypt stream wrapper for the given file
- */
- private function shouldEncrypt($path, $mode = 'w') {
-
- // don't call the crypt stream wrapper, if...
- if (
- Crypt::mode() !== 'server' // we are not in server-side-encryption mode
- || $this->isExcludedPath($path) // if path is excluded from encryption
- || substr($path, 0, 8) === 'crypt://' // we are already in crypt mode
- ) {
- return false;
- }
-
- $userId = Helper::getUser($path);
- $view = new \OC\Files\View('');
- $util = new Util($view, $userId);
-
- // for write operation we always encrypt the files, for read operations
- // we check if the existing file is encrypted or not decide if it needs to
- // decrypt it.
- if (($mode !== 'r' && $mode !== 'rb') || $util->isEncryptedPath($path)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * @param string $path
- * @param string $data
- * @return bool
- */
- public function preFile_put_contents($path, &$data) {
-
- if ($this->shouldEncrypt($path)) {
-
- if (!is_resource($data)) {
-
- // get root view
- $view = new \OC\Files\View('/');
-
- // get relative path
- $relativePath = Helper::stripUserFilesPath($path);
-
- if (!isset($relativePath)) {
- return true;
- }
-
- // create random cache folder
- $cacheFolder = rand();
- $path_slices = explode('/', \OC\Files\Filesystem::normalizePath($path));
- $path_slices[2] = "cache/".$cacheFolder;
- $tmpPath = implode('/', $path_slices);
-
- $handle = fopen('crypt://' . $tmpPath, 'w');
- if (is_resource($handle)) {
-
- // write data to stream
- fwrite($handle, $data);
-
- // close stream
- fclose($handle);
-
- // disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // get encrypted content
- $data = $view->file_get_contents($tmpPath);
-
- // store new unenecrypted size so that it can be updated
- // in the post proxy
- $tmpFileInfo = $view->getFileInfo($tmpPath);
- if ( isset($tmpFileInfo['unencrypted_size']) ) {
- self::$unencryptedSizes[\OC\Files\Filesystem::normalizePath($path)] = $tmpFileInfo['unencrypted_size'];
- }
-
- // remove our temp file
- $view->deleteAll('/' . \OCP\User::getUser() . '/cache/' . $cacheFolder);
-
- // re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
- } else {
- return false;
- }
- }
- }
-
- return true;
-
- }
-
- /**
- * update file cache with the new unencrypted size after file was written
- * @param string $path
- * @param mixed $result
- * @return mixed
- */
- public function postFile_put_contents($path, $result) {
- $normalizedPath = \OC\Files\Filesystem::normalizePath($path);
- if ( isset(self::$unencryptedSizes[$normalizedPath]) ) {
- $view = new \OC\Files\View('/');
- $view->putFileInfo($normalizedPath,
- array('encrypted' => true, 'unencrypted_size' => self::$unencryptedSizes[$normalizedPath]));
- unset(self::$unencryptedSizes[$normalizedPath]);
- }
-
- return $result;
- }
-
- /**
- * @param string $path Path of file from which has been read
- * @param string $data Data that has been read from file
- */
- public function postFile_get_contents($path, $data) {
-
- $plainData = null;
-
- // If data is a catfile
- if (
- Crypt::mode() === 'server'
- && $this->shouldEncrypt($path)
- && Crypt::isCatfileContent($data)
- ) {
-
- $handle = fopen('crypt://' . $path, 'r');
-
- if (is_resource($handle)) {
- while (($plainDataChunk = fgets($handle, 8192)) !== false) {
- $plainData .= $plainDataChunk;
- }
- }
-
- }
-
- if (!isset($plainData)) {
-
- $plainData = $data;
-
- }
-
- return $plainData;
-
- }
-
- /**
- * remember initial fopen mode because sometimes it gets changed during the request
- * @param string $path path
- * @param string $mode type of access
- */
- public function preFopen($path, $mode) {
-
- self::$fopenMode[$path] = $mode;
- self::$enableEncryption = $this->shouldEncrypt($path, $mode);
-
- }
-
-
- /**
- * @param string $path
- * @param resource $result
- * @return resource
- */
- public function postFopen($path, $result) {
-
- $path = \OC\Files\Filesystem::normalizePath($path);
-
- if (!$result || self::$enableEncryption === false) {
-
- return $result;
-
- }
-
- // if we remember the mode from the pre proxy we re-use it
- // otherwise we fall back to stream_get_meta_data()
- if (isset(self::$fopenMode[$path])) {
- $mode = self::$fopenMode[$path];
- unset(self::$fopenMode[$path]);
- } else {
- $meta = stream_get_meta_data($result);
- $mode = $meta['mode'];
- }
-
- // Close the original encrypted file
- fclose($result);
-
- // Open the file using the crypto stream wrapper
- // protocol and let it do the decryption work instead
- $result = fopen('crypt://' . $path, $mode);
-
- return $result;
-
- }
-
- /**
- * @param string $path
- * @param array $data
- * @return array
- */
- public function postGetFileInfo($path, $data) {
-
- // if path is a folder do nothing
- if (\OCP\App::isEnabled('files_encryption') && $data !== false && array_key_exists('size', $data)) {
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // get file size
- $data['size'] = self::postFileSize($path, $data['size'], $data);
-
- // Re-enable the proxy
- \OC_FileProxy::$enabled = $proxyStatus;
- }
-
- return $data;
- }
-
- /**
- * @param string $path
- * @param int $size
- * @return int|bool
- */
- public function postFileSize($path, $size, $fileInfo = null) {
-
- $view = new \OC\Files\View('/');
-
- $userId = Helper::getUser($path);
- $util = new Util($view, $userId);
-
- // if encryption is no longer enabled or if the files aren't migrated yet
- // we return the default file size
- if(!\OCP\App::isEnabled('files_encryption') ||
- $util->getMigrationStatus() !== Util::MIGRATION_COMPLETED) {
- return $size;
- }
-
- // if path is a folder do nothing
- if ($view->is_dir($path)) {
- $proxyState = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
- $fileInfo = $view->getFileInfo($path);
- \OC_FileProxy::$enabled = $proxyState;
- if (isset($fileInfo['unencrypted_size']) && $fileInfo['unencrypted_size'] > 0) {
- return $fileInfo['unencrypted_size'];
- }
- return $size;
- }
-
- // get relative path
- $relativePath = Helper::stripUserFilesPath($path);
-
- // if path is empty we cannot resolve anything
- if (empty($relativePath)) {
- return $size;
- }
-
- // get file info from database/cache
- if (empty($fileInfo)) {
- $proxyState = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
- $fileInfo = $view->getFileInfo($path);
- \OC_FileProxy::$enabled = $proxyState;
- }
-
- // if file is encrypted return real file size
- if (isset($fileInfo['encrypted']) && $fileInfo['encrypted'] === true) {
- // try to fix unencrypted file size if it doesn't look plausible
- if ((int)$fileInfo['size'] > 0 && (int)$fileInfo['unencrypted_size'] === 0 ) {
- $fixSize = $util->getFileSize($path);
- $fileInfo['unencrypted_size'] = $fixSize;
- // put file info if not .part file
- if (!Helper::isPartialFilePath($relativePath)) {
- $view->putFileInfo($path, array('unencrypted_size' => $fixSize));
- }
- }
- $size = $fileInfo['unencrypted_size'];
- } else {
-
- $fileInfoUpdates = array();
-
- $fixSize = $util->getFileSize($path);
- if ($fixSize > 0) {
- $size = $fixSize;
-
- $fileInfoUpdates['encrypted'] = true;
- $fileInfoUpdates['unencrypted_size'] = $size;
-
- // put file info if not .part file
- if (!Helper::isPartialFilePath($relativePath)) {
- $view->putFileInfo($path, $fileInfoUpdates);
- }
- }
-
- }
- return $size;
- }
-
-}
diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php
deleted file mode 100644
index 10e4c061b30..00000000000
--- a/apps/files_encryption/lib/session.php
+++ /dev/null
@@ -1,203 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption;
-
-/**
- * Class for handling encryption related session data
- */
-
-class Session {
-
- private $view;
- private static $publicShareKey = false;
-
- const NOT_INITIALIZED = '0';
- const INIT_EXECUTED = '1';
- const INIT_SUCCESSFUL = '2';
-
-
- /**
- * if session is started, check if ownCloud key pair is set up, if not create it
- * @param \OC\Files\View $view
- *
- * @note The ownCloud key pair is used to allow public link sharing even if encryption is enabled
- */
- public function __construct($view) {
-
- $this->view = $view;
-
- if (!$this->view->is_dir('files_encryption')) {
-
- $this->view->mkdir('files_encryption');
-
- }
-
- $appConfig = \OC::$server->getAppConfig();
-
- $publicShareKeyId = Helper::getPublicShareKeyId();
-
- if ($publicShareKeyId === false) {
- $publicShareKeyId = 'pubShare_' . substr(md5(time()), 0, 8);
- $appConfig->setValue('files_encryption', 'publicShareKeyId', $publicShareKeyId);
- }
-
- if (!Keymanager::publicShareKeyExists($view)) {
-
- $keypair = Crypt::createKeypair();
-
-
- // Save public key
- Keymanager::setPublicKey($keypair['publicKey'], $publicShareKeyId);
-
- // Encrypt private key empty passphrase
- $cipher = Helper::getCipher();
- $encryptedKey = Crypt::symmetricEncryptFileContent($keypair['privateKey'], '', $cipher);
- if ($encryptedKey) {
- Keymanager::setPrivateSystemKey($encryptedKey, $publicShareKeyId);
- } else {
- \OCP\Util::writeLog('files_encryption', 'Could not create public share keys', \OCP\Util::ERROR);
- }
-
- }
-
- if (Helper::isPublicAccess() && !self::getPublicSharePrivateKey()) {
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- $encryptedKey = Keymanager::getPrivateSystemKey($publicShareKeyId);
- $privateKey = Crypt::decryptPrivateKey($encryptedKey, '');
- self::setPublicSharePrivateKey($privateKey);
-
- \OC_FileProxy::$enabled = $proxyStatus;
- }
- }
-
- /**
- * Sets user private key to session
- * @param string $privateKey
- * @return bool
- *
- * @note this should only be set on login
- */
- public function setPrivateKey($privateKey) {
-
- \OC::$server->getSession()->set('privateKey', $privateKey);
-
- return true;
-
- }
-
- /**
- * remove keys from session
- */
- public function removeKeys() {
- \OC::$server->getSession()->remove('publicSharePrivateKey');
- \OC::$server->getSession()->remove('privateKey');
- }
-
- /**
- * Sets status of encryption app
- * @param string $init INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INITIALIZED
- * @return bool
- *
- * @note this doesn not indicate of the init was successful, we just remeber the try!
- */
- public function setInitialized($init) {
-
- \OC::$server->getSession()->set('encryptionInitialized', $init);
-
- return true;
-
- }
-
- /**
- * remove encryption keys and init status from session
- */
- public function closeSession() {
- \OC::$server->getSession()->remove('encryptionInitialized');
- \OC::$server->getSession()->remove('privateKey');
- }
-
-
- /**
- * Gets status if we already tried to initialize the encryption app
- * @return string init status INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INITIALIZED
- *
- * @note this doesn not indicate of the init was successful, we just remeber the try!
- */
- public function getInitialized() {
- if (!is_null(\OC::$server->getSession()->get('encryptionInitialized'))) {
- return \OC::$server->getSession()->get('encryptionInitialized');
- } else if (Helper::isPublicAccess() && self::getPublicSharePrivateKey()) {
- return self::INIT_SUCCESSFUL;
- } else {
- return self::NOT_INITIALIZED;
- }
- }
-
- /**
- * Gets user or public share private key from session
- * @return string $privateKey The user's plaintext private key
- *
- */
- public function getPrivateKey() {
- // return the public share private key if this is a public access
- if (Helper::isPublicAccess()) {
- return self::getPublicSharePrivateKey();
- } else {
- if (!is_null(\OC::$server->getSession()->get('privateKey'))) {
- return \OC::$server->getSession()->get('privateKey');
- } else {
- return false;
- }
- }
- }
-
- /**
- * Sets public user private key to session
- * @param string $privateKey
- * @return bool
- */
- private static function setPublicSharePrivateKey($privateKey) {
- self::$publicShareKey = $privateKey;
- return true;
- }
-
- /**
- * Gets public share private key from session
- * @return string $privateKey
- *
- */
- private static function getPublicSharePrivateKey() {
- return self::$publicShareKey;
- }
-
-}
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
deleted file mode 100644
index 4cbf9e4a4b7..00000000000
--- a/apps/files_encryption/lib/stream.php
+++ /dev/null
@@ -1,700 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author jknockaert <jasper@knockaert.nl>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-/**
- * transparently encrypted filestream
- *
- * you can use it as wrapper around an existing stream by setting CryptStream::$sourceStreams['foo']=array('path'=>$path,'stream'=>$stream)
- * and then fopen('crypt://streams/foo');
- */
-
-namespace OCA\Files_Encryption;
-
-use OCA\Files_Encryption\Exception\EncryptionException;
-
-/**
- * Provides 'crypt://' stream wrapper protocol.
- * @note We use a stream wrapper because it is the most secure way to handle
- * decrypted content transfers. There is no safe way to decrypt the entire file
- * somewhere on the server, so we have to encrypt and decrypt blocks on the fly.
- * @note Paths used with this protocol MUST BE RELATIVE. Use URLs like:
- * crypt://filename, or crypt://subdirectory/filename, NOT
- * crypt:///home/user/owncloud/data. Otherwise keyfiles will be put in
- * [owncloud]/data/user/files_encryption/keyfiles/home/user/owncloud/data and
- * will not be accessible to other methods.
- * @note Data read and written must always be 8192 bytes long, as this is the
- * buffer size used internally by PHP. The encryption process makes the input
- * data longer, and input is chunked into smaller pieces in order to result in
- * a 8192 encrypted block size.
- * @note When files are deleted via webdav, or when they are updated and the
- * previous version deleted, this is handled by OC\Files\View, and thus the
- * encryption proxies are used and keyfiles deleted.
- */
-class Stream {
-
- const PADDING_CHAR = '-';
-
- private $plainKey;
- private $encKeyfiles;
- private $rawPath; // The raw path relative to the data dir
- private $relPath; // rel path to users file dir
- private $userId;
- private $keyId;
- private $handle; // Resource returned by fopen
- private $meta = array(); // Header / meta for source stream
- private $cache; // Current block unencrypted
- private $position; // Current pointer position in the unencrypted stream
- private $writeFlag; // Flag to write current block when leaving it
- private $size;
- private $headerSize = 0; // Size of header
- private $unencryptedSize;
- private $publicKey;
- private $encKeyfile;
- private $newFile; // helper var, we only need to write the keyfile for new files
- private $isLocalTmpFile = false; // do we operate on a local tmp file
- private $localTmpFile; // path of local tmp file
- private $containHeader = false; // the file contain a header
- private $cipher; // cipher used for encryption/decryption
- /** @var \OCA\Files_Encryption\Util */
- private $util;
-
- /**
- * @var \OC\Files\View
- */
- private $rootView; // a fsview object set to '/'
-
- /**
- * @var \OCA\Files_Encryption\Session
- */
- private $session;
- private $privateKey;
-
- /**
- * @param string $path raw path relative to data/
- * @param string $mode
- * @param int $options
- * @param string $opened_path
- * @return bool
- * @throw \OCA\Files_Encryption\Exception\EncryptionException
- */
- public function stream_open($path, $mode, $options, &$opened_path) {
-
- // read default cipher from config
- $this->cipher = Helper::getCipher();
-
- // assume that the file already exist before we decide it finally in getKey()
- $this->newFile = false;
-
- $this->rootView = new \OC\Files\View('/');
-
- $this->session = new Session($this->rootView);
-
- $this->privateKey = $this->session->getPrivateKey();
- if ($this->privateKey === false) {
- throw new EncryptionException('Session does not contain a private key, maybe your login password changed?',
- EncryptionException::PRIVATE_KEY_MISSING);
- }
-
- $normalizedPath = \OC\Files\Filesystem::normalizePath(str_replace('crypt://', '', $path));
- $originalFile = Helper::getPathFromTmpFile($normalizedPath);
- if ($originalFile) {
- $this->rawPath = $originalFile;
- $this->isLocalTmpFile = true;
- $this->localTmpFile = $normalizedPath;
- } else {
- $this->rawPath = $normalizedPath;
- }
-
- $this->util = new Util($this->rootView, Helper::getUser($this->rawPath));
-
- // get the key ID which we want to use, can be the users key or the
- // public share key
- $this->keyId = $this->util->getKeyId();
-
- $fileType = Helper::detectFileType($this->rawPath);
-
- switch ($fileType) {
- case Util::FILE_TYPE_FILE:
- $this->relPath = Helper::stripUserFilesPath($this->rawPath);
- $user = \OC::$server->getUserSession()->getUser();
- $this->userId = $user ? $user->getUID() : Helper::getUserFromPath($this->rawPath);
- break;
- case Util::FILE_TYPE_VERSION:
- $this->relPath = Helper::getPathFromVersion($this->rawPath);
- $this->userId = Helper::getUserFromPath($this->rawPath);
- break;
- case Util::FILE_TYPE_CACHE:
- $this->relPath = Helper::getPathFromCachedFile($this->rawPath);
- Helper::mkdirr($this->rawPath, new \OC\Files\View('/'));
- $user = \OC::$server->getUserSession()->getUser();
- $this->userId = $user ? $user->getUID() : Helper::getUserFromPath($this->rawPath);
- break;
- default:
- \OCP\Util::writeLog('Encryption library', 'failed to open file "' . $this->rawPath . '" expecting a path to "files", "files_versions" or "cache"', \OCP\Util::ERROR);
- return false;
- }
-
- // Disable fileproxies so we can get the file size and open the source file without recursive encryption
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- $this->position = 0;
- $this->cache = '';
- $this->writeFlag = 0;
-
- // Setting handle so it can be used for reading the header
- if ($this->isLocalTmpFile) {
- $this->handle = fopen($this->localTmpFile, $mode);
- } else {
- $this->handle = $this->rootView->fopen($this->rawPath, $mode);
- }
-
- if (
- $mode === 'w'
- or $mode === 'w+'
- or $mode === 'wb'
- or $mode === 'wb+'
- ) {
- // We're writing a new file so start write counter with 0 bytes
- $this->size = 0;
- $this->unencryptedSize = 0;
- } else {
- $this->size = $this->rootView->filesize($this->rawPath);
- \OC_FileProxy::$enabled = true;
- $this->unencryptedSize = $this->rootView->filesize($this->rawPath);
- \OC_FileProxy::$enabled = false;
- $this->readHeader();
- }
-
- \OC_FileProxy::$enabled = $proxyStatus;
-
- if (!is_resource($this->handle)) {
-
- \OCP\Util::writeLog('Encryption library', 'failed to open file "' . $this->rawPath . '"', \OCP\Util::ERROR);
-
- } else {
-
- $this->meta = stream_get_meta_data($this->handle);
- // sometimes fopen changes the mode, e.g. for a url "r" convert to "r+"
- // but we need to remember the original access type
- $this->meta['mode'] = $mode;
-
- }
-
-
- return is_resource($this->handle);
-
- }
-
- private function readHeader() {
-
- if (is_resource($this->handle)) {
- $data = fread($this->handle, Crypt::BLOCKSIZE);
-
- $header = Crypt::parseHeader($data);
- $this->cipher = Crypt::getCipher($header);
-
- // remeber that we found a header
- if (!empty($header)) {
- $this->containHeader = true;
- $this->headerSize = Crypt::BLOCKSIZE;
- // if there's no header then decrypt the block and store it in the cache
- } else {
- if (!$this->getKey()) {
- throw new \Exception('Encryption key not found for "' . $this->rawPath . '" during attempted read via stream');
- } else {
- $this->cache = Crypt::symmetricDecryptFileContent($data, $this->plainKey, $this->cipher);
- }
- }
-
- }
- }
-
- /**
- * Returns the current position of the file pointer
- * @return int position of the file pointer
- */
- public function stream_tell() {
- return $this->position;
- }
-
- /**
- * @param int $offset
- * @param int $whence
- * @return bool true if fseek was successful, otherwise false
- */
-
- // seeking the stream tries to move the pointer on the encrypted stream to the beginning of the target block
- // if that works, it flushes the current block and changes the position in the unencrypted stream
- public function stream_seek($offset, $whence = SEEK_SET) {
- // this wrapper needs to return "true" for success.
- // the fseek call itself returns 0 on succeess
-
- $return=false;
-
- switch($whence) {
- case SEEK_SET:
- if($offset < $this->unencryptedSize && $offset >= 0) {
- $newPosition=$offset;
- }
- break;
- case SEEK_CUR:
- if($offset>=0) {
- $newPosition=$offset+$this->position;
- }
- break;
- case SEEK_END:
- if($this->unencryptedSize + $offset >= 0) {
- $newPosition=$this->unencryptedSize+$offset;
- }
- break;
- default:
- return $return;
- }
- $newFilePosition=floor($newPosition/6126)*Crypt::BLOCKSIZE+$this->headerSize;
- if (fseek($this->handle, $newFilePosition)===0) {
- $this->flush();
- $this->position=$newPosition;
- $return=true;
- }
- return $return;
-
- }
-
- /**
- * @param int $count
- * @return bool|string
- * @throws \OCA\Files_Encryption\Exception\EncryptionException
- */
- public function stream_read($count) {
-
- $result = '';
-
- // limit to the end of the unencrypted file; otherwise getFileSize will fail and it is good practise anyway
- $count=min($count,$this->unencryptedSize - $this->position);
-
- // loop over the 6126 sized unencrypted blocks
- while ($count > 0) {
-
- $remainingLength = $count;
-
- // update the cache of the current block
- $this->readCache();
-
- // determine the relative position in the current block
- $blockPosition=($this->position % 6126);
-
- // if entire read inside current block then only position needs to be updated
- if ($remainingLength<(6126 - $blockPosition)) {
- $result .= substr($this->cache,$blockPosition,$remainingLength);
- $this->position += $remainingLength;
- $count=0;
- // otherwise remainder of current block is fetched, the block is flushed and the position updated
- } else {
- $result .= substr($this->cache,$blockPosition);
- $this->flush();
- $this->position += (6126 - $blockPosition);
- $count -= (6126 - $blockPosition);
- }
-
- }
-
- return $result;
-
- }
-
- /**
- * Encrypt and pad data ready for writing to disk
- * @param string $plainData data to be encrypted
- * @param string $key key to use for encryption
- * @return string encrypted data on success, false on failure
- */
- public function preWriteEncrypt($plainData, $key) {
-
- // Encrypt data to 'catfile', which includes IV
- if ($encrypted = Crypt::symmetricEncryptFileContent($plainData, $key, $this->cipher)) {
-
- return $encrypted;
-
- } else {
-
- return false;
-
- }
-
- }
-
- /**
- * Fetch the plain encryption key for the file and set it as plainKey property
- * @internal param bool $generate if true, a new key will be generated if none can be found
- * @return bool true on key found and set, false on key not found and new key generated and set
- */
- public function getKey() {
-
- // Check if key is already set
- if (isset($this->plainKey) && isset($this->encKeyfile)) {
-
- return true;
-
- }
-
- // Fetch and decrypt keyfile
- // Fetch existing keyfile
- $this->encKeyfile = Keymanager::getFileKey($this->rootView, $this->util, $this->relPath);
-
- // If a keyfile already exists
- if ($this->encKeyfile) {
-
- $shareKey = Keymanager::getShareKey($this->rootView, $this->keyId, $this->util, $this->relPath);
-
- // if there is no valid private key return false
- if ($this->privateKey === false) {
- // if private key is not valid redirect user to a error page
- Helper::redirectToErrorPage($this->session);
- return false;
- }
-
- if ($shareKey === false) {
- // if no share key is available redirect user to a error page
- Helper::redirectToErrorPage($this->session, Crypt::ENCRYPTION_NO_SHARE_KEY_FOUND);
- return false;
- }
-
- $this->plainKey = Crypt::multiKeyDecrypt($this->encKeyfile, $shareKey, $this->privateKey);
-
- return true;
-
- } else {
-
- $this->newFile = true;
-
- return false;
-
- }
-
- }
-
- /**
- * write header at beginning of encrypted file
- *
- * @throws \OCA\Files_Encryption\Exception\EncryptionException
- */
- private function writeHeader() {
-
- $header = Crypt::generateHeader();
-
- if (strlen($header) > Crypt::BLOCKSIZE) {
- throw new EncryptionException('max header size exceeded', EncryptionException::ENCRYPTION_HEADER_TO_LARGE);
- }
-
- $paddedHeader = str_pad($header, Crypt::BLOCKSIZE, self::PADDING_CHAR, STR_PAD_RIGHT);
-
- fwrite($this->handle, $paddedHeader);
- $this->headerWritten = true;
- $this->containHeader = true;
- $this->headerSize = Crypt::BLOCKSIZE;
- $this->size += $this->headerSize;
- }
-
- /**
- * Handle plain data from the stream, and write it in 8192 byte blocks
- * @param string $data data to be written to disk
- * @note the data will be written to the path stored in the stream handle, set in stream_open()
- * @note $data is only ever be a maximum of 8192 bytes long. This is set by PHP internally. stream_write() is called multiple times in a loop on data larger than 8192 bytes
- * @note Because the encryption process used increases the length of $data, a cache is used to carry over data which would not fit in the required block size
- * @note Padding is added to each encrypted block to ensure that the resulting block is exactly 8192 bytes. This is removed during stream_read
- * @note PHP automatically updates the file pointer after writing data to reflect it's length. There is generally no need to update the poitner manually using fseek
- */
- public function stream_write($data) {
-
- // if there is no valid private key return false
- if ($this->privateKey === false) {
- $this->size = 0;
- return strlen($data);
- }
-
- if ($this->size === 0) {
- $this->writeHeader();
- }
-
- // Get / generate the keyfile for the file we're handling
- // If we're writing a new file (not overwriting an existing
- // one), save the newly generated keyfile
- if (!$this->getKey()) {
-
- $this->plainKey = Crypt::generateKey();
-
- }
-
- $length=0;
-
- // loop over $data to fit it in 6126 sized unencrypted blocks
- while (strlen($data) > 0) {
-
- $remainingLength = strlen($data);
-
- // set the cache to the current 6126 block
- $this->readCache();
-
- // only allow writes on seekable streams, or at the end of the encrypted stream
- // for seekable streams the pointer is moved back to the beginning of the encrypted block
- // flush will start writing there when the position moves to another block
- if((fseek($this->handle, floor($this->position/6126)*Crypt::BLOCKSIZE + $this->headerSize) === 0) || (floor($this->position/6126)*Crypt::BLOCKSIZE + $this->headerSize === $this->size)) {
-
- // switch the writeFlag so flush() will write the block
- $this->writeFlag=1;
-
- // determine the relative position in the current block
- $blockPosition=($this->position % 6126);
-
- // check if $data fits in current block
- // if so, overwrite existing data (if any)
- // update position and liberate $data
- if ($remainingLength<(6126 - $blockPosition)) {
- $this->cache=substr($this->cache,0,$blockPosition).$data.substr($this->cache,$blockPosition+$remainingLength);
- $this->position += $remainingLength;
- $length += $remainingLength;
- $data = '';
- // if $data doens't fit the current block, the fill the current block and reiterate
- // after the block is filled, it is flushed and $data is updated
- } else {
- $this->cache=substr($this->cache,0,$blockPosition).substr($data,0,6126-$blockPosition);
- $this->flush();
- $this->position += (6126 - $blockPosition);
- $length += (6126 - $blockPosition);
- $data = substr($data, 6126 - $blockPosition);
- }
-
- } else {
- $data='';
- }
- }
-
- $this->unencryptedSize = max($this->unencryptedSize,$this->position);
-
- return $length;
-
- }
-
-
- /**
- * @param int $option
- * @param int $arg1
- * @param int|null $arg2
- */
- public function stream_set_option($option, $arg1, $arg2) {
- $return = false;
- switch ($option) {
- case STREAM_OPTION_BLOCKING:
- $return = stream_set_blocking($this->handle, $arg1);
- break;
- case STREAM_OPTION_READ_TIMEOUT:
- $return = stream_set_timeout($this->handle, $arg1, $arg2);
- break;
- case STREAM_OPTION_WRITE_BUFFER:
- $return = stream_set_write_buffer($this->handle, $arg1);
- }
-
- return $return;
- }
-
- /**
- * @return array
- */
- public function stream_stat() {
- return fstat($this->handle);
- }
-
- /**
- * @param int $mode
- */
- public function stream_lock($mode) {
- return flock($this->handle, $mode);
- }
-
- /**
- * @return bool
- */
- public function stream_flush() {
-
- $this->flush();
- return fflush($this->handle);
- // Not a typo: http://php.net/manual/en/function.fflush.php
-
- }
-
- /**
- * @return bool
- */
- public function stream_eof() {
- return ($this->position>=$this->unencryptedSize);
- }
-
- private function flush() {
-
- // write to disk only when writeFlag was set to 1
- if ($this->writeFlag === 1) {
- // Disable the file proxies so that encryption is not
- // automatically attempted when the file is written to disk -
- // we are handling that separately here and we don't want to
- // get into an infinite loop
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
- // Set keyfile property for file in question
- $this->getKey();
- $encrypted = $this->preWriteEncrypt($this->cache, $this->plainKey);
- fwrite($this->handle, $encrypted);
- $this->writeFlag = 0;
- $this->size = max($this->size,ftell($this->handle));
- \OC_FileProxy::$enabled = $proxyStatus;
- }
- // always empty the cache (otherwise readCache() will not fill it with the new block)
- $this->cache = '';
- }
-
- private function readCache() {
- // cache should always be empty string when this function is called
- // don't try to fill the cache when trying to write at the end of the unencrypted file when it coincides with new block
- if ($this->cache === '' && !($this->position===$this->unencryptedSize && ($this->position % 6126)===0)) {
- // Get the data from the file handle
- $data = fread($this->handle, Crypt::BLOCKSIZE);
- $result = '';
- if (strlen($data)) {
- if (!$this->getKey()) {
- // Error! We don't have a key to decrypt the file with
- throw new \Exception('Encryption key not found for "'. $this->rawPath . '" during attempted read via stream');
- } else {
- // Decrypt data
- $result = Crypt::symmetricDecryptFileContent($data, $this->plainKey, $this->cipher);
- }
- }
- $this->cache = $result;
- }
- }
-
- /**
- * @return bool
- */
- public function stream_close() {
-
- $this->flush();
-
- // if there is no valid private key return false
- if ($this->privateKey === false) {
-
- // cleanup
- if ($this->meta['mode'] !== 'r' && $this->meta['mode'] !== 'rb' && !$this->isLocalTmpFile) {
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- if ($this->rootView->file_exists($this->rawPath) && $this->size === $this->headerSize) {
- fclose($this->handle);
- $this->rootView->unlink($this->rawPath);
- }
-
- // Re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
- }
-
- // if private key is not valid redirect user to a error page
- Helper::redirectToErrorPage($this->session);
- }
-
- if (
- $this->meta['mode'] !== 'r' &&
- $this->meta['mode'] !== 'rb' &&
- $this->isLocalTmpFile === false &&
- $this->size > $this->headerSize &&
- $this->unencryptedSize > 0
- ) {
-
- // only write keyfiles if it was a new file
- if ($this->newFile === true) {
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // Fetch user's public key
- $this->publicKey = Keymanager::getPublicKey($this->rootView, $this->keyId);
-
- // Check if OC sharing api is enabled
- $sharingEnabled = \OCP\Share::isEnabled();
-
- // Get all users sharing the file includes current user
- $uniqueUserIds = $this->util->getSharingUsersArray($sharingEnabled, $this->relPath);
- $checkedUserIds = $this->util->filterShareReadyUsers($uniqueUserIds);
-
- // Fetch public keys for all sharing users
- $publicKeys = Keymanager::getPublicKeys($this->rootView, $checkedUserIds['ready']);
-
- // Encrypt enc key for all sharing users
- $this->encKeyfiles = Crypt::multiKeyEncrypt($this->plainKey, $publicKeys);
-
- // Save the new encrypted file key
- Keymanager::setFileKey($this->rootView, $this->util, $this->relPath, $this->encKeyfiles['data']);
-
- // Save the sharekeys
- Keymanager::setShareKeys($this->rootView, $this->util, $this->relPath, $this->encKeyfiles['keys']);
-
- // Re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
- }
-
- // we need to update the file info for the real file, not for the
- // part file.
- $path = Helper::stripPartialFileExtension($this->rawPath);
-
- $fileInfo = array(
- 'mimetype' => $this->rootView->getMimeType($this->rawPath),
- 'encrypted' => true,
- 'unencrypted_size' => $this->unencryptedSize,
- );
-
- // if we write a part file we also store the unencrypted size for
- // the part file so that it can be re-used later
- $this->rootView->putFileInfo($this->rawPath, $fileInfo);
- if ($path !== $this->rawPath) {
- $this->rootView->putFileInfo($path, $fileInfo);
- }
-
- }
-
- $result = fclose($this->handle);
-
- if ($result === false) {
- \OCP\Util::writeLog('Encryption library', 'Could not close stream, file could be corrupted', \OCP\Util::FATAL);
- }
-
- return $result;
-
- }
-
-}
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
deleted file mode 100644
index d8dd96d653f..00000000000
--- a/apps/files_encryption/lib/util.php
+++ /dev/null
@@ -1,1700 +0,0 @@
-<?php
-/**
- * @author Arthur Schiwon <blizzz@owncloud.com>
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author jknockaert <jasper@knockaert.nl>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Markus Goetz <markus@woboq.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption;
-
-/**
- * Class for utilities relating to encrypted file storage system
- * @param \OC\Files\View $view expected to have OC '/' as root path
- * @param string $userId ID of the logged in user
- * @param int $client indicating status of client side encryption. Currently
- * unused, likely to become obsolete shortly
- */
-
-class Util {
-
- const MIGRATION_COMPLETED = 1; // migration to new encryption completed
- const MIGRATION_IN_PROGRESS = -1; // migration is running
- const MIGRATION_OPEN = 0; // user still needs to be migrated
-
- const FILE_TYPE_FILE = 0;
- const FILE_TYPE_VERSION = 1;
- const FILE_TYPE_CACHE = 2;
-
- /**
- * @var \OC\Files\View
- */
- private $view; // OC\Files\View object for filesystem operations
-
- /**
- * @var string
- */
- private $userId; // ID of the user we use to encrypt/decrypt files
-
- /**
- * @var string
- */
- private $keyId; // ID of the key we want to manipulate
-
- /**
- * @var bool
- */
- private $client; // Client side encryption mode flag
-
- /**
- * @var string
- */
- private $publicKeyDir; // Dir containing all public user keys
-
- /**
- * @var string
- */
- private $encryptionDir; // Dir containing user's files_encryption
-
- /**
- * @var string
- */
- private $keysPath; // Dir containing all file related encryption keys
-
- /**
- * @var string
- */
- private $publicKeyPath; // Path to user's public key
-
- /**
- * @var string
- */
- private $privateKeyPath; // Path to user's private key
-
- /**
- * @var string
- */
- private $userFilesDir;
-
- /**
- * @var string
- */
- private $publicShareKeyId;
-
- /**
- * @var string
- */
- private $recoveryKeyId;
-
- /**
- * @var bool
- */
- private $isPublic;
-
- /**
- * @param \OC\Files\View $view
- * @param string $userId
- * @param bool $client
- */
- public function __construct($view, $userId, $client = false) {
-
- $this->view = $view;
- $this->client = $client;
- $this->userId = $userId;
-
- $appConfig = \OC::$server->getAppConfig();
-
- $this->publicShareKeyId = $appConfig->getValue('files_encryption', 'publicShareKeyId');
- $this->recoveryKeyId = $appConfig->getValue('files_encryption', 'recoveryKeyId');
-
- $this->userDir = '/' . $this->userId;
- $this->fileFolderName = 'files';
- $this->userFilesDir =
- '/' . $userId . '/' . $this->fileFolderName; // TODO: Does this need to be user configurable?
- $this->publicKeyDir = Keymanager::getPublicKeyPath();
- $this->encryptionDir = '/' . $this->userId . '/' . 'files_encryption';
- $this->keysPath = $this->encryptionDir . '/' . 'keys';
- $this->publicKeyPath =
- $this->publicKeyDir . '/' . $this->userId . '.publicKey'; // e.g. data/public-keys/admin.publicKey
- $this->privateKeyPath =
- $this->encryptionDir . '/' . $this->userId . '.privateKey'; // e.g. data/admin/admin.privateKey
- // make sure that the owners home is mounted
- \OC\Files\Filesystem::initMountPoints($userId);
-
- if (Helper::isPublicAccess()) {
- $this->keyId = $this->publicShareKeyId;
- $this->isPublic = true;
- } else {
- $this->keyId = $this->userId;
- $this->isPublic = false;
- }
- }
-
- /**
- * @return bool
- */
- public function ready() {
-
- if (
- !$this->view->file_exists($this->encryptionDir)
- or !$this->view->file_exists($this->keysPath)
- or !$this->view->file_exists($this->publicKeyPath)
- or !$this->view->file_exists($this->privateKeyPath)
- ) {
- return false;
- } else {
- return true;
- }
- }
-
- /**
- * check if the users private & public key exists
- * @return boolean
- */
- public function userKeysExists() {
- if (
- $this->view->file_exists($this->privateKeyPath) &&
- $this->view->file_exists($this->publicKeyPath)) {
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * create a new public/private key pair for the user
- *
- * @param string $password password for the private key
- */
- public function replaceUserKeys($password) {
- $this->backupAllKeys('password_reset');
- $this->view->unlink($this->publicKeyPath);
- $this->view->unlink($this->privateKeyPath);
- $this->setupServerSide($password);
- }
-
- /**
- * Sets up user folders and keys for serverside encryption
- *
- * @param string $passphrase to encrypt server-stored private key with
- * @return bool
- */
- public function setupServerSide($passphrase = null) {
-
- // Set directories to check / create
- $setUpDirs = array(
- $this->userDir,
- $this->publicKeyDir,
- $this->encryptionDir,
- $this->keysPath
- );
-
- // Check / create all necessary dirs
- foreach ($setUpDirs as $dirPath) {
-
- if (!$this->view->file_exists($dirPath)) {
-
- $this->view->mkdir($dirPath);
-
- }
-
- }
-
- // Create user keypair
- // we should never override a keyfile
- if (
- !$this->view->file_exists($this->publicKeyPath)
- && !$this->view->file_exists($this->privateKeyPath)
- ) {
-
- // Generate keypair
- $keypair = Crypt::createKeypair();
-
- if ($keypair) {
-
- \OC_FileProxy::$enabled = false;
-
- // Encrypt private key with user pwd as passphrase
- $encryptedPrivateKey = Crypt::symmetricEncryptFileContent($keypair['privateKey'], $passphrase, Helper::getCipher());
-
- // Save key-pair
- if ($encryptedPrivateKey) {
- $header = crypt::generateHeader();
- $this->view->file_put_contents($this->privateKeyPath, $header . $encryptedPrivateKey);
- $this->view->file_put_contents($this->publicKeyPath, $keypair['publicKey']);
- }
-
- \OC_FileProxy::$enabled = true;
- }
-
- } else {
- // check if public-key exists but private-key is missing
- if ($this->view->file_exists($this->publicKeyPath) && !$this->view->file_exists($this->privateKeyPath)) {
- \OCP\Util::writeLog('Encryption library',
- 'public key exists but private key is missing for "' . $this->keyId . '"', \OCP\Util::FATAL);
- return false;
- } else {
- if (!$this->view->file_exists($this->publicKeyPath) && $this->view->file_exists($this->privateKeyPath)
- ) {
- \OCP\Util::writeLog('Encryption library',
- 'private key exists but public key is missing for "' . $this->keyId . '"', \OCP\Util::FATAL);
- return false;
- }
- }
- }
-
- return true;
-
- }
-
- /**
- * @return string
- */
- public function getPublicShareKeyId() {
- return $this->publicShareKeyId;
- }
-
- /**
- * Check whether pwd recovery is enabled for a given user
- * @return bool 1 = yes, 0 = no, false = no record
- *
- * @note If records are not being returned, check for a hidden space
- * at the start of the uid in db
- */
- public function recoveryEnabledForUser() {
-
- $recoveryMode = \OC::$server->getConfig()->getUserValue($this->userId, 'files_encryption', 'recovery_enabled', '0');
-
- return ($recoveryMode === '1') ? true : false;
-
- }
-
- /**
- * Enable / disable pwd recovery for a given user
- * @param bool $enabled Whether to enable or disable recovery
- * @return bool
- */
- public function setRecoveryForUser($enabled) {
-
- $value = $enabled ? '1' : '0';
- try {
- \OC::$server->getConfig()->setUserValue($this->userId, 'files_encryption', 'recovery_enabled', $value);
- return true;
- } catch(\OCP\PreConditionNotMetException $e) {
- return false;
- }
-
- }
-
- /**
- * Find all files and their encryption status within a directory
- * @param string $directory The path of the parent directory to search
- * @param bool $found the founded files if called again
- * @return array keys: plain, encrypted, broken
- * @note $directory needs to be a path relative to OC data dir. e.g.
- * /admin/files NOT /backup OR /home/www/oc/data/admin/files
- */
- public function findEncFiles($directory, &$found = false) {
-
- // Disable proxy - we don't want files to be decrypted before
- // we handle them
- \OC_FileProxy::$enabled = false;
-
- if ($found === false) {
- $found = array(
- 'plain' => array(),
- 'encrypted' => array(),
- 'broken' => array(),
- );
- }
-
- if ($this->view->is_dir($directory) && $handle = $this->view->opendir($directory)){
- if (is_resource($handle)) {
- while (false !== ($file = readdir($handle))) {
-
- if ($file !== "." && $file !== "..") {
- // skip stray part files
- if (Helper::isPartialFilePath($file)) {
- continue;
- }
-
- $filePath = $directory . '/' . $this->view->getRelativePath('/' . $file);
- $relPath = Helper::stripUserFilesPath($filePath);
-
- // If the path is a directory, search
- // its contents
- if ($this->view->is_dir($filePath)) {
-
- $this->findEncFiles($filePath, $found);
-
- // If the path is a file, determine
- // its encryption status
- } elseif ($this->view->is_file($filePath)) {
-
- // Disable proxies again, some-
- // where they got re-enabled :/
- \OC_FileProxy::$enabled = false;
-
- $isEncryptedPath = $this->isEncryptedPath($filePath);
- // If the file is encrypted
- // NOTE: If the userId is
- // empty or not set, file will
- // detected as plain
- // NOTE: This is inefficient;
- // scanning every file like this
- // will eat server resources :(
- if ($isEncryptedPath) {
-
- $fileKey = Keymanager::getFileKey($this->view, $this, $relPath);
- $shareKey = Keymanager::getShareKey($this->view, $this->userId, $this, $relPath);
- // if file is encrypted but now file key is available, throw exception
- if ($fileKey === false || $shareKey === false) {
- \OCP\Util::writeLog('encryption library', 'No keys available to decrypt the file: ' . $filePath, \OCP\Util::ERROR);
- $found['broken'][] = array(
- 'name' => $file,
- 'path' => $filePath,
- );
- } else {
- $found['encrypted'][] = array(
- 'name' => $file,
- 'path' => $filePath,
- );
- }
-
- // If the file is not encrypted
- } else {
-
- $found['plain'][] = array(
- 'name' => $file,
- 'path' => $relPath
- );
- }
- }
- }
- }
- }
- }
-
- \OC_FileProxy::$enabled = true;
-
- return $found;
- }
-
- /**
- * Check if a given path identifies an encrypted file
- * @param string $path
- * @return boolean
- */
- public function isEncryptedPath($path) {
-
- // Disable encryption proxy so data retrieved is in its
- // original form
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- $data = '';
-
- // we only need 24 byte from the last chunk
- if ($this->view->file_exists($path)) {
- $handle = $this->view->fopen($path, 'r');
- if (is_resource($handle)) {
- // suppress fseek warining, we handle the case that fseek doesn't
- // work in the else branch
- if (@fseek($handle, -24, SEEK_END) === 0) {
- $data = fgets($handle);
- } else {
- // if fseek failed on the storage we create a local copy from the file
- // and read this one
- fclose($handle);
- $localFile = $this->view->getLocalFile($path);
- $handle = fopen($localFile, 'r');
- if (is_resource($handle) && fseek($handle, -24, SEEK_END) === 0) {
- $data = fgets($handle);
- }
- }
- fclose($handle);
- }
- }
-
- // re-enable proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
- return Crypt::isCatfileContent($data);
- }
-
- /**
- * get the file size of the unencrypted file
- * @param string $path absolute path
- * @return bool
- */
- public function getFileSize($path) {
-
- $result = 0;
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // split the path parts
- $pathParts = explode('/', $path);
-
- if (isset($pathParts[2]) && $pathParts[2] === 'files' && $this->view->file_exists($path)
- && $this->isEncryptedPath($path)
- ) {
-
- $cipher = 'AES-128-CFB';
- $realSize = 0;
-
- // get the size from filesystem
- $size = $this->view->filesize($path);
-
- // open stream
- $stream = $this->view->fopen($path, "r");
-
- if (is_resource($stream)) {
-
- // if the file contains a encryption header we
- // we set the cipher
- // and we update the size
- if ($this->containHeader($path)) {
- $data = fread($stream,Crypt::BLOCKSIZE);
- $header = Crypt::parseHeader($data);
- $cipher = Crypt::getCipher($header);
- $size -= Crypt::BLOCKSIZE;
- }
-
- // fast path, else the calculation for $lastChunkNr is bogus
- if ($size === 0) {
- \OC_FileProxy::$enabled = $proxyStatus;
- return 0;
- }
-
- // calculate last chunk nr
- // next highest is end of chunks, one subtracted is last one
- // we have to read the last chunk, we can't just calculate it (because of padding etc)
- $lastChunkNr = ceil($size/Crypt::BLOCKSIZE)-1;
-
- // calculate last chunk position
- $lastChunkPos = ($lastChunkNr * Crypt::BLOCKSIZE);
-
- // get the content of the last chunk
- if (@fseek($stream, $lastChunkPos, SEEK_CUR) === 0) {
- $realSize+=$lastChunkNr*6126;
- }
- $lastChunkContentEncrypted='';
- $count=Crypt::BLOCKSIZE;
- while ($count>0) {
- $data=fread($stream,Crypt::BLOCKSIZE);
- $count=strlen($data);
- $lastChunkContentEncrypted.=$data;
- if(strlen($lastChunkContentEncrypted)>Crypt::BLOCKSIZE) {
- $realSize+=6126;
- $lastChunkContentEncrypted=substr($lastChunkContentEncrypted,Crypt::BLOCKSIZE);
- }
- }
- fclose($stream);
- $relPath = Helper::stripUserFilesPath($path);
- $shareKey = Keymanager::getShareKey($this->view, $this->keyId, $this, $relPath);
- if($shareKey===false) {
- \OC_FileProxy::$enabled = $proxyStatus;
- return $result;
- }
- $session = new Session($this->view);
- $privateKey = $session->getPrivateKey();
- $plainKeyfile = $this->decryptKeyfile($relPath, $privateKey);
- $plainKey = Crypt::multiKeyDecrypt($plainKeyfile, $shareKey, $privateKey);
- $lastChunkContent=Crypt::symmetricDecryptFileContent($lastChunkContentEncrypted, $plainKey, $cipher);
-
- // calc the real file size with the size of the last chunk
- $realSize += strlen($lastChunkContent);
-
- // store file size
- $result = $realSize;
- }
- }
-
- \OC_FileProxy::$enabled = $proxyStatus;
-
- return $result;
- }
-
- /**
- * check if encrypted file contain a encryption header
- *
- * @param string $path
- * @return boolean
- */
- private function containHeader($path) {
- // Disable encryption proxy to read the raw data
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- $isHeader = false;
- $handle = $this->view->fopen($path, 'r');
-
- if (is_resource($handle)) {
- $firstBlock = fread($handle, Crypt::BLOCKSIZE);
- $isHeader = Crypt::isHeader($firstBlock);
- }
-
- \OC_FileProxy::$enabled = $proxyStatus;
-
- return $isHeader;
- }
-
- /**
- * fix the file size of the encrypted file
- * @param string $path absolute path
- * @return boolean true / false if file is encrypted
- */
- public function fixFileSize($path) {
-
- $result = false;
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- $realSize = $this->getFileSize($path);
-
- if ($realSize > 0) {
-
- $cached = $this->view->getFileInfo($path);
- $cached['encrypted'] = true;
-
- // set the size
- $cached['unencrypted_size'] = $realSize;
-
- // put file info
- $this->view->putFileInfo($path, $cached);
-
- $result = true;
-
- }
-
- \OC_FileProxy::$enabled = $proxyStatus;
-
- return $result;
- }
-
- /**
- * encrypt versions from given file
- * @param array $filelist list of encrypted files, relative to data/user/files
- * @return boolean
- */
- private function encryptVersions($filelist) {
-
- $successful = true;
-
- if (\OCP\App::isEnabled('files_versions')) {
-
- foreach ($filelist as $filename) {
-
- $versions = \OCA\Files_Versions\Storage::getVersions($this->userId, $filename);
- foreach ($versions as $version) {
-
- $path = '/' . $this->userId . '/files_versions/' . $version['path'] . '.v' . $version['version'];
-
- $encHandle = fopen('crypt://' . $path . '.part', 'wb');
-
- if ($encHandle === false) {
- \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $path . '", decryption failed!', \OCP\Util::FATAL);
- $successful = false;
- continue;
- }
-
- $plainHandle = $this->view->fopen($path, 'rb');
- if ($plainHandle === false) {
- \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $path . '.part", decryption failed!', \OCP\Util::FATAL);
- $successful = false;
- continue;
- }
-
- stream_copy_to_stream($plainHandle, $encHandle);
-
- fclose($encHandle);
- fclose($plainHandle);
-
- $this->view->rename($path . '.part', $path);
- }
- }
- }
-
- return $successful;
- }
-
- /**
- * decrypt versions from given file
- * @param string $filelist list of decrypted files, relative to data/user/files
- * @return boolean
- */
- private function decryptVersions($filelist) {
-
- $successful = true;
-
- if (\OCP\App::isEnabled('files_versions')) {
-
- foreach ($filelist as $filename) {
-
- $versions = \OCA\Files_Versions\Storage::getVersions($this->userId, $filename);
- foreach ($versions as $version) {
-
- $path = '/' . $this->userId . '/files_versions/' . $version['path'] . '.v' . $version['version'];
-
- $encHandle = fopen('crypt://' . $path, 'rb');
-
- if ($encHandle === false) {
- \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $path . '", decryption failed!', \OCP\Util::FATAL);
- $successful = false;
- continue;
- }
-
- $plainHandle = $this->view->fopen($path . '.part', 'wb');
- if ($plainHandle === false) {
- \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $path . '.part", decryption failed!', \OCP\Util::FATAL);
- $successful = false;
- continue;
- }
-
- stream_copy_to_stream($encHandle, $plainHandle);
-
- fclose($encHandle);
- fclose($plainHandle);
-
- $this->view->rename($path . '.part', $path);
- }
- }
- }
-
- return $successful;
- }
-
- /**
- * Decrypt all files
- * @return bool
- */
- public function decryptAll() {
-
- $found = $this->findEncFiles($this->userId . '/files');
-
- $successful = true;
-
- if ($found) {
-
- $versionStatus = \OCP\App::isEnabled('files_versions');
- \OC_App::disable('files_versions');
-
- $decryptedFiles = array();
-
- // Encrypt unencrypted files
- foreach ($found['encrypted'] as $encryptedFile) {
-
- //relative to data/<user>/file
- $relPath = Helper::stripUserFilesPath($encryptedFile['path']);
-
- //get file info
- $fileInfo = \OC\Files\Filesystem::getFileInfo($relPath);
-
- //relative to /data
- $rawPath = $encryptedFile['path'];
-
- //get timestamp
- $timestamp = $fileInfo['mtime'];
-
- //enable proxy to use OC\Files\View to access the original file
- \OC_FileProxy::$enabled = true;
-
- // Open enc file handle for binary reading
- $encHandle = $this->view->fopen($rawPath, 'rb');
-
- // Disable proxy to prevent file being encrypted again
- \OC_FileProxy::$enabled = false;
-
- if ($encHandle === false) {
- \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $rawPath . '", decryption failed!', \OCP\Util::FATAL);
- $successful = false;
- continue;
- }
-
- // Open plain file handle for binary writing, with same filename as original plain file
- $plainHandle = $this->view->fopen($rawPath . '.part', 'wb');
- if ($plainHandle === false) {
- \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $rawPath . '.part", decryption failed!', \OCP\Util::FATAL);
- $successful = false;
- continue;
- }
-
- // Move plain file to a temporary location
- $size = stream_copy_to_stream($encHandle, $plainHandle);
- if ($size === 0) {
- \OCP\Util::writeLog('Encryption library', 'Zero bytes copied of "' . $rawPath . '", decryption failed!', \OCP\Util::FATAL);
- $successful = false;
- continue;
- }
-
- fclose($encHandle);
- fclose($plainHandle);
-
- $fakeRoot = $this->view->getRoot();
- $this->view->chroot('/' . $this->userId . '/files');
-
- $this->view->rename($relPath . '.part', $relPath);
-
- //set timestamp
- $this->view->touch($relPath, $timestamp);
-
- $this->view->chroot($fakeRoot);
-
- // Add the file to the cache
- \OC\Files\Filesystem::putFileInfo($relPath, array(
- 'encrypted' => false,
- 'size' => $size,
- 'unencrypted_size' => 0,
- 'etag' => $fileInfo['etag']
- ));
-
- $decryptedFiles[] = $relPath;
-
- }
-
- if ($versionStatus) {
- \OC_App::enable('files_versions');
- }
-
- if (!$this->decryptVersions($decryptedFiles)) {
- $successful = false;
- }
-
- // if there are broken encrypted files than the complete decryption
- // was not successful
- if (!empty($found['broken'])) {
- $successful = false;
- }
-
- if ($successful) {
- $this->backupAllKeys('decryptAll', false, false);
- $this->view->deleteAll($this->keysPath);
- }
-
- \OC_FileProxy::$enabled = true;
- }
-
- return $successful;
- }
-
- /**
- * Encrypt all files in a directory
- * @param string $dirPath the directory whose files will be encrypted
- * @return bool
- * @note Encryption is recursive
- */
- public function encryptAll($dirPath) {
-
- $result = true;
-
- $found = $this->findEncFiles($dirPath);
-
- // Disable proxy to prevent file being encrypted twice
- \OC_FileProxy::$enabled = false;
-
- $versionStatus = \OCP\App::isEnabled('files_versions');
- \OC_App::disable('files_versions');
-
- $encryptedFiles = array();
-
- // Encrypt unencrypted files
- foreach ($found['plain'] as $plainFile) {
-
- //get file info
- $fileInfo = \OC\Files\Filesystem::getFileInfo($plainFile['path']);
-
- //relative to data/<user>/file
- $relPath = $plainFile['path'];
-
- //relative to /data
- $rawPath = '/' . $this->userId . '/files/' . $plainFile['path'];
-
- // keep timestamp
- $timestamp = $fileInfo['mtime'];
-
- // Open plain file handle for binary reading
- $plainHandle = $this->view->fopen($rawPath, 'rb');
-
- // Open enc file handle for binary writing, with same filename as original plain file
- $encHandle = fopen('crypt://' . $rawPath . '.part', 'wb');
-
- if (is_resource($encHandle) && is_resource($plainHandle)) {
- // Move plain file to a temporary location
- $size = stream_copy_to_stream($plainHandle, $encHandle);
-
- fclose($encHandle);
- fclose($plainHandle);
-
- $fakeRoot = $this->view->getRoot();
- $this->view->chroot('/' . $this->userId . '/files');
-
- $this->view->rename($relPath . '.part', $relPath);
-
- // set timestamp
- $this->view->touch($relPath, $timestamp);
-
- $encSize = $this->view->filesize($relPath);
-
- $this->view->chroot($fakeRoot);
-
- // Add the file to the cache
- \OC\Files\Filesystem::putFileInfo($relPath, array(
- 'encrypted' => true,
- 'size' => $encSize,
- 'unencrypted_size' => $size,
- 'etag' => $fileInfo['etag']
- ));
-
- $encryptedFiles[] = $relPath;
- } else {
- \OCP\Util::writeLog('files_encryption', 'initial encryption: could not encrypt ' . $rawPath, \OCP\Util::FATAL);
- $result = false;
- }
- }
-
- \OC_FileProxy::$enabled = true;
-
- if ($versionStatus) {
- \OC_App::enable('files_versions');
- }
-
- $result = $result && $this->encryptVersions($encryptedFiles);
-
- return $result;
-
- }
-
- /**
- * Return important encryption related paths
- * @param string $pathName Name of the directory to return the path of
- * @return string path
- */
- public function getPath($pathName) {
-
- switch ($pathName) {
-
- case 'publicKeyDir':
-
- return $this->publicKeyDir;
-
- break;
-
- case 'encryptionDir':
-
- return $this->encryptionDir;
-
- break;
-
- case 'keysPath':
-
- return $this->keysPath;
-
- break;
-
- case 'publicKeyPath':
-
- return $this->publicKeyPath;
-
- break;
-
- case 'privateKeyPath':
-
- return $this->privateKeyPath;
-
- break;
- }
-
- return false;
-
- }
-
- /**
- * Returns whether the given user is ready for encryption.
- * Also returns true if the given user is the public user
- * or the recovery key user.
- *
- * @param string $user user to check
- *
- * @return boolean true if the user is ready, false otherwise
- */
- private function isUserReady($user) {
- if ($user === $this->publicShareKeyId
- || $user === $this->recoveryKeyId
- ) {
- return true;
- }
- $util = new Util($this->view, $user);
- return $util->ready();
- }
-
- /**
- * Filter an array of UIDs to return only ones ready for sharing
- * @param array $unfilteredUsers users to be checked for sharing readiness
- * @return array as multi-dimensional array. keys: ready, unready
- */
- public function filterShareReadyUsers($unfilteredUsers) {
-
- // This array will collect the filtered IDs
- $readyIds = $unreadyIds = array();
-
- // Loop through users and create array of UIDs that need new keyfiles
- foreach ($unfilteredUsers as $user) {
- // Check that the user is encryption capable, or is the
- // public system user (for public shares)
- if ($this->isUserReady($user)) {
-
- // Construct array of ready UIDs for Keymanager{}
- $readyIds[] = $user;
-
- } else {
-
- // Construct array of unready UIDs for Keymanager{}
- $unreadyIds[] = $user;
-
- // Log warning; we can't do necessary setup here
- // because we don't have the user passphrase
- \OCP\Util::writeLog('Encryption library',
- '"' . $user . '" is not setup for encryption', \OCP\Util::WARN);
-
- }
-
- }
-
- return array(
- 'ready' => $readyIds,
- 'unready' => $unreadyIds
- );
-
- }
-
- /**
- * Decrypt a keyfile
- * @param string $filePath
- * @param string $privateKey
- * @return false|string
- */
- private function decryptKeyfile($filePath, $privateKey) {
-
- // Get the encrypted keyfile
- $encKeyfile = Keymanager::getFileKey($this->view, $this, $filePath);
-
- // The file has a shareKey and must use it for decryption
- $shareKey = Keymanager::getShareKey($this->view, $this->keyId, $this, $filePath);
-
- $plainKeyfile = Crypt::multiKeyDecrypt($encKeyfile, $shareKey, $privateKey);
-
- return $plainKeyfile;
- }
-
- /**
- * Encrypt keyfile to multiple users
- * @param Session $session
- * @param array $users list of users which should be able to access the file
- * @param string $filePath path of the file to be shared
- * @return bool
- */
- public function setSharedFileKeyfiles(Session $session, array $users, $filePath) {
-
- // Make sure users are capable of sharing
- $filteredUids = $this->filterShareReadyUsers($users);
-
- // If we're attempting to share to unready users
- if (!empty($filteredUids['unready'])) {
-
- \OCP\Util::writeLog('Encryption library',
- 'Sharing to these user(s) failed as they are unready for encryption:"'
- . print_r($filteredUids['unready'], 1), \OCP\Util::WARN);
-
- return false;
-
- }
-
- // Get public keys for each user, ready for generating sharekeys
- $userPubKeys = Keymanager::getPublicKeys($this->view, $filteredUids['ready']);
-
- // Note proxy status then disable it
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // Get the current users's private key for decrypting existing keyfile
- $privateKey = $session->getPrivateKey();
-
- try {
- // Decrypt keyfile
- $plainKeyfile = $this->decryptKeyfile($filePath, $privateKey);
- // Re-enc keyfile to (additional) sharekeys
- $multiEncKey = Crypt::multiKeyEncrypt($plainKeyfile, $userPubKeys);
- } catch (Exception\EncryptionException $e) {
- $msg = 'set shareFileKeyFailed (code: ' . $e->getCode() . '): ' . $e->getMessage();
- \OCP\Util::writeLog('files_encryption', $msg, \OCP\Util::FATAL);
- return false;
- } catch (\Exception $e) {
- $msg = 'set shareFileKeyFailed (unknown error): ' . $e->getMessage();
- \OCP\Util::writeLog('files_encryption', $msg, \OCP\Util::FATAL);
- return false;
- }
-
- // Save the recrypted key to it's owner's keyfiles directory
- // Save new sharekeys to all necessary user directory
- if (
- !Keymanager::setFileKey($this->view, $this, $filePath, $multiEncKey['data'])
- || !Keymanager::setShareKeys($this->view, $this, $filePath, $multiEncKey['keys'])
- ) {
-
- \OCP\Util::writeLog('Encryption library',
- 'Keyfiles could not be saved for users sharing ' . $filePath, \OCP\Util::ERROR);
-
- return false;
-
- }
-
- // Return proxy to original status
- \OC_FileProxy::$enabled = $proxyStatus;
-
- return true;
- }
-
- /**
- * Find, sanitise and format users sharing a file
- * @note This wraps other methods into a portable bundle
- * @param boolean $sharingEnabled
- * @param string $filePath path relativ to current users files folder
- */
- public function getSharingUsersArray($sharingEnabled, $filePath) {
-
- $appConfig = \OC::$server->getAppConfig();
-
- // Check if key recovery is enabled
- if (
- $appConfig->getValue('files_encryption', 'recoveryAdminEnabled')
- && $this->recoveryEnabledForUser()
- ) {
- $recoveryEnabled = true;
- } else {
- $recoveryEnabled = false;
- }
-
- // Make sure that a share key is generated for the owner too
- list($owner, $ownerPath) = $this->getUidAndFilename($filePath);
-
- $ownerPath = Helper::stripPartialFileExtension($ownerPath);
-
- // always add owner to the list of users with access to the file
- $userIds = array($owner);
-
- if ($sharingEnabled) {
-
- // Find out who, if anyone, is sharing the file
- $result = \OCP\Share::getUsersSharingFile($ownerPath, $owner);
- $userIds = \array_merge($userIds, $result['users']);
- if ($result['public'] || $result['remote']) {
- $userIds[] = $this->publicShareKeyId;
- }
-
- }
-
- // If recovery is enabled, add the
- // Admin UID to list of users to share to
- if ($recoveryEnabled) {
- // Find recoveryAdmin user ID
- $recoveryKeyId = $appConfig->getValue('files_encryption', 'recoveryKeyId');
- // Add recoveryAdmin to list of users sharing
- $userIds[] = $recoveryKeyId;
- }
-
- // check if it is a group mount
- if (\OCP\App::isEnabled("files_external")) {
- $mounts = \OC_Mount_Config::getSystemMountPoints();
- foreach ($mounts as $mount) {
- if ($mount['mountpoint'] == substr($ownerPath, 1, strlen($mount['mountpoint']))) {
- $userIds = array_merge($userIds, $this->getUserWithAccessToMountPoint($mount['applicable']['users'], $mount['applicable']['groups']));
- }
- }
- }
-
- // Remove duplicate UIDs
- $uniqueUserIds = array_unique($userIds);
-
- return $uniqueUserIds;
-
- }
-
- private function getUserWithAccessToMountPoint($users, $groups) {
- $result = array();
- if (in_array('all', $users)) {
- $result = \OCP\User::getUsers();
- } else {
- $result = array_merge($result, $users);
- foreach ($groups as $group) {
- $result = array_merge($result, \OC_Group::usersInGroup($group));
- }
- }
-
- return $result;
- }
-
- /**
- * set migration status
- * @param int $status
- * @param int $preCondition only update migration status if the previous value equals $preCondition
- * @return boolean
- */
- private function setMigrationStatus($status, $preCondition = null) {
-
- // convert to string if preCondition is set
- $preCondition = ($preCondition === null) ? null : (string)$preCondition;
-
- try {
- \OC::$server->getConfig()->setUserValue($this->userId, 'files_encryption', 'migration_status', (string)$status, $preCondition);
- return true;
- } catch(\OCP\PreConditionNotMetException $e) {
- return false;
- }
-
- }
-
- /**
- * start migration mode to initially encrypt users data
- * @return boolean
- */
- public function beginMigration() {
-
- $result = $this->setMigrationStatus(self::MIGRATION_IN_PROGRESS, self::MIGRATION_OPEN);
-
- if ($result) {
- \OCP\Util::writeLog('Encryption library', "Start migration to encryption mode for " . $this->userId, \OCP\Util::INFO);
- } else {
- \OCP\Util::writeLog('Encryption library', "Could not activate migration mode for " . $this->userId . ". Probably another process already started the initial encryption", \OCP\Util::WARN);
- }
-
- return $result;
- }
-
- public function resetMigrationStatus() {
- return $this->setMigrationStatus(self::MIGRATION_OPEN);
-
- }
-
- /**
- * close migration mode after users data has been encrypted successfully
- * @return boolean
- */
- public function finishMigration() {
- $result = $this->setMigrationStatus(self::MIGRATION_COMPLETED);
-
- if ($result) {
- \OCP\Util::writeLog('Encryption library', "Finish migration successfully for " . $this->userId, \OCP\Util::INFO);
- } else {
- \OCP\Util::writeLog('Encryption library', "Could not deactivate migration mode for " . $this->userId, \OCP\Util::WARN);
- }
-
- return $result;
- }
-
- /**
- * check if files are already migrated to the encryption system
- * @return int|false migration status, false = in case of no record
- * @note If records are not being returned, check for a hidden space
- * at the start of the uid in db
- */
- public function getMigrationStatus() {
-
- $migrationStatus = false;
- if (\OCP\User::userExists($this->userId)) {
- $migrationStatus = \OC::$server->getConfig()->getUserValue($this->userId, 'files_encryption', 'migration_status', null);
- if ($migrationStatus === null) {
- \OC::$server->getConfig()->setUserValue($this->userId, 'files_encryption', 'migration_status', (string)self::MIGRATION_OPEN);
- $migrationStatus = self::MIGRATION_OPEN;
- }
- }
-
- return (int)$migrationStatus;
-
- }
-
- /**
- * get uid of the owners of the file and the path to the file
- * @param string $path Path of the file to check
- * @throws \Exception
- * @note $shareFilePath must be relative to data/UID/files. Files
- * relative to /Shared are also acceptable
- * @return array
- */
- public function getUidAndFilename($path) {
-
- $pathinfo = pathinfo($path);
- $partfile = false;
- $parentFolder = false;
- if (array_key_exists('extension', $pathinfo) && $pathinfo['extension'] === 'part') {
- // if the real file exists we check this file
- $filePath = $this->userFilesDir . '/' .$pathinfo['dirname'] . '/' . $pathinfo['filename'];
- if ($this->view->file_exists($filePath)) {
- $pathToCheck = $pathinfo['dirname'] . '/' . $pathinfo['filename'];
- } else { // otherwise we look for the parent
- $pathToCheck = $pathinfo['dirname'];
- $parentFolder = true;
- }
- $partfile = true;
- } else {
- $pathToCheck = $path;
- }
-
- $view = new \OC\Files\View($this->userFilesDir);
- $fileOwnerUid = $view->getOwner($pathToCheck);
-
- // handle public access
- if ($this->isPublic) {
- return array($this->userId, $path);
- } else {
-
- // Check that UID is valid
- if (!\OCP\User::userExists($fileOwnerUid)) {
- throw new \Exception(
- 'Could not find owner (UID = "' . var_export($fileOwnerUid, 1) . '") of file "' . $path . '"');
- }
-
- // NOTE: Bah, this dependency should be elsewhere
- \OC\Files\Filesystem::initMountPoints($fileOwnerUid);
-
- // If the file owner is the currently logged in user
- if ($fileOwnerUid === $this->userId) {
-
- // Assume the path supplied is correct
- $filename = $path;
-
- } else {
- $info = $view->getFileInfo($pathToCheck);
- $ownerView = new \OC\Files\View('/' . $fileOwnerUid . '/files');
-
- // Fetch real file path from DB
- $filename = $ownerView->getPath($info['fileid']);
- if ($parentFolder) {
- $filename = $filename . '/'. $pathinfo['filename'];
- }
-
- if ($partfile) {
- $filename = $filename . '.' . $pathinfo['extension'];
- }
-
- }
-
- return array(
- $fileOwnerUid,
- \OC\Files\Filesystem::normalizePath($filename)
- );
- }
- }
-
- /**
- * go recursively through a dir and collect all files and sub files.
- * @param string $dir relative to the users files folder
- * @return array with list of files relative to the users files folder
- */
- public function getAllFiles($dir, $mountPoint = '') {
- $result = array();
- $dirList = array($dir);
-
- while ($dirList) {
- $dir = array_pop($dirList);
- $content = $this->view->getDirectoryContent(\OC\Files\Filesystem::normalizePath(
- $this->userFilesDir . '/' . $dir));
-
- foreach ($content as $c) {
- // getDirectoryContent() returns the paths relative to the mount points, so we need
- // to re-construct the complete path
- $path = ($mountPoint !== '') ? $mountPoint . '/' . $c['path'] : $c['path'];
- $path = \OC\Files\Filesystem::normalizePath($path);
- if ($c['type'] === 'dir') {
- $dirList[] = substr($path, strlen('/' . \OCP\User::getUser() . "/files"));
- } else {
- $result[] = substr($path, strlen('/' . \OCP\User::getUser() . "/files"));
- }
- }
-
- }
-
- return $result;
- }
-
- /**
- * get owner of the shared files.
- * @param int $id ID of a share
- * @return string owner
- */
- public function getOwnerFromSharedFile($id) {
-
- $query = \OCP\DB::prepare('SELECT `parent`, `uid_owner` FROM `*PREFIX*share` WHERE `id` = ?', 1);
-
- $result = $query->execute(array($id));
-
- $source = null;
- if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('Encryption library', \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
- } else {
- $source = $result->fetchRow();
- }
-
- $fileOwner = false;
-
- if ($source && isset($source['parent'])) {
-
- $parent = $source['parent'];
-
- while (isset($parent)) {
-
- $query = \OCP\DB::prepare('SELECT `parent`, `uid_owner` FROM `*PREFIX*share` WHERE `id` = ?', 1);
-
- $result = $query->execute(array($parent));
-
- $item = null;
- if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('Encryption library', \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
- } else {
- $item = $result->fetchRow();
- }
-
- if ($item && isset($item['parent'])) {
-
- $parent = $item['parent'];
-
- } else {
-
- $fileOwner = $item['uid_owner'];
-
- break;
-
- }
- }
-
- } else {
-
- $fileOwner = $source['uid_owner'];
-
- }
-
- return $fileOwner;
-
- }
-
- /**
- * @return string
- */
- public function getUserId() {
- return $this->userId;
- }
-
- /**
- * @return string
- */
- public function getKeyId() {
- return $this->keyId;
- }
-
- /**
- * @return string
- */
- public function getUserFilesDir() {
- return $this->userFilesDir;
- }
-
- /**
- * @param string $password
- * @return bool
- */
- public function checkRecoveryPassword($password) {
-
- $result = false;
-
- $recoveryKey = Keymanager::getPrivateSystemKey($this->recoveryKeyId);
- $decryptedRecoveryKey = Crypt::decryptPrivateKey($recoveryKey, $password);
-
- if ($decryptedRecoveryKey) {
- $result = true;
- }
-
- return $result;
- }
-
- /**
- * @return string
- */
- public function getRecoveryKeyId() {
- return $this->recoveryKeyId;
- }
-
- /**
- * add recovery key to all encrypted files
- */
- public function addRecoveryKeys($path = '/') {
- $dirContent = $this->view->getDirectoryContent($this->keysPath . '/' . $path);
- foreach ($dirContent as $item) {
- // get relative path from files_encryption/keyfiles/
- $filePath = substr($item['path'], strlen('files_encryption/keys'));
- if ($this->view->is_dir($this->userFilesDir . '/' . $filePath)) {
- $this->addRecoveryKeys($filePath . '/');
- } else {
- $session = new Session(new \OC\Files\View('/'));
- $sharingEnabled = \OCP\Share::isEnabled();
- $usersSharing = $this->getSharingUsersArray($sharingEnabled, $filePath);
- $this->setSharedFileKeyfiles($session, $usersSharing, $filePath);
- }
- }
- }
-
- /**
- * remove recovery key to all encrypted files
- */
- public function removeRecoveryKeys($path = '/') {
- $dirContent = $this->view->getDirectoryContent($this->keysPath . '/' . $path);
- foreach ($dirContent as $item) {
- // get relative path from files_encryption/keyfiles
- $filePath = substr($item['path'], strlen('files_encryption/keys'));
- if ($this->view->is_dir($this->userFilesDir . '/' . $filePath)) {
- $this->removeRecoveryKeys($filePath . '/');
- } else {
- $this->view->unlink($this->keysPath . '/' . $filePath . '/' . $this->recoveryKeyId . '.shareKey');
- }
- }
- }
-
- /**
- * decrypt given file with recovery key and encrypt it again to the owner and his new key
- * @param string $file
- * @param string $privateKey recovery key to decrypt the file
- */
- private function recoverFile($file, $privateKey) {
-
- $sharingEnabled = \OCP\Share::isEnabled();
-
- // Find out who, if anyone, is sharing the file
- if ($sharingEnabled) {
- $result = \OCP\Share::getUsersSharingFile($file, $this->userId, true);
- $userIds = $result['users'];
- $userIds[] = $this->recoveryKeyId;
- if ($result['public']) {
- $userIds[] = $this->publicShareKeyId;
- }
- } else {
- $userIds = array(
- $this->userId,
- $this->recoveryKeyId
- );
- }
- $filteredUids = $this->filterShareReadyUsers($userIds);
-
- //decrypt file key
- $encKeyfile = Keymanager::getFileKey($this->view, $this, $file);
- $shareKey = Keymanager::getShareKey($this->view, $this->recoveryKeyId, $this, $file);
- $plainKeyfile = Crypt::multiKeyDecrypt($encKeyfile, $shareKey, $privateKey);
- // encrypt file key again to all users, this time with the new public key for the recovered use
- $userPubKeys = Keymanager::getPublicKeys($this->view, $filteredUids['ready']);
- $multiEncKey = Crypt::multiKeyEncrypt($plainKeyfile, $userPubKeys);
-
- Keymanager::setFileKey($this->view, $this, $file, $multiEncKey['data']);
- Keymanager::setShareKeys($this->view, $this, $file, $multiEncKey['keys']);
-
- }
-
- /**
- * collect all files and recover them one by one
- * @param string $path to look for files keys
- * @param string $privateKey private recovery key which is used to decrypt the files
- */
- private function recoverAllFiles($path, $privateKey) {
- $dirContent = $this->view->getDirectoryContent($this->keysPath . '/' . $path);
- foreach ($dirContent as $item) {
- // get relative path from files_encryption/keyfiles
- $filePath = substr($item['path'], strlen('files_encryption/keys'));
- if ($this->view->is_dir($this->userFilesDir . '/' . $filePath)) {
- $this->recoverAllFiles($filePath . '/', $privateKey);
- } else {
- $this->recoverFile($filePath, $privateKey);
- }
- }
- }
-
- /**
- * recover users files in case of password lost
- * @param string $recoveryPassword
- */
- public function recoverUsersFiles($recoveryPassword) {
-
- $encryptedKey = Keymanager::getPrivateSystemKey( $this->recoveryKeyId);
- $privateKey = Crypt::decryptPrivateKey($encryptedKey, $recoveryPassword);
-
- $this->recoverAllFiles('/', $privateKey);
- }
-
- /**
- * create a backup of all keys from the user
- *
- * @param string $purpose define the purpose of the backup, will be part of the backup folder name
- * @param boolean $timestamp (optional) should a timestamp be added, default true
- * @param boolean $includeUserKeys (optional) include users private-/public-key, default true
- */
- public function backupAllKeys($purpose, $timestamp = true, $includeUserKeys = true) {
- $this->userId;
- $backupDir = $this->encryptionDir . '/backup.' . $purpose;
- $backupDir .= ($timestamp) ? '.' . date("Y-m-d_H-i-s") . '/' : '/';
- $this->view->mkdir($backupDir);
- $this->view->copy($this->keysPath, $backupDir . 'keys/');
- if ($includeUserKeys) {
- $this->view->copy($this->privateKeyPath, $backupDir . $this->userId . '.privateKey');
- $this->view->copy($this->publicKeyPath, $backupDir . $this->userId . '.publicKey');
- }
- }
-
- /**
- * restore backup
- *
- * @param string $backup complete name of the backup
- * @return boolean
- */
- public function restoreBackup($backup) {
- $backupDir = $this->encryptionDir . '/backup.' . $backup . '/';
-
- $fileKeysRestored = $this->view->rename($backupDir . 'keys', $this->encryptionDir . '/keys');
-
- $pubKeyRestored = $privKeyRestored = true;
- if (
- $this->view->file_exists($backupDir . $this->userId . '.privateKey') &&
- $this->view->file_exists($backupDir . $this->userId . '.privateKey')
- ) {
-
- $pubKeyRestored = $this->view->rename($backupDir . $this->userId . '.publicKey', $this->publicKeyPath);
- $privKeyRestored = $this->view->rename($backupDir . $this->userId . '.privateKey', $this->privateKeyPath);
- }
-
- if ($fileKeysRestored && $pubKeyRestored && $privKeyRestored) {
- $this->view->deleteAll($backupDir);
-
- return true;
- }
-
- return false;
- }
-
- /**
- * delete backup
- *
- * @param string $backup complete name of the backup
- * @return boolean
- */
- public function deleteBackup($backup) {
- $backupDir = $this->encryptionDir . '/backup.' . $backup . '/';
- return $this->view->deleteAll($backupDir);
- }
-
- /**
- * check if the file is stored on a system wide mount point
- * @param string $path relative to /data/user with leading '/'
- * @return boolean
- */
- public function isSystemWideMountPoint($path) {
- $normalizedPath = ltrim($path, '/');
- if (\OCP\App::isEnabled("files_external")) {
- $mounts = \OC_Mount_Config::getSystemMountPoints();
- foreach ($mounts as $mount) {
- if ($mount['mountpoint'] == substr($normalizedPath, 0, strlen($mount['mountpoint']))) {
- if ($this->isMountPointApplicableToUser($mount)) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- /**
- * check if mount point is applicable to user
- *
- * @param array $mount contains $mount['applicable']['users'], $mount['applicable']['groups']
- * @return boolean
- */
- protected function isMountPointApplicableToUser($mount) {
- $uid = \OCP\User::getUser();
- $acceptedUids = array('all', $uid);
- // check if mount point is applicable for the user
- $intersection = array_intersect($acceptedUids, $mount['applicable']['users']);
- if (!empty($intersection)) {
- return true;
- }
- // check if mount point is applicable for group where the user is a member
- foreach ($mount['applicable']['groups'] as $gid) {
- if (\OC_Group::inGroup($uid, $gid)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * decrypt private key and add it to the current session
- * @param array $params with 'uid' and 'password'
- * @return mixed session or false
- */
- public function initEncryption($params) {
-
- $session = new Session($this->view);
-
- // we tried to initialize the encryption app for this session
- $session->setInitialized(Session::INIT_EXECUTED);
-
- $encryptedKey = Keymanager::getPrivateKey($this->view, $params['uid']);
-
- $privateKey = false;
- if ($encryptedKey) {
- $privateKey = Crypt::decryptPrivateKey($encryptedKey, $params['password']);
- }
-
- if ($privateKey === false) {
- \OCP\Util::writeLog('Encryption library', 'Private key for user "' . $params['uid']
- . '" is not valid! Maybe the user password was changed from outside if so please change it back to gain access', \OCP\Util::ERROR);
- return false;
- }
-
- $session->setPrivateKey($privateKey);
- $session->setInitialized(Session::INIT_SUCCESSFUL);
-
- return $session;
- }
-
- /*
- * remove encryption related keys from the session
- */
- public function closeEncryptionSession() {
- $session = new Session($this->view);
- $session->closeSession();
- }
-
-}
diff --git a/apps/files_encryption/settings-admin.php b/apps/files_encryption/settings-admin.php
deleted file mode 100644
index 44dcc2309a4..00000000000
--- a/apps/files_encryption/settings-admin.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Sam Tuke <mail@samtuke.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-\OC_Util::checkAdminUser();
-
-$tmpl = new OCP\Template('files_encryption', 'settings-admin');
-
-// Check if an adminRecovery account is enabled for recovering files after lost pwd
-$recoveryAdminEnabled = \OC::$server->getAppConfig()->getValue('files_encryption', 'recoveryAdminEnabled', '0');
-$session = new \OCA\Files_Encryption\Session(new \OC\Files\View('/'));
-$initStatus = $session->getInitialized();
-
-$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
-$tmpl->assign('initStatus', $initStatus);
-
-\OCP\Util::addscript('files_encryption', 'settings-admin');
-\OCP\Util::addscript('core', 'multiselect');
-
-return $tmpl->fetchPage();
diff --git a/apps/files_encryption/settings-personal.php b/apps/files_encryption/settings-personal.php
deleted file mode 100644
index a9e512f89d8..00000000000
--- a/apps/files_encryption/settings-personal.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-// Add CSS stylesheet
-\OCP\Util::addStyle('files_encryption', 'settings-personal');
-
-$tmpl = new OCP\Template('files_encryption', 'settings-personal');
-
-$user = \OCP\USER::getUser();
-$view = new \OC\Files\View('/');
-$util = new \OCA\Files_Encryption\Util($view, $user);
-$session = new \OCA\Files_Encryption\Session($view);
-
-$privateKeySet = $session->getPrivateKey() !== false;
-// did we tried to initialize the keys for this session?
-$initialized = $session->getInitialized();
-
-$recoveryAdminEnabled = \OC::$server->getAppConfig()->getValue('files_encryption', 'recoveryAdminEnabled');
-$recoveryEnabledForUser = $util->recoveryEnabledForUser();
-
-$result = false;
-
-if ($recoveryAdminEnabled || !$privateKeySet) {
-
- \OCP\Util::addscript('files_encryption', 'settings-personal');
-
- $tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
- $tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser);
- $tmpl->assign('privateKeySet', $privateKeySet);
- $tmpl->assign('initialized', $initialized);
-
- $result = $tmpl->fetchPage();
-}
-
-return $result;
-
diff --git a/apps/files_encryption/templates/invalid_private_key.php b/apps/files_encryption/templates/invalid_private_key.php
deleted file mode 100644
index 700b37b58a7..00000000000
--- a/apps/files_encryption/templates/invalid_private_key.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<ul>
- <li class='error'>
- <?php $location = \OCP\Util::linkToRoute( "settings_personal" ).'#changePKPasswd' ?>
-
- <?php p($_['message']); ?>
- <br/>
- <?php if($_['errorCode'] === \OCA\Files_Encryption\Crypt::ENCRYPTION_PRIVATE_KEY_NOT_VALID_ERROR): ?>
- <?php p($l->t('Go directly to your %spersonal settings%s.', array('<a href="'.$location.'">', '</a>'))); ?>
- <?php endif; ?>
- <br/>
- </li>
-</ul>
diff --git a/apps/files_encryption/tests/binary b/apps/files_encryption/tests/binary
deleted file mode 100644
index 79bc99479da..00000000000
--- a/apps/files_encryption/tests/binary
+++ /dev/null
Binary files differ
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
deleted file mode 100755
index 4ce8f9a926d..00000000000
--- a/apps/files_encryption/tests/crypt.php
+++ /dev/null
@@ -1,678 +0,0 @@
-<?php
-/**
- * @author Andreas Fischer <bantu@owncloud.com>
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-/**
- * Class Crypt
- */
-class Crypt extends TestCase {
-
- const TEST_ENCRYPTION_CRYPT_USER1 = "test-crypt-user1";
-
- public $userId;
- public $pass;
- public $stateFilesTrashbin;
- public $dataLong;
- public $dataUrl;
- public $dataShort;
- /**
- * @var \OC\Files\View
- */
- public $view;
- public $legacyEncryptedData;
- public $genPrivateKey;
- public $genPublicKey;
-
- /** @var \OCP\IConfig */
- private $config;
-
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
-
- // create test user
- self::loginHelper(self::TEST_ENCRYPTION_CRYPT_USER1, true);
- }
-
- protected function setUp() {
- parent::setUp();
-
- // set user id
- self::loginHelper(self::TEST_ENCRYPTION_CRYPT_USER1);
- $this->userId = self::TEST_ENCRYPTION_CRYPT_USER1;
- $this->pass = self::TEST_ENCRYPTION_CRYPT_USER1;
-
- // set content for encrypting / decrypting in tests
- $this->dataLong = file_get_contents(__DIR__ . '/../lib/crypt.php');
- $this->dataShort = 'hats';
- $this->dataUrl = __DIR__ . '/../lib/crypt.php';
- $this->legacyData = __DIR__ . '/legacy-text.txt';
- $this->legacyEncryptedData = __DIR__ . '/legacy-encrypted-text.txt';
- $this->legacyEncryptedDataKey = __DIR__ . '/encryption.key';
- $this->randomKey = \OCA\Files_Encryption\Crypt::generateKey();
-
- $keypair = \OCA\Files_Encryption\Crypt::createKeypair();
- $this->genPublicKey = $keypair['publicKey'];
- $this->genPrivateKey = $keypair['privateKey'];
-
- $this->view = new \OC\Files\View('/');
-
- // remember files_trashbin state
- $this->stateFilesTrashbin = \OC_App::isEnabled('files_trashbin');
-
- // we don't want to tests with app files_trashbin enabled
- \OC_App::disable('files_trashbin');
-
- $this->config = \OC::$server->getConfig();
- }
-
- protected function tearDown() {
- // reset app files_trashbin
- if ($this->stateFilesTrashbin) {
- \OC_App::enable('files_trashbin');
- } else {
- \OC_App::disable('files_trashbin');
- }
-
- $this->assertTrue(\OC_FileProxy::$enabled);
- $this->config->deleteSystemValue('cipher');
-
- parent::tearDown();
- }
-
- public static function tearDownAfterClass() {
- // cleanup test user
- \OC_User::deleteUser(self::TEST_ENCRYPTION_CRYPT_USER1);
-
- parent::tearDownAfterClass();
- }
-
- /**
- * @medium
- */
- public function testGenerateKey() {
-
- # TODO: use more accurate (larger) string length for test confirmation
-
- $key = \OCA\Files_Encryption\Crypt::generateKey();
-
- $this->assertTrue(strlen($key) > 16);
-
- }
-
- public function testDecryptPrivateKey() {
-
- // test successful decrypt
- $crypted = \OCA\Files_Encryption\Crypt::symmetricEncryptFileContent($this->genPrivateKey, 'hat');
-
- $header = \OCA\Files_Encryption\Crypt::generateHeader();
-
- $decrypted = \OCA\Files_Encryption\Crypt::decryptPrivateKey($header . $crypted, 'hat');
-
- $this->assertEquals($this->genPrivateKey, $decrypted);
-
- //test private key decrypt with wrong password
- $wrongPasswd = \OCA\Files_Encryption\Crypt::decryptPrivateKey($crypted, 'hat2');
-
- $this->assertEquals(false, $wrongPasswd);
-
- }
-
-
- /**
- * @medium
- */
- public function testSymmetricEncryptFileContent() {
-
- # TODO: search in keyfile for actual content as IV will ensure this test always passes
-
- $crypted = \OCA\Files_Encryption\Crypt::symmetricEncryptFileContent($this->dataShort, 'hat');
-
- $this->assertNotEquals($this->dataShort, $crypted);
-
-
- $decrypt = \OCA\Files_Encryption\Crypt::symmetricDecryptFileContent($crypted, 'hat');
-
- $this->assertEquals($this->dataShort, $decrypt);
-
- }
-
- /**
- * @medium
- */
- public function testSymmetricEncryptFileContentAes128() {
-
- # TODO: search in keyfile for actual content as IV will ensure this test always passes
-
- $crypted = \OCA\Files_Encryption\Crypt::symmetricEncryptFileContent($this->dataShort, 'hat', 'AES-128-CFB');
-
- $this->assertNotEquals($this->dataShort, $crypted);
-
-
- $decrypt = \OCA\Files_Encryption\Crypt::symmetricDecryptFileContent($crypted, 'hat', 'AES-128-CFB');
-
- $this->assertEquals($this->dataShort, $decrypt);
-
- }
-
- /**
- * @medium
- */
- public function testSymmetricStreamEncryptShortFileContent() {
-
- $filename = 'tmp-' . $this->getUniqueID() . '.test';
-
- $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/'. $filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // Get file contents without using any wrapper to get it's actual contents on disk
- $retreivedCryptedFile = $this->view->file_get_contents($this->userId . '/files/' . $filename);
-
- // Re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // Check that the file was encrypted before being written to disk
- $this->assertNotEquals($this->dataShort, $retreivedCryptedFile);
-
- // Get file contents with the encryption wrapper
- $decrypted = file_get_contents('crypt:///' . $this->userId . '/files/'. $filename);
-
- // Check that decrypted data matches
- $this->assertEquals($this->dataShort, $decrypted);
-
- // Teardown
- $this->view->unlink($this->userId . '/files/' . $filename);
- }
-
- /**
- * @medium
- */
- public function testSymmetricStreamEncryptShortFileContentAes128() {
-
- $filename = 'tmp-' . $this->getUniqueID() . '.test';
-
- $this->config->setSystemValue('cipher', 'AES-128-CFB');
-
- $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/'. $filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- $this->config->deleteSystemValue('cipher');
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // Get file contents without using any wrapper to get it's actual contents on disk
- $retreivedCryptedFile = $this->view->file_get_contents($this->userId . '/files/' . $filename);
-
- // Re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // Check that the file was encrypted before being written to disk
- $this->assertNotEquals($this->dataShort, $retreivedCryptedFile);
-
- // Get file contents with the encryption wrapper
- $decrypted = file_get_contents('crypt:///' . $this->userId . '/files/'. $filename);
-
- // Check that decrypted data matches
- $this->assertEquals($this->dataShort, $decrypted);
-
- // Teardown
- $this->view->unlink($this->userId . '/files/' . $filename);
- }
-
- /**
- * @medium
- * Test that data that is written by the crypto stream wrapper
- * @note Encrypted data is manually prepared and decrypted here to avoid dependency on success of stream_read
- * @note If this test fails with truncate content, check that enough array slices are being rejoined to form $e, as the crypt.php file may have gotten longer and broken the manual
- * reassembly of its data
- */
- public function testSymmetricStreamEncryptLongFileContent() {
-
- // Generate a a random filename
- $filename = 'tmp-' . $this->getUniqueID() . '.test';
-
- // Save long data as encrypted file using stream wrapper
- $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong . $this->dataLong);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // Get file contents without using any wrapper to get it's actual contents on disk
- $retreivedCryptedFile = $this->view->file_get_contents($this->userId . '/files/' . $filename);
-
- // Re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
-
-
- // Check that the file was encrypted before being written to disk
- $this->assertNotEquals($this->dataLong . $this->dataLong, $retreivedCryptedFile);
-
- $decrypted = file_get_contents('crypt:///' . $this->userId . '/files/'. $filename);
-
- $this->assertEquals($this->dataLong . $this->dataLong, $decrypted);
-
- // Teardown
- $this->view->unlink($this->userId . '/files/' . $filename);
- }
-
- /**
- * @medium
- * Test that data that is written by the crypto stream wrapper with AES 128
- * @note Encrypted data is manually prepared and decrypted here to avoid dependency on success of stream_read
- * @note If this test fails with truncate content, check that enough array slices are being rejoined to form $e, as the crypt.php file may have gotten longer and broken the manual
- * reassembly of its data
- */
- public function testSymmetricStreamEncryptLongFileContentAes128() {
-
- // Generate a a random filename
- $filename = 'tmp-' . $this->getUniqueID() . '.test';
-
- $this->config->setSystemValue('cipher', 'AES-128-CFB');
-
- // Save long data as encrypted file using stream wrapper
- $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong . $this->dataLong);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- $this->config->deleteSystemValue('cipher');
-
- // Get file contents without using any wrapper to get it's actual contents on disk
- $retreivedCryptedFile = $this->view->file_get_contents($this->userId . '/files/' . $filename);
-
- // Re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
-
-
- // Check that the file was encrypted before being written to disk
- $this->assertNotEquals($this->dataLong . $this->dataLong, $retreivedCryptedFile);
-
- $decrypted = file_get_contents('crypt:///' . $this->userId . '/files/'. $filename);
-
- $this->assertEquals($this->dataLong . $this->dataLong, $decrypted);
-
- // Teardown
- $this->view->unlink($this->userId . '/files/' . $filename);
- }
-
- /**
- * @medium
- * Test that data that is written by the crypto stream wrapper with AES 128
- * @note Encrypted data is manually prepared and decrypted here to avoid dependency on success of stream_read
- * @note If this test fails with truncate content, check that enough array slices are being rejoined to form $e, as the crypt.php file may have gotten longer and broken the manual
- * reassembly of its data
- */
- public function testStreamDecryptLongFileContentWithoutHeader() {
-
- // Generate a a random filename
- $filename = 'tmp-' . $this->getUniqueID() . '.test';
-
- $this->config->setSystemValue('cipher', 'AES-128-CFB');
-
- // Save long data as encrypted file using stream wrapper
- $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong . $this->dataLong);
-
- $this->config->deleteSystemValue('cipher');
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // Get file contents without using any wrapper to get it's actual contents on disk
- $retreivedCryptedFile = $this->view->file_get_contents($this->userId . '/files/' . $filename);
-
- // Check that the file was encrypted before being written to disk
- $this->assertNotEquals($this->dataLong . $this->dataLong, $retreivedCryptedFile);
-
- // remove the header to check if we can also decrypt old files without a header,
- // this files should fall back to AES-128
- $cryptedWithoutHeader = substr($retreivedCryptedFile, \OCA\Files_Encryption\Crypt::BLOCKSIZE);
- $this->view->file_put_contents($this->userId . '/files/' . $filename, $cryptedWithoutHeader);
-
- // Re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
-
- $decrypted = file_get_contents('crypt:///' . $this->userId . '/files/'. $filename);
-
- $this->assertEquals($this->dataLong . $this->dataLong, $decrypted);
-
- // Teardown
- $this->view->unlink($this->userId . '/files/' . $filename);
- }
-
- /**
- * @medium
- */
- public function testIsEncryptedContent() {
-
- $this->assertFalse(\OCA\Files_Encryption\Crypt::isCatfileContent($this->dataUrl));
-
- $this->assertFalse(\OCA\Files_Encryption\Crypt::isCatfileContent($this->legacyEncryptedData));
-
- $keyfileContent = \OCA\Files_Encryption\Crypt::symmetricEncryptFileContent($this->dataUrl, 'hat', 'AES-128-CFB');
-
- $this->assertTrue(\OCA\Files_Encryption\Crypt::isCatfileContent($keyfileContent));
-
- }
-
- /**
- * @large
- */
- public function testMultiKeyEncrypt() {
-
- # TODO: search in keyfile for actual content as IV will ensure this test always passes
-
- $pair1 = \OCA\Files_Encryption\Crypt::createKeypair();
-
- $this->assertEquals(2, count($pair1));
-
- $this->assertTrue(strlen($pair1['publicKey']) > 1);
-
- $this->assertTrue(strlen($pair1['privateKey']) > 1);
-
-
- $crypted = \OCA\Files_Encryption\Crypt::multiKeyEncrypt($this->dataShort, array($pair1['publicKey']));
-
- $this->assertNotEquals($this->dataShort, $crypted['data']);
-
-
- $decrypt = \OCA\Files_Encryption\Crypt::multiKeyDecrypt($crypted['data'], $crypted['keys'][0], $pair1['privateKey']);
-
- $this->assertEquals($this->dataShort, $decrypt);
-
- }
-
- /**
- * @medium
- */
- public function testRenameFile() {
-
- $filename = 'tmp-' . $this->getUniqueID();
-
- // Save long data as encrypted file using stream wrapper
- $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // Get file decrypted contents
- $decrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $filename);
-
- $this->assertEquals($this->dataLong, $decrypt);
-
- $newFilename = 'tmp-new-' . $this->getUniqueID();
- $view = new \OC\Files\View('/' . $this->userId . '/files');
- $view->rename($filename, $newFilename);
-
- // Get file decrypted contents
- $newDecrypt = file_get_contents('crypt:///'. $this->userId . '/files/' . $newFilename);
-
- $this->assertEquals($this->dataLong, $newDecrypt);
-
- // tear down
- $view->unlink($newFilename);
- }
-
- /**
- * @medium
- */
- public function testMoveFileIntoFolder() {
-
- $filename = 'tmp-' . $this->getUniqueID();
-
- // Save long data as encrypted file using stream wrapper
- $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // Get file decrypted contents
- $decrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $filename);
-
- $this->assertEquals($this->dataLong, $decrypt);
-
- $newFolder = '/newfolder' . $this->getUniqueID();
- $newFilename = 'tmp-new-' . $this->getUniqueID();
- $view = new \OC\Files\View('/' . $this->userId . '/files');
- $view->mkdir($newFolder);
- $view->rename($filename, $newFolder . '/' . $newFilename);
-
- // Get file decrypted contents
- $newDecrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $newFolder . '/' . $newFilename);
-
- $this->assertEquals($this->dataLong, $newDecrypt);
-
- // tear down
- $view->unlink($newFolder);
- }
-
- /**
- * @medium
- */
- public function testMoveFolder() {
-
- $view = new \OC\Files\View('/' . $this->userId . '/files');
-
- $filename = '/tmp-' . $this->getUniqueID();
- $folder = '/folder' . $this->getUniqueID();
-
- $view->mkdir($folder);
-
- // Save long data as encrypted file using stream wrapper
- $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $folder . $filename, $this->dataLong);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // Get file decrypted contents
- $decrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $folder . $filename);
-
- $this->assertEquals($this->dataLong, $decrypt);
-
- $newFolder = '/newfolder/subfolder' . $this->getUniqueID();
- $view->mkdir('/newfolder');
-
- $view->rename($folder, $newFolder);
-
- // Get file decrypted contents
- $newDecrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $newFolder . $filename);
-
- $this->assertEquals($this->dataLong, $newDecrypt);
-
- // tear down
- $view->unlink($newFolder);
- $view->unlink('/newfolder');
- }
-
- /**
- * @medium
- */
- public function testChangePassphrase() {
- $filename = 'tmp-' . $this->getUniqueID();
-
- // Save long data as encrypted file using stream wrapper
- $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // Get file decrypted contents
- $decrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $filename);
-
- $this->assertEquals($this->dataLong, $decrypt);
-
- // change password
- \OC_User::setPassword($this->userId, 'test', null);
-
- // relogin
- $params['uid'] = $this->userId;
- $params['password'] = 'test';
- \OCA\Files_Encryption\Hooks::login($params);
-
- // Get file decrypted contents
- $newDecrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $filename);
-
- $this->assertEquals($this->dataLong, $newDecrypt);
-
- // tear down
- // change password back
- \OC_User::setPassword($this->userId, $this->pass);
- $view = new \OC\Files\View('/' . $this->userId . '/files');
- $view->unlink($filename);
- }
-
- /**
- * @medium
- */
- public function testViewFilePutAndGetContents() {
-
- $filename = '/tmp-' . $this->getUniqueID();
- $view = new \OC\Files\View('/' . $this->userId . '/files');
-
- // Save short data as encrypted file using stream wrapper
- $cryptedFile = $view->file_put_contents($filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // Get file decrypted contents
- $decrypt = $view->file_get_contents($filename);
-
- $this->assertEquals($this->dataShort, $decrypt);
-
- // Save long data as encrypted file using stream wrapper
- $cryptedFileLong = $view->file_put_contents($filename, $this->dataLong);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFileLong));
-
- // Get file decrypted contents
- $decryptLong = $view->file_get_contents($filename);
-
- $this->assertEquals($this->dataLong, $decryptLong);
-
- // tear down
- $view->unlink($filename);
- }
-
- /**
- * @large
- */
- public function testTouchExistingFile() {
- $filename = '/tmp-' . $this->getUniqueID();
- $view = new \OC\Files\View('/' . $this->userId . '/files');
-
- // Save short data as encrypted file using stream wrapper
- $cryptedFile = $view->file_put_contents($filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- $view->touch($filename);
-
- // Get file decrypted contents
- $decrypt = $view->file_get_contents($filename);
-
- $this->assertEquals($this->dataShort, $decrypt);
-
- // tear down
- $view->unlink($filename);
- }
-
- /**
- * @medium
- */
- public function testTouchFile() {
- $filename = '/tmp-' . $this->getUniqueID();
- $view = new \OC\Files\View('/' . $this->userId . '/files');
-
- $view->touch($filename);
-
- // Save short data as encrypted file using stream wrapper
- $cryptedFile = $view->file_put_contents($filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // Get file decrypted contents
- $decrypt = $view->file_get_contents($filename);
-
- $this->assertEquals($this->dataShort, $decrypt);
-
- // tear down
- $view->unlink($filename);
- }
-
- /**
- * @medium
- */
- public function testFopenFile() {
- $filename = '/tmp-' . $this->getUniqueID();
- $view = new \OC\Files\View('/' . $this->userId . '/files');
-
- // Save short data as encrypted file using stream wrapper
- $cryptedFile = $view->file_put_contents($filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- $handle = $view->fopen($filename, 'r');
-
- // Get file decrypted contents
- $decrypt = fgets($handle);
-
- $this->assertEquals($this->dataShort, $decrypt);
-
- // tear down
- fclose($handle);
- $view->unlink($filename);
- }
-
-}
diff --git a/apps/files_encryption/tests/encryption.key b/apps/files_encryption/tests/encryption.key
deleted file mode 100644
index 4ee962145c2..00000000000
--- a/apps/files_encryption/tests/encryption.key
+++ /dev/null
Binary files differ
diff --git a/apps/files_encryption/tests/encryption_table.xml b/apps/files_encryption/tests/encryption_table.xml
deleted file mode 100644
index c0f63dc0efa..00000000000
--- a/apps/files_encryption/tests/encryption_table.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<database>
- <name>*dbname*</name>
- <create>true</create>
- <overwrite>false</overwrite>
- <charset>utf8</charset>
- <table>
- <name>*dbprefix*encryption_test</name>
- <declaration>
- <field>
- <name>uid</name>
- <type>text</type>
- <notnull>true</notnull>
- <length>64</length>
- </field>
- <field>
- <name>mode</name>
- <type>text</type>
- <notnull>true</notnull>
- <length>64</length>
- <comments>What client-side / server-side configuration is used</comments>
- </field>
- <field>
- <name>recovery_enabled</name>
- <type>integer</type>
- <notnull>true</notnull>
- <default>0</default>
- <comments>Whether encryption key recovery is enabled</comments>
- </field>
- <field>
- <name>migration_status</name>
- <type>integer</type>
- <notnull>true</notnull>
- <default>0</default>
- <comments>Whether encryption migration has been performed</comments>
- </field>
- </declaration>
- </table>
-</database>
diff --git a/apps/files_encryption/tests/helper.php b/apps/files_encryption/tests/helper.php
deleted file mode 100644
index 8fbd4f419a9..00000000000
--- a/apps/files_encryption/tests/helper.php
+++ /dev/null
@@ -1,339 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-use OCA\Files_Encryption;
-use OCA\Files_Encryption\Helper;
-
-/**
- * Class Helper
- */
-class TestHelper extends TestCase {
-
- const TEST_ENCRYPTION_HELPER_USER1 = "test-helper-user1";
- const TEST_ENCRYPTION_HELPER_USER2 = "test-helper-user2";
-
- protected function setUpUsers() {
- // create test user
- self::loginHelper(self::TEST_ENCRYPTION_HELPER_USER2, true);
- self::loginHelper(self::TEST_ENCRYPTION_HELPER_USER1, true);
- }
-
- protected function cleanUpUsers() {
- // cleanup test user
- \OC_User::deleteUser(self::TEST_ENCRYPTION_HELPER_USER1);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_HELPER_USER2);
- }
-
- public static function setupHooks() {
- // Filesystem related hooks
- Helper::registerFilesystemHooks();
-
- // clear and register hooks
- \OC_FileProxy::clearProxies();
- \OC_FileProxy::register(new Files_Encryption\Proxy());
- }
-
- public static function tearDownAfterClass() {
- parent::tearDownAfterClass();
- }
-
- /**
- * @medium
- */
- function testStripPartialFileExtension() {
-
- $partFilename = 'testfile.txt.part';
- $filename = 'testfile.txt';
-
- $this->assertTrue(Helper::isPartialFilePath($partFilename));
-
- $this->assertEquals('testfile.txt', Helper::stripPartialFileExtension($partFilename));
-
- $this->assertFalse(Helper::isPartialFilePath($filename));
-
- $this->assertEquals('testfile.txt', Helper::stripPartialFileExtension($filename));
- }
-
-
- /**
- * @medium
- */
- function testStripPartialFileExtensionWithTransferIdPath() {
-
- $partFilename = 'testfile.txt.ocTransferId643653835.part';
- $filename = 'testfile.txt';
-
- $this->assertTrue(Helper::isPartialFilePath($partFilename));
-
- $this->assertEquals('testfile.txt', Helper::stripPartialFileExtension($partFilename));
-
- $this->assertFalse(Helper::isPartialFilePath($filename));
-
- $this->assertEquals('testfile.txt', Helper::stripPartialFileExtension($filename));
- }
-
- /**
- * @dataProvider dataVersionsPathPositive
- */
- function testGetPathFromVersionPositive($path, $expected) {
- $result = Helper::getPathFromVersion($path);
- $this->assertSame($expected, $result);
- }
-
- function dataVersionsPathPositive() {
- return array(
- array('/user/files_versions/foo/bar/test.txt.v456756835', 'foo/bar/test.txt'),
- array('user/files_versions/foo/bar/test.txt.v456756835', 'foo/bar/test.txt'),
- array('user/files_versions//foo/bar/test.txt.v456756835', 'foo/bar/test.txt'),
- array('user/files_versions/test.txt.v456756835', 'test.txt'),
- );
- }
-
- /**
- * @dataProvider dataVersionsPathNegative
- * @expectedException \OCA\Files_Encryption\Exception\EncryptionException
- */
- function testGetPathFromVersionNegative($path) {
- Helper::getPathFromVersion($path);
- }
-
- function dataVersionsPathNegative() {
- return array(
- array('/user/files_versions/'),
- array('/user/files_versions'),
- );
- }
-
- /**
- * @dataProvider dataPathsCachedFilePositive
- */
- function testGetPathFromCachedFilePositive($path, $expected) {
- $result = Helper::getPathFromCachedFile($path);
- $this->assertEquals($expected, $result);
- }
-
- function dataPathsCachedFilePositive() {
- return array(
- array('/user/cache/transferid636483/foo/bar/test.txt', 'foo/bar/test.txt'),
- array('/user/cache/transferid636483//test.txt', 'test.txt'),
- array('user/cache/transferid636483//test.txt', 'test.txt'),
- );
- }
-
-
- /**
- * @dataProvider dataPathsCachedFileNegative
- * @expectedException \OCA\Files_Encryption\Exception\EncryptionException
- */
- function testGetPathFromCachedFileNegative($path) {
- Helper::getPathFromCachedFile($path);
- }
-
- function dataPathsCachedFileNegative() {
- return array(
- array('/user/cache/transferid636483/'),
- array('/user/cache/transferid636483'),
- array('/user/cache/transferid636483//'),
- array('/user/cache'),
- );
- }
-
- function testGetUser() {
- self::setUpUsers();
-
- $path1 = "/" . self::TEST_ENCRYPTION_HELPER_USER1 . "/files/foo/bar.txt";
- $path2 = "/" . self::TEST_ENCRYPTION_HELPER_USER1 . "/cache/foo/bar.txt";
- $path3 = "/" . self::TEST_ENCRYPTION_HELPER_USER2 . "/thumbnails/foo";
- $path4 ="/" . "/" . self::TEST_ENCRYPTION_HELPER_USER1;
-
- self::loginHelper(self::TEST_ENCRYPTION_HELPER_USER1);
-
- // if we are logged-in every path should return the currently logged-in user
- $this->assertEquals(self::TEST_ENCRYPTION_HELPER_USER1, Helper::getUser($path1));
- $this->assertEquals(self::TEST_ENCRYPTION_HELPER_USER1, Helper::getUser($path2));
- $this->assertEquals(self::TEST_ENCRYPTION_HELPER_USER1, Helper::getUser($path3));
- $this->assertEquals(self::TEST_ENCRYPTION_HELPER_USER1, Helper::getUser($path4));
-
- // now log out
- self::logoutHelper();
-
- // now we should only get the user from /user/files and user/cache paths
- $this->assertEquals(self::TEST_ENCRYPTION_HELPER_USER1, Helper::getUser($path1));
- $this->assertEquals(self::TEST_ENCRYPTION_HELPER_USER1, Helper::getUser($path2));
-
- try {
- $this->assertFalse(Helper::getUser($path3));
- $this->assertFalse(true, '"OCA\Files_Encryption\Exception\EncryptionException: Could not determine user expected"');
- } catch (Files_Encryption\Exception\EncryptionException $e) {
- $this->assertSame('Could not determine user', $e->getMessage());
- }
- try {
- $this->assertFalse(Helper::getUser($path4));
- $this->assertFalse(true, '"OCA\Files_Encryption\Exception\EncryptionException: Could not determine user expected"');
- } catch (Files_Encryption\Exception\EncryptionException $e) {
- $this->assertSame('Could not determine user', $e->getMessage());
- }
-
- // Log-in again
- self::loginHelper(self::TEST_ENCRYPTION_HELPER_USER1);
- self::cleanUpUsers();
- }
-
- /**
- * @dataProvider dataStripUserFilesPath
- */
- function testStripUserFilesPath($path, $expected) {
- $result = Helper::stripUserFilesPath($path);
- $this->assertSame($expected, $result);
- }
-
- function dataStripUserFilesPath() {
- return array(
- array('/user/files/foo.txt', 'foo.txt'),
- array('//user/files/foo.txt', 'foo.txt'),
- array('user//files/foo/bar.txt', 'foo/bar.txt'),
- array('user//files/', false),
- array('/user', false),
- array('', false),
- );
- }
-
- /**
- * @dataProvider dataStripUserFilesPathPositive
- */
- function testGetUserFromPathPositive($path, $expected) {
- self::setUpUsers();
- $result = Helper::getUserFromPath($path);
- $this->assertSame($expected, $result);
- self::cleanUpUsers();
- }
-
- function dataStripUserFilesPathPositive() {
- return array(
- array('/' . self::TEST_ENCRYPTION_HELPER_USER1 . '/files/foo.txt', self::TEST_ENCRYPTION_HELPER_USER1),
- array('//' . self::TEST_ENCRYPTION_HELPER_USER2 . '/files_versions/foo.txt', self::TEST_ENCRYPTION_HELPER_USER2),
- array('/' . self::TEST_ENCRYPTION_HELPER_USER1 . '/files_trashbin/', self::TEST_ENCRYPTION_HELPER_USER1),
- array(self::TEST_ENCRYPTION_HELPER_USER1 . '//cache/foo/bar.txt', self::TEST_ENCRYPTION_HELPER_USER1),
- );
- }
-
- /**
- * @dataProvider dataStripUserFilesPathNegative
- * @expectedException \OCA\Files_Encryption\Exception\EncryptionException
- */
- function testGetUserFromPathNegative($path) {
- Helper::getUserFromPath($path);
- }
-
- function dataStripUserFilesPathNegative() {
- return array(
- array('/unknown_user/files/foo.txt'),
- array('/' . self::TEST_ENCRYPTION_HELPER_USER2 . '/unknown_folder/foo.txt'),
- array('/' . self::TEST_ENCRYPTION_HELPER_USER1),
- array(''),
- );
- }
-
- /**
- * @dataProvider dataPaths
- */
- function testMkdirr($path, $expected) {
- self::setUpUsers();
- Helper::mkdirr($path, new \OC\Files\View('/' . self::TEST_ENCRYPTION_HELPER_USER1 . '/files'));
- // ignore the filename because we only check for the directories
- $dirParts = array_slice($expected, 0, -1);
- $expectedPath = implode('/', $dirParts);
- $this->assertTrue(\OC\Files\Filesystem::is_dir($expectedPath));
-
- // cleanup
- \OC\Files\Filesystem::unlink('/' . $expected[0]);
- self::cleanUpUsers();
- }
-
- /**
- * @dataProvider dataDetectFileTypePositive
- */
- function testDetectFileTypePositive($path, $expected) {
- $result = Helper::detectFileType($path);
- $this->assertSame($expected, $result);
- }
-
- function dataDetectFileTypePositive() {
- return array(
- array(self::TEST_ENCRYPTION_HELPER_USER1 . '/files', Files_Encryption\Util::FILE_TYPE_FILE),
- array(self::TEST_ENCRYPTION_HELPER_USER1 . '/files/foo/bar', Files_Encryption\Util::FILE_TYPE_FILE),
- array('/' . self::TEST_ENCRYPTION_HELPER_USER1 . '/files/foo/bar', Files_Encryption\Util::FILE_TYPE_FILE),
- array(self::TEST_ENCRYPTION_HELPER_USER1 . '/files_versions', Files_Encryption\Util::FILE_TYPE_VERSION),
- array('/' . self::TEST_ENCRYPTION_HELPER_USER1 . '//files_versions/foo/bar', Files_Encryption\Util::FILE_TYPE_VERSION),
- array('/' . self::TEST_ENCRYPTION_HELPER_USER1 . '//cache/foo/bar', Files_Encryption\Util::FILE_TYPE_CACHE),
- );
- }
-
- /**
- * @dataProvider dataDetectFileTypeNegative
- * @expectedException \OCA\Files_Encryption\Exception\EncryptionException
- */
- function testDetectFileTypeNegative($path) {
- Helper::detectFileType($path);
- }
-
- function dataDetectFileTypeNegative() {
- return array(
- array('/files'),
- array('/' . self::TEST_ENCRYPTION_HELPER_USER1 . '/unsuported_dir/foo/bar'),
- );
- }
-
- /**
- * @dataProvider dataPaths
- */
- function testSplitPath($path, $expected) {
- $result = Helper::splitPath($path);
- $this->compareArray($result, $expected);
- }
-
- function dataPaths() {
- return array(
- array('foo/bar/test.txt', array('', 'foo', 'bar', 'test.txt')),
- array('/foo/bar/test.txt', array('', 'foo', 'bar', 'test.txt')),
- array('/foo/bar//test.txt', array('', 'foo', 'bar', 'test.txt')),
- array('//foo/bar/test.txt', array('', 'foo', 'bar', 'test.txt')),
- array('foo', array('', 'foo')),
- array('/foo', array('', 'foo')),
- array('//foo', array('', 'foo')),
- );
- }
-
- function compareArray($result, $expected) {
- $this->assertSame(count($expected), count($result));
-
- foreach ($expected as $key => $value) {
- $this->assertArrayHasKey($key, $result);
- $this->assertSame($value, $result[$key]);
- }
- }
-
-}
diff --git a/apps/files_encryption/tests/hooks.php b/apps/files_encryption/tests/hooks.php
deleted file mode 100644
index b63e0431187..00000000000
--- a/apps/files_encryption/tests/hooks.php
+++ /dev/null
@@ -1,447 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-/**
- * Class Hooks
- * this class provide basic hook app tests
- */
-class Hooks extends TestCase {
-
- const TEST_ENCRYPTION_HOOKS_USER1 = "test-encryption-hooks-user1.dot";
- const TEST_ENCRYPTION_HOOKS_USER2 = "test-encryption-hooks-user2.dot";
-
- /** @var \OC\Files\View */
- public $user1View; // view on /data/user1/files
- /** @var \OC\Files\View */
- public $user2View; // view on /data/user2/files
- /** @var \OC\Files\View */
- public $rootView; // view on /data/user
- public $data;
- public $filename;
- public $folder;
-
- private static $testFiles;
-
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
-
- // note: not using a data provider because these
- // files all need to coexist to make sure the
- // share keys are found properly (pattern matching)
- self::$testFiles = array(
- 't est.txt',
- 't est_.txt',
- 't est.doc.txt',
- 't est(.*).txt', // make sure the regexp is escaped
- 'multiple.dots.can.happen.too.txt',
- 't est.' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.txt',
- 't est_.' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey.txt',
- 'who would upload their.shareKey',
- 'user ones file.txt',
- 'user ones file.txt.backup',
- '.t est.txt'
- );
-
- // create test user
- self::loginHelper(self::TEST_ENCRYPTION_HOOKS_USER1, true);
- self::loginHelper(self::TEST_ENCRYPTION_HOOKS_USER2, true);
- }
-
- protected function setUp() {
- parent::setUp();
-
- // set user id
- self::loginHelper(self::TEST_ENCRYPTION_HOOKS_USER1);
- \OC_User::setUserId(self::TEST_ENCRYPTION_HOOKS_USER1);
-
- // init filesystem view
- $this->user1View = new \OC\Files\View('/'. self::TEST_ENCRYPTION_HOOKS_USER1 . '/files');
- $this->user2View = new \OC\Files\View('/'. self::TEST_ENCRYPTION_HOOKS_USER2 . '/files');
- $this->rootView = new \OC\Files\View('/');
-
- // init short data
- $this->data = 'hats';
- $this->filename = 'enc_hooks_tests-' . $this->getUniqueID() . '.txt';
- $this->folder = 'enc_hooks_tests_folder-' . $this->getUniqueID();
-
- }
-
- public static function tearDownAfterClass() {
- // cleanup test user
- \OC_User::deleteUser(self::TEST_ENCRYPTION_HOOKS_USER1);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_HOOKS_USER2);
-
- parent::tearDownAfterClass();
- }
-
- function testDisableHook() {
- // encryption is enabled and running so we should have some user specific
- // settings in oc_preferences
- $query = \OC_DB::prepare('SELECT * FROM `*PREFIX*preferences` WHERE `appid` = ?');
- $result = $query->execute(array('files_encryption'));
- $row = $result->fetchRow();
- $this->assertTrue(is_array($row));
-
- // disabling the app should delete all user specific settings
- \OCA\Files_Encryption\Hooks::preDisable(array('app' => 'files_encryption'));
-
- // check if user specific settings for the encryption app are really gone
- $query = \OC_DB::prepare('SELECT * FROM `*PREFIX*preferences` WHERE `appid` = ?');
- $result = $query->execute(array('files_encryption'));
- $row = $result->fetchRow();
- $this->assertFalse($row);
-
- // relogin user to initialize the encryption again
- $user = \OCP\User::getUser();
- self::loginHelper($user);
-
- }
-
- function testDeleteHooks() {
-
- // remember files_trashbin state
- $stateFilesTrashbin = \OC_App::isEnabled('files_trashbin');
-
- // we want to tests with app files_trashbin disabled
- \OC_App::disable('files_trashbin');
-
- // make sure that the trash bin is disabled
- $this->assertFalse(\OC_APP::isEnabled('files_trashbin'));
-
- $this->user1View->file_put_contents($this->filename, $this->data);
-
- // check if all keys are generated
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
-
-
- self::logoutHelper();
- self::loginHelper(self::TEST_ENCRYPTION_HOOKS_USER2);
- \OC_User::setUserId(self::TEST_ENCRYPTION_HOOKS_USER2);
-
-
- $this->user2View->file_put_contents($this->filename, $this->data);
-
- // check if all keys are generated
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey'));
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
-
-
- // create a dummy file that we can delete something outside of data/user/files
- // in this case no share or file keys should be deleted
- $this->rootView->file_put_contents(self::TEST_ENCRYPTION_HOOKS_USER2 . "/" . $this->filename, $this->data);
-
- // delete dummy file outside of data/user/files
- $this->rootView->unlink(self::TEST_ENCRYPTION_HOOKS_USER2 . "/" . $this->filename);
-
- // all keys should still exist
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey'));
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
-
-
- // delete the file in data/user/files
- // now the correspondig share and file keys from user2 should be deleted
- $this->user2View->unlink($this->filename);
-
- // check if keys from user2 are really deleted
- $this->assertFalse($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey'));
- $this->assertFalse($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
-
- // but user1 keys should still exist
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
-
- if ($stateFilesTrashbin) {
- \OC_App::enable('files_trashbin');
- }
- else {
- \OC_App::disable('files_trashbin');
- }
- }
-
- function testDeleteHooksForSharedFiles() {
-
- self::logoutHelper();
- self::loginHelper(self::TEST_ENCRYPTION_HOOKS_USER1);
- \OC_User::setUserId(self::TEST_ENCRYPTION_HOOKS_USER1);
-
- // remember files_trashbin state
- $stateFilesTrashbin = \OC_App::isEnabled('files_trashbin');
-
- // we want to tests with app files_trashbin disabled
- \OC_App::disable('files_trashbin');
-
- // make sure that the trash bin is disabled
- $this->assertFalse(\OC_APP::isEnabled('files_trashbin'));
-
- $this->user1View->file_put_contents($this->filename, $this->data);
-
- // check if all keys are generated
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
-
- // get the file info from previous created file
- $fileInfo = $this->user1View->getFileInfo($this->filename);
-
- // check if we have a valid file info
- $this->assertTrue($fileInfo instanceof \OC\Files\FileInfo);
-
- // share the file with user2
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_HOOKS_USER2, \OCP\Constants::PERMISSION_ALL);
-
- // check if new share key exists
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey'));
-
- self::logoutHelper();
- self::loginHelper(self::TEST_ENCRYPTION_HOOKS_USER2);
- \OC_User::setUserId(self::TEST_ENCRYPTION_HOOKS_USER2);
-
- // user2 update the shared file
- $this->user2View->file_put_contents($this->filename, $this->data);
-
- // keys should be stored at user1s dir, not in user2s
- $this->assertFalse($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey'));
- $this->assertFalse($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
-
- // delete the Shared file from user1 in data/user2/files/Shared
- $result = $this->user2View->unlink($this->filename);
-
- $this->assertTrue($result);
-
- // share key for user2 from user1s home should be gone, all other keys should still exists
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
- $this->assertFalse($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey'));
- $this->assertTrue($this->rootView->file_exists(
- self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
-
- // cleanup
-
- self::logoutHelper();
- self::loginHelper(self::TEST_ENCRYPTION_HOOKS_USER1);
- \OC_User::setUserId(self::TEST_ENCRYPTION_HOOKS_USER1);
-
- if ($stateFilesTrashbin) {
- \OC_App::enable('files_trashbin');
- }
- else {
- \OC_App::disable('files_trashbin');
- }
- }
-
- function testRenameHook() {
- // create all files to make sure all keys can coexist properly
- foreach (self::$testFiles as $file) {
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $file, $this->data);
-
- // test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
- }
-
- foreach (self::$testFiles as $file) {
- $this->doTestRenameHook($file);
- }
- }
-
- /**
- * test rename operation
- */
- function doTestRenameHook($filename) {
- // check if keys exists
- $this->assertTrue($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
-
- $this->assertTrue($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $filename . '/fileKey'));
-
- // make subfolder and sub-subfolder
- $this->rootView->mkdir('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder);
- $this->rootView->mkdir('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder . '/' . $this->folder);
-
- $this->assertTrue($this->rootView->is_dir('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder . '/' . $this->folder));
-
- // move the file to the sub-subfolder
- $root = $this->rootView->getRoot();
- $this->rootView->chroot('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/');
- $this->rootView->rename($filename, '/' . $this->folder . '/' . $this->folder . '/' . $filename);
- $this->rootView->chroot($root);
-
- $this->assertFalse($this->rootView->file_exists('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $filename));
- $this->assertTrue($this->rootView->file_exists('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder . '/' . $this->folder . '/' . $filename));
-
- // keys should be renamed too
- $this->assertFalse($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
- $this->assertFalse($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $filename . '/fileKey'));
-
- $this->assertTrue($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->folder . '/' . $this->folder . '/'
- . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
- $this->assertTrue($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->folder . '/' . $this->folder . '/'
- . $filename . '/fileKey'));
-
- // cleanup
- $this->rootView->unlink('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder);
- }
-
- function testCopyHook() {
- // create all files to make sure all keys can coexist properly
- foreach (self::$testFiles as $file) {
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $file, $this->data);
-
- // test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
- }
-
- foreach (self::$testFiles as $file) {
- $this->doTestCopyHook($file);
- }
- }
-
- /**
- * test rename operation
- */
- function doTestCopyHook($filename) {
- // check if keys exists
- $this->assertTrue($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
-
- $this->assertTrue($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $filename . '/fileKey'));
-
- // make subfolder and sub-subfolder
- $this->rootView->mkdir('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder);
- $this->rootView->mkdir('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder . '/' . $this->folder);
-
- $this->assertTrue($this->rootView->is_dir('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder . '/' . $this->folder));
-
- // copy the file to the sub-subfolder
- \OC\Files\Filesystem::copy($filename, '/' . $this->folder . '/' . $this->folder . '/' . $filename);
-
- $this->assertTrue($this->rootView->file_exists('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $filename));
- $this->assertTrue($this->rootView->file_exists('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder . '/' . $this->folder . '/' . $filename));
-
- // keys should be copied too
- $this->assertTrue($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
- $this->assertTrue($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/'
- . $filename . '/fileKey'));
-
- $this->assertTrue($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->folder . '/' . $this->folder . '/'
- . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
- $this->assertTrue($this->rootView->file_exists(
- '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->folder . '/' . $this->folder . '/'
- . $filename . '/fileKey'));
-
- // cleanup
- $this->rootView->unlink('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder);
- $this->rootView->unlink('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $filename);
- }
-
- /**
- * @brief replacing encryption keys during password change should be allowed
- * until the user logged in for the first time
- */
- public function testSetPassphrase() {
-
- $view = new \OC\Files\View();
-
- // set user password for the first time
- \OCA\Files_Encryption\Hooks::postCreateUser(array('uid' => 'newUser', 'password' => 'newUserPassword'));
-
- $this->assertTrue($view->file_exists(\OCA\Files_Encryption\Keymanager::getPublicKeyPath() . '/newUser.publicKey'));
- $this->assertTrue($view->file_exists('newUser/files_encryption/newUser.privateKey'));
-
- // check if we are able to decrypt the private key
- $encryptedKey = \OCA\Files_Encryption\Keymanager::getPrivateKey($view, 'newUser');
- $privateKey = \OCA\Files_Encryption\Crypt::decryptPrivateKey($encryptedKey, 'newUserPassword');
- $this->assertTrue(is_string($privateKey));
-
- // change the password before the user logged-in for the first time,
- // we can replace the encryption keys
- \OCA\Files_Encryption\Hooks::setPassphrase(array('uid' => 'newUser', 'password' => 'passwordChanged'));
-
- $encryptedKey = \OCA\Files_Encryption\Keymanager::getPrivateKey($view, 'newUser');
- $privateKey = \OCA\Files_Encryption\Crypt::decryptPrivateKey($encryptedKey, 'passwordChanged');
- $this->assertTrue(is_string($privateKey));
-
- // now create a files folder to simulate a already used account
- $view->mkdir('/newUser/files');
-
- // change the password after the user logged in, now the password should not change
- \OCA\Files_Encryption\Hooks::setPassphrase(array('uid' => 'newUser', 'password' => 'passwordChanged2'));
-
- $encryptedKey = \OCA\Files_Encryption\Keymanager::getPrivateKey($view, 'newUser');
- $privateKey = \OCA\Files_Encryption\Crypt::decryptPrivateKey($encryptedKey, 'passwordChanged2');
- $this->assertFalse($privateKey);
-
- $privateKey = \OCA\Files_Encryption\Crypt::decryptPrivateKey($encryptedKey, 'passwordChanged');
- $this->assertTrue(is_string($privateKey));
-
- }
-
-}
diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php
deleted file mode 100644
index d1a3f1e140e..00000000000
--- a/apps/files_encryption/tests/keymanager.php
+++ /dev/null
@@ -1,411 +0,0 @@
-<?php
-/**
- * @author Andreas Fischer <bantu@owncloud.com>
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-/**
- * Class Keymanager
- */
-class Keymanager extends TestCase {
-
- const TEST_USER = "test-keymanager-user.dot";
-
- public $userId;
- public $pass;
- public static $stateFilesTrashbin;
- /**
- * @var \OC\Files\View
- */
- public $view;
- public $randomKey;
- public $dataShort;
-
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
-
- // disable file proxy by default
- \OC_FileProxy::$enabled = false;
-
- // remember files_trashbin state
- self::$stateFilesTrashbin = \OC_App::isEnabled('files_trashbin');
-
- // we don't want to tests with app files_trashbin enabled
- \OC_App::disable('files_trashbin');
-
- // create test user
- \OC_User::deleteUser(self::TEST_USER);
- parent::loginHelper(self::TEST_USER, true);
- }
-
- protected function setUp() {
- parent::setUp();
- // set content for encrypting / decrypting in tests
- $this->dataLong = file_get_contents(__DIR__ . '/../lib/crypt.php');
- $this->dataShort = 'hats';
- $this->dataUrl = __DIR__ . '/../lib/crypt.php';
- $this->legacyData = __DIR__ . '/legacy-text.txt';
- $this->legacyEncryptedData = __DIR__ . '/legacy-encrypted-text.txt';
- $this->randomKey = \OCA\Files_Encryption\Crypt::generateKey();
-
- $keypair = \OCA\Files_Encryption\Crypt::createKeypair();
- $this->genPublicKey = $keypair['publicKey'];
- $this->genPrivateKey = $keypair['privateKey'];
-
- $this->view = new \OC\Files\View('/');
-
- self::loginHelper(self::TEST_USER);
- $this->userId = self::TEST_USER;
- $this->pass = self::TEST_USER;
-
- $userHome = \OC_User::getHome($this->userId);
- $this->dataDir = str_replace('/' . $this->userId, '', $userHome);
- }
-
- function tearDown() {
- $this->view->deleteAll('/' . self::TEST_USER . '/files_encryption/keys');
- parent::tearDown();
- }
-
- public static function tearDownAfterClass() {
- \OC_FileProxy::$enabled = true;
-
- // cleanup test user
- \OC_User::deleteUser(self::TEST_USER);
- // reset app files_trashbin
- if (self::$stateFilesTrashbin) {
- \OC_App::enable('files_trashbin');
- }
-
- parent::tearDownAfterClass();
- }
-
- function testKeyCacheUpdate() {
- $testUser = 'testKeyCacheUpdate';
- \OCA\Files_Encryption\Keymanager::setPublicKey('oldKey', $testUser);
-
- $this->assertSame('oldKey',
- \OCA\Files_Encryption\Keymanager::getPublicKey($this->view, $testUser));
-
- // update key
- \OCA\Files_Encryption\Keymanager::setPublicKey('newKey', $testUser);
-
- $this->assertSame('newKey',
- \OCA\Files_Encryption\Keymanager::getPublicKey($this->view, $testUser));
-
- // cleanup
- \OCA\Files_Encryption\Keymanager::deletePublicKey($this->view, $testUser);
-
- }
-
- /**
- * @medium
- */
- function testGetPrivateKey() {
-
- $key = \OCA\Files_Encryption\Keymanager::getPrivateKey($this->view, $this->userId);
-
- $privateKey = \OCA\Files_Encryption\Crypt::decryptPrivateKey($key, $this->pass);
-
- $res = openssl_pkey_get_private($privateKey);
-
- $this->assertTrue(is_resource($res));
-
- $sslInfo = openssl_pkey_get_details($res);
-
- $this->assertArrayHasKey('key', $sslInfo);
-
- }
-
- /**
- * @medium
- */
- function testGetPublicKey() {
-
- $publiceKey = \OCA\Files_Encryption\Keymanager::getPublicKey($this->view, $this->userId);
-
- $res = openssl_pkey_get_public($publiceKey);
-
- $this->assertTrue(is_resource($res));
-
- $sslInfo = openssl_pkey_get_details($res);
-
- $this->assertArrayHasKey('key', $sslInfo);
- }
-
- /**
- * @medium
- */
- function testSetFileKey() {
-
- $key = $this->randomKey;
-
- $file = 'unittest-' . $this->getUniqueID() . '.txt';
-
- $util = new \OCA\Files_Encryption\Util($this->view, $this->userId);
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- $this->view->file_put_contents($this->userId . '/files/' . $file, $this->dataShort);
-
- \OCA\Files_Encryption\Keymanager::setFileKey($this->view, $util, $file, $key);
-
- $this->assertTrue($this->view->file_exists('/' . $this->userId . '/files_encryption/keys/' . $file . '/fileKey'));
-
- // cleanup
- $this->view->unlink('/' . $this->userId . '/files/' . $file);
-
- // change encryption proxy to previous state
- \OC_FileProxy::$enabled = $proxyStatus;
- }
-
- /**
- * @medium
- */
- function testSetPrivateKey() {
-
- $key = "dummy key";
-
- \OCA\Files_Encryption\Keymanager::setPrivateKey($key, 'dummyUser');
-
- $this->assertTrue($this->view->file_exists('/dummyUser/files_encryption/dummyUser.privateKey'));
-
- //clean up
- $this->view->deleteAll('/dummyUser');
- }
-
- /**
- * @medium
- */
- function testSetPrivateSystemKey() {
-
- $key = "dummy key";
- $keyName = "myDummyKey";
- $encHeader = \OCA\Files_Encryption\Crypt::generateHeader();
-
- \OCA\Files_Encryption\Keymanager::setPrivateSystemKey($key, $keyName);
-
- $this->assertTrue($this->view->file_exists('/files_encryption/' . $keyName . '.privateKey'));
-
- $result = \OCA\Files_Encryption\Keymanager::getPrivateSystemKey($keyName);
-
- $this->assertSame($encHeader . $key, $result);
-
- // clean up
- $this->view->unlink('/files_encryption/' . $keyName.'.privateKey');
- }
-
-
- /**
- * @medium
- */
- function testGetUserKeys() {
-
- $keys = \OCA\Files_Encryption\Keymanager::getUserKeys($this->view, $this->userId);
-
- $resPublic = openssl_pkey_get_public($keys['publicKey']);
-
- $this->assertTrue(is_resource($resPublic));
-
- $sslInfoPublic = openssl_pkey_get_details($resPublic);
-
- $this->assertArrayHasKey('key', $sslInfoPublic);
-
- $privateKey = \OCA\Files_Encryption\Crypt::decryptPrivateKey($keys['privateKey'], $this->pass);
-
- $resPrivate = openssl_pkey_get_private($privateKey);
-
- $this->assertTrue(is_resource($resPrivate));
-
- $sslInfoPrivate = openssl_pkey_get_details($resPrivate);
-
- $this->assertArrayHasKey('key', $sslInfoPrivate);
- }
-
- /**
- * @medium
- */
- function testRecursiveDelShareKeysFolder() {
-
- $this->view->mkdir('/' . self::TEST_USER . '/files/folder1');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files/folder1/existingFile.txt', 'data');
-
- // create folder structure for some dummy share key files
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1');
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt');
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1/file1');
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1/file2');
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder');
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder/file2');
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder/subsubfolder');
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder/subsubfolder/file1');
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder/subsubfolder/file2');
-
- // create some dummy share keys
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt/user1.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt/' . self::TEST_USER . '.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/user1.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/user1.test.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/test-keymanager-userxdot.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/userx.' . self::TEST_USER . '.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/' . self::TEST_USER . '.userx.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/user1.' . self::TEST_USER . '.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/' . self::TEST_USER . '.user1.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/file2/user2.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/file2/user3.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder/file2/user3.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder/subsubfolder/file1/user1.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder/subsubfolder/file2/user2.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder/subsubfolder/file2/user3.shareKey', 'data');
-
- // recursive delete share keys from user1 and user2
- \OCA\Files_Encryption\Keymanager::delShareKey($this->view,
- array('user1', 'user2', self::TEST_USER),
- \OCA\Files_Encryption\Keymanager::getKeyPath($this->view, new \OCA\Files_Encryption\Util($this->view, self::TEST_USER), '/folder1'),
- self::TEST_USER,
- '/folder1');
-
- // check if share keys from user1 and user2 are deleted
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt/user1.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/share-keys/folder1/file1/user1.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/share-keys/folder1/file2/user2.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/share-keys/folder1/subfolder/subsubfolder/file1/user1.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/share-keys/folder1/subfolder/subsubfolder/file2/user2.shareKey'));
-
- // check if share keys from user3 still exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/file2/user3.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder/subsubfolder/file2/user3.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/subfolder/file2/user3.shareKey'));
-
- // check if share keys for user or file with similar name
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/user1.test.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/test-keymanager-userxdot.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/' . self::TEST_USER . '.userx.shareKey'));
- // FIXME: this case currently cannot be distinguished, needs further fixing
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/userx.' . self::TEST_USER . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/user1.' . self::TEST_USER . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/file1/' . self::TEST_USER . '.user1.shareKey'));
-
- // owner key from existing file should still exists because the file is still there
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt/' . self::TEST_USER . '.shareKey'));
-
- // cleanup
- $this->view->deleteAll('/' . self::TEST_USER . '/files/folder1');
-
- }
-
- /**
- * @medium
- */
- function testRecursiveDelShareKeysFile() {
-
- $this->view->mkdir('/' . self::TEST_USER . '/files/folder1');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files/folder1/existingFile.txt', 'data');
-
- // create folder structure for some dummy share key files
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1');
- $this->view->mkdir('/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt');
-
- // create some dummy share keys
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt/user1.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt/user2.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt/user3.shareKey', 'data');
- $this->view->file_put_contents('/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt/' . self::TEST_USER . '.shareKey', 'data');
-
- // recursive delete share keys from user1 and user2
- \OCA\Files_Encryption\Keymanager::delShareKey($this->view,
- array('user1', 'user2', self::TEST_USER),
- \OCA\Files_Encryption\Keymanager::getKeyPath($this->view, new \OCA\Files_Encryption\Util($this->view, self::TEST_USER), '/folder1/existingFile.txt'),
- self::TEST_USER,
- '/folder1/existingFile.txt');
-
-
- // check if share keys from user1 and user2 are deleted
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile/user1.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile/user2.shareKey'));
-
- // check if share keys for user3 and owner
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt/' . self::TEST_USER . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_USER . '/files_encryption/keys/folder1/existingFile.txt/user3.shareKey'));
- // cleanup
- $this->view->deleteAll('/' . self::TEST_USER . '/files/folder1');
-
- }
-
- function testKeySetPreperation() {
- $basePath = '/' . self::TEST_USER . '/files';
- $path = '/folder1/subfolder/subsubfolder/file.txt';
-
- $this->assertFalse($this->view->is_dir($basePath . '/testKeySetPreperation'));
-
- TestProtectedKeymanagerMethods::testKeySetPreperation($this->view, $basePath . $path);
-
- // check if directory structure was created
- $this->assertTrue($this->view->is_dir($basePath . $path));
-
- // cleanup
- $this->view->deleteAll($basePath . '/folder1');
-
- }
-}
-
-/**
- * dummy class to access protected methods of \OCA\Files_Encryption\Keymanager for testing
- */
-class TestProtectedKeymanagerMethods extends \OCA\Files_Encryption\Keymanager {
-
- /**
- * @param \OC\Files\View $view relative to data/
- * @param string $path
- * @param string $basePath
- */
- public static function testKeySetPreperation($view, $path) {
- self::keySetPreparation($view, $path);
- }
-}
diff --git a/apps/files_encryption/tests/legacy-encrypted-text.txt b/apps/files_encryption/tests/legacy-encrypted-text.txt
deleted file mode 100644
index 1f5087178cd..00000000000
--- a/apps/files_encryption/tests/legacy-encrypted-text.txt
+++ /dev/null
@@ -1 +0,0 @@
-ð˜¯5–¡‹Ç¡i›òë³Zg§ESlÁF=Àªð \ No newline at end of file
diff --git a/apps/files_encryption/tests/migration.php b/apps/files_encryption/tests/migration.php
deleted file mode 100644
index 031c327d371..00000000000
--- a/apps/files_encryption/tests/migration.php
+++ /dev/null
@@ -1,266 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-class Migration extends TestCase {
-
- const TEST_ENCRYPTION_MIGRATION_USER1='test_encryption_user1';
- const TEST_ENCRYPTION_MIGRATION_USER2='test_encryption_user2';
- const TEST_ENCRYPTION_MIGRATION_USER3='test_encryption_user3';
-
- /** @var \OC\Files\View */
- private $view;
- private $public_share_key_id;
- private $recovery_key_id;
-
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
- self::loginHelper(self::TEST_ENCRYPTION_MIGRATION_USER1, true);
- self::loginHelper(self::TEST_ENCRYPTION_MIGRATION_USER2, true);
- self::loginHelper(self::TEST_ENCRYPTION_MIGRATION_USER3, true);
- }
-
- public static function tearDownAfterClass() {
- \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER1);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER2);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER3);
- parent::tearDownAfterClass();
- }
-
- protected function tearDown() {
- if (\OC_DB::tableExists('encryption_test')) {
- \OC_DB::dropTable('encryption_test');
- }
- $this->assertTableNotExist('encryption_test');
-
- parent::tearDown();
- }
-
- public function setUp() {
- $this->loginHelper(self::TEST_ENCRYPTION_MIGRATION_USER1);
- $this->view = new \OC\Files\View();
- $this->public_share_key_id = \OCA\Files_Encryption\Helper::getPublicShareKeyId();
- $this->recovery_key_id = \OCA\Files_Encryption\Helper::getRecoveryKeyId();
- if (\OC_DB::tableExists('encryption_test')) {
- \OC_DB::dropTable('encryption_test');
- }
- $this->assertTableNotExist('encryption_test');
- }
-
- public function checkLastIndexId() {
- $query = \OC_DB::prepare('INSERT INTO `*PREFIX*share` ('
- .' `item_type`, `item_source`, `item_target`, `share_type`,'
- .' `share_with`, `uid_owner`, `permissions`, `stime`, `file_source`,'
- .' `file_target`, `token`, `parent`, `expiration`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)');
- $query->bindValue(1, 'file');
- $query->bindValue(2, 949);
- $query->bindValue(3, '/949');
- $query->bindValue(4, 0);
- $query->bindValue(5, 'migrate-test-user');
- $query->bindValue(6, 'migrate-test-owner');
- $query->bindValue(7, 23);
- $query->bindValue(8, 1402493312);
- $query->bindValue(9, 0);
- $query->bindValue(10, '/migration.txt');
- $query->bindValue(11, null);
- $query->bindValue(12, null);
- $query->bindValue(13, null);
- $this->assertEquals(1, $query->execute());
-
- $this->assertNotEquals('0', \OC_DB::insertid('*PREFIX*share'));
-
- // cleanup
- $query = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `file_target` = ?');
- $query->bindValue(1, '/migration.txt');
- $this->assertEquals(1, $query->execute());
-
- }
-
- public function testBrokenLastIndexId() {
-
- // create test table
- $this->checkLastIndexId();
- \OC_DB::createDbFromStructure(__DIR__ . '/encryption_table.xml');
- $this->checkLastIndexId();
- }
-
- /**
- * @param string $table
- */
- public function assertTableNotExist($table) {
- $type = \OC_Config::getValue( "dbtype", "sqlite" );
- if( $type == 'sqlite' || $type == 'sqlite3' ) {
- // sqlite removes the tables after closing the DB
- $this->assertTrue(true);
- } else {
- $this->assertFalse(\OC_DB::tableExists($table), 'Table ' . $table . ' exists.');
- }
- }
-
- protected function createDummyShareKeys($uid) {
- $this->view->mkdir($uid . '/files_encryption/share-keys/folder1/folder2/folder3');
- $this->view->mkdir($uid . '/files_encryption/share-keys/folder2/');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/folder3/file3.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/folder3/file3.' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/folder3/file3.' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/file2.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/file2.' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/file2.' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/file.1.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/file.1.' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/file.1.' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder2/file.2.1.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder2/file.2.1.' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder2/file.2.1.' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey' , 'data');
- if ($this->public_share_key_id) {
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder2/file.2.1.' . $this->public_share_key_id . '.shareKey' , 'data');
- }
- if ($this->recovery_key_id) {
- $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder2/file.2.1.' . $this->recovery_key_id . '.shareKey' , 'data');
- }
- }
-
- protected function createDummyFileKeys($uid) {
- $this->view->mkdir($uid . '/files_encryption/keyfiles/folder1/folder2/folder3');
- $this->view->mkdir($uid . '/files_encryption/keyfiles/folder2/');
- $this->view->file_put_contents($uid . '/files_encryption/keyfiles/folder1/folder2/folder3/file3.key' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/keyfiles/folder1/folder2/file2.key' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/keyfiles/folder1/file.1.key' , 'data');
- $this->view->file_put_contents($uid . '/files_encryption/keyfiles/folder2/file.2.1.key' , 'data');
- }
-
- protected function createDummyFilesInTrash($uid) {
- $this->view->mkdir($uid . '/files_trashbin/share-keys');
- $this->view->mkdir($uid . '/files_trashbin/share-keys/folder1.d7437648723');
- $this->view->file_put_contents($uid . '/files_trashbin/share-keys/file1.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey.d5457864' , 'data');
- $this->view->file_put_contents($uid . '/files_trashbin/share-keys/file1.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey.d5457864' , 'data');
- $this->view->file_put_contents($uid . '/files_trashbin/share-keys/folder1.d7437648723/file2.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data');
-
- $this->view->mkdir($uid . '/files_trashbin/keyfiles');
- $this->view->mkdir($uid . '/files_trashbin/keyfiles/folder1.d7437648723');
- $this->view->file_put_contents($uid . '/files_trashbin/keyfiles/file1.key.d5457864' , 'data');
- $this->view->file_put_contents($uid . '/files_trashbin/keyfiles/folder1.d7437648723/file2.key' , 'data');
- }
-
- protected function createDummySystemWideKeys() {
- $this->view->mkdir('owncloud_private_key');
- $this->view->file_put_contents('owncloud_private_key/systemwide_1.private.key', 'data');
- $this->view->file_put_contents('owncloud_private_key/systemwide_2.private.key', 'data');
- }
-
- public function testMigrateToNewFolderStructure() {
-
- // go back to the state before migration
- $this->view->rename('/files_encryption/public_keys', '/public-keys');
- $this->view->rename('/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.publicKey', '/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.public.key');
- $this->view->rename('/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.publicKey', '/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.public.key');
- $this->view->rename('/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.publicKey', '/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.public.key');
- $this->view->deleteAll(self::TEST_ENCRYPTION_MIGRATION_USER1 . '/files_encryption/keys');
- $this->view->deleteAll(self::TEST_ENCRYPTION_MIGRATION_USER2 . '/files_encryption/keys');
- $this->view->deleteAll(self::TEST_ENCRYPTION_MIGRATION_USER3 . '/files_encryption/keys');
- $this->view->rename(self::TEST_ENCRYPTION_MIGRATION_USER1 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.privateKey',
- self::TEST_ENCRYPTION_MIGRATION_USER1 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.private.key');
- $this->view->rename(self::TEST_ENCRYPTION_MIGRATION_USER2 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.privateKey',
- self::TEST_ENCRYPTION_MIGRATION_USER2 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.private.key');
- $this->view->rename(self::TEST_ENCRYPTION_MIGRATION_USER3 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.privateKey',
- self::TEST_ENCRYPTION_MIGRATION_USER3 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.private.key');
-
- $this->createDummyShareKeys(self::TEST_ENCRYPTION_MIGRATION_USER1);
- $this->createDummyShareKeys(self::TEST_ENCRYPTION_MIGRATION_USER2);
- $this->createDummyShareKeys(self::TEST_ENCRYPTION_MIGRATION_USER3);
-
- $this->createDummyFileKeys(self::TEST_ENCRYPTION_MIGRATION_USER1);
- $this->createDummyFileKeys(self::TEST_ENCRYPTION_MIGRATION_USER2);
- $this->createDummyFileKeys(self::TEST_ENCRYPTION_MIGRATION_USER3);
-
- $this->createDummyFilesInTrash(self::TEST_ENCRYPTION_MIGRATION_USER2);
-
- // no user for system wide mount points
- $this->createDummyFileKeys('');
- $this->createDummyShareKeys('');
-
- $this->createDummySystemWideKeys();
-
- $m = new \OCA\Files_Encryption\Migration();
- $m->reorganizeFolderStructure();
-
- // TODO Verify that all files at the right place
- $this->assertTrue($this->view->file_exists('/files_encryption/public_keys/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.publicKey'));
- $this->assertTrue($this->view->file_exists('/files_encryption/public_keys/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.publicKey'));
- $this->assertTrue($this->view->file_exists('/files_encryption/public_keys/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.publicKey'));
- $this->verifyNewKeyPath(self::TEST_ENCRYPTION_MIGRATION_USER1);
- $this->verifyNewKeyPath(self::TEST_ENCRYPTION_MIGRATION_USER2);
- $this->verifyNewKeyPath(self::TEST_ENCRYPTION_MIGRATION_USER3);
- // system wide keys
- $this->verifyNewKeyPath('');
- // trash
- $this->verifyFilesInTrash(self::TEST_ENCRYPTION_MIGRATION_USER2);
-
- }
-
- protected function verifyFilesInTrash($uid) {
- // share keys
- $this->view->file_exists($uid . '/files_trashbin/keys/file1.d5457864/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey.d5457864' , 'data');
- $this->view->file_exists($uid . '/files_trashbin/keys/file1.d5457864/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey.d5457864' , 'data');
- $this->view->file_exists($uid . '/files_trashbin/keys/folder1.d7437648723/file2/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data');
-
- // file keys
- $this->view->file_exists($uid . '/files_trashbin/keys/file1.d5457864/fileKey.d5457864' , 'data');
- $this->view->file_exists($uid . '/files_trashbin/keyfiles/file1.d5457864/fileKey.d5457864' , 'data');
- $this->view->file_exists($uid . '/files_trashbin/keyfiles/folder1.d7437648723/file2/fileKey' , 'data');
- }
-
- protected function verifyNewKeyPath($uid) {
- // private key
- if ($uid !== '') {
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/' . $uid . '.privateKey'));
- }
- // file keys
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/folder3/file3/fileKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/file2/fileKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/file.1/fileKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/fileKey'));
- // share keys
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/folder3/file3/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/folder3/file3/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/folder3/file3/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/file2/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/file2/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/file2/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/file.1/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/file.1/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/file.1/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey'));
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey'));
- if ($this->public_share_key_id) {
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/' . $this->public_share_key_id . '.shareKey'));
- }
- if ($this->recovery_key_id) {
- $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/' . $this->recovery_key_id . '.shareKey'));
- }
- }
-}
diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php
deleted file mode 100644
index 59fcb896a2b..00000000000
--- a/apps/files_encryption/tests/proxy.php
+++ /dev/null
@@ -1,154 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-/**
- * Class Proxy
- * this class provide basic proxy app tests
- */
-class Proxy extends TestCase {
-
- const TEST_ENCRYPTION_PROXY_USER1 = "test-proxy-user1";
-
- public $userId;
- public $pass;
- /**
- * @var \OC\Files\View
- */
- public $view; // view in /data/user/files
- public $rootView; // view on /data/user
- public $data;
- public $dataLong;
- public $filename;
-
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
-
- // create test user
- self::loginHelper(self::TEST_ENCRYPTION_PROXY_USER1, true);
- }
-
- protected function setUp() {
- parent::setUp();
-
- // set user id
- \OC_User::setUserId(self::TEST_ENCRYPTION_PROXY_USER1);
- $this->userId = self::TEST_ENCRYPTION_PROXY_USER1;
- $this->pass = self::TEST_ENCRYPTION_PROXY_USER1;
-
- // init filesystem view
- $this->view = new \OC\Files\View('/'. self::TEST_ENCRYPTION_PROXY_USER1 . '/files');
- $this->rootView = new \OC\Files\View('/'. self::TEST_ENCRYPTION_PROXY_USER1 );
-
- // init short data
- $this->data = 'hats';
- $this->dataLong = file_get_contents(__DIR__ . '/../lib/crypt.php');
- $this->filename = 'enc_proxy_tests-' . $this->getUniqueID() . '.txt';
-
- }
-
- public static function tearDownAfterClass() {
- // cleanup test user
- \OC_User::deleteUser(self::TEST_ENCRYPTION_PROXY_USER1);
-
- parent::tearDownAfterClass();
- }
-
- /**
- * @medium
- * test if postFileSize returns the unencrypted file size
- */
- function testPostFileSize() {
-
- $this->view->file_put_contents($this->filename, $this->dataLong);
- $size = strlen($this->dataLong);
-
- \OC_FileProxy::$enabled = false;
-
- $encryptedSize = $this->view->filesize($this->filename);
-
- \OC_FileProxy::$enabled = true;
-
- $unencryptedSize = $this->view->filesize($this->filename);
-
- $this->assertTrue($encryptedSize > $unencryptedSize);
- $this->assertSame($size, $unencryptedSize);
-
- // cleanup
- $this->view->unlink($this->filename);
-
- }
-
- function testPostFileSizeWithDirectory() {
-
- $this->view->file_put_contents($this->filename, $this->data);
-
- \OC_FileProxy::$enabled = false;
-
- // get root size, must match the file's unencrypted size
- $unencryptedSize = $this->view->filesize('');
-
- \OC_FileProxy::$enabled = true;
-
- $encryptedSize = $this->view->filesize('');
-
- $this->assertTrue($encryptedSize !== $unencryptedSize);
-
- // cleanup
- $this->view->unlink($this->filename);
-
- }
-
- /**
- * @dataProvider isExcludedPathProvider
- */
- function testIsExcludedPath($path, $expected) {
- $this->view->mkdir(dirname($path));
- $this->view->file_put_contents($path, "test");
-
- $result = \Test_Helper::invokePrivate(new \OCA\Files_Encryption\Proxy(), 'isExcludedPath', array($path));
- $this->assertSame($expected, $result);
-
- $this->view->deleteAll(dirname($path));
-
- }
-
- public function isExcludedPathProvider() {
- return array(
- array ('/' . self::TEST_ENCRYPTION_PROXY_USER1 . '/files/test.txt', false),
- array (self::TEST_ENCRYPTION_PROXY_USER1 . '/files/test.txt', false),
- array ('/files/test.txt', true),
- array ('/' . self::TEST_ENCRYPTION_PROXY_USER1 . '/files/versions/test.txt', false),
- array ('/' . self::TEST_ENCRYPTION_PROXY_USER1 . '/files_versions/test.txt', false),
- array ('/' . self::TEST_ENCRYPTION_PROXY_USER1 . '/files_trashbin/test.txt', true),
- array ('/' . self::TEST_ENCRYPTION_PROXY_USER1 . '/file/test.txt', true),
- );
- }
-
-}
-
diff --git a/apps/files_encryption/tests/share.php b/apps/files_encryption/tests/share.php
deleted file mode 100755
index 2a9f0359c91..00000000000
--- a/apps/files_encryption/tests/share.php
+++ /dev/null
@@ -1,1392 +0,0 @@
-<?php
-/**
- * @author Bart Visscher <bartv@thisnet.nl>
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-/**
- * Class Share
- */
-class Share extends TestCase {
-
- const TEST_ENCRYPTION_SHARE_USER1 = "test-share-user1";
- const TEST_ENCRYPTION_SHARE_USER2 = "test-share-user2";
- const TEST_ENCRYPTION_SHARE_USER3 = "test-share-user3";
- const TEST_ENCRYPTION_SHARE_USER4 = "test-share-user4";
- const TEST_ENCRYPTION_SHARE_GROUP1 = "test-share-group1";
-
- public $stateFilesTrashbin;
- public $filename;
- public $dataShort;
- /**
- * @var \OC\Files\View
- */
- public $view;
- public $folder1;
- public $subfolder;
- public $subsubfolder;
-
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
-
- // enable resharing
- \OC::$server->getAppConfig()->setValue('core', 'shareapi_allow_resharing', 'yes');
-
- // register share hooks
- \OC::registerShareHooks();
- \OCA\Files_Sharing\Helper::registerHooks();
-
- // create users
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1, true);
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2, true);
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER3, true);
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER4, true);
-
- // create group and assign users
- \OC_Group::createGroup(self::TEST_ENCRYPTION_SHARE_GROUP1);
- \OC_Group::addToGroup(self::TEST_ENCRYPTION_SHARE_USER3, self::TEST_ENCRYPTION_SHARE_GROUP1);
- \OC_Group::addToGroup(self::TEST_ENCRYPTION_SHARE_USER4, self::TEST_ENCRYPTION_SHARE_GROUP1);
- }
-
- protected function setUp() {
- parent::setUp();
-
- $this->dataShort = 'hats';
- $this->view = new \OC\Files\View('/');
-
- $this->folder1 = '/folder1';
- $this->subfolder = '/subfolder1';
- $this->subsubfolder = '/subsubfolder1';
-
- $this->filename = 'share-tmp.test';
-
- // remember files_trashbin state
- $this->stateFilesTrashbin = \OC_App::isEnabled('files_trashbin');
-
- // we don't want to tests with app files_trashbin enabled
- \OC_App::disable('files_trashbin');
-
- // login as first user
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- $this->createMocks();
- }
-
- protected function tearDown() {
- // reset app files_trashbin
- if ($this->stateFilesTrashbin) {
- \OC_App::enable('files_trashbin');
- } else {
- \OC_App::disable('files_trashbin');
- }
-
- $this->restoreHttpHelper();
-
- parent::tearDown();
- }
-
- public static function tearDownAfterClass() {
- // clean group
- \OC_Group::deleteGroup(self::TEST_ENCRYPTION_SHARE_GROUP1);
-
- // cleanup users
- \OC_User::deleteUser(self::TEST_ENCRYPTION_SHARE_USER1);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_SHARE_USER2);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_SHARE_USER3);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_SHARE_USER4);
-
- parent::tearDownAfterClass();
- }
-
- private function createMocks() {
- $config = $this->getMockBuilder('\OCP\IConfig')
- ->disableOriginalConstructor()->getMock();
- $clientService = $this->getMock('\OCP\Http\Client\IClientService');
- $httpHelperMock = $this->getMockBuilder('\OC\HTTPHelper')
- ->setConstructorArgs([$config, $clientService])
- ->getMock();
- $httpHelperMock->expects($this->any())->method('post')->with($this->anything())->will($this->returnValue(array('success' => true, 'result' => "{'ocs' : { 'meta' : { 'statuscode' : 100 }}}")));
-
- $this->registerHttpHelper($httpHelperMock);
- }
-
- /**
- * Register an http helper mock for testing purposes.
- * @param $httpHelper http helper mock
- */
- private function registerHttpHelper($httpHelper) {
- $this->oldHttpHelper = \OC::$server->query('HTTPHelper');
- \OC::$server->registerService('HTTPHelper', function ($c) use ($httpHelper) {
- return $httpHelper;
- });
- }
-
- /**
- * Restore the original http helper
- */
- private function restoreHttpHelper() {
- $oldHttpHelper = $this->oldHttpHelper;
- \OC::$server->registerService('HTTPHelper', function ($c) use ($oldHttpHelper) {
- return $oldHttpHelper;
- });
- }
-
- /**
- * @medium
- */
- function testDeclineServer2ServerShare() {
-
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // get the file info from previous created file
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename);
-
-
- // share the file
- $token = \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, '', \OCP\Constants::PERMISSION_ALL);
- $this->assertTrue(is_string($token));
-
- $publicShareKeyId = \OC::$server->getConfig()->getAppValue('files_encryption', 'publicShareKeyId');
-
- // check if share key for public exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $publicShareKeyId . '.shareKey'));
-
- // manipulate share
- $query = \OC::$server->getDatabaseConnection()->prepare('UPDATE `*PREFIX*share` SET `share_type` = ?, `share_with` = ? WHERE `token`=?');
- $this->assertTrue($query->execute(array(\OCP\Share::SHARE_TYPE_REMOTE, 'foo@bar', $token)));
-
- // check if share key not exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $publicShareKeyId . '.shareKey'));
-
-
- $query = \OC::$server->getDatabaseConnection()->prepare('SELECT * FROM `*PREFIX*share` WHERE `token`=?');
- $query->execute(array($token));
-
- $share = $query->fetch();
-
- $_POST['token'] = $token;
- $s2s = new \OCA\Files_Sharing\API\Server2Server();
- $s2s->declineShare(array('id' => $share['id']));
-
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $publicShareKeyId . '.shareKey'));
-
- }
-
- /**
- * @medium
- * @param bool $withTeardown
- */
- function testShareFile($withTeardown = true) {
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // get the file info from previous created file
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename);
-
- // check if we have a valid file info
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // check if the unencrypted file size is stored
- $this->assertGreaterThan(0, $fileInfo['unencrypted_size']);
-
- // re-enable the file proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // share the file
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL);
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // check if share key for user1 exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // login as user1
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2);
-
- // get file contents
- $retrievedCryptedFile = $this->view->file_get_contents(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files/' . $this->filename);
-
- // check if data is the same as we previously written
- $this->assertEquals($this->dataShort, $retrievedCryptedFile);
-
- // cleanup
- if ($withTeardown) {
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // unshare the file
- \OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2);
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // cleanup
- $this->view->chroot('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/');
- $this->view->unlink($this->filename);
- $this->view->chroot('/');
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- }
- }
-
- function testDownloadVersions() {
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- $rootView = new \OC\Files\View();
-
- // save file twice to create a new version
- \OC\Files\Filesystem::file_put_contents($this->filename, "revision1");
- \OCA\Files_Versions\Storage::store($this->filename);
- \OC\Files\Filesystem::file_put_contents($this->filename, "revision2");
-
- // check if the owner can retrieve the correct version
- $versions = \OCA\Files_Versions\Storage::getVersions(self::TEST_ENCRYPTION_SHARE_USER1, $this->filename);
- $this->assertSame(1, count($versions));
- $version = reset($versions);
- $versionUser1 = $rootView->file_get_contents('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_versions/' . $this->filename . '.v' . $version['version']);
- $this->assertSame('revision1', $versionUser1);
-
- // share the file
- $fileInfo = \OC\Files\Filesystem::getFileInfo($this->filename);
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
- $this->assertTrue(\OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL));
-
- // try to download the version as user2
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2);
- $versionUser2 = $rootView->file_get_contents('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_versions/' . $this->filename . '.v' . $version['version']);
- $this->assertSame('revision1', $versionUser2);
-
- //cleanup
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
- \OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2);
- \OC\Files\Filesystem::unlink($this->filename);
- }
-
- /**
- * @medium
- * @param bool $withTeardown
- */
- function testReShareFile($withTeardown = true) {
- $this->testShareFile(false);
-
- // login as user2
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2);
-
- // get the file info
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files/' . $this->filename);
-
- // share the file with user3
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER3, \OCP\Constants::PERMISSION_ALL);
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // check if share key for user2 exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'));
-
- // login as user2
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER3);
-
- // get file contents
- $retrievedCryptedFile = $this->view->file_get_contents(
- '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '/files/' . $this->filename);
-
- // check if data is the same as previously written
- $this->assertEquals($this->dataShort, $retrievedCryptedFile);
-
- // cleanup
- if ($withTeardown) {
-
- // login as user1
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2);
-
- // unshare the file with user2
- \OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER3);
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'));
-
- // unshare the file with user1
- \OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2);
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // cleanup
- $this->view->chroot('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/');
- $this->view->unlink($this->filename);
- $this->view->chroot('/');
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- }
- }
-
- /**
- * @medium
- * @param bool $withTeardown
- * @return array
- */
- function testShareFolder($withTeardown = true) {
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // create folder structure
- $this->view->mkdir('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files' . $this->folder1);
- $this->view->mkdir(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files' . $this->folder1 . $this->subfolder);
- $this->view->mkdir(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files' . $this->folder1 . $this->subfolder
- . $this->subsubfolder);
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // get the file info from previous created folder
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files' . $this->folder1);
-
- // check if we have a valid file info
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // re-enable the file proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // share the folder with user1
- \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL);
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // check if share key for user1 exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // login as user1
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2);
-
- // get file contents
- $retrievedCryptedFile = $this->view->file_get_contents(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files/' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/' . $this->filename);
-
- // check if data is the same
- $this->assertEquals($this->dataShort, $retrievedCryptedFile);
-
- // cleanup
- if ($withTeardown) {
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // unshare the folder with user1
- \OCP\Share::unshare('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2);
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys'
- . $this->folder1 . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // cleanup
- $this->view->chroot('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files');
- $this->view->unlink($this->folder1);
- $this->view->chroot('/');
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys'
- . $this->folder1 . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- }
-
- return $fileInfo;
- }
-
- /**
- * @medium
- * @param bool $withTeardown
- */
- function testReShareFolder($withTeardown = true) {
- $fileInfoFolder1 = $this->testShareFolder(false);
-
- // login as user2
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2);
-
- // disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // get the file info from previous created folder
- $fileInfoSubFolder = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files/' . $this->folder1
- . $this->subfolder);
-
- // check if we have a valid file info
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfoSubFolder);
-
- // re-enable the file proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // share the file with user3
- \OCP\Share::shareItem('folder', $fileInfoSubFolder['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER3, \OCP\Constants::PERMISSION_ALL);
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // check if share key for user3 exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'));
-
- // login as user3
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER3);
-
- // get file contents
- $retrievedCryptedFile = $this->view->file_get_contents(
- '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '/files/' . $this->subfolder
- . $this->subsubfolder . '/' . $this->filename);
-
- // check if data is the same
- $this->assertEquals($this->dataShort, $retrievedCryptedFile);
-
- // get the file info
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '/files/' . $this->subfolder
- . $this->subsubfolder . '/' . $this->filename);
-
- // check if we have fileInfos
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // share the file with user3
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER4, \OCP\Constants::PERMISSION_ALL);
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // check if share key for user3 exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey'));
-
- // login as user3
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER4);
-
- // get file contents
- $retrievedCryptedFile = $this->view->file_get_contents(
- '/' . self::TEST_ENCRYPTION_SHARE_USER4 . '/files/' . $this->filename);
-
- // check if data is the same
- $this->assertEquals($this->dataShort, $retrievedCryptedFile);
-
- // cleanup
- if ($withTeardown) {
-
- // login as user2
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER3);
-
- // unshare the file with user3
- \OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER4);
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys'
- . $this->folder1 . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey'));
-
- // login as user1
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2);
-
- // unshare the folder with user2
- \OCP\Share::unshare('folder', $fileInfoSubFolder['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER3);
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys'
- . $this->folder1 . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'));
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // unshare the folder1 with user1
- \OCP\Share::unshare('folder', $fileInfoFolder1['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2);
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys'
- . $this->folder1 . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // cleanup
- $this->view->chroot('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files');
- $this->view->unlink($this->folder1 . $this->subfolder . $this->subsubfolder . '/' . $this->filename);
- $this->view->chroot('/');
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys'
- . $this->folder1 . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- }
- }
-
-
- function testRemoteShareFile() {
- // login as admin
- //self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // get the file info from previous created file
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename);
-
- // check if we have a valid file info
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // check if the unencrypted file size is stored
- $this->assertGreaterThan(0, $fileInfo['unencrypted_size']);
-
- // re-enable the file proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // share the file
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_REMOTE, 'user1@server1', \OCP\Constants::PERMISSION_ALL);
-
- $publicShareKeyId = \OC::$server->getAppConfig()->getValue('files_encryption', 'publicShareKeyId');
-
- // check if share key for public exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $publicShareKeyId . '.shareKey'));
-
- // unshare the file
- \OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_REMOTE, 'user1@server1');
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $publicShareKeyId . '.shareKey'));
-
- // cleanup
- $this->view->chroot('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/');
- $this->view->unlink($this->filename);
- $this->view->chroot('/');
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- }
-
- function testPublicShareFile() {
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // get the file info from previous created file
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename);
-
- // check if we have a valid file info
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // check if the unencrypted file size is stored
- $this->assertGreaterThan(0, $fileInfo['unencrypted_size']);
-
- // re-enable the file proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // share the file
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, false, \OCP\Constants::PERMISSION_ALL);
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- $publicShareKeyId = \OC::$server->getAppConfig()->getValue('files_encryption', 'publicShareKeyId');
-
- // check if share key for public exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $publicShareKeyId . '.shareKey'));
-
- // some hacking to simulate public link
- //$GLOBALS['app'] = 'files_sharing';
- //$GLOBALS['fileOwner'] = self::TEST_ENCRYPTION_SHARE_USER1;
- self::logoutHelper();
-
- // get file contents
- $retrievedCryptedFile = file_get_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename);
-
- // check if data is the same as we previously written
- $this->assertEquals($this->dataShort, $retrievedCryptedFile);
-
- // tear down
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // unshare the file
- \OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, null);
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $publicShareKeyId . '.shareKey'));
-
- // cleanup
- $this->view->chroot('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/');
- $this->view->unlink($this->filename);
- $this->view->chroot('/');
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- }
-
- /**
- * @medium
- */
- function testShareFileWithGroup() {
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // get the file info from previous created file
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename);
-
- // check if we have a valid file info
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // check if the unencrypted file size is stored
- $this->assertGreaterThan(0, $fileInfo['unencrypted_size']);
-
- // re-enable the file proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // share the file
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, self::TEST_ENCRYPTION_SHARE_GROUP1, \OCP\Constants::PERMISSION_ALL);
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // check if share key for user2 and user3 exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey'));
-
- // login as user1
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER3);
-
- // get file contents
- $retrievedCryptedFile = $this->view->file_get_contents(
- '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '/files/' . $this->filename);
-
- // check if data is the same as we previously written
- $this->assertEquals($this->dataShort, $retrievedCryptedFile);
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // unshare the file
- \OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, self::TEST_ENCRYPTION_SHARE_GROUP1);
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey'));
-
- // cleanup
- $this->view->chroot('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/');
- $this->view->unlink($this->filename);
- $this->view->chroot('/');
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
-
- }
-
- /**
- * @large
- */
- function testRecoveryFile() {
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- \OCA\Files_Encryption\Helper::adminEnableRecovery(null, 'test123');
- $recoveryKeyId = \OC::$server->getAppConfig()->getValue('files_encryption', 'recoveryKeyId');
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- $util = new \OCA\Files_Encryption\Util(new \OC\Files\View('/'), self::TEST_ENCRYPTION_SHARE_USER1);
-
- // check if recovery password match
- $this->assertTrue($util->checkRecoveryPassword('test123'));
-
- // enable recovery for admin
- $this->assertTrue($util->setRecoveryForUser(1));
- $util->addRecoveryKeys();
-
- // create folder structure
- $this->view->mkdir('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files' . $this->folder1);
- $this->view->mkdir(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files' . $this->folder1 . $this->subfolder);
- $this->view->mkdir(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files' . $this->folder1 . $this->subfolder
- . $this->subsubfolder);
-
- // save file with content
- $cryptedFile1 = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort);
- $cryptedFile2 = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile1);
- $this->assertInternalType('int', $cryptedFile2);
-
- // check if share key for admin and recovery exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
-
- // disable recovery for admin
- $this->assertTrue($util->setRecoveryForUser(0));
-
- // remove all recovery keys
- $util->removeRecoveryKeys('/');
-
- // check if share key for recovery not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
-
- // enable recovery for admin
- $this->assertTrue($util->setRecoveryForUser(1));
-
- // add recovery keys again
- $util->addRecoveryKeys('/');
-
- // check if share key for admin and recovery exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
-
- // cleanup
- $this->view->chroot('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/');
- $this->view->unlink($this->filename);
- $this->view->unlink($this->folder1);
- $this->view->chroot('/');
-
- // check if share key for recovery not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
-
- $this->assertTrue(\OCA\Files_Encryption\Helper::adminEnableRecovery(null, 'test123'));
- $this->assertTrue(\OCA\Files_Encryption\Helper::adminDisableRecovery('test123'));
- $this->assertEquals(0, \OC::$server->getAppConfig()->getValue('files_encryption', 'recoveryAdminEnabled'));
- }
-
- /**
- * @large
- */
- function testRecoveryForUser() {
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- $result = \OCA\Files_Encryption\Helper::adminEnableRecovery(null, 'test123');
- $this->assertTrue($result);
-
- $recoveryKeyId = \OC::$server->getAppConfig()->getValue('files_encryption', 'recoveryKeyId');
-
- // login as user2
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2);
-
- $util = new \OCA\Files_Encryption\Util(new \OC\Files\View('/'), self::TEST_ENCRYPTION_SHARE_USER2);
-
- // enable recovery for admin
- $this->assertTrue($util->setRecoveryForUser(1));
-
- // add recovery keys for existing files (e.g. the auto-generated welcome.txt)
- $util->addRecoveryKeys();
-
- // create folder structure
- $this->view->mkdir('/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files' . $this->folder1);
- $this->view->mkdir(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files' . $this->folder1 . $this->subfolder);
- $this->view->mkdir(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files' . $this->folder1 . $this->subfolder
- . $this->subsubfolder);
-
- // save file with content
- $cryptedFile1 = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER2. '/files/' . $this->filename, $this->dataShort);
- $cryptedFile2 = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile1);
- $this->assertInternalType('int', $cryptedFile2);
-
- // check if share key for user and recovery exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // change password
- \OC_User::setPassword(self::TEST_ENCRYPTION_SHARE_USER2, 'test', 'test123');
- $params = array('uid' => self::TEST_ENCRYPTION_SHARE_USER2,
- 'password' => 'test',
- 'recoveryPassword' => 'test123');
- \OCA\Files_Encryption\Hooks::setPassphrase($params);
-
- // login as user2
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2, false, 'test');
-
- // get file contents
- $retrievedCryptedFile1 = file_get_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files/' . $this->filename);
- $retrievedCryptedFile2 = file_get_contents(
- 'crypt:///' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' . $this->filename);
-
- // check if data is the same as we previously written
- $this->assertEquals($this->dataShort, $retrievedCryptedFile1);
- $this->assertEquals($this->dataShort, $retrievedCryptedFile2);
-
- // cleanup
- $this->view->chroot('/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files/');
- $this->view->unlink($this->folder1);
- $this->view->unlink($this->filename);
- $this->view->chroot('/');
-
- // check if share key for user and recovery exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' . $this->folder1
- . $this->subfolder . $this->subsubfolder . '/'
- . $this->filename . '/' . $recoveryKeyId . '.shareKey'));
-
- // enable recovery for admin
- $this->assertTrue($util->setRecoveryForUser(0));
-
- \OCA\Files_Encryption\Helper::adminDisableRecovery('test123');
- $this->assertEquals(0, \OC::$server->getAppConfig()->getValue('files_encryption', 'recoveryAdminEnabled'));
-
- //clean up, reset passwords
- \OC_User::setPassword(self::TEST_ENCRYPTION_SHARE_USER2, self::TEST_ENCRYPTION_SHARE_USER2, 'test123');
- $params = array('uid' => self::TEST_ENCRYPTION_SHARE_USER2,
- 'password' => self::TEST_ENCRYPTION_SHARE_USER2,
- 'recoveryPassword' => 'test123');
- \OCA\Files_Encryption\Hooks::setPassphrase($params);
- }
-
- /**
- * @medium
- */
- function testFailShareFile() {
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // get the file info from previous created file
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename);
-
- // check if we have a valid file info
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // check if the unencrypted file size is stored
- $this->assertGreaterThan(0, $fileInfo['unencrypted_size']);
-
- // break users public key
- $this->view->rename(\OCA\Files_Encryption\Keymanager::getPublicKeyPath() . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.publicKey',
- \OCA\Files_Encryption\Keymanager::getPublicKeyPath() . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.publicKey_backup');
-
- // re-enable the file proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // share the file
- try {
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, self::TEST_ENCRYPTION_SHARE_GROUP1, \OCP\Constants::PERMISSION_ALL);
- } catch (\Exception $e) {
- $this->assertEquals(0, strpos($e->getMessage(), "Following users are not set up for encryption"));
- }
-
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // check if share key for user1 not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'));
-
- // disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- // break user1 public key
- $this->view->rename(
- \OCA\Files_Encryption\Keymanager::getPublicKeyPath() . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.publicKey_backup',
- \OCA\Files_Encryption\Keymanager::getPublicKeyPath() . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.publicKey');
-
- // remove share file
- $this->view->unlink('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3
- . '.shareKey');
-
- // re-enable the file proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // unshare the file with user1
- \OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, self::TEST_ENCRYPTION_SHARE_GROUP1);
-
- // check if share key not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'));
-
- // cleanup
- $this->view->chroot('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/');
- $this->view->unlink($this->filename);
- $this->view->chroot('/');
- }
-
-
- /**
- * test rename a shared file mount point
- */
- function testRename() {
-
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // get the file info from previous created file
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename);
-
- // check if we have a valid file info
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // share the file
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL);
-
- // check if share key for user1 and user2 exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
-
- // login as user2
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER2);
-
- $this->assertTrue($this->view->file_exists('/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files/' . $this->filename));
-
- // get file contents
- $retrievedCryptedFile = $this->view->file_get_contents(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files/' . $this->filename);
-
- // check if data is the same as we previously written
- $this->assertEquals($this->dataShort, $retrievedCryptedFile);
-
- \OC\Files\Filesystem::mkdir($this->folder1);
-
- // move the file to a subfolder
- \OC\Files\Filesystem::rename($this->filename, $this->folder1 . $this->filename);
-
- // check if we can read the moved file
- $retrievedRenamedFile = $this->view->file_get_contents(
- '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '/files/' . $this->folder1 . $this->filename);
-
- // check if data is the same as we previously written
- $this->assertEquals($this->dataShort, $retrievedRenamedFile);
-
- // check if share key for user2 and user1 still exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // cleanup
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
- $this->view->unlink('/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename);
- }
-
- function testRenameGroupShare() {
- // login as admin
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // get the file info from previous created file
- $fileInfo = $this->view->getFileInfo(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename);
-
- // check if we have a valid file info
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // share the file
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, self::TEST_ENCRYPTION_SHARE_GROUP1, \OCP\Constants::PERMISSION_ALL);
-
- // check if share key for user1, user3 and user4 exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey'));
-
-
- // login as user2
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER3);
-
- $this->assertTrue(\OC\Files\Filesystem::file_exists($this->filename));
-
- // get file contents
- $retrievedCryptedFile = \OC\Files\Filesystem::file_get_contents($this->filename);
-
- // check if data is the same as we previously written
- $this->assertEquals($this->dataShort, $retrievedCryptedFile);
-
- \OC\Files\Filesystem::mkdir($this->folder1);
-
- // move the file to a subfolder
- \OC\Files\Filesystem::rename($this->filename, $this->folder1 . $this->filename);
-
- // check if we can read the moved file
- $retrievedRenamedFile = \OC\Files\Filesystem::file_get_contents($this->folder1 . $this->filename);
-
- // check if data is the same as we previously written
- $this->assertEquals($this->dataShort, $retrievedRenamedFile);
-
- // check if share key for user1, user3 and user4 still exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/'
- . $this->filename . '/' . self::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey'));
-
- // cleanup
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
- \OC\Files\Filesystem::unlink($this->filename);
- }
-
- /**
- * test if additional share keys are added if we move a folder to a shared parent
- * @medium
- */
- function testMoveFolder() {
-
- $view = new \OC\Files\View('/' . self::TEST_ENCRYPTION_SHARE_USER1);
-
- $filename = '/tmp-' . $this->getUniqueID();
- $folder = '/folder' . $this->getUniqueID();
-
- \OC\Files\Filesystem::mkdir($folder);
-
- // Save long data as encrypted file using stream wrapper
- $cryptedFile = \OC\Files\Filesystem::file_put_contents($folder . $filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // Get file decrypted contents
- $decrypt = \OC\Files\Filesystem::file_get_contents($folder . $filename);
-
- $this->assertEquals($this->dataShort, $decrypt);
-
- $newFolder = '/newfolder/subfolder' . $this->getUniqueID();
- \OC\Files\Filesystem::mkdir('/newfolder');
-
- // get the file info from previous created file
- $fileInfo = \OC\Files\Filesystem::getFileInfo('/newfolder');
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // share the folder
- \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL);
-
- \OC\Files\Filesystem::rename($folder, $newFolder);
-
- // Get file decrypted contents
- $newDecrypt = \OC\Files\Filesystem::file_get_contents($newFolder . $filename);
- $this->assertEquals($this->dataShort, $newDecrypt);
-
- // check if additional share key for user2 exists
- $this->assertTrue($view->file_exists('files_encryption/keys' . $newFolder . '/' . $filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // check that old keys were removed/moved properly
- $this->assertFalse($view->file_exists('files_encryption/keys' . $folder . '/' . $filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // tear down
- \OC\Files\Filesystem::unlink($newFolder);
- \OC\Files\Filesystem::unlink('/newfolder');
- }
-
- function usersProvider() {
- return array(
- // test as owner
- array(self::TEST_ENCRYPTION_SHARE_USER1),
- // test as share receiver
- array(self::TEST_ENCRYPTION_SHARE_USER2),
- );
- }
-
- /**
- * @dataProvider usersProvider
- */
- function testMoveFileToFolder($userId) {
- $view = new \OC\Files\View('/' . self::TEST_ENCRYPTION_SHARE_USER1);
-
- $filename = '/tmp-' . $this->getUniqueID();
- $folder = '/folder' . $this->getUniqueID();
-
- \OC\Files\Filesystem::mkdir($folder);
-
- // Save long data as encrypted file using stream wrapper
- $cryptedFile = \OC\Files\Filesystem::file_put_contents($folder . $filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertInternalType('int', $cryptedFile);
-
- // Get file decrypted contents
- $decrypt = \OC\Files\Filesystem::file_get_contents($folder . $filename);
-
- $this->assertEquals($this->dataShort, $decrypt);
-
- $subFolder = $folder . '/subfolder' . $this->getUniqueID();
- \OC\Files\Filesystem::mkdir($subFolder);
-
- // get the file info from previous created file
- $fileInfo = \OC\Files\Filesystem::getFileInfo($folder);
- $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
-
- // share the folder
- \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL);
-
- // check that the share keys exist
- $this->assertTrue($view->file_exists('files_encryption/keys' . $folder . '/' . $filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- $this->assertTrue($view->file_exists('files_encryption/keys' . $folder . '/' . $filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // move the file into the subfolder as the test user
- self::loginHelper($userId);
- \OC\Files\Filesystem::rename($folder . $filename, $subFolder . $filename);
- self::loginHelper(self::TEST_ENCRYPTION_SHARE_USER1);
-
- // Get file decrypted contents
- $newDecrypt = \OC\Files\Filesystem::file_get_contents($subFolder . $filename);
- $this->assertEquals($this->dataShort, $newDecrypt);
-
- // check if additional share key for user2 exists
- $this->assertTrue($view->file_exists('files_encryption/keys' . $subFolder . '/' . $filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- $this->assertTrue($view->file_exists('files_encryption/keys' . $subFolder . '/' . $filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // check that old keys were removed/moved properly
- $this->assertFalse($view->file_exists('files_encryption/keys' . $folder . '/' . $filename . '/' . self::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey'));
- $this->assertFalse($view->file_exists('files_encryption/keys' . $folder . '/' . $filename . '/' . self::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey'));
-
- // tear down
- \OC\Files\Filesystem::unlink($subFolder);
- \OC\Files\Filesystem::unlink($folder);
- }
-
-}
diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php
deleted file mode 100644
index 34e4ee6a32a..00000000000
--- a/apps/files_encryption/tests/stream.php
+++ /dev/null
@@ -1,232 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Christopher Schäpers <kondou@ts.unde.re>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-/**
- * Class Stream
- * this class provide basic stream tests
- */
-class Stream extends TestCase {
-
- const TEST_ENCRYPTION_STREAM_USER1 = "test-stream-user1";
-
- public $userId;
- public $pass;
- /**
- * @var \OC\Files\View
- */
- public $view;
- public $dataShort;
- public $stateFilesTrashbin;
-
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
-
- // create test user
- self::loginHelper(self::TEST_ENCRYPTION_STREAM_USER1, true);
- }
-
- protected function setUp() {
- parent::setUp();
-
- // set user id
- \OC_User::setUserId(self::TEST_ENCRYPTION_STREAM_USER1);
- $this->userId = self::TEST_ENCRYPTION_STREAM_USER1;
- $this->pass = self::TEST_ENCRYPTION_STREAM_USER1;
-
- // init filesystem view
- $this->view = new \OC\Files\View('/');
-
- // init short data
- $this->dataShort = 'hats';
-
- // remember files_trashbin state
- $this->stateFilesTrashbin = \OC_App::isEnabled('files_trashbin');
-
- // we don't want to tests with app files_trashbin enabled
- \OC_App::disable('files_trashbin');
- }
-
- protected function tearDown() {
- // reset app files_trashbin
- if ($this->stateFilesTrashbin) {
- \OC_App::enable('files_trashbin');
- }
- else {
- \OC_App::disable('files_trashbin');
- }
-
- parent::tearDown();
- }
-
- public static function tearDownAfterClass() {
- // cleanup test user
- \OC_User::deleteUser(self::TEST_ENCRYPTION_STREAM_USER1);
-
- parent::tearDownAfterClass();
- }
-
- function testStreamOptions() {
- $filename = '/tmp-' . $this->getUniqueID();
- $view = new \OC\Files\View('/' . $this->userId . '/files');
-
- // Save short data as encrypted file using stream wrapper
- $cryptedFile = $view->file_put_contents($filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- $handle = $view->fopen($filename, 'r');
-
- // check if stream is at position zero
- $this->assertEquals(0, ftell($handle));
-
- // set stream options
- $this->assertTrue(flock($handle, LOCK_SH));
- $this->assertTrue(flock($handle, LOCK_UN));
-
- fclose($handle);
-
- // tear down
- $view->unlink($filename);
- }
-
- function testStreamSetBlocking() {
- $filename = '/tmp-' . $this->getUniqueID();
- $view = new \OC\Files\View('/' . $this->userId . '/files');
-
- // Save short data as encrypted file using stream wrapper
- $cryptedFile = $view->file_put_contents($filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- $handle = $view->fopen($filename, 'r');
-
-
- if (\OC_Util::runningOnWindows()) {
- fclose($handle);
- $view->unlink($filename);
- $this->markTestSkipped('[Windows] stream_set_blocking() does not work as expected on Windows.');
- }
-
- // set stream options
- $this->assertTrue(stream_set_blocking($handle, 1));
-
- fclose($handle);
-
- // tear down
- $view->unlink($filename);
- }
-
- /**
- * @medium
- */
- function testStreamSetTimeout() {
- $filename = '/tmp-' . $this->getUniqueID();
- $view = new \OC\Files\View('/' . $this->userId . '/files');
-
- // Save short data as encrypted file using stream wrapper
- $cryptedFile = $view->file_put_contents($filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- $handle = $view->fopen($filename, 'r');
-
- // set stream options
- $this->assertFalse(stream_set_timeout($handle, 1));
-
- fclose($handle);
-
- // tear down
- $view->unlink($filename);
- }
-
- function testStreamSetWriteBuffer() {
- $filename = '/tmp-' . $this->getUniqueID();
- $view = new \OC\Files\View('/' . $this->userId . '/files');
-
- // Save short data as encrypted file using stream wrapper
- $cryptedFile = $view->file_put_contents($filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- $handle = $view->fopen($filename, 'r');
-
- // set stream options
- $this->assertEquals(0, stream_set_write_buffer($handle, 1024));
-
- fclose($handle);
-
- // tear down
- $view->unlink($filename);
- }
-
- /**
- * @medium
- * test if stream wrapper can read files outside from the data folder
- */
- function testStreamFromLocalFile() {
-
- $filename = '/' . $this->userId . '/files/' . 'tmp-' . $this->getUniqueID().'.txt';
-
- $tmpFilename = "/tmp/" . $this->getUniqueID() . ".txt";
-
- // write an encrypted file
- $cryptedFile = $this->view->file_put_contents($filename, $this->dataShort);
-
- // Test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // create a copy outside of the data folder in /tmp
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
- $encryptedContent = $this->view->file_get_contents($filename);
- \OC_FileProxy::$enabled = $proxyStatus;
-
- file_put_contents($tmpFilename, $encryptedContent);
-
- \OCA\Files_Encryption\Helper::addTmpFileToMapper($tmpFilename, $filename);
-
- // try to read the file from /tmp
- $handle = fopen("crypt://".$tmpFilename, "r");
- $contentFromTmpFile = stream_get_contents($handle);
-
- // check if it was successful
- $this->assertEquals($this->dataShort, $contentFromTmpFile);
-
- fclose($handle);
-
- // clean up
- unlink($tmpFilename);
- $this->view->unlink($filename);
-
- }
-}
diff --git a/apps/files_encryption/tests/testcase.php b/apps/files_encryption/tests/testcase.php
deleted file mode 100644
index c03147fabcd..00000000000
--- a/apps/files_encryption/tests/testcase.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-/**
- * Class TestCase
- */
-abstract class TestCase extends \Test\TestCase {
-
- /**
- * @param string $user
- * @param bool $create
- * @param bool $password
- */
- public static function loginHelper($user, $create = false, $password = false, $loadEncryption = true) {
- if ($create) {
- try {
- \OC_User::createUser($user, $user);
- } catch (\Exception $e) {
- // catch username is already being used from previous aborted runs
- }
- }
-
- if ($password === false) {
- $password = $user;
- }
-
- \OC_Util::tearDownFS();
- \OC_User::setUserId('');
- \OC\Files\Filesystem::tearDown();
- \OC::$server->getUserSession()->setUser(new \OC\User\User($user, new \OC_User_Database()));
- \OC_Util::setupFS($user);
-
- if ($loadEncryption) {
- $params['uid'] = $user;
- $params['password'] = $password;
- \OCA\Files_Encryption\Hooks::login($params);
- }
- }
-
- public static function logoutHelper() {
- \OC_Util::tearDownFS();
- \OC_User::setUserId(false);
- \OC\Files\Filesystem::tearDown();
- }
-
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
-
- // reset backend
- \OC_User::clearBackends();
- \OC_User::useBackend('database');
-
- \OCA\Files_Encryption\Helper::registerFilesystemHooks();
- \OCA\Files_Encryption\Helper::registerUserHooks();
- \OCA\Files_Encryption\Helper::registerShareHooks();
-
- \OC::registerShareHooks();
- \OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
-
- // clear and register hooks
- \OC_FileProxy::clearProxies();
- \OC_FileProxy::register(new \OCA\Files_Encryption\Proxy());
- }
-
- public static function tearDownAfterClass() {
- \OC_Hook::clear();
- \OC_FileProxy::clearProxies();
-
- // Delete keys in /data/
- $view = new \OC\Files\View('/');
- $view->deleteAll('files_encryption');
-
- parent::tearDownAfterClass();
- }
-
- protected function tearDown() {
- parent::tearDown();
- $this->resetKeyCache();
- }
-
- protected function resetKeyCache() {
- // reset key cache for every testrun
- $keyCache = new \ReflectionProperty('\OCA\Files_Encryption\Keymanager', 'key_cache');
- $keyCache->setAccessible(true);
- $keyCache->setValue(array());
- $keyCache->setAccessible(false);
- }
-
-}
diff --git a/apps/files_encryption/tests/trashbin.php b/apps/files_encryption/tests/trashbin.php
deleted file mode 100755
index 84785738bfc..00000000000
--- a/apps/files_encryption/tests/trashbin.php
+++ /dev/null
@@ -1,346 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Christopher Schäpers <kondou@ts.unde.re>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-/**
- * Class Trashbin
- * this class provide basic trashbin app tests
- */
-class Trashbin extends TestCase {
-
- const TEST_ENCRYPTION_TRASHBIN_USER1 = "test-trashbin-user1";
-
- public $userId;
- public $pass;
- /**
- * @var \OC\Files\View
- */
- public $view;
- public $dataShort;
- public $stateFilesTrashbin;
- public $folder1;
- public $subfolder;
- public $subsubfolder;
-
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
-
- // trashbin hooks
- \OCA\Files_Trashbin\Trashbin::registerHooks();
-
- // create test user
- self::loginHelper(self::TEST_ENCRYPTION_TRASHBIN_USER1, true);
- }
-
- protected function setUp() {
- parent::setUp();
-
- // set user id
- \OC_User::setUserId(self::TEST_ENCRYPTION_TRASHBIN_USER1);
- $this->userId = self::TEST_ENCRYPTION_TRASHBIN_USER1;
- $this->pass = self::TEST_ENCRYPTION_TRASHBIN_USER1;
-
- // init filesystem view
- $this->view = new \OC\Files\View('/');
-
- // init short data
- $this->dataShort = 'hats';
-
- $this->folder1 = '/folder1';
- $this->subfolder = '/subfolder1';
- $this->subsubfolder = '/subsubfolder1';
-
- // remember files_trashbin state
- $this->stateFilesTrashbin = \OC_App::isEnabled('files_trashbin');
-
- // we want to tests with app files_trashbin enabled
- \OC_App::enable('files_trashbin');
- }
-
- protected function tearDown() {
- // reset app files_trashbin
- if ($this->stateFilesTrashbin) {
- \OC_App::enable('files_trashbin');
- }
- else {
- \OC_App::disable('files_trashbin');
- }
-
- parent::tearDown();
- }
-
- public static function tearDownAfterClass() {
- // cleanup test user
- \OC_User::deleteUser(self::TEST_ENCRYPTION_TRASHBIN_USER1);
-
- \OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin');
-
- parent::tearDownAfterClass();
- }
-
- /**
- * @medium
- * test delete file
- */
- function testDeleteFile() {
-
- // generate filename
- $filename = 'tmp-' . $this->getUniqueID() . '.txt';
- $filename2 = $filename . '.backup'; // a second file with similar name
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' .self::TEST_ENCRYPTION_TRASHBIN_USER1. '/files/'. $filename, $this->dataShort);
- $cryptedFile2 = file_put_contents('crypt:///' .self::TEST_ENCRYPTION_TRASHBIN_USER1. '/files/'. $filename2, $this->dataShort);
-
- // test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
- $this->assertTrue(is_int($cryptedFile2));
-
- // check if key for admin exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/fileKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename2 . '/fileKey'));
-
- // check if share key for admin exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/'
- . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/'
- . $filename2 . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
-
- // delete first file
- \OC\Files\Filesystem::unlink($filename);
-
- // check if file not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files/' . $filename));
-
- // check if key for admin not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/fileKey'));
-
- // check if share key for admin not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/'
- . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
-
- // check that second file still exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files/' . $filename2));
-
- // check that key for second file still exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename2 . '/fileKey'));
-
- // check that share key for second file still exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/'
- . $filename2 . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
-
- // get files
- $trashFiles = \OCA\Files_Trashbin\Helper::getTrashFiles('/', self::TEST_ENCRYPTION_TRASHBIN_USER1);
-
- // find created file with timestamp
- $timestamp = null;
- foreach ($trashFiles as $file) {
- if ($file['name'] === $filename) {
- $timestamp = $file['mtime'];
- break;
- }
- }
-
- // check if we found the file we created
- $this->assertNotNull($timestamp);
-
- $this->assertTrue($this->view->is_dir('/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename . '.d' . $timestamp));
-
- // check if key for admin not exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename . '.d' . $timestamp . '/fileKey'));
-
- // check if share key for admin not exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename
- . '.d' . $timestamp . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
- }
-
- /**
- * @medium
- * test restore file
- */
- function testRestoreFile() {
- // generate filename
- $filename = 'tmp-' . $this->getUniqueID() . '.txt';
- $filename2 = $filename . '.backup'; // a second file with similar name
-
- // save file with content
- file_put_contents('crypt:///' . self::TEST_ENCRYPTION_TRASHBIN_USER1. '/files/'. $filename, $this->dataShort);
- file_put_contents('crypt:///' . self::TEST_ENCRYPTION_TRASHBIN_USER1. '/files/'. $filename2, $this->dataShort);
-
- // delete both files
- \OC\Files\Filesystem::unlink($filename);
- \OC\Files\Filesystem::unlink($filename2);
-
- $trashFiles = \OCA\Files_Trashbin\Helper::getTrashFiles('/', self::TEST_ENCRYPTION_TRASHBIN_USER1);
-
- // find created file with timestamp
- $timestamp = null;
- foreach ($trashFiles as $file) {
- if ($file['name'] === $filename) {
- $timestamp = $file['mtime'];
- break;
- }
- }
-
- // make sure that we have a timestamp
- $this->assertNotNull($timestamp);
-
- // before calling the restore operation the keys shouldn't be there
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/fileKey'));
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/'
- . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
-
- // restore first file
- $this->assertTrue(\OCA\Files_Trashbin\Trashbin::restore($filename . '.d' . $timestamp, $filename, $timestamp));
-
- // check if file exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files/' . $filename));
-
- // check if key for admin exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/fileKey'));
-
- // check if share key for admin exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/'
- . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
-
- // check that second file was NOT restored
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files/' . $filename2));
-
- // check if key for admin exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename2 . '/fileKey'));
-
- // check if share key for admin exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/'
- . $filename2 . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
- }
-
- /**
- * @medium
- * test delete file forever
- */
- function testPermanentDeleteFile() {
-
- // generate filename
- $filename = 'tmp-' . $this->getUniqueID() . '.txt';
-
- // save file with content
- $cryptedFile = file_put_contents('crypt:///' .$this->userId. '/files/' . $filename, $this->dataShort);
-
- // test that data was successfully written
- $this->assertTrue(is_int($cryptedFile));
-
- // check if key for admin exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/fileKey'));
-
- // check if share key for admin exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/'
- . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
-
- // delete file
- \OC\Files\Filesystem::unlink($filename);
-
- // check if file not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files/' . $filename));
-
- // check if key for admin not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/'
- . $filename . '.key'));
-
- // check if share key for admin not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/'
- . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
-
- // find created file with timestamp
- $query = \OC_DB::prepare('SELECT `timestamp`,`type` FROM `*PREFIX*files_trash`'
- . ' WHERE `id`=?');
- $result = $query->execute(array($filename))->fetchRow();
-
- $this->assertTrue(is_array($result));
-
- // build suffix
- $trashFileSuffix = 'd' . $result['timestamp'];
-
- // check if key for admin exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename
- . '.' . $trashFileSuffix . '/fileKey'));
-
- // check if share key for admin exists
- $this->assertTrue($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/'
- . $filename . '.' . $trashFileSuffix . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
-
- // get timestamp from file
- $timestamp = str_replace('d', '', $trashFileSuffix);
-
- // delete file forever
- $this->assertGreaterThan(0, \OCA\Files_Trashbin\Trashbin::delete($filename, $this->userId, $timestamp));
-
- // check if key for admin not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/files/' . $filename . '.'
- . $trashFileSuffix));
-
- // check if key for admin not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename
- . '.' . $trashFileSuffix . '/fileKey'));
-
- // check if share key for admin not exists
- $this->assertFalse($this->view->file_exists(
- '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename
- . '.' . $trashFileSuffix . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
- }
-
-}
diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php
deleted file mode 100755
index 4174a0da0da..00000000000
--- a/apps/files_encryption/tests/util.php
+++ /dev/null
@@ -1,693 +0,0 @@
-<?php
-/**
- * @author Andreas Fischer <bantu@owncloud.com>
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Florin Peter <github@florin-peter.de>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Markus Goetz <markus@woboq.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
- * @author Sam Tuke <mail@samtuke.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Files_Encryption\Tests;
-
-/**
- * Class Util
- */
-class Util extends TestCase {
-
- const TEST_ENCRYPTION_UTIL_USER1 = "test-util-user1";
- const TEST_ENCRYPTION_UTIL_USER2 = "test-util-user2";
- const TEST_ENCRYPTION_UTIL_GROUP1 = "test-util-group1";
- const TEST_ENCRYPTION_UTIL_GROUP2 = "test-util-group2";
- const TEST_ENCRYPTION_UTIL_LEGACY_USER = "test-legacy-user";
-
- public $userId;
- public $encryptionDir;
- public $publicKeyDir;
- public $pass;
- /**
- * @var \OC\Files\View
- */
- public $view;
- public $keysPath;
- public $publicKeyPath;
- public $privateKeyPath;
- /**
- * @var \OCA\Files_Encryption\Util
- */
- public $util;
- public $dataShort;
- public $legacyEncryptedData;
- public $legacyEncryptedDataKey;
- public $legacyKey;
- public $stateFilesTrashbin;
-
- public static function setUpBeforeClass() {
- parent::setUpBeforeClass();
-
- // create test user
- self::loginHelper(self::TEST_ENCRYPTION_UTIL_USER1, true);
- self::loginHelper(self::TEST_ENCRYPTION_UTIL_USER2, true);
- self::loginHelper(self::TEST_ENCRYPTION_UTIL_LEGACY_USER, true);
-
- // create groups
- \OC_Group::createGroup(self::TEST_ENCRYPTION_UTIL_GROUP1);
- \OC_Group::createGroup(self::TEST_ENCRYPTION_UTIL_GROUP2);
-
- // add user 1 to group1
- \OC_Group::addToGroup(self::TEST_ENCRYPTION_UTIL_USER1, self::TEST_ENCRYPTION_UTIL_GROUP1);
- }
-
- protected function setUp() {
- parent::setUp();
-
- // login user
- self::loginHelper(self::TEST_ENCRYPTION_UTIL_USER1);
- \OC_User::setUserId(self::TEST_ENCRYPTION_UTIL_USER1);
- $this->userId = self::TEST_ENCRYPTION_UTIL_USER1;
- $this->pass = self::TEST_ENCRYPTION_UTIL_USER1;
-
- // set content for encrypting / decrypting in tests
- $this->dataUrl = __DIR__ . '/../lib/crypt.php';
- $this->dataShort = 'hats';
- $this->dataLong = file_get_contents(__DIR__ . '/../lib/crypt.php');
- $this->legacyData = __DIR__ . '/legacy-text.txt';
- $this->legacyEncryptedData = __DIR__ . '/legacy-encrypted-text.txt';
- $this->legacyEncryptedDataKey = __DIR__ . '/encryption.key';
- $this->legacyKey = "30943623843030686906\0\0\0\0";
-
- $keypair = \OCA\Files_Encryption\Crypt::createKeypair();
-
- $this->genPublicKey = $keypair['publicKey'];
- $this->genPrivateKey = $keypair['privateKey'];
-
- $this->publicKeyDir = \OCA\Files_Encryption\Keymanager::getPublicKeyPath();
- $this->encryptionDir = '/' . $this->userId . '/' . 'files_encryption';
- $this->keysPath = $this->encryptionDir . '/' . 'keys';
- $this->publicKeyPath =
- $this->publicKeyDir . '/' . $this->userId . '.publicKey'; // e.g. data/public-keys/admin.publicKey
- $this->privateKeyPath =
- $this->encryptionDir . '/' . $this->userId . '.privateKey'; // e.g. data/admin/admin.privateKey
-
- $this->view = new \OC\Files\View('/');
-
- $this->util = new \OCA\Files_Encryption\Util($this->view, $this->userId);
-
- // remember files_trashbin state
- $this->stateFilesTrashbin = \OC_App::isEnabled('files_trashbin');
-
- // we don't want to tests with app files_trashbin enabled
- \OC_App::disable('files_trashbin');
- }
-
- protected function tearDown() {
- // reset app files_trashbin
- if ($this->stateFilesTrashbin) {
- \OC_App::enable('files_trashbin');
- }
- else {
- \OC_App::disable('files_trashbin');
- }
-
- parent::tearDown();
- }
-
- public static function tearDownAfterClass() {
- // cleanup test user
- \OC_User::deleteUser(self::TEST_ENCRYPTION_UTIL_USER1);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_UTIL_USER2);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_UTIL_LEGACY_USER);
-
- //cleanup groups
- \OC_Group::deleteGroup(self::TEST_ENCRYPTION_UTIL_GROUP1);
- \OC_Group::deleteGroup(self::TEST_ENCRYPTION_UTIL_GROUP2);
-
- parent::tearDownAfterClass();
- }
-
- /**
- * @medium
- * test that paths set during User construction are correct
- */
- function testKeyPaths() {
- $util = new \OCA\Files_Encryption\Util($this->view, $this->userId);
-
- $this->assertEquals($this->publicKeyDir, $util->getPath('publicKeyDir'));
- $this->assertEquals($this->encryptionDir, $util->getPath('encryptionDir'));
- $this->assertEquals($this->keysPath, $util->getPath('keysPath'));
- $this->assertEquals($this->publicKeyPath, $util->getPath('publicKeyPath'));
- $this->assertEquals($this->privateKeyPath, $util->getPath('privateKeyPath'));
-
- }
-
- /**
- * @medium
- * test detection of encrypted files
- */
- function testIsEncryptedPath() {
-
- $util = new \OCA\Files_Encryption\Util($this->view, $this->userId);
-
- self::loginHelper($this->userId);
-
- $unencryptedFile = '/tmpUnencrypted-' . $this->getUniqueID() . '.txt';
- $encryptedFile = '/tmpEncrypted-' . $this->getUniqueID() . '.txt';
-
- // Disable encryption proxy to write a unencrypted file
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- $this->view->file_put_contents($this->userId . '/files/' . $unencryptedFile, $this->dataShort);
-
- // Re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
-
- // write a encrypted file
- $this->view->file_put_contents($this->userId . '/files/' . $encryptedFile, $this->dataShort);
-
- // test if both files are detected correctly
- $this->assertFalse($util->isEncryptedPath($this->userId . '/files/' . $unencryptedFile));
- $this->assertTrue($util->isEncryptedPath($this->userId . '/files/' . $encryptedFile));
-
- // cleanup
- $this->view->unlink($this->userId . '/files/' . $unencryptedFile);
- $this->view->unlink($this->userId . '/files/' . $encryptedFile);
-
- }
-
- /**
- * @medium
- * test setup of encryption directories
- */
- function testSetupServerSide() {
- $this->assertEquals(true, $this->util->setupServerSide($this->pass));
- }
-
- /**
- * @medium
- * test checking whether account is ready for encryption,
- */
- function testUserIsReady() {
- $this->assertEquals(true, $this->util->ready());
- }
-
- /**
- * test checking whether account is not ready for encryption,
- */
-// function testUserIsNotReady() {
-// $this->view->unlink($this->publicKeyDir);
-//
-// $params['uid'] = $this->userId;
-// $params['password'] = $this->pass;
-// $this->assertFalse(OCA\Files_Encryption\Hooks::login($params));
-//
-// $this->view->unlink($this->privateKeyPath);
-// }
-
- /**
- * @medium
- */
- function testRecoveryEnabledForUser() {
-
- $util = new \OCA\Files_Encryption\Util($this->view, $this->userId);
-
- // Record the value so we can return it to it's original state later
- $enabled = $util->recoveryEnabledForUser();
-
- $this->assertTrue($util->setRecoveryForUser(!$enabled));
-
- $this->assertEquals(!$enabled, $util->recoveryEnabledForUser());
-
- $this->assertTrue($util->setRecoveryForUser($enabled));
-
- $this->assertEquals($enabled, $util->recoveryEnabledForUser());
-
-
- }
-
- /**
- * @medium
- */
- function testGetUidAndFilename() {
-
- \OC_User::setUserId(self::TEST_ENCRYPTION_UTIL_USER1);
-
- $filename = '/tmp-' . $this->getUniqueID() . '.test';
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- $this->view->file_put_contents($this->userId . '/files/' . $filename, $this->dataShort);
-
- // Re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
-
- $util = new \OCA\Files_Encryption\Util($this->view, $this->userId);
-
- list($fileOwnerUid, $file) = $util->getUidAndFilename($filename);
-
- $this->assertEquals(self::TEST_ENCRYPTION_UTIL_USER1, $fileOwnerUid);
-
- $this->assertEquals($file, $filename);
-
- $this->view->unlink($this->userId . '/files/' . $filename);
- }
-
- /**
- * Test that data that is read by the crypto stream wrapper
- */
- function testGetFileSize() {
- self::loginHelper(self::TEST_ENCRYPTION_UTIL_USER1);
-
- $filename = 'tmp-' . $this->getUniqueID();
- $externalFilename = '/' . $this->userId . '/files/' . $filename;
-
- // Test for 0 byte files
- $problematicFileSizeData = "";
- $cryptedFile = $this->view->file_put_contents($externalFilename, $problematicFileSizeData);
- $this->assertTrue(is_int($cryptedFile));
- $this->assertEquals($this->util->getFileSize($externalFilename), 0);
- $decrypt = $this->view->file_get_contents($externalFilename);
- $this->assertEquals($problematicFileSizeData, $decrypt);
- $this->view->unlink($this->userId . '/files/' . $filename);
-
- // Test a file with 18377 bytes as in https://github.com/owncloud/mirall/issues/1009
- $problematicFileSizeData = str_pad("", 18377, "abc");
- $cryptedFile = $this->view->file_put_contents($externalFilename, $problematicFileSizeData);
- $this->assertTrue(is_int($cryptedFile));
- $this->assertEquals($this->util->getFileSize($externalFilename), 18377);
- $decrypt = $this->view->file_get_contents($externalFilename);
- $this->assertEquals($problematicFileSizeData, $decrypt);
- $this->view->unlink($this->userId . '/files/' . $filename);
- }
-
- function testEncryptAll() {
-
- $filename = "/encryptAll" . $this->getUniqueID() . ".txt";
- $util = new \OCA\Files_Encryption\Util($this->view, $this->userId);
-
- // disable encryption to upload a unencrypted file
- \OC_App::disable('files_encryption');
-
- $this->view->file_put_contents($this->userId . '/files/' . $filename, $this->dataShort);
-
- $fileInfoUnencrypted = $this->view->getFileInfo($this->userId . '/files/' . $filename);
-
- $this->assertTrue($fileInfoUnencrypted instanceof \OC\Files\FileInfo);
-
- // enable file encryption again
- \OC_App::enable('files_encryption');
-
- // encrypt all unencrypted files
- $util->encryptAll('/' . $this->userId . '/' . 'files');
-
- $fileInfoEncrypted = $this->view->getFileInfo($this->userId . '/files/' . $filename);
-
- $this->assertTrue($fileInfoEncrypted instanceof \OC\Files\FileInfo);
-
- // check if mtime and etags unchanged
- $this->assertEquals($fileInfoEncrypted['mtime'], $fileInfoUnencrypted['mtime']);
- $this->assertSame($fileInfoEncrypted['etag'], $fileInfoUnencrypted['etag']);
-
- $this->view->unlink($this->userId . '/files/' . $filename);
- }
-
- function testDecryptAll() {
-
- $filename = "/decryptAll" . $this->getUniqueID() . ".txt";
- $datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data/');
- $userdir = $datadir . '/' . $this->userId . '/files/';
-
- $this->view->file_put_contents($this->userId . '/files/' . $filename, $this->dataShort);
-
- $fileInfoEncrypted = $this->view->getFileInfo($this->userId . '/files/' . $filename);
-
- $this->assertTrue($fileInfoEncrypted instanceof \OC\Files\FileInfo);
- $this->assertEquals($fileInfoEncrypted['encrypted'], 1);
-
- $encContent = file_get_contents($userdir . $filename);
-
- \OC_App::disable('files_encryption');
-
- $user = \OCP\User::getUser();
- $this->logoutHelper();
- $this->loginHelper($user, false, false, false);
-
- $content = file_get_contents($userdir . $filename);
-
- //content should be encrypted
- $this->assertSame($encContent, $content);
-
- // now we load the encryption app again
- \OC_App::loadApp('files_encryption');
-
- // init encryption app
- $params = array('uid' => \OCP\User::getUser(),
- 'password' => \OCP\User::getUser());
-
- $view = new \OC\Files\View('/');
- $util = new \OCA\Files_Encryption\Util($view, \OCP\User::getUser());
-
- $result = $util->initEncryption($params);
-
- $this->assertTrue($result instanceof \OCA\Files_Encryption\Session);
-
- $successful = $util->decryptAll();
-
- $this->assertTrue($successful);
-
- $this->logoutHelper();
- $this->loginHelper($user, false, false, false);
-
- // file should be unencrypted and fileInfo should contain the correct values
- $content = file_get_contents($userdir . $filename);
-
- // now we should get the plain data
- $this->assertSame($this->dataShort, $content);
-
- $fileInfoUnencrypted = $this->view->getFileInfo($this->userId . '/files/' . $filename);
- $this->assertTrue($fileInfoUnencrypted instanceof \OC\Files\FileInfo);
-
- // check if mtime and etags unchanged
- $this->assertEquals($fileInfoEncrypted['mtime'], $fileInfoUnencrypted['mtime']);
- $this->assertSame($fileInfoEncrypted['etag'], $fileInfoUnencrypted['etag']);
- // file should no longer be encrypted
- $this->assertEquals(0, $fileInfoUnencrypted['encrypted']);
-
- $backupPath = $this->getBackupPath('decryptAll');
-
- // check if the keys where moved to the backup location
- $this->assertTrue($this->view->is_dir($backupPath . '/keys'));
- $this->assertTrue($this->view->file_exists($backupPath . '/keys/' . $filename . '/fileKey'));
- $this->assertTrue($this->view->file_exists($backupPath . '/keys/' . $filename . '/' . $user . '.shareKey'));
-
- // cleanup
- $this->view->unlink($this->userId . '/files/' . $filename);
- $this->view->deleteAll($backupPath);
- \OC_App::enable('files_encryption');
-
- }
-
- private function createDummyKeysForBackupTest() {
- // create some dummy key files
- $encPath = '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '/files_encryption';
- $this->view->mkdir($encPath . '/keys/foo');
- $this->view->file_put_contents($encPath . '/keys/foo/fileKey', 'key');
- $this->view->file_put_contents($encPath . '/keys/foo/user1.shareKey', 'share key');
- }
-
- /**
- * test if all keys get moved to the backup folder correctly
- *
- * @dataProvider dataBackupAllKeys
- */
- function testBackupAllKeys($addTimestamp, $includeUserKeys) {
- self::loginHelper(self::TEST_ENCRYPTION_UTIL_USER1);
-
- $this->createDummyKeysForBackupTest();
-
- $util = new \OCA\Files_Encryption\Util($this->view, self::TEST_ENCRYPTION_UTIL_USER1);
-
- $util->backupAllKeys('testBackupAllKeys', $addTimestamp, $includeUserKeys);
-
- $backupPath = $this->getBackupPath('testBackupAllKeys');
-
- // check backupDir Content
- $this->assertTrue($this->view->is_dir($backupPath . '/keys'));
- $this->assertTrue($this->view->is_dir($backupPath . '/keys/foo'));
- $this->assertTrue($this->view->file_exists($backupPath . '/keys/foo/fileKey'));
- $this->assertTrue($this->view->file_exists($backupPath . '/keys/foo/user1.shareKey'));
-
- if ($includeUserKeys) {
- $this->assertTrue($this->view->file_exists($backupPath . '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '.privateKey'));
- $this->assertTrue($this->view->file_exists($backupPath . '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '.publicKey'));
- } else {
- $this->assertFalse($this->view->file_exists($backupPath . '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '.privateKey'));
- $this->assertFalse($this->view->file_exists($backupPath . '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '.publicKey'));
- }
-
- //cleanup
- $this->view->deleteAll($backupPath);
- $this->view->unlink($this->encryptionDir . '/keys/foo/fileKey');
- $this->view->unlink($this->encryptionDir . '/keys/foo/user1.shareKey');
- }
-
- function dataBackupAllKeys() {
- return array(
- array(true, true),
- array(false, true),
- array(true, false),
- array(false, false),
- );
- }
-
-
- /**
- * @dataProvider dataBackupAllKeys
- */
- function testRestoreBackup($addTimestamp, $includeUserKeys) {
-
- $util = new \OCA\Files_Encryption\Util($this->view, self::TEST_ENCRYPTION_UTIL_USER1);
- $this->createDummyKeysForBackupTest();
-
- $util->backupAllKeys('restoreKeysBackupTest', $addTimestamp, $includeUserKeys);
- $this->view->deleteAll($this->keysPath);
- if ($includeUserKeys) {
- $this->view->unlink($this->privateKeyPath);
- $this->view->unlink($this->publicKeyPath);
- }
-
- // key should be removed after backup was created
- $this->assertFalse($this->view->is_dir($this->keysPath));
- if ($includeUserKeys) {
- $this->assertFalse($this->view->file_exists($this->privateKeyPath));
- $this->assertFalse($this->view->file_exists($this->publicKeyPath));
- }
-
- $backupPath = $this->getBackupPath('restoreKeysBackupTest');
- $backupName = substr(basename($backupPath), strlen('backup.'));
-
- $this->assertTrue($util->restoreBackup($backupName));
-
- // check if all keys are restored
- $this->assertFalse($this->view->is_dir($backupPath));
- $this->assertTrue($this->view->is_dir($this->keysPath));
- $this->assertTrue($this->view->is_dir($this->keysPath . '/foo'));
- $this->assertTrue($this->view->file_exists($this->keysPath . '/foo/fileKey'));
- $this->assertTrue($this->view->file_exists($this->keysPath . '/foo/user1.shareKey'));
- $this->assertTrue($this->view->file_exists($this->privateKeyPath));
- $this->assertTrue($this->view->file_exists($this->publicKeyPath));
- }
-
- function testDeleteBackup() {
- $util = new \OCA\Files_Encryption\Util($this->view, self::TEST_ENCRYPTION_UTIL_USER1);
- $this->createDummyKeysForBackupTest();
-
- $util->backupAllKeys('testDeleteBackup', false, false);
-
- $this->assertTrue($this->view->is_dir($this->encryptionDir . '/backup.testDeleteBackup'));
-
- $util->deleteBackup('testDeleteBackup');
-
- $this->assertFalse($this->view->is_dir($this->encryptionDir . '/backup.testDeleteBackup'));
- }
-
- function testDescryptAllWithBrokenFiles() {
-
- $file1 = "/decryptAll1" . $this->getUniqueID() . ".txt";
- $file2 = "/decryptAll2" . $this->getUniqueID() . ".txt";
-
- $util = new \OCA\Files_Encryption\Util($this->view, $this->userId);
-
- $this->view->file_put_contents($this->userId . '/files/' . $file1, $this->dataShort);
- $this->view->file_put_contents($this->userId . '/files/' . $file2, $this->dataShort);
-
- $fileInfoEncrypted1 = $this->view->getFileInfo($this->userId . '/files/' . $file1);
- $fileInfoEncrypted2 = $this->view->getFileInfo($this->userId . '/files/' . $file2);
-
- $this->assertTrue($fileInfoEncrypted1 instanceof \OC\Files\FileInfo);
- $this->assertTrue($fileInfoEncrypted2 instanceof \OC\Files\FileInfo);
- $this->assertEquals($fileInfoEncrypted1['encrypted'], 1);
- $this->assertEquals($fileInfoEncrypted2['encrypted'], 1);
-
- // rename keyfile for file1 so that the decryption for file1 fails
- // Expected behaviour: decryptAll() returns false, file2 gets decrypted anyway
- $this->view->rename($this->userId . '/files_encryption/keys/' . $file1 . '/fileKey',
- $this->userId . '/files_encryption/keys/' . $file1 . '/fileKey.moved');
-
- // need to reset key cache that we don't use the cached key
- $this->resetKeyCache();
-
- // decrypt all encrypted files
- $result = $util->decryptAll();
-
- $this->assertFalse($result);
-
- $fileInfoUnencrypted1 = $this->view->getFileInfo($this->userId . '/files/' . $file1);
- $fileInfoUnencrypted2 = $this->view->getFileInfo($this->userId . '/files/' . $file2);
-
- $this->assertTrue($fileInfoUnencrypted1 instanceof \OC\Files\FileInfo);
- $this->assertTrue($fileInfoUnencrypted2 instanceof \OC\Files\FileInfo);
-
- // file1 should be still encrypted; file2 should be decrypted
- $this->assertEquals(1, $fileInfoUnencrypted1['encrypted']);
- $this->assertEquals(0, $fileInfoUnencrypted2['encrypted']);
-
- // keyfiles and share keys should still exist
- $this->assertTrue($this->view->is_dir($this->userId . '/files_encryption/keys/'));
- $this->assertTrue($this->view->file_exists($this->userId . '/files_encryption/keys/' . $file1 . '/fileKey.moved'));
- $this->assertTrue($this->view->file_exists($this->userId . '/files_encryption/keys/' . $file1 . '/' . $this->userId . '.shareKey'));
-
- // rename the keyfile for file1 back
- $this->view->rename($this->userId . '/files_encryption/keys/' . $file1 . '/fileKey.moved',
- $this->userId . '/files_encryption/keys/' . $file1 . '/fileKey');
-
- // try again to decrypt all encrypted files
- $result = $util->decryptAll();
-
- $this->assertTrue($result);
-
- $fileInfoUnencrypted1 = $this->view->getFileInfo($this->userId . '/files/' . $file1);
- $fileInfoUnencrypted2 = $this->view->getFileInfo($this->userId . '/files/' . $file2);
-
- $this->assertTrue($fileInfoUnencrypted1 instanceof \OC\Files\FileInfo);
- $this->assertTrue($fileInfoUnencrypted2 instanceof \OC\Files\FileInfo);
-
- // now both files should be decrypted
- $this->assertEquals(0, $fileInfoUnencrypted1['encrypted']);
- $this->assertEquals(0, $fileInfoUnencrypted2['encrypted']);
-
- // keyfiles and share keys should be deleted
- $this->assertFalse($this->view->is_dir($this->userId . '/files_encryption/keys/'));
-
- //cleanup
- $backupPath = $this->getBackupPath('decryptAll');
- $this->view->unlink($this->userId . '/files/' . $file1);
- $this->view->unlink($this->userId . '/files/' . $file2);
- $this->view->deleteAll($backupPath);
-
- }
-
- function getBackupPath($extension) {
- $encPath = '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '/files_encryption';
- $encFolderContent = $this->view->getDirectoryContent($encPath);
-
- $backupPath = '';
- foreach ($encFolderContent as $c) {
- $name = $c['name'];
- if (substr($name, 0, strlen('backup.' . $extension)) === 'backup.' . $extension) {
- $backupPath = $encPath . '/'. $c['name'];
- break;
- }
- }
-
- return $backupPath;
- }
-
- /**
- * @dataProvider dataProviderFortestIsMountPointApplicableToUser
- */
- function testIsMountPointApplicableToUser($mount, $expectedResult) {
- self::loginHelper(self::TEST_ENCRYPTION_UTIL_USER1);
- $dummyClass = new DummyUtilClass($this->view, self::TEST_ENCRYPTION_UTIL_USER1);
- $result = $dummyClass->testIsMountPointApplicableToUser($mount);
-
- $this->assertSame($expectedResult, $result);
- }
-
- function dataProviderFortestIsMountPointApplicableToUser() {
- return array(
- array(array('applicable' => array('groups' => array(), 'users' => array(self::TEST_ENCRYPTION_UTIL_USER1))), true),
- array(array('applicable' => array('groups' => array(), 'users' => array(self::TEST_ENCRYPTION_UTIL_USER2))), false),
- array(array('applicable' => array('groups' => array(self::TEST_ENCRYPTION_UTIL_GROUP1), 'users' => array())), true),
- array(array('applicable' => array('groups' => array(self::TEST_ENCRYPTION_UTIL_GROUP1), 'users' => array(self::TEST_ENCRYPTION_UTIL_USER2))), true),
- array(array('applicable' => array('groups' => array(self::TEST_ENCRYPTION_UTIL_GROUP2), 'users' => array(self::TEST_ENCRYPTION_UTIL_USER2))), false),
- array(array('applicable' => array('groups' => array(self::TEST_ENCRYPTION_UTIL_GROUP2), 'users' => array(self::TEST_ENCRYPTION_UTIL_USER2, 'all'))), true),
- array(array('applicable' => array('groups' => array(self::TEST_ENCRYPTION_UTIL_GROUP2), 'users' => array('all'))), true),
- );
- }
-
- /**
- * Tests that filterShareReadyUsers() returns the correct list of
- * users that are ready or not ready for encryption
- */
- public function testFilterShareReadyUsers() {
- $appConfig = \OC::$server->getAppConfig();
-
- $publicShareKeyId = $appConfig->getValue('files_encryption', 'publicShareKeyId');
- $recoveryKeyId = $appConfig->getValue('files_encryption', 'recoveryKeyId');
-
- $usersToTest = array(
- 'readyUser',
- 'notReadyUser',
- 'nonExistingUser',
- $publicShareKeyId,
- $recoveryKeyId,
- );
- self::loginHelper('readyUser', true);
- self::loginHelper('notReadyUser', true);
- // delete encryption dir to make it not ready
- $this->view->unlink('notReadyUser/files_encryption/');
-
- // login as user1
- self::loginHelper(self::TEST_ENCRYPTION_UTIL_USER1);
-
- $result = $this->util->filterShareReadyUsers($usersToTest);
- $this->assertEquals(
- array('readyUser', $publicShareKeyId, $recoveryKeyId),
- $result['ready']
- );
- $this->assertEquals(
- array('notReadyUser', 'nonExistingUser'),
- $result['unready']
- );
- \OC_User::deleteUser('readyUser');
- }
-
- /**
- * helper function to set migration status to the right value
- * to be able to test the migration path
- *
- * @param integer $status needed migration status for test
- * @param string $user for which user the status should be set
- * @return boolean
- */
- private function setMigrationStatus($status, $user) {
- \OC::$server->getConfig()->setUserValue($user, 'files_encryption', 'migration_status', (string)$status);
- // the update will definitely be executed -> return value is always true
- return true;
- }
-
-}
-
-/**
- * dummy class extends \OCA\Files_Encryption\Util to access protected methods for testing
- */
-class DummyUtilClass extends \OCA\Files_Encryption\Util {
- public function testIsMountPointApplicableToUser($mount) {
- return $this->isMountPointApplicableToUser($mount);
- }
-}
diff --git a/apps/files_encryption/tests/zeros b/apps/files_encryption/tests/zeros
deleted file mode 100644
index ff982acf423..00000000000
--- a/apps/files_encryption/tests/zeros
+++ /dev/null
Binary files differ
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 69b8f629393..e9b2addea38 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -122,7 +122,7 @@ class Shared_Cache extends Cache {
}
$query = \OC_DB::prepare(
'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`,'
- . ' `size`, `mtime`, `encrypted`, `unencrypted_size`, `storage_mtime`, `etag`, `permissions`'
+ . ' `size`, `mtime`, `encrypted`, `storage_mtime`, `etag`, `permissions`'
. ' FROM `*PREFIX*filecache` WHERE `fileid` = ?');
$result = $query->execute(array($sourceId));
$data = $result->fetchRow();
@@ -135,12 +135,7 @@ class Shared_Cache extends Cache {
if ($data['storage_mtime'] === 0) {
$data['storage_mtime'] = $data['mtime'];
}
- if ($data['encrypted'] or ($data['unencrypted_size'] > 0 and $data['mimetype'] === 'httpd/unix-directory')) {
- $data['encrypted_size'] = (int)$data['size'];
- $data['size'] = (int)$data['unencrypted_size'];
- } else {
- $data['size'] = (int)$data['size'];
- }
+ $data['size'] = (int)$data['size'];
$data['permissions'] = (int)$data['permissions'];
if (!is_int($file) || $file === 0) {
$data['path'] = '';
diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php
index 22d6f29ff94..1822c2468f1 100644
--- a/apps/files_sharing/lib/share/file.php
+++ b/apps/files_sharing/lib/share/file.php
@@ -128,12 +128,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
$storage = \OC\Files\Filesystem::getStorage('/');
$cache = $storage->getCache();
- if ($item['encrypted'] or ($item['unencrypted_size'] > 0 and $cache->getMimetype($item['mimetype']) === 'httpd/unix-directory')) {
- $file['size'] = $item['unencrypted_size'];
- $file['encrypted_size'] = $item['size'];
- } else {
- $file['size'] = $item['size'];
- }
+ $file['size'] = $item['size'];
$files[] = $file;
}
return $files;
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index ce8665c97a0..6e3abb1f56c 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -39,6 +39,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
private $share; // the shared resource
private $files = array();
+ private static $isInitialized = array();
public function __construct($arguments) {
$this->share = $arguments['share'];
@@ -423,11 +424,16 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
}
public static function setup($options) {
- $shares = \OCP\Share::getItemsSharedWithUser('file', $options['user']);
+ $user = $options['user'];
+ $shares = \OCP\Share::getItemsSharedWithUser('file', $user);
$manager = Filesystem::getMountManager();
$loader = Filesystem::getLoader();
- if (!\OCP\User::isLoggedIn() || \OCP\User::getUser() != $options['user']
- || $shares
+ if (
+ !isset(self::$isInitialized[$user]) && (
+ !\OCP\User::isLoggedIn()
+ || \OCP\User::getUser() != $options['user']
+ || $shares
+ )
) {
foreach ($shares as $share) {
// don't mount shares where we have no permissions
@@ -437,7 +443,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
$options['user_dir'] . '/' . $share['file_target'],
array(
'share' => $share,
- 'user' => $options['user']
+ 'user' => $user
),
$loader
);
@@ -445,6 +451,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
}
}
}
+ self::$isInitialized[$user] = true;
}
/**
diff --git a/apps/files_sharing/tests/propagation.php b/apps/files_sharing/tests/propagation.php
index 25bf0864b6b..546f67556f2 100644
--- a/apps/files_sharing/tests/propagation.php
+++ b/apps/files_sharing/tests/propagation.php
@@ -19,17 +19,17 @@
*
*/
-namespace OCA\Files_sharing\Tests;
+namespace OCA\Files_Sharing\Tests;
use OC\Files\View;
class Propagation extends TestCase {
public function testSizePropagationWhenOwnerChangesFile() {
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1);
+ $this->loginHelper(self::TEST_FILES_SHARING_API_USER1);
$recipientView = new View('/' . self::TEST_FILES_SHARING_API_USER1 . '/files');
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
+ $this->loginHelper(self::TEST_FILES_SHARING_API_USER2);
$ownerView = new View('/' . self::TEST_FILES_SHARING_API_USER2 . '/files');
$ownerView->mkdir('/sharedfolder/subfolder');
$ownerView->file_put_contents('/sharedfolder/subfolder/foo.txt', 'bar');
@@ -38,30 +38,30 @@ class Propagation extends TestCase {
\OCP\Share::shareItem('folder', $sharedFolderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER1, 31);
$ownerRootInfo = $ownerView->getFileInfo('', false);
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1);
+ $this->loginHelper(self::TEST_FILES_SHARING_API_USER1);
$this->assertTrue($recipientView->file_exists('/sharedfolder/subfolder/foo.txt'));
$recipientRootInfo = $recipientView->getFileInfo('', false);
// when file changed as owner
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
+ $this->loginHelper(self::TEST_FILES_SHARING_API_USER2);
$ownerView->file_put_contents('/sharedfolder/subfolder/foo.txt', 'foobar');
// size of recipient's root stays the same
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1);
+ $this->loginHelper(self::TEST_FILES_SHARING_API_USER1);
$newRecipientRootInfo = $recipientView->getFileInfo('', false);
$this->assertEquals($recipientRootInfo->getSize(), $newRecipientRootInfo->getSize());
// size of owner's root increases
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
+ $this->loginHelper(self::TEST_FILES_SHARING_API_USER2);
$newOwnerRootInfo = $ownerView->getFileInfo('', false);
$this->assertEquals($ownerRootInfo->getSize() + 3, $newOwnerRootInfo->getSize());
}
public function testSizePropagationWhenRecipientChangesFile() {
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1);
+ $this->loginHelper(self::TEST_FILES_SHARING_API_USER1);
$recipientView = new View('/' . self::TEST_FILES_SHARING_API_USER1 . '/files');
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
+ $this->loginHelper(self::TEST_FILES_SHARING_API_USER2);
$ownerView = new View('/' . self::TEST_FILES_SHARING_API_USER2 . '/files');
$ownerView->mkdir('/sharedfolder/subfolder');
$ownerView->file_put_contents('/sharedfolder/subfolder/foo.txt', 'bar');
@@ -70,7 +70,7 @@ class Propagation extends TestCase {
\OCP\Share::shareItem('folder', $sharedFolderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER1, 31);
$ownerRootInfo = $ownerView->getFileInfo('', false);
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1);
+ $this->loginHelper(self::TEST_FILES_SHARING_API_USER1);
$this->assertTrue($recipientView->file_exists('/sharedfolder/subfolder/foo.txt'));
$recipientRootInfo = $recipientView->getFileInfo('', false);
@@ -82,7 +82,7 @@ class Propagation extends TestCase {
$this->assertEquals($recipientRootInfo->getSize(), $newRecipientRootInfo->getSize());
// size of owner's root increases
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
+ $this->loginHelper(self::TEST_FILES_SHARING_API_USER2);
$newOwnerRootInfo = $ownerView->getFileInfo('', false);
$this->assertEquals($ownerRootInfo->getSize() + 3, $newOwnerRootInfo->getSize());
}
diff --git a/apps/files_sharing/tests/testcase.php b/apps/files_sharing/tests/testcase.php
index 6a831bf5f62..b9f8658a69e 100644
--- a/apps/files_sharing/tests/testcase.php
+++ b/apps/files_sharing/tests/testcase.php
@@ -45,7 +45,6 @@ abstract class TestCase extends \Test\TestCase {
const TEST_FILES_SHARING_API_GROUP1 = "test-share-group1";
- public static $stateFilesEncryption;
public $filename;
public $data;
/**
@@ -58,12 +57,6 @@ abstract class TestCase extends \Test\TestCase {
public static function setUpBeforeClass() {
parent::setUpBeforeClass();
- // remember files_encryption state
- self::$stateFilesEncryption = \OC_App::isEnabled('files_encryption');
-
- //we don't want to tests with app files_encryption enabled
- \OC_App::disable('files_encryption');
-
// reset backend
\OC_User::clearBackends();
\OC_Group::clearBackends();
@@ -100,8 +93,6 @@ abstract class TestCase extends \Test\TestCase {
$this->data = 'foobar';
$this->view = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER1 . '/files');
-
- $this->assertFalse(\OC_App::isEnabled('files_encryption'));
}
protected function tearDown() {
@@ -120,13 +111,6 @@ abstract class TestCase extends \Test\TestCase {
// delete group
\OC_Group::deleteGroup(self::TEST_FILES_SHARING_API_GROUP1);
- // reset app files_encryption
- if (self::$stateFilesEncryption) {
- \OC_App::enable('files_encryption');
- } else {
- \OC_App::disable('files_encryption');
- }
-
\OC_Util::tearDownFS();
\OC_User::setUserId('');
Filesystem::tearDown();
@@ -157,6 +141,8 @@ abstract class TestCase extends \Test\TestCase {
\OC_Group::addToGroup($user, 'group');
}
+ self::resetStorage();
+
\OC_Util::tearDownFS();
\OC::$server->getUserSession()->setUser(null);
\OC\Files\Filesystem::tearDown();
@@ -165,6 +151,17 @@ abstract class TestCase extends \Test\TestCase {
}
/**
+ * reset init status for the share storage
+ */
+ protected static function resetStorage() {
+ $storage = new \ReflectionClass('\OC\Files\Storage\Shared');
+ $isInitialized = $storage->getProperty('isInitialized');
+ $isInitialized->setAccessible(true);
+ $isInitialized->setValue(array());
+ $isInitialized->setAccessible(false);
+ }
+
+ /**
* get some information from a given share
* @param int $shareID
* @return array with: item_source, share_type, share_with, item_type, permissions
diff --git a/apps/files_sharing/tests/updater.php b/apps/files_sharing/tests/updater.php
index df1bbe1cc66..67c76c28ed2 100644
--- a/apps/files_sharing/tests/updater.php
+++ b/apps/files_sharing/tests/updater.php
@@ -27,7 +27,7 @@
/**
* Class Test_Files_Sharing_Updater
*/
-class Test_Files_Sharing_Updater extends OCA\Files_sharing\Tests\TestCase {
+class Test_Files_Sharing_Updater extends OCA\Files_Sharing\Tests\TestCase {
const TEST_FOLDER_NAME = '/folder_share_updater_test';
diff --git a/apps/files_trashbin/lib/storage.php b/apps/files_trashbin/lib/storage.php
index 3f474d71da5..61e0816fd24 100644
--- a/apps/files_trashbin/lib/storage.php
+++ b/apps/files_trashbin/lib/storage.php
@@ -84,7 +84,7 @@ class Storage extends Wrapper {
* @param string $path
*/
public function unlink($path) {
- if (self::$disableTrash) {
+ if (self::$disableTrash || !\OC_App::isEnabled('files_trashbin')) {
return $this->storage->unlink($path);
}
$normalized = Filesystem::normalizePath($this->mountPoint . '/' . $path);
@@ -117,7 +117,7 @@ class Storage extends Wrapper {
public static function setupStorage() {
\OC\Files\Filesystem::addStorageWrapper('oc_trashbin', function ($mountPoint, $storage) {
return new \OCA\Files_Trashbin\Storage(array('storage' => $storage, 'mountPoint' => $mountPoint));
- });
+ }, 1);
}
}
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 6bdbac49aa7..1c880735b5a 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -183,8 +183,6 @@ class Trashbin {
$userTrashSize = self::getTrashbinSize($user);
// disable proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
$trashPath = '/files_trashbin/files/' . $filename . '.d' . $timestamp;
try {
$sizeOfAddedFiles = $view->filesize('/files/' . $file_path);
@@ -199,7 +197,6 @@ class Trashbin {
}
\OC_Log::write('files_trashbin', 'Couldn\'t move ' . $file_path . ' to the trash bin', \OC_log::ERROR);
}
- \OC_FileProxy::$enabled = $proxyStatus;
if ($view->file_exists('/files/' . $file_path)) { // failed to delete the original file, abort
$view->unlink($trashPath);
@@ -217,7 +214,6 @@ class Trashbin {
'trashPath' => \OC\Files\Filesystem::normalizePath($filename . '.d' . $timestamp)));
$size += self::retainVersions($file_path, $filename, $timestamp);
- $size += self::retainEncryptionKeys($file_path, $filename, $timestamp);
// if owner !== user we need to also add a copy to the owners trash
if ($user !== $owner) {
@@ -251,10 +247,6 @@ class Trashbin {
$size = 0;
if (\OCP\App::isEnabled('files_versions')) {
- // disable proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
$user = \OCP\User::getUser();
$rootView = new \OC\Files\View('/');
@@ -279,60 +271,12 @@ class Trashbin {
$rootView->rename($owner . '/files_versions' . $v['path'] . '.v' . $v['version'], $user . '/files_trashbin/versions/' . $filename . '.v' . $v['version'] . '.d' . $timestamp);
}
}
-
- // enable proxy
- \OC_FileProxy::$enabled = $proxyStatus;
}
return $size;
}
/**
- * Move encryption keys to trash so that they can be restored later
- *
- * @param string $file_path path to original file
- * @param string $filename of deleted file
- * @param integer $timestamp when the file was deleted
- *
- * @return int size of encryption keys
- */
- private static function retainEncryptionKeys($file_path, $filename, $timestamp) {
- $size = 0;
-
- if (\OCP\App::isEnabled('files_encryption')) {
-
- $user = \OCP\User::getUser();
- $rootView = new \OC\Files\View('/');
-
- list($owner, $ownerPath) = self::getUidAndFilename($file_path);
-
- // file has been deleted in between
- if (empty($ownerPath)) {
- return 0;
- }
-
- $util = new \OCA\Files_Encryption\Util($rootView, $user);
-
- $baseDir = '/files_encryption/';
- if (!$util->isSystemWideMountPoint($ownerPath)) {
- $baseDir = $owner . $baseDir;
- }
-
- $keyfiles = \OC\Files\Filesystem::normalizePath($baseDir . '/keys/' . $ownerPath);
-
- if ($rootView->is_dir($keyfiles)) {
- $size += self::calculateSize(new \OC\Files\View($keyfiles));
- if ($owner !== $user) {
- self::copy_recursive($keyfiles, $owner . '/files_trashbin/keys/' . basename($ownerPath) . '.d' . $timestamp, $rootView);
- }
- $rootView->rename($keyfiles, $user . '/files_trashbin/keys/' . $filename . '.d' . $timestamp);
- }
-
- }
- return $size;
- }
-
- /**
* restore files from trash bin
*
* @param string $file path to the deleted file
@@ -369,10 +313,6 @@ class Trashbin {
$target = \OC\Files\Filesystem::normalizePath('files/' . $location . '/' . $uniqueFilename);
$mtime = $view->filemtime($source);
- // disable proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
// restore file
$restoreResult = $view->rename($source, $target);
@@ -386,22 +326,15 @@ class Trashbin {
'trashPath' => \OC\Files\Filesystem::normalizePath($file)));
self::restoreVersions($view, $file, $filename, $uniqueFilename, $location, $timestamp);
- self::restoreEncryptionKeys($view, $file, $filename, $uniqueFilename, $location, $timestamp);
if ($timestamp) {
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trash` WHERE `user`=? AND `id`=? AND `timestamp`=?');
$query->execute(array($user, $filename, $timestamp));
}
- // enable proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
return true;
}
- // enable proxy
- \OC_FileProxy::$enabled = $proxyStatus;
-
return false;
}
@@ -419,9 +352,6 @@ class Trashbin {
private static function restoreVersions(\OC\Files\View $view, $file, $filename, $uniqueFilename, $location, $timestamp) {
if (\OCP\App::isEnabled('files_versions')) {
- // disable proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
$user = \OCP\User::getUser();
$rootView = new \OC\Files\View('/');
@@ -432,7 +362,6 @@ class Trashbin {
// file has been deleted in between
if (empty($ownerPath)) {
- \OC_FileProxy::$enabled = $proxyStatus;
return false;
}
@@ -453,63 +382,6 @@ class Trashbin {
}
}
}
-
- // enable proxy
- \OC_FileProxy::$enabled = $proxyStatus;
- }
- }
-
- /**
- * restore encryption keys from trash bin
- *
- * @param \OC\Files\View $view
- * @param string $file complete path to file
- * @param string $filename name of file
- * @param string $uniqueFilename new file name to restore the file without overwriting existing files
- * @param string $location location of file
- * @param int $timestamp deletion time
- * @return bool
- */
- private static function restoreEncryptionKeys(\OC\Files\View $view, $file, $filename, $uniqueFilename, $location, $timestamp) {
-
- if (\OCP\App::isEnabled('files_encryption')) {
- $user = \OCP\User::getUser();
- $rootView = new \OC\Files\View('/');
-
- $target = \OC\Files\Filesystem::normalizePath('/' . $location . '/' . $uniqueFilename);
-
- list($owner, $ownerPath) = self::getUidAndFilename($target);
-
- // file has been deleted in between
- if (empty($ownerPath)) {
- return false;
- }
-
- $util = new \OCA\Files_Encryption\Util($rootView, $user);
-
- $baseDir = '/files_encryption/';
- if (!$util->isSystemWideMountPoint($ownerPath)) {
- $baseDir = $owner . $baseDir;
- }
-
- $source_location = dirname($file);
-
- if ($view->is_dir('/files_trashbin/keys/' . $file)) {
- if ($source_location != '.') {
- $keyfile = \OC\Files\Filesystem::normalizePath($user . '/files_trashbin/keys/' . $source_location . '/' . $filename);
- } else {
- $keyfile = \OC\Files\Filesystem::normalizePath($user . '/files_trashbin/keys/' . $filename);
- }
- }
-
- if ($timestamp) {
- $keyfile .= '.d' . $timestamp;
- }
-
- if ($rootView->is_dir($keyfile)) {
- $rootView->rename($keyfile, $baseDir . '/keys/' . $ownerPath);
- }
-
}
}
@@ -528,7 +400,6 @@ class Trashbin {
return true;
}
-
/**
* delete file from trash bin permanently
*
diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php
index b3176ebbe92..bf6446389f1 100644
--- a/apps/files_trashbin/tests/trashbin.php
+++ b/apps/files_trashbin/tests/trashbin.php
@@ -26,7 +26,7 @@
use OCA\Files_Trashbin;
/**
- * Class Test_Encryption_Crypt
+ * Class Test_Encryption
*/
class Test_Trashbin extends \Test\TestCase {
@@ -36,7 +36,6 @@ class Test_Trashbin extends \Test\TestCase {
private $trashRoot1;
private $trashRoot2;
- private static $encryptionStatus;
private static $rememberRetentionObligation;
private static $rememberAutoExpire;
@@ -58,7 +57,6 @@ class Test_Trashbin extends \Test\TestCase {
\OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
//disable encryption
- self::$encryptionStatus = \OC_App::isEnabled('files_encryption');
\OC_App::disable('files_encryption');
//configure trashbin
@@ -82,10 +80,6 @@ class Test_Trashbin extends \Test\TestCase {
// cleanup test user
\OC_User::deleteUser(self::TEST_TRASHBIN_USER1);
- if (self::$encryptionStatus === true) {
- \OC_App::enable('files_encryption');
- }
-
\OC_Config::setValue('trashbin_retention_obligation', self::$rememberRetentionObligation);
\OC_Config::setValue('trashbin_auto_expire', self::$rememberAutoExpire);
@@ -312,6 +306,12 @@ class Test_Trashbin extends \Test\TestCase {
}
}
+ $storage = new \ReflectionClass('\OC\Files\Storage\Shared');
+ $isInitialized = $storage->getProperty('isInitialized');
+ $isInitialized->setAccessible(true);
+ $isInitialized->setValue(array());
+ $isInitialized->setAccessible(false);
+
\OC_Util::tearDownFS();
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
diff --git a/apps/files_versions/lib/storage.php b/apps/files_versions/lib/storage.php
index 01a7935c0c5..125fb5d983c 100644
--- a/apps/files_versions/lib/storage.php
+++ b/apps/files_versions/lib/storage.php
@@ -160,18 +160,11 @@ class Storage {
self::scheduleExpire($filename, $versionsSize, $neededSpace);
- // disable proxy to prevent multiple fopen calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
// store a new version of a file
$mtime = $users_view->filemtime('files/' . $filename);
$users_view->copy('files/' . $filename, 'files_versions/' . $filename . '.v' . $mtime);
// call getFileInfo to enforce a file cache entry for the new version
$users_view->getFileInfo('files_versions/' . $filename . '.v' . $mtime);
-
- // reset proxy state
- \OC_FileProxy::$enabled = $proxyStatus;
}
}
@@ -283,15 +276,8 @@ class Storage {
$version = 'files_versions'.$filename.'.v'.$users_view->filemtime('files'.$filename);
if ( !$users_view->file_exists($version)) {
- // disable proxy to prevent multiple fopen calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
$users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.$users_view->filemtime('files'.$filename));
- // reset proxy state
- \OC_FileProxy::$enabled = $proxyStatus;
-
$versionCreated = true;
}
diff --git a/apps/files_versions/tests/versions.php b/apps/files_versions/tests/versions.php
index 6852f769a3d..f8bfe38df4d 100644
--- a/apps/files_versions/tests/versions.php
+++ b/apps/files_versions/tests/versions.php
@@ -431,6 +431,12 @@ class Test_Files_Versioning extends \Test\TestCase {
\OC::$server->getUserManager()->registerBackend($backend);
}
+ $storage = new \ReflectionClass('\OC\Files\Storage\Shared');
+ $isInitialized = $storage->getProperty('isInitialized');
+ $isInitialized->setAccessible(true);
+ $isInitialized->setValue(array());
+ $isInitialized->setAccessible(false);
+
\OC_Util::tearDownFS();
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
diff --git a/build/license.php b/build/license.php
index a8d82b084e6..6e3806e1464 100644
--- a/build/license.php
+++ b/build/license.php
@@ -166,7 +166,7 @@ if (isset($argv[1])) {
} else {
$licenses->exec([
'../apps/files',
- '../apps/files_encryption',
+ '../apps/encryption',
'../apps/files_external',
'../apps/files_sharing',
'../apps/files_trashbin',
diff --git a/core/application.php b/core/application.php
index 5d12ea0280e..cca2c600118 100644
--- a/core/application.php
+++ b/core/application.php
@@ -88,8 +88,8 @@ class Application extends App {
/**
* Core class wrappers
*/
- $container->registerService('IsEncryptionEnabled', function() {
- return \OC_App::isEnabled('files_encryption');
+ $container->registerService('IsEncryptionEnabled', function(SimpleContainer $c) {
+ return $c->query('ServerContainer')->getEncryptionManager()->isEnabled();
});
$container->registerService('URLGenerator', function(SimpleContainer $c) {
return $c->query('ServerContainer')->getURLGenerator();
diff --git a/lib/base.php b/lib/base.php
index 98da75b61a8..be397e52449 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -701,23 +701,7 @@ class OC {
}
private static function registerEncryptionWrapper() {
- $enabled = self::$server->getEncryptionManager()->isEnabled();
- if ($enabled) {
- \OC\Files\Filesystem::addStorageWrapper('oc_encryption', function ($mountPoint, $storage, \OCP\Files\Mount\IMountPoint $mount) {
- if($mount->getOption('encrypt', true)) {
- $parameters = array('storage' => $storage, 'mountPoint' => $mountPoint);
- $manager = \OC::$server->getEncryptionManager();
- $util = new \OC\Encryption\Util(new \OC\Files\View(), \OC::$server->getUserManager());
- $user = \OC::$server->getUserSession()->getUser();
- $logger = \OC::$server->getLogger();
- $uid = $user ? $user->getUID() : null;
- return new \OC\Files\Storage\Wrapper\Encryption($parameters, $manager, $util, $logger, $uid);
- } else {
- return $storage;
- }
- });
- }
-
+ \OCP\Util::connectHook('OC_Filesystem', 'setup', 'OC\Encryption\Manager', 'setupStorage');
}
private static function registerEncryptionHooks() {
@@ -730,16 +714,17 @@ class OC {
}
$updater = new \OC\Encryption\Update(
new \OC\Files\View(),
- new \OC\Encryption\Util(new \OC\Files\View(), \OC::$server->getUserManager()),
+ new \OC\Encryption\Util(
+ new \OC\Files\View(),
+ \OC::$server->getUserManager(),
+ \OC::$server->getConfig()),
\OC\Files\Filesystem::getMountManager(),
\OC::$server->getEncryptionManager(),
+ \OC::$server->getEncryptionFilesHelper(),
$uid
);
\OCP\Util::connectHook('OCP\Share', 'post_shared', $updater, 'postShared');
\OCP\Util::connectHook('OCP\Share', 'post_unshare', $updater, 'postUnshared');
-
- //\OCP\Util::connectHook('OC_Filesystem', 'post_umount', 'OCA\Files_Encryption\Hooks', 'postUnmount');
- //\OCP\Util::connectHook('OC_Filesystem', 'umount', 'OCA\Files_Encryption\Hooks', 'preUnmount');
}
}
diff --git a/lib/private/app.php b/lib/private/app.php
index 84bc23608fb..4b3d4b82b82 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -207,7 +207,7 @@ class OC_App {
self::$shippedApps = json_decode(file_get_contents($shippedJson), true);
self::$shippedApps = self::$shippedApps['shippedApps'];
} else {
- self::$shippedApps = ['files', 'files_encryption', 'files_external',
+ self::$shippedApps = ['files', 'encryption', 'files_external',
'files_sharing', 'files_trashbin', 'files_versions', 'provisioning_api',
'user_ldap', 'user_webdavauth'];
}
diff --git a/lib/private/cache/file.php b/lib/private/cache/file.php
index 8874acbb1e5..c70698eb7f8 100644
--- a/lib/private/cache/file.php
+++ b/lib/private/cache/file.php
@@ -67,13 +67,10 @@ class File {
*/
public function get($key) {
$result = null;
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
if ($this->hasKey($key)) {
$storage = $this->getStorage();
$result = $storage->file_get_contents($key);
}
- \OC_FileProxy::$enabled = $proxyStatus;
return $result;
}
@@ -85,13 +82,10 @@ class File {
*/
public function size($key) {
$result = 0;
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
if ($this->hasKey($key)) {
$storage = $this->getStorage();
$result = $storage->filesize($key);
}
- \OC_FileProxy::$enabled = $proxyStatus;
return $result;
}
@@ -101,7 +95,6 @@ class File {
public function set($key, $value, $ttl = 0) {
$storage = $this->getStorage();
$result = false;
- $proxyStatus = \OC_FileProxy::$enabled;
// unique id to avoid chunk collision, just in case
$uniqueId = \OC::$server->getSecureRandom()->getLowStrengthGenerator()->generate(
16,
@@ -111,7 +104,6 @@ class File {
// use part file to prevent hasKey() to find the key
// while it is being written
$keyPart = $key . '.' . $uniqueId . '.part';
- \OC_FileProxy::$enabled = false;
if ($storage and $storage->file_put_contents($keyPart, $value)) {
if ($ttl === 0) {
$ttl = 86400; // 60*60*24
@@ -119,7 +111,6 @@ class File {
$result = $storage->touch($keyPart, time() + $ttl);
$result &= $storage->rename($keyPart, $key);
}
- \OC_FileProxy::$enabled = $proxyStatus;
return $result;
}
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 4fbcb732688..b4acaa15073 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -35,7 +35,24 @@
namespace OC\Connector\Sabre;
-class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
+use OC\Connector\Sabre\Exception\EntityTooLarge;
+use OC\Connector\Sabre\Exception\FileLocked;
+use OC\Connector\Sabre\Exception\UnsupportedMediaType;
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+use OCP\Files\EntityTooLargeException;
+use OCP\Files\InvalidContentException;
+use OCP\Files\InvalidPathException;
+use OCP\Files\LockNotAcquiredException;
+use OCP\Files\NotPermittedException;
+use OCP\Files\StorageNotAvailableException;
+use Sabre\DAV\Exception;
+use Sabre\DAV\Exception\BadRequest;
+use Sabre\DAV\Exception\Forbidden;
+use Sabre\DAV\Exception\NotImplemented;
+use Sabre\DAV\Exception\ServiceUnavailable;
+use Sabre\DAV\IFile;
+
+class File extends Node implements IFile {
/**
* Updates the data
@@ -56,27 +73,22 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
*
* @param resource $data
*
- * @throws \Sabre\DAV\Exception\Forbidden
- * @throws \OC\Connector\Sabre\Exception\UnsupportedMediaType
- * @throws \Sabre\DAV\Exception\BadRequest
- * @throws \Sabre\DAV\Exception
- * @throws \OC\Connector\Sabre\Exception\EntityTooLarge
- * @throws \Sabre\DAV\Exception\ServiceUnavailable
+ * @throws Forbidden
+ * @throws UnsupportedMediaType
+ * @throws BadRequest
+ * @throws Exception
+ * @throws EntityTooLarge
+ * @throws ServiceUnavailable
* @return string|null
*/
public function put($data) {
try {
if ($this->info && $this->fileView->file_exists($this->path) &&
!$this->info->isUpdateable()) {
- throw new \Sabre\DAV\Exception\Forbidden();
+ throw new Forbidden();
}
- } catch (\OCP\Files\StorageNotAvailableException $e) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("File is not updatable: ".$e->getMessage());
- }
-
- // throw an exception if encryption was disabled but the files are still encrypted
- if (\OC_Util::encryptedFiles()) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("Encryption is disabled");
+ } catch (StorageNotAvailableException $e) {
+ throw new ServiceUnavailable("File is not updatable: ".$e->getMessage());
}
// verify path of the target
@@ -104,31 +116,29 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
\OC_Log::write('webdav', '\OC\Files\Filesystem::file_put_contents() failed', \OC_Log::ERROR);
$this->fileView->unlink($partFilePath);
// because we have no clue about the cause we can only throw back a 500/Internal Server Error
- throw new \Sabre\DAV\Exception('Could not write file contents');
+ throw new Exception('Could not write file contents');
}
- } catch (\OCP\Files\NotPermittedException $e) {
+ } catch (NotPermittedException $e) {
// a more general case - due to whatever reason the content could not be written
- throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
-
- } catch (\OCP\Files\EntityTooLargeException $e) {
+ throw new Forbidden($e->getMessage());
+ } catch (EntityTooLargeException $e) {
// the file is too big to be stored
- throw new \OC\Connector\Sabre\Exception\EntityTooLarge($e->getMessage());
-
- } catch (\OCP\Files\InvalidContentException $e) {
+ throw new EntityTooLarge($e->getMessage());
+ } catch (InvalidContentException $e) {
// the file content is not permitted
- throw new \OC\Connector\Sabre\Exception\UnsupportedMediaType($e->getMessage());
-
- } catch (\OCP\Files\InvalidPathException $e) {
+ throw new UnsupportedMediaType($e->getMessage());
+ } catch (InvalidPathException $e) {
// the path for the file was not valid
// TODO: find proper http status code for this case
- throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
- } catch (\OCP\Files\LockNotAcquiredException $e) {
+ throw new Forbidden($e->getMessage());
+ } catch (LockNotAcquiredException $e) {
// the file is currently being written to by another process
- throw new \OC\Connector\Sabre\Exception\FileLocked($e->getMessage(), $e->getCode(), $e);
- } catch (\OCA\Files_Encryption\Exception\EncryptionException $e) {
- throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
- } catch (\OCP\Files\StorageNotAvailableException $e) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to write file contents: ".$e->getMessage());
+ throw new FileLocked($e->getMessage(), $e->getCode(), $e);
+ } catch (GenericEncryptionException $e) {
+ // returning 503 will allow retry of the operation at a later point in time
+ throw new ServiceUnavailable("Encryption not ready: " . $e->getMessage());
+ } catch (StorageNotAvailableException $e) {
+ throw new ServiceUnavailable("Failed to write file contents: ".$e->getMessage());
}
try {
@@ -140,7 +150,7 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
$actual = $this->fileView->filesize($partFilePath);
if ($actual != $expected) {
$this->fileView->unlink($partFilePath);
- throw new \Sabre\DAV\Exception\BadRequest('expected filesize ' . $expected . ' got ' . $actual);
+ throw new BadRequest('expected filesize ' . $expected . ' got ' . $actual);
}
}
@@ -152,12 +162,12 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
if ($renameOkay === false || $fileExists === false) {
\OC_Log::write('webdav', '\OC\Files\Filesystem::rename() failed', \OC_Log::ERROR);
$this->fileView->unlink($partFilePath);
- throw new \Sabre\DAV\Exception('Could not rename part file to final file');
+ throw new Exception('Could not rename part file to final file');
}
}
- catch (\OCP\Files\LockNotAcquiredException $e) {
+ catch (LockNotAcquiredException $e) {
// the file is currently being written to by another process
- throw new \OC\Connector\Sabre\Exception\FileLocked($e->getMessage(), $e->getCode(), $e);
+ throw new FileLocked($e->getMessage(), $e->getCode(), $e);
}
}
@@ -169,8 +179,8 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
}
}
$this->refreshInfo();
- } catch (\OCP\Files\StorageNotAvailableException $e) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to check file size: ".$e->getMessage());
+ } catch (StorageNotAvailableException $e) {
+ throw new ServiceUnavailable("Failed to check file size: ".$e->getMessage());
}
return '"' . $this->info->getEtag() . '"';
@@ -179,43 +189,39 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
/**
* Returns the data
* @return string|resource
- * @throws \Sabre\DAV\Exception\Forbidden
- * @throws \Sabre\DAV\Exception\ServiceUnavailable
+ * @throws Forbidden
+ * @throws ServiceUnavailable
*/
public function get() {
//throw exception if encryption is disabled but files are still encrypted
- if (\OC_Util::encryptedFiles()) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("Encryption is disabled");
- } else {
- try {
- return $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
- } catch (\OCA\Files_Encryption\Exception\EncryptionException $e) {
- throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
- } catch (\OCP\Files\StorageNotAvailableException $e) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to open file: ".$e->getMessage());
- }
+ try {
+ return $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
+ } catch (GenericEncryptionException $e) {
+ // returning 503 will allow retry of the operation at a later point in time
+ throw new ServiceUnavailable("Encryption not ready: " . $e->getMessage());
+ } catch (StorageNotAvailableException $e) {
+ throw new ServiceUnavailable("Failed to open file: ".$e->getMessage());
}
-
}
/**
* Delete the current file
- * @throws \Sabre\DAV\Exception\Forbidden
- * @throws \Sabre\DAV\Exception\ServiceUnavailable
+ * @throws Forbidden
+ * @throws ServiceUnavailable
*/
public function delete() {
if (!$this->info->isDeletable()) {
- throw new \Sabre\DAV\Exception\Forbidden();
+ throw new Forbidden();
}
try {
if (!$this->fileView->unlink($this->path)) {
// assume it wasn't possible to delete due to permissions
- throw new \Sabre\DAV\Exception\Forbidden();
+ throw new Forbidden();
}
- } catch (\OCP\Files\StorageNotAvailableException $e) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to unlink: ".$e->getMessage());
+ } catch (StorageNotAvailableException $e) {
+ throw new ServiceUnavailable("Failed to unlink: ".$e->getMessage());
}
}
@@ -255,10 +261,10 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
/**
* @param resource $data
* @return null|string
- * @throws \Sabre\DAV\Exception
- * @throws \Sabre\DAV\Exception\BadRequest
- * @throws \Sabre\DAV\Exception\NotImplemented
- * @throws \Sabre\DAV\Exception\ServiceUnavailable
+ * @throws Exception
+ * @throws BadRequest
+ * @throws NotImplemented
+ * @throws ServiceUnavailable
*/
private function createFileChunked($data)
{
@@ -266,7 +272,7 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
$info = \OC_FileChunking::decodeName($name);
if (empty($info)) {
- throw new \Sabre\DAV\Exception\NotImplemented();
+ throw new NotImplemented();
}
$chunk_handler = new \OC_FileChunking($info);
$bytesWritten = $chunk_handler->store($info['index'], $data);
@@ -277,7 +283,7 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
$expected = $_SERVER['CONTENT_LENGTH'];
if ($bytesWritten != $expected) {
$chunk_handler->remove($info['index']);
- throw new \Sabre\DAV\Exception\BadRequest(
+ throw new BadRequest(
'expected filesize ' . $expected . ' got ' . $bytesWritten);
}
}
@@ -303,7 +309,7 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
if ($fileExists) {
$this->fileView->unlink($targetPath);
}
- throw new \Sabre\DAV\Exception('Could not rename part file assembled from chunks');
+ throw new Exception('Could not rename part file assembled from chunks');
}
} else {
// assemble directly into the final file
@@ -320,8 +326,8 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
$info = $this->fileView->getFileInfo($targetPath);
return $info->getEtag();
- } catch (\OCP\Files\StorageNotAvailableException $e) {
- throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to put file: ".$e->getMessage());
+ } catch (StorageNotAvailableException $e) {
+ throw new ServiceUnavailable("Failed to put file: ".$e->getMessage());
}
}
diff --git a/apps/files_encryption/exception/multikeyencryptexception.php b/lib/private/encryption/exceptions/decryptionfailedexception.php
index 3b485a33982..f8b4fdf07fa 100644
--- a/apps/files_encryption/exception/multikeyencryptexception.php
+++ b/lib/private/encryption/exceptions/decryptionfailedexception.php
@@ -1,9 +1,7 @@
<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- *
+ /**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/25/15, 9:38 AM
* @copyright Copyright (c) 2015, ownCloud, Inc.
* @license AGPL-3.0
*
@@ -21,14 +19,11 @@
*
*/
-namespace OCA\Files_Encryption\Exception;
-/**
- * Throw this exception if multi key encrytion fails
- *
- * Possible error codes:
- * 110 - openssl_seal failed
- */
-class MultiKeyEncryptException extends EncryptionException {
- const OPENSSL_SEAL_FAILED = 110;
+namespace OC\Encryption\Exceptions;
+
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class DecryptionFailedException extends GenericEncryptionException {
+
}
diff --git a/apps/files_encryption/exception/multikeydecryptexception.php b/lib/private/encryption/exceptions/emptyencryptiondataexception.php
index a75bd663dc6..d3dc9230047 100644
--- a/apps/files_encryption/exception/multikeydecryptexception.php
+++ b/lib/private/encryption/exceptions/emptyencryptiondataexception.php
@@ -1,9 +1,7 @@
<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- *
+ /**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/25/15, 9:38 AM
* @copyright Copyright (c) 2015, ownCloud, Inc.
* @license AGPL-3.0
*
@@ -21,14 +19,11 @@
*
*/
-namespace OCA\Files_Encryption\Exception;
-/**
- * Throw this encryption if multi key decryption failed
- *
- * Possible error codes:
- * 110 - openssl_open failed
- */
-class MultiKeyDecryptException extends EncryptionException {
- const OPENSSL_OPEN_FAILED = 110;
+namespace OC\Encryption\Exceptions;
+
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class EmptyEncryptionDataException extends GenericEncryptionException{
+
}
diff --git a/lib/private/encryption/exceptions/encryptionfailedexception.php b/lib/private/encryption/exceptions/encryptionfailedexception.php
new file mode 100644
index 00000000000..ac489c73254
--- /dev/null
+++ b/lib/private/encryption/exceptions/encryptionfailedexception.php
@@ -0,0 +1,29 @@
+<?php
+ /**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/25/15, 9:37 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+namespace OC\Encryption\Exceptions;
+
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class EncryptionFailedException extends GenericEncryptionException{
+
+}
diff --git a/lib/private/encryption/exceptions/encryptionheaderkeyexistsexception.php b/lib/private/encryption/exceptions/encryptionheaderkeyexistsexception.php
index d401f0323ba..5e8e48efd78 100644
--- a/lib/private/encryption/exceptions/encryptionheaderkeyexistsexception.php
+++ b/lib/private/encryption/exceptions/encryptionheaderkeyexistsexception.php
@@ -23,7 +23,14 @@
namespace OC\Encryption\Exceptions;
+use OCP\Encryption\Exceptions\GenericEncryptionException;
-class EncryptionHeaderKeyExistsException extends \Exception {
+class EncryptionHeaderKeyExistsException extends GenericEncryptionException {
-} \ No newline at end of file
+ /**
+ * @param string $key
+ */
+ public function __construct($key) {
+ parent::__construct('header key "'. $key . '" already reserved by ownCloud');
+ }
+}
diff --git a/lib/private/encryption/exceptions/encryptionheadertolargeexception.php b/lib/private/encryption/exceptions/encryptionheadertolargeexception.php
new file mode 100644
index 00000000000..cdb5f940800
--- /dev/null
+++ b/lib/private/encryption/exceptions/encryptionheadertolargeexception.php
@@ -0,0 +1,33 @@
+<?php
+ /**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/25/15, 9:35 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+namespace OC\Encryption\Exceptions;
+
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class EncryptionHeaderToLargeException extends GenericEncryptionException {
+
+ public function __construct() {
+ parent::__construct('max header size exceeded');
+ }
+
+}
diff --git a/lib/private/encryption/exceptions/modulealreadyexistsexception.php b/lib/private/encryption/exceptions/modulealreadyexistsexception.php
index 41fc0188e24..fa1e70a5c36 100644
--- a/lib/private/encryption/exceptions/modulealreadyexistsexception.php
+++ b/lib/private/encryption/exceptions/modulealreadyexistsexception.php
@@ -23,6 +23,16 @@
namespace OC\Encryption\Exceptions;
-class ModuleAlreadyExistsException extends \Exception {
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class ModuleAlreadyExistsException extends GenericEncryptionException {
+
+ /**
+ * @param string $id
+ * @param string $name
+ */
+ public function __construct($id, $name) {
+ parent::__construct('Id "' . $id . '" already used by encryption module "' . $name . '"');
+ }
}
diff --git a/lib/private/encryption/exceptions/moduledoesnotexistsexception.php b/lib/private/encryption/exceptions/moduledoesnotexistsexception.php
index 5507bd03dab..2c699e8dc2d 100644
--- a/lib/private/encryption/exceptions/moduledoesnotexistsexception.php
+++ b/lib/private/encryption/exceptions/moduledoesnotexistsexception.php
@@ -23,6 +23,8 @@
namespace OC\Encryption\Exceptions;
-class ModuleDoesNotExistsException extends \Exception {
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class ModuleDoesNotExistsException extends GenericEncryptionException {
}
diff --git a/lib/private/encryption/exceptions/unknowncipherexception.php b/lib/private/encryption/exceptions/unknowncipherexception.php
new file mode 100644
index 00000000000..188f7403848
--- /dev/null
+++ b/lib/private/encryption/exceptions/unknowncipherexception.php
@@ -0,0 +1,29 @@
+<?php
+ /**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/25/15, 9:36 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+namespace OC\Encryption\Exceptions;
+
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class UnknownCipherException extends GenericEncryptionException {
+
+}
diff --git a/lib/private/encryption/file.php b/lib/private/encryption/file.php
new file mode 100644
index 00000000000..3600936ed0e
--- /dev/null
+++ b/lib/private/encryption/file.php
@@ -0,0 +1,79 @@
+<?php
+
+/**
+ * ownCloud
+ *
+ * @copyright (C) 2015 ownCloud, Inc.
+ *
+ * @author Bjoern Schiessle <schiessle@owncloud.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace OC\Encryption;
+
+class File implements \OCP\Encryption\IFile {
+
+ /** @var Util */
+ protected $util;
+
+ public function __construct(Util $util) {
+ $this->util = $util;
+ }
+
+
+ /**
+ * get list of users with access to the file
+ *
+ * @param string $path to the file
+ * @return array
+ */
+ public function getAccessList($path) {
+
+ // Make sure that a share key is generated for the owner too
+ list($owner, $ownerPath) = $this->util->getUidAndFilename($path);
+
+ // always add owner to the list of users with access to the file
+ $userIds = array($owner);
+
+ if (!$this->util->isFile($ownerPath)) {
+ return array('users' => $userIds, 'public' => false);
+ }
+
+ $ownerPath = substr($ownerPath, strlen('/files'));
+ $ownerPath = $this->util->stripPartialFileExtension($ownerPath);
+
+ // Find out who, if anyone, is sharing the file
+ $result = \OCP\Share::getUsersSharingFile($ownerPath, $owner);
+ $userIds = \array_merge($userIds, $result['users']);
+ $public = $result['public'] || $result['remote'];
+
+ // check if it is a group mount
+ if (\OCP\App::isEnabled("files_external")) {
+ $mounts = \OC_Mount_Config::getSystemMountPoints();
+ foreach ($mounts as $mount) {
+ if ($mount['mountpoint'] == substr($ownerPath, 1, strlen($mount['mountpoint']))) {
+ $mountedFor = $this->util->getUserWithAccessToMountPoint($mount['applicable']['users'], $mount['applicable']['groups']);
+ $userIds = array_merge($userIds, $mountedFor);
+ }
+ }
+ }
+
+ // Remove duplicate UIDs
+ $uniqueUserIds = array_unique($userIds);
+
+ return array('users' => $uniqueUserIds, 'public' => $public);
+ }
+
+}
diff --git a/lib/private/encryption/keys/storage.php b/lib/private/encryption/keys/storage.php
index 041db2a2cb8..42610bd0b41 100644
--- a/lib/private/encryption/keys/storage.php
+++ b/lib/private/encryption/keys/storage.php
@@ -25,7 +25,7 @@ namespace OC\Encryption\Keys;
use OC\Encryption\Util;
use OC\Files\View;
-use OCA\Files_Encryption\Exception\EncryptionException;
+use OCP\Encryption\Exceptions\GenericEncryptionException;
class Storage implements \OCP\Encryption\Keys\IStorage {
@@ -253,13 +253,13 @@ class Storage implements \OCP\Encryption\Keys\IStorage {
*
* @param string $path path to the file, relative to data/
* @return string
- * @throws EncryptionException
+ * @throws GenericEncryptionException
* @internal param string $keyId
*/
private function getFileKeyDir($path) {
if ($this->view->is_dir($path)) {
- throw new EncryptionException('file was expected but directory was given', EncryptionException::GENERIC);
+ throw new GenericEncryptionException("file was expected but directory was given: $path");
}
list($owner, $filename) = $this->util->getUidAndFilename($path);
@@ -283,7 +283,12 @@ class Storage implements \OCP\Encryption\Keys\IStorage {
* @param string $owner
* @param bool $systemWide
*/
- public function renameKeys($source, $target, $owner, $systemWide) {
+ public function renameKeys($source, $target) {
+
+ list($owner, $source) = $this->util->getUidAndFilename($source);
+ list(, $target) = $this->util->getUidAndFilename($target);
+ $systemWide = $this->util->isSystemWideMountPoint($target);
+
if ($systemWide) {
$sourcePath = $this->keys_base_dir . $source . '/';
$targetPath = $this->keys_base_dir . $target . '/';
@@ -299,6 +304,34 @@ class Storage implements \OCP\Encryption\Keys\IStorage {
}
/**
+ * copy keys if a file was renamed
+ *
+ * @param string $source
+ * @param string $target
+ * @param string $owner
+ * @param bool $systemWide
+ */
+ public function copyKeys($source, $target) {
+
+ list($owner, $source) = $this->util->getUidAndFilename($source);
+ list(, $target) = $this->util->getUidAndFilename($target);
+ $systemWide = $this->util->isSystemWideMountPoint($target);
+
+ if ($systemWide) {
+ $sourcePath = $this->keys_base_dir . $source . '/';
+ $targetPath = $this->keys_base_dir . $target . '/';
+ } else {
+ $sourcePath = '/' . $owner . $this->keys_base_dir . $source . '/';
+ $targetPath = '/' . $owner . $this->keys_base_dir . $target . '/';
+ }
+
+ if ($this->view->file_exists($sourcePath)) {
+ $this->keySetPreparation(dirname($targetPath));
+ $this->view->copy($sourcePath, $targetPath);
+ }
+ }
+
+ /**
* Make preparations to filesystem for saving a keyfile
*
* @param string $path relative to the views root
@@ -306,7 +339,7 @@ class Storage implements \OCP\Encryption\Keys\IStorage {
protected function keySetPreparation($path) {
// If the file resides within a subdirectory, create it
if (!$this->view->file_exists($path)) {
- $sub_dirs = explode('/', $path);
+ $sub_dirs = explode('/', ltrim($path, '/'));
$dir = '';
foreach ($sub_dirs as $sub_dir) {
$dir .= '/' . $sub_dir;
diff --git a/lib/private/encryption/manager.php b/lib/private/encryption/manager.php
index 5164025239c..484e0f540b2 100644
--- a/lib/private/encryption/manager.php
+++ b/lib/private/encryption/manager.php
@@ -23,7 +23,9 @@
namespace OC\Encryption;
+use OC\Files\Storage\Wrapper\Encryption;
use OCP\Encryption\IEncryptionModule;
+use OCP\Files\Mount\IMountPoint;
class Manager implements \OCP\Encryption\IManager {
@@ -66,10 +68,9 @@ class Manager implements \OCP\Encryption\IManager {
public function registerEncryptionModule(IEncryptionModule $module) {
$id = $module->getId();
$name = $module->getDisplayName();
- if (isset($this->encryptionModules[$id])) {
- $message = 'Id "' . $id . '" already used by encryption module "' . $name . '"';
- throw new Exceptions\ModuleAlreadyExistsException($message);
+ if (isset($this->encryptionModules[$id])) {
+ throw new Exceptions\ModuleAlreadyExistsException($id, $name);
}
$defaultEncryptionModuleId = $this->getDefaultEncryptionModuleId();
@@ -106,12 +107,24 @@ class Manager implements \OCP\Encryption\IManager {
* @return IEncryptionModule
* @throws Exceptions\ModuleDoesNotExistsException
*/
- public function getEncryptionModule($moduleId) {
- if (isset($this->encryptionModules[$moduleId])) {
- return $this->encryptionModules[$moduleId];
- } else {
- $message = "Module with id: $moduleId does not exists.";
- throw new Exceptions\ModuleDoesNotExistsException($message);
+ public function getEncryptionModule($moduleId = '') {
+ if (!empty($moduleId)) {
+ if (isset($this->encryptionModules[$moduleId])) {
+ return $this->encryptionModules[$moduleId];
+ } else {
+ $message = "Module with id: $moduleId does not exists.";
+ throw new Exceptions\ModuleDoesNotExistsException($message);
+ }
+ } else { // get default module and return this
+ // For now we simply return the first module until we have a way
+ // to enable multiple modules and define a default module
+ $module = reset($this->encryptionModules);
+ if ($module) {
+ return $module;
+ } else {
+ $message = 'No encryption module registered';
+ throw new Exceptions\ModuleDoesNotExistsException($message);
+ }
}
}
@@ -166,5 +179,25 @@ class Manager implements \OCP\Encryption\IManager {
}
}
-
+ public static function setupStorage() {
+ \OC\Files\Filesystem::addStorageWrapper('oc_encryption', function ($mountPoint, $storage, IMountPoint $mount) {
+ $parameters = [
+ 'storage' => $storage,
+ 'mountPoint' => $mountPoint,
+ 'mount' => $mount];
+
+ if (!($storage instanceof \OC\Files\Storage\Shared)) {
+ $manager = \OC::$server->getEncryptionManager();
+ $util = new \OC\Encryption\Util(
+ new \OC\Files\View(), \OC::$server->getUserManager(), \OC::$server->getConfig());
+ $user = \OC::$server->getUserSession()->getUser();
+ $logger = \OC::$server->getLogger();
+ $uid = $user ? $user->getUID() : null;
+ $fileHelper = \OC::$server->getEncryptionFilesHelper();
+ return new Encryption($parameters, $manager, $util, $logger, $fileHelper, $uid);
+ } else {
+ return $storage;
+ }
+ }, 2);
+ }
}
diff --git a/lib/private/encryption/update.php b/lib/private/encryption/update.php
index 06dc330151e..1cfe935e584 100644
--- a/lib/private/encryption/update.php
+++ b/lib/private/encryption/update.php
@@ -46,12 +46,16 @@ class Update {
/** @var string */
protected $uid;
+ /** @var \OC\Encryption\File */
+ protected $file;
+
/**
*
* @param \OC\Files\View $view
* @param \OC\Encryption\Util $util
* @param \OC\Files\Mount\Manager $mountManager
* @param \OC\Encryption\Manager $encryptionManager
+ * @param \OC\Encryption\File $file
* @param string $uid
*/
public function __construct(
@@ -59,6 +63,7 @@ class Update {
Util $util,
Mount\Manager $mountManager,
Manager $encryptionManager,
+ File $file,
$uid
) {
@@ -66,6 +71,7 @@ class Update {
$this->util = $util;
$this->mountManager = $mountManager;
$this->encryptionManager = $encryptionManager;
+ $this->file = $file;
$this->uid = $uid;
}
@@ -87,25 +93,29 @@ class Update {
* @param int $fileSource file source id
*/
private function update($fileSource) {
- $path = \OC\Files\Filesystem::getPath($fileSource);
- $absPath = '/' . $this->uid . '/files' . $path;
-
- $mount = $this->mountManager->find($path);
- $mountPoint = $mount->getMountPoint();
-
- // if a folder was shared, get a list of all (sub-)folders
- if ($this->view->is_dir($absPath)) {
- $allFiles = $this->util->getAllFiles($absPath, $mountPoint);
- } else {
- $allFiles = array($absPath);
- }
+ $path = \OC\Files\Filesystem::getPath($fileSource);
+ $info = \OC\Files\Filesystem::getFileInfo($path);
+ $owner = \OC\Files\Filesystem::getOwner($path);
+ $view = new \OC\Files\View('/' . $owner . '/files');
+ $ownerPath = $view->getPath($info->getId());
+ $absPath = '/' . $owner . '/files' . $ownerPath;
+
+ $mount = $this->mountManager->find($path);
+ $mountPoint = $mount->getMountPoint();
+
+ // if a folder was shared, get a list of all (sub-)folders
+ if ($this->view->is_dir($absPath)) {
+ $allFiles = $this->util->getAllFiles($absPath, $mountPoint);
+ } else {
+ $allFiles = array($absPath);
+ }
- $encryptionModule = $this->encryptionManager->getDefaultEncryptionModule();
+ $encryptionModule = $this->encryptionManager->getDefaultEncryptionModule();
- foreach ($allFiles as $path) {
- $usersSharing = $this->util->getSharingUsersArray($path);
- $encryptionModule->update($absPath, $this->uid, $usersSharing);
- }
+ foreach ($allFiles as $path) {
+ $usersSharing = $this->file->getAccessList($path);
+ $encryptionModule->update($path, $this->uid, $usersSharing);
+ }
}
-} \ No newline at end of file
+}
diff --git a/lib/private/encryption/util.php b/lib/private/encryption/util.php
index 85e852ec2c9..6312d8813e3 100644
--- a/lib/private/encryption/util.php
+++ b/lib/private/encryption/util.php
@@ -23,9 +23,11 @@
namespace OC\Encryption;
-use OC\Encryption\Exceptions\EncryptionHeaderToLargeException;
use OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException;
+use OC\Encryption\Exceptions\EncryptionHeaderToLargeException;
+use OC\Files\View;
use OCP\Encryption\IEncryptionModule;
+use OCP\IConfig;
class Util {
@@ -49,7 +51,7 @@ class Util {
*/
protected $blockSize = 8192;
- /** @var \OC\Files\View */
+ /** @var View */
protected $view;
/** @var array */
@@ -58,19 +60,30 @@ class Util {
/** @var \OC\User\Manager */
protected $userManager;
+ /** @var IConfig */
+ protected $config;
+
/** @var array paths excluded from encryption */
protected $excludedPaths;
/**
- * @param \OC\Files\View $view root view
+ *
+ * @param \OC\Files\View $view
+ * @param \OC\User\Manager $userManager
+ * @param IConfig $config
*/
- public function __construct(\OC\Files\View $view, \OC\User\Manager $userManager) {
+ public function __construct(
+ \OC\Files\View $view,
+ \OC\User\Manager $userManager,
+ IConfig $config) {
+
$this->ocHeaderKeys = [
self::HEADER_ENCRYPTION_MODULE_KEY
];
$this->view = $view;
$this->userManager = $userManager;
+ $this->config = $config;
$this->excludedPaths[] = 'files_encryption';
}
@@ -81,7 +94,7 @@ class Util {
* @param array $header
* @return string
*/
- public function getEncryptionModuleId(array $header) {
+ public function getEncryptionModuleId(array $header = null) {
$id = '';
$encryptionModuleKey = self::HEADER_ENCRYPTION_MODULE_KEY;
@@ -134,14 +147,14 @@ class Util {
$header = self::HEADER_START . ':' . self::HEADER_ENCRYPTION_MODULE_KEY . ':' . $encryptionModule->getId() . ':';
foreach ($headerData as $key => $value) {
if (in_array($key, $this->ocHeaderKeys)) {
- throw new EncryptionHeaderKeyExistsException('header key "'. $key . '" already reserved by ownCloud');
+ throw new EncryptionHeaderKeyExistsException($key);
}
$header .= $key . ':' . $value . ':';
}
$header .= self::HEADER_END;
if (strlen($header) > $this->getHeaderSize()) {
- throw new EncryptionHeaderToLargeException('max header size exceeded', EncryptionException::ENCRYPTION_HEADER_TO_LARGE);
+ throw new EncryptionHeaderToLargeException();
}
$paddedHeader = str_pad($header, $this->headerSize, self::HEADER_PADDING_CHAR, STR_PAD_RIGHT);
@@ -150,53 +163,10 @@ class Util {
}
/**
- * Find, sanitise and format users sharing a file
- * @note This wraps other methods into a portable bundle
- * @param string $path path relative to current users files folder
- * @return array
- */
- public function getSharingUsersArray($path) {
-
- // Make sure that a share key is generated for the owner too
- list($owner, $ownerPath) = $this->getUidAndFilename($path);
-
- // always add owner to the list of users with access to the file
- $userIds = array($owner);
-
- if (!$this->isFile($ownerPath)) {
- return array('users' => $userIds, 'public' => false);
- }
-
- $ownerPath = substr($ownerPath, strlen('/files'));
- $ownerPath = $this->stripPartialFileExtension($ownerPath);
-
- // Find out who, if anyone, is sharing the file
- $result = \OCP\Share::getUsersSharingFile($ownerPath, $owner);
- $userIds = \array_merge($userIds, $result['users']);
- $public = $result['public'] || $result['remote'];
-
- // check if it is a group mount
- if (\OCP\App::isEnabled("files_external")) {
- $mounts = \OC_Mount_Config::getSystemMountPoints();
- foreach ($mounts as $mount) {
- if ($mount['mountpoint'] == substr($ownerPath, 1, strlen($mount['mountpoint']))) {
- $mountedFor = $this->getUserWithAccessToMountPoint($mount['applicable']['users'], $mount['applicable']['groups']);
- $userIds = array_merge($userIds, $mountedFor);
- }
- }
- }
-
- // Remove duplicate UIDs
- $uniqueUserIds = array_unique($userIds);
-
- return array('users' => $uniqueUserIds, 'public' => $public);
- }
-
- /**
* go recursively through a dir and collect all files and sub files.
*
* @param string $dir relative to the users files folder
- * @param strinf $mountPoint
+ * @param string $mountPoint
* @return array with list of files relative to the users files folder
*/
public function getAllFiles($dir, $mountPoint = '') {
@@ -210,11 +180,11 @@ class Util {
foreach ($content as $c) {
// getDirectoryContent() returns the paths relative to the mount points, so we need
// to re-construct the complete path
- $path = ($mountPoint !== '') ? $mountPoint . '/' . $c['path'] : $c['path'];
+ $path = ($mountPoint !== '') ? $mountPoint . '/' . $c->getPath() : $c->getPath();
if ($c['type'] === 'dir') {
- $dirList[] = $path;
+ $dirList[] = \OC\Files\Filesystem::normalizePath($path);
} else {
- $result[] = $path;
+ $result[] = \OC\Files\Filesystem::normalizePath($path);
}
}
@@ -230,7 +200,7 @@ class Util {
* @param string $path
* @return boolean
*/
- protected function isFile($path) {
+ public function isFile($path) {
if (substr($path, 0, strlen('/files/')) === '/files/') {
return true;
}
@@ -256,7 +226,7 @@ class Util {
}
/**
- * get the owner and the path for the owner
+ * get the owner and the path for the file relative to the owners files folder
*
* @param string $path
* @return array
@@ -270,55 +240,15 @@ class Util {
$uid = $parts[1];
}
if (!$this->userManager->userExists($uid)) {
- throw new \BadMethodCallException('path needs to be relative to the system wide data folder and point to a user specific file');
- }
-
- $pathinfo = pathinfo($path);
- $partfile = false;
- $parentFolder = false;
- if (array_key_exists('extension', $pathinfo) && $pathinfo['extension'] === 'part') {
- // if the real file exists we check this file
- $filePath = $pathinfo['dirname'] . '/' . $pathinfo['filename'];
- if ($this->view->file_exists($filePath)) {
- $pathToCheck = $pathinfo['dirname'] . '/' . $pathinfo['filename'];
- } else { // otherwise we look for the parent
- $pathToCheck = $pathinfo['dirname'];
- $parentFolder = true;
- }
- $partfile = true;
- } else {
- $pathToCheck = $path;
+ throw new \BadMethodCallException(
+ 'path needs to be relative to the system wide data folder and point to a user specific file'
+ );
}
- $pathToCheck = substr($pathToCheck, strlen('/' . $uid));
-
- $this->view->chroot('/' . $uid);
- $owner = $this->view->getOwner($pathToCheck);
-
- // Check that UID is valid
- if (!$this->userManager->userExists($owner)) {
- throw new \BadMethodCallException('path needs to be relative to the system wide data folder and point to a user specific file');
- }
-
- \OC\Files\Filesystem::initMountPoints($owner);
-
- $info = $this->view->getFileInfo($pathToCheck);
- $this->view->chroot('/' . $owner);
- $ownerPath = $this->view->getPath($info->getId());
- $this->view->chroot('/');
+ $ownerPath = implode('/', array_slice($parts, 2));
- if ($parentFolder) {
- $ownerPath = $ownerPath . '/'. $pathinfo['filename'];
- }
-
- if ($partfile) {
- $ownerPath = $ownerPath . '.' . $pathinfo['extension'];
- }
+ return array($uid, \OC\Files\Filesystem::normalizePath($ownerPath));
- return array(
- $owner,
- \OC\Files\Filesystem::normalizePath($ownerPath)
- );
}
/**
@@ -348,7 +278,7 @@ class Util {
}
}
- protected function getUserWithAccessToMountPoint($users, $groups) {
+ public function getUserWithAccessToMountPoint($users, $groups) {
$result = array();
if (in_array('all', $users)) {
$result = \OCP\User::getUsers();
@@ -398,9 +328,6 @@ class Util {
return true;
}
- $v1 = $this->userManager->userExists($root[1]);
- $v2 = in_array($root[2], $this->excludedPaths);
-
// detect user specific folders
if ($this->userManager->userExists($root[1])
&& in_array($root[2], $this->excludedPaths)) {
@@ -411,4 +338,16 @@ class Util {
return false;
}
+ /**
+ * check if recovery key is enabled for user
+ *
+ * @param string $uid
+ * @return boolean
+ */
+ public function recoveryEnabled($uid) {
+ $enabled = $this->config->getUserValue($uid, 'encryption', 'recovery_enabled', '0');
+
+ return ($enabled === '1') ? true : false;
+ }
+
}
diff --git a/lib/private/filechunking.php b/lib/private/filechunking.php
index e8a58b2538d..82bf61fa7b1 100644
--- a/lib/private/filechunking.php
+++ b/lib/private/filechunking.php
@@ -189,8 +189,7 @@ class OC_FileChunking {
$absolutePath = \OC\Files\Filesystem::normalizePath(\OC\Files\Filesystem::getView()->getAbsolutePath($path));
$data = '';
// use file_put_contents as method because that best matches what this function does
- if (OC_FileProxy::runPreProxies('file_put_contents', $absolutePath, $data)
- && \OC\Files\Filesystem::isValidPath($path)) {
+ if (\OC\Files\Filesystem::isValidPath($path)) {
$path = \OC\Files\Filesystem::getView()->getRelativePath($absolutePath);
$exists = \OC\Files\Filesystem::file_exists($path);
$run = true;
@@ -231,7 +230,6 @@ class OC_FileChunking {
\OC\Files\Filesystem::signal_post_write,
array( \OC\Files\Filesystem::signal_param_path => $path)
);
- OC_FileProxy::runPostProxies('file_put_contents', $absolutePath, $count);
return $count > 0;
}else{
return false;
diff --git a/lib/private/fileproxy.php b/lib/private/fileproxy.php
deleted file mode 100644
index 8b28e866ac2..00000000000
--- a/lib/private/fileproxy.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-/**
- * @author Bart Visscher <bartv@thisnet.nl>
- * @author Felix Moeller <mail@felixmoeller.de>
- * @author Jörn Friedrich Dreyer <jfd@butonic.de>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
- * @author Scrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <pvince81@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-/**
- * Class for manipulating filesystem requests
- *
- * Manipulation happens by using 2 kind of proxy operations, pre and post proxies
- * that manipulate the filesystem call and the result of the call respectively
- *
- * A pre-proxy recieves the filepath as arugments (or 2 filespaths in case of
- * operations like copy or move) and return a boolean
- * If a pre-proxy returns false the file operation will be canceled
- * All filesystem operations have a pre-proxy
- *
- * A post-proxy recieves 2 arguments, the filepath and the result of the operation.
- * The return value of the post-proxy will be used as the new result of the operation
- * The operations that have a post-proxy are:
- * file_get_contents, is_file, is_dir, file_exists, stat, is_readable,
- * is_writable, filemtime, filectime, file_get_contents,
- * getMimeType, hash, fopen, free_space and search
- */
-
-class OC_FileProxy{
- private static $proxies=array();
- public static $enabled=true;
-
- /**
- * fallback function when a proxy operation is not implemented
- * @param string $function the name of the proxy operation
- * @param mixed $arguments
- *
- * this implements a dummy proxy for all operations
- */
- public function __call($function, $arguments) {
- if(substr($function, 0, 3)=='pre') {
- return true;
- }else{
- return $arguments[1];
- }
- }
-
- /**
- * register a proxy to be used
- * @param OC_FileProxy $proxy
- */
- public static function register($proxy) {
- self::$proxies[]=$proxy;
- }
-
- /**
- * @param string $operation
- */
- public static function getProxies($operation = null) {
- if ($operation === null) {
- // return all
- return self::$proxies;
- }
- $proxies=array();
- foreach(self::$proxies as $proxy) {
- if(method_exists($proxy, $operation)) {
- $proxies[]=$proxy;
- }
- }
- return $proxies;
- }
-
- /**
- * @param string $operation
- * @param string|boolean $filepath
- */
- public static function runPreProxies($operation,&$filepath,&$filepath2=null) {
- if(!self::$enabled) {
- return true;
- }
- $operation='pre'.$operation;
- $proxies=self::getProxies($operation);
- foreach($proxies as $proxy) {
- if(!is_null($filepath2)) {
- if($proxy->$operation($filepath, $filepath2)===false) {
- return false;
- }
- }else{
- if($proxy->$operation($filepath)===false) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * @param string $operation
- * @param string|boolean $path
- *
- * @return string
- */
- public static function runPostProxies($operation, $path, $result) {
- if(!self::$enabled) {
- return $result;
- }
- $operation='post'.$operation;
- $proxies=self::getProxies($operation);
- foreach($proxies as $proxy) {
- $result=$proxy->$operation($path, $result);
- }
- return $result;
- }
-
- public static function clearProxies() {
- self::$proxies=array();
- }
-}
diff --git a/lib/private/files.php b/lib/private/files.php
index d0c1baa0c1e..97f9d8163b1 100644
--- a/lib/private/files.php
+++ b/lib/private/files.php
@@ -122,7 +122,7 @@ class OC_Files {
if ($get_type === self::FILE) {
$zip = false;
- if ($xsendfile && OC_App::isEnabled('files_encryption')) {
+ if ($xsendfile && \OC::$server->getEncryptionManager()->isEnabled()) {
$xsendfile = false;
}
} else {
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php
index 9a785d071f7..c5e118946e5 100644
--- a/lib/private/files/cache/cache.php
+++ b/lib/private/files/cache/cache.php
@@ -152,7 +152,7 @@ class Cache {
$params = array($file);
}
$sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`,
- `storage_mtime`, `encrypted`, `unencrypted_size`, `etag`, `permissions`
+ `storage_mtime`, `encrypted`, `etag`, `permissions`
FROM `*PREFIX*filecache` ' . $where;
$result = \OC_DB::executeAudited($sql, $params);
$data = $result->fetchRow();
@@ -175,7 +175,6 @@ class Cache {
$data['mtime'] = (int)$data['mtime'];
$data['storage_mtime'] = (int)$data['storage_mtime'];
$data['encrypted'] = (bool)$data['encrypted'];
- $data['unencrypted_size'] = 0 + $data['unencrypted_size'];
$data['storage'] = $this->storageId;
$data['mimetype'] = $this->getMimetype($data['mimetype']);
$data['mimepart'] = $this->getMimetype($data['mimepart']);
@@ -208,7 +207,7 @@ class Cache {
public function getFolderContentsById($fileId) {
if ($fileId > -1) {
$sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`,
- `storage_mtime`, `encrypted`, `unencrypted_size`, `etag`, `permissions`
+ `storage_mtime`, `encrypted`, `etag`, `permissions`
FROM `*PREFIX*filecache` WHERE `parent` = ? ORDER BY `name` ASC';
$result = \OC_DB::executeAudited($sql, array($fileId));
$files = $result->fetchAll();
@@ -218,10 +217,6 @@ class Cache {
if ($file['storage_mtime'] == 0) {
$file['storage_mtime'] = $file['mtime'];
}
- if ($file['encrypted'] or ($file['unencrypted_size'] > 0 and $file['mimetype'] === 'httpd/unix-directory')) {
- $file['encrypted_size'] = $file['size'];
- $file['size'] = $file['unencrypted_size'];
- }
$file['permissions'] = (int)$file['permissions'];
$file['mtime'] = (int)$file['mtime'];
$file['storage_mtime'] = (int)$file['storage_mtime'];
@@ -325,7 +320,7 @@ class Cache {
*/
function buildParts(array $data) {
$fields = array(
- 'path', 'parent', 'name', 'mimetype', 'size', 'mtime', 'storage_mtime', 'encrypted', 'unencrypted_size',
+ 'path', 'parent', 'name', 'mimetype', 'size', 'mtime', 'storage_mtime', 'encrypted',
'etag', 'permissions');
$params = array();
$queryParts = array();
@@ -521,7 +516,7 @@ class Cache {
$sql = '
SELECT `fileid`, `storage`, `path`, `parent`, `name`,
`mimetype`, `mimepart`, `size`, `mtime`, `encrypted`,
- `unencrypted_size`, `etag`, `permissions`
+ `etag`, `permissions`
FROM `*PREFIX*filecache`
WHERE `storage` = ? AND `name` ILIKE ?';
$result = \OC_DB::executeAudited($sql,
@@ -549,7 +544,7 @@ class Cache {
} else {
$where = '`mimepart` = ?';
}
- $sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `unencrypted_size`, `etag`, `permissions`
+ $sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `etag`, `permissions`
FROM `*PREFIX*filecache` WHERE ' . $where . ' AND `storage` = ?';
$mimetype = $this->getMimetypeId($mimetype);
$result = \OC_DB::executeAudited($sql, array($mimetype, $this->getNumericStorageId()));
@@ -574,7 +569,7 @@ class Cache {
public function searchByTag($tag, $userId) {
$sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, ' .
'`mimetype`, `mimepart`, `size`, `mtime`, ' .
- '`encrypted`, `unencrypted_size`, `etag`, `permissions` ' .
+ '`encrypted`, `etag`, `permissions` ' .
'FROM `*PREFIX*filecache` `file`, ' .
'`*PREFIX*vcategory_to_object` `tagmap`, ' .
'`*PREFIX*vcategory` `tag` ' .
@@ -638,17 +633,15 @@ class Cache {
}
if (isset($entry['mimetype']) && $entry['mimetype'] === 'httpd/unix-directory') {
$id = $entry['fileid'];
- $sql = 'SELECT SUM(`size`) AS f1, MIN(`size`) AS f2, ' .
- 'SUM(`unencrypted_size`) AS f3 ' .
+ $sql = 'SELECT SUM(`size`) AS f1, MIN(`size`) AS f2 ' .
'FROM `*PREFIX*filecache` ' .
'WHERE `parent` = ? AND `storage` = ?';
$result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
if ($row = $result->fetchRow()) {
$result->closeCursor();
- list($sum, $min, $unencryptedSum) = array_values($row);
+ list($sum, $min) = array_values($row);
$sum = 0 + $sum;
$min = 0 + $min;
- $unencryptedSum = 0 + $unencryptedSum;
if ($min === -1) {
$totalSize = $min;
} else {
@@ -658,15 +651,9 @@ class Cache {
if ($entry['size'] !== $totalSize) {
$update['size'] = $totalSize;
}
- if (!isset($entry['unencrypted_size']) or $entry['unencrypted_size'] !== $unencryptedSum) {
- $update['unencrypted_size'] = $unencryptedSum;
- }
if (count($update) > 0) {
$this->update($id, $update);
}
- if ($totalSize !== -1 and $unencryptedSum > 0) {
- $totalSize = $unencryptedSum;
- }
} else {
$result->closeCursor();
}
diff --git a/lib/private/files/cache/homecache.php b/lib/private/files/cache/homecache.php
index aa075d41221..1b85462d615 100644
--- a/lib/private/files/cache/homecache.php
+++ b/lib/private/files/cache/homecache.php
@@ -48,26 +48,18 @@ class HomeCache extends Cache {
}
if ($entry && $entry['mimetype'] === 'httpd/unix-directory') {
$id = $entry['fileid'];
- $sql = 'SELECT SUM(`size`) AS f1, ' .
- 'SUM(`unencrypted_size`) AS f2 FROM `*PREFIX*filecache` ' .
+ $sql = 'SELECT SUM(`size`) AS f1 ' .
+ 'FROM `*PREFIX*filecache` ' .
'WHERE `parent` = ? AND `storage` = ? AND `size` >= 0';
$result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
if ($row = $result->fetchRow()) {
$result->closeCursor();
- list($sum, $unencryptedSum) = array_values($row);
+ list($sum) = array_values($row);
$totalSize = 0 + $sum;
- $unencryptedSize = 0 + $unencryptedSum;
$entry['size'] += 0;
- if (!isset($entry['unencrypted_size'])) {
- $entry['unencrypted_size'] = 0;
- }
- $entry['unencrypted_size'] += 0;
if ($entry['size'] !== $totalSize) {
$this->update($id, array('size' => $totalSize));
}
- if ($entry['unencrypted_size'] !== $unencryptedSize) {
- $this->update($id, array('unencrypted_size' => $unencryptedSize));
- }
}
}
return $totalSize;
diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php
index 03aad56e103..82c8f3de690 100644
--- a/lib/private/files/fileinfo.php
+++ b/lib/private/files/fileinfo.php
@@ -170,13 +170,6 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
/**
* @return int
*/
- public function getUnencryptedSize() {
- return isset($this->data['unencrypted_size']) ? $this->data['unencrypted_size'] : 0;
- }
-
- /**
- * @return int
- */
public function getPermissions() {
return $this->data['permissions'];
}
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 9fef53fa95a..ed85d3c07cc 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -56,6 +56,9 @@ use OCP\Files\ReservedWordException;
* in classes which extend it, e.g. $this->stat() .
*/
abstract class Common implements Storage {
+
+ use LocalTempFileTrait;
+
protected $cache;
protected $scanner;
protected $watcher;
@@ -63,11 +66,6 @@ abstract class Common implements Storage {
protected $mountOptions = [];
- /**
- * @var string[]
- */
- protected $cachedFiles = array();
-
public function __construct($parameters) {
}
@@ -247,27 +245,6 @@ abstract class Common implements Storage {
return $this->getCachedFile($path);
}
- /**
- * @param string $path
- * @return string
- */
- protected function toTmpFile($path) { //no longer in the storage api, still useful here
- $source = $this->fopen($path, 'r');
- if (!$source) {
- return false;
- }
- if ($pos = strrpos($path, '.')) {
- $extension = substr($path, $pos);
- } else {
- $extension = '';
- }
- $tmpFile = \OC_Helper::tmpFile($extension);
- $target = fopen($tmpFile, 'w');
- \OC_Helper::streamCopy($source, $target);
- fclose($target);
- return $tmpFile;
- }
-
public function getLocalFolder($path) {
$baseDir = \OC_Helper::tmpFolder();
$this->addLocalFolder($path, $baseDir);
@@ -451,20 +428,6 @@ abstract class Common implements Storage {
}
/**
- * @param string $path
- */
- protected function getCachedFile($path) {
- if (!isset($this->cachedFiles[$path])) {
- $this->cachedFiles[$path] = $this->toTmpFile($path);
- }
- return $this->cachedFiles[$path];
- }
-
- protected function removeCachedFile($path) {
- unset($this->cachedFiles[$path]);
- }
-
- /**
* Check if the storage is an instance of $class or is a wrapper for a storage that is an instance of $class
*
* @param string $class
diff --git a/lib/private/files/storage/localtempfiletrait.php b/lib/private/files/storage/localtempfiletrait.php
new file mode 100644
index 00000000000..444e4e2e89e
--- /dev/null
+++ b/lib/private/files/storage/localtempfiletrait.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * @author Thomas Müller <thomas.mueller@tmit.eu>
+ *
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OC\Files\Storage;
+
+use OC\Files\Cache\Cache;
+use OC\Files\Cache\Scanner;
+use OC\Files\Filesystem;
+use OC\Files\Cache\Watcher;
+use OCP\Files\FileNameTooLongException;
+use OCP\Files\InvalidCharacterInPathException;
+use OCP\Files\InvalidPathException;
+use OCP\Files\ReservedWordException;
+
+/**
+ * Storage backend class for providing common filesystem operation methods
+ * which are not storage-backend specific.
+ *
+ * \OC\Files\Storage\Common is never used directly; it is extended by all other
+ * storage backends, where its methods may be overridden, and additional
+ * (backend-specific) methods are defined.
+ *
+ * Some \OC\Files\Storage\Common methods call functions which are first defined
+ * in classes which extend it, e.g. $this->stat() .
+ */
+trait LocalTempFileTrait {
+
+ /**
+ * @var string[]
+ */
+ protected $cachedFiles = array();
+
+ /**
+ * @param string $path
+ */
+ protected function getCachedFile($path) {
+ if (!isset($this->cachedFiles[$path])) {
+ $this->cachedFiles[$path] = $this->toTmpFile($path);
+ }
+ return $this->cachedFiles[$path];
+ }
+
+ protected function removeCachedFile($path) {
+ unset($this->cachedFiles[$path]);
+ }
+
+ /**
+ * @param string $path
+ * @return string
+ */
+ protected function toTmpFile($path) { //no longer in the storage api, still useful here
+ $source = $this->fopen($path, 'r');
+ if (!$source) {
+ return false;
+ }
+ if ($pos = strrpos($path, '.')) {
+ $extension = substr($path, $pos);
+ } else {
+ $extension = '';
+ }
+ $tmpFile = \OC_Helper::tmpFile($extension);
+ $target = fopen($tmpFile, 'w');
+ \OC_Helper::streamCopy($source, $target);
+ fclose($target);
+ return $tmpFile;
+ }
+}
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php
index 0e70c99c8d7..5245fe4cc45 100644
--- a/lib/private/files/storage/wrapper/encryption.php
+++ b/lib/private/files/storage/wrapper/encryption.php
@@ -24,9 +24,13 @@
namespace OC\Files\Storage\Wrapper;
use OC\Encryption\Exceptions\ModuleDoesNotExistsException;
+use OC\Files\Storage\LocalTempFileTrait;
+use OCP\Files\Mount\IMountPoint;
class Encryption extends Wrapper {
+ use LocalTempFileTrait;
+
/** @var string */
private $mountPoint;
@@ -45,11 +49,18 @@ class Encryption extends Wrapper {
/** @var array */
private $unencryptedSize;
+ /** @var \OC\Encryption\File */
+ private $fileHelper;
+
+ /** @var IMountPoint */
+ private $mount;
+
/**
* @param array $parameters
* @param \OC\Encryption\Manager $encryptionManager
* @param \OC\Encryption\Util $util
* @param \OC\Log $logger
+ * @param \OC\Encryption\File $fileHelper
* @param string $uid user who perform the read/write operation (null for public access)
*/
public function __construct(
@@ -57,14 +68,17 @@ class Encryption extends Wrapper {
\OC\Encryption\Manager $encryptionManager = null,
\OC\Encryption\Util $util = null,
\OC\Log $logger = null,
+ \OC\Encryption\File $fileHelper = null,
$uid = null
) {
$this->mountPoint = $parameters['mountPoint'];
+ $this->mount = $parameters['mount'];
$this->encryptionManager = $encryptionManager;
$this->util = $util;
$this->logger = $logger;
$this->uid = $uid;
+ $this->fileHelper = $fileHelper;
$this->unencryptedSize = array();
parent::__construct($parameters);
}
@@ -77,27 +91,18 @@ class Encryption extends Wrapper {
* @return int
*/
public function filesize($path) {
- $size = 0;
$fullPath = $this->getFullPath($path);
-
- $encryptedSize = $this->storage->filesize($path);
+ $size = $this->storage->filesize($path);
$info = $this->getCache()->get($path);
- if($encryptedSize > 0 && $info['encrypted']) {
- $size = $info['unencrypted_size'];
- if ($size <= 0) {
- $encryptionModule = $this->getEncryptionModule($path);
- if ($encryptionModule) {
- $size = $encryptionModule->calculateUnencryptedSize($fullPath);
- $this->getCache()->update($info['fileid'], array('unencrypted_size' => $size));
- }
- }
- } else if (isset($this->unencryptedSize[$fullPath]) && isset($info['fileid'])) {
+ if (isset($this->unencryptedSize[$fullPath])) {
$size = $this->unencryptedSize[$fullPath];
+ }
+
+ if (isset($info['fileid'])) {
$info['encrypted'] = true;
- $info['unencrypted_size'] = $size;
- $info['size'] = $encryptedSize;
+ $info['size'] = $size;
$this->getCache()->put($path, $info);
}
@@ -112,23 +117,18 @@ class Encryption extends Wrapper {
*/
public function file_get_contents($path) {
- $data = null;
$encryptionModule = $this->getEncryptionModule($path);
if ($encryptionModule) {
-
- $handle = $this->fopen($path, 'r');
-
- if (is_resource($handle)) {
- while (!feof($handle)) {
- $data .= fread($handle, $this->util->getBlockSize());
- }
+ $handle = $this->fopen($path, "r");
+ if (!$handle) {
+ return false;
}
- } else {
- $data = $this->storage->file_get_contents($path);
+ $data = stream_get_contents($handle);
+ fclose($handle);
+ return $data;
}
-
- return $data;
+ return $this->storage->file_get_contents($path);
}
/**
@@ -141,8 +141,9 @@ class Encryption extends Wrapper {
public function file_put_contents($path, $data) {
// file put content will always be translated to a stream write
$handle = $this->fopen($path, 'w');
- fwrite($handle, $data);
- return fclose($handle);
+ $written = fwrite($handle, $data);
+ fclose($handle);
+ return $written;
}
/**
@@ -158,8 +159,8 @@ class Encryption extends Wrapper {
$encryptionModule = $this->getEncryptionModule($path);
if ($encryptionModule) {
- $keyStorage = \OC::$server->getEncryptionKeyStorage($encryptionModule->getId());
- $keyStorage->deleteAllFileKeys($this->getFullPath($path));
+ $keyStorage = $this->getKeyStorage($encryptionModule->getId());
+ $keyStorage->deleteAllFileKeys($this->getFullPath($path));
}
return $this->storage->unlink($path);
@@ -177,17 +178,14 @@ class Encryption extends Wrapper {
return $this->storage->rename($path1, $path2);
}
- $fullPath1 = $this->getFullPath($path1);
- list($owner, $source) = $this->util->getUidAndFilename($fullPath1);
+ $source = $this->getFullPath($path1);
$result = $this->storage->rename($path1, $path2);
if ($result) {
- $fullPath2 = $this->getFullPath($path2);
- $systemWide = $this->util->isSystemWideMountPoint($this->mountPoint);
- list(, $target) = $this->util->getUidAndFilename($fullPath2);
+ $target = $this->getFullPath($path2);
$encryptionModule = $this->getEncryptionModule($path2);
if ($encryptionModule) {
- $keyStorage = \OC::$server->getEncryptionKeyStorage($encryptionModule->getId());
- $keyStorage->renameKeys($source, $target, $owner, $systemWide);
+ $keyStorage = $this->getKeyStorage($encryptionModule->getId());
+ $keyStorage->renameKeys($source, $target);
}
}
@@ -202,9 +200,22 @@ class Encryption extends Wrapper {
* @return bool
*/
public function copy($path1, $path2) {
- // todo copy encryption keys, get users with access to the file and reencrypt
- // or is this to encryption module specific? Then we can hand this over
- return $this->storage->copy($path1, $path2);
+ if ($this->util->isExcluded($path1)) {
+ return $this->storage->rename($path1, $path2);
+ }
+
+ $source = $this->getFullPath($path1);
+ $result = $this->storage->copy($path1, $path2);
+ if ($result) {
+ $target = $this->getFullPath($path2);
+ $encryptionModule = $this->getEncryptionModule($path2);
+ if ($encryptionModule) {
+ $keyStorage = $this->getKeyStorage($encryptionModule->getId());
+ $keyStorage->copyKeys($source, $target);
+ }
+ }
+
+ return $result;
}
/**
@@ -223,7 +234,17 @@ class Encryption extends Wrapper {
$encryptionModuleId = $this->util->getEncryptionModuleId($header);
$size = $unencryptedSize = 0;
- if ($this->file_exists($path)) {
+ $targetExists = $this->file_exists($path);
+ $targetIsEncrypted = false;
+ if ($targetExists) {
+ // in case the file exists we require the explicit module as
+ // specified in the file header - otherwise we need to fail hard to
+ // prevent data loss on client side
+ if (!empty($encryptionModuleId)) {
+ $targetIsEncrypted = true;
+ $encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId);
+ }
+
$size = $this->storage->filesize($path);
$unencryptedSize = $this->filesize($path);
}
@@ -254,10 +275,18 @@ class Encryption extends Wrapper {
'" not found, file will be stored unencrypted');
}
+ // encryption disabled on write of new file and write to existing unencrypted file -> don't encrypt
+ $encEnabled = $this->encryptionManager->isEnabled();
+ if (!$encEnabled || !$this->mount->getOption('encrypt', true)) {
+ if (!$targetExists || !$targetIsEncrypted) {
+ $shouldEncrypt = false;
+ }
+ }
+
if($shouldEncrypt === true && !$this->util->isExcluded($fullPath) && $encryptionModule !== null) {
$source = $this->storage->fopen($path, $mode);
$handle = \OC\Files\Stream\Encryption::wrap($source, $path, $fullPath, $header,
- $this->uid, $encryptionModule, $this->storage, $this, $this->util, $mode,
+ $this->uid, $encryptionModule, $this->storage, $this, $this->util, $this->fileHelper, $mode,
$size, $unencryptedSize);
return $handle;
} else {
@@ -266,6 +295,57 @@ class Encryption extends Wrapper {
}
/**
+ * get the path to a local version of the file.
+ * The local version of the file can be temporary and doesn't have to be persistent across requests
+ *
+ * @param string $path
+ * @return string
+ */
+ public function getLocalFile($path) {
+ return $this->getCachedFile($path);
+ }
+
+ /**
+ * Returns the wrapped storage's value for isLocal()
+ *
+ * @return bool wrapped storage's isLocal() value
+ */
+ public function isLocal() {
+ return false;
+ }
+
+ /**
+ * see http://php.net/manual/en/function.stat.php
+ * only the following keys are required in the result: size and mtime
+ *
+ * @param string $path
+ * @return array
+ */
+ public function stat($path) {
+ $stat = $this->storage->stat($path);
+ $fileSize = $this->filesize($path);
+ $stat['size'] = $fileSize;
+ $stat[7] = $fileSize;
+ return $stat;
+ }
+
+ /**
+ * see http://php.net/manual/en/function.hash.php
+ *
+ * @param string $type
+ * @param string $path
+ * @param bool $raw
+ * @return string
+ */
+ public function hash($type, $path, $raw = false) {
+ $fh = $this->fopen($path, 'rb');
+ $ctx = hash_init($type);
+ hash_update_stream($ctx, $fh);
+ fclose($fh);
+ return hash_final($ctx, $raw);
+ }
+
+ /**
* return full path, including mount point
*
* @param string $path relative to mount point
@@ -295,7 +375,9 @@ class Encryption extends Wrapper {
* read encryption module needed to read/write the file located at $path
*
* @param string $path
- * @return \OCP\Encryption\IEncryptionModule|null
+ * @return null|\OCP\Encryption\IEncryptionModule
+ * @throws ModuleDoesNotExistsException
+ * @throws \Exception
*/
protected function getEncryptionModule($path) {
$encryptionModule = null;
@@ -305,7 +387,7 @@ class Encryption extends Wrapper {
try {
$encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId);
} catch (ModuleDoesNotExistsException $e) {
- $this->logger->critical('Encryption module defined in "' . $path . '" mot loaded!');
+ $this->logger->critical('Encryption module defined in "' . $path . '" not loaded!');
throw $e;
}
}
@@ -316,4 +398,13 @@ class Encryption extends Wrapper {
$this->unencryptedSize[$path] = $unencryptedSize;
}
+ /**
+ * @param string $encryptionModuleId
+ * @return \OCP\Encryption\Keys\IStorage
+ */
+ protected function getKeyStorage($encryptionModuleId) {
+ $keyStorage = \OC::$server->getEncryptionKeyStorage($encryptionModuleId);
+ return $keyStorage;
+ }
+
}
diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php
index 34bd2589947..3c0fda98dad 100644
--- a/lib/private/files/storage/wrapper/quota.php
+++ b/lib/private/files/storage/wrapper/quota.php
@@ -60,11 +60,6 @@ class Quota extends Wrapper {
$cache = $this->getCache();
$data = $cache->get($path);
if (is_array($data) and isset($data['size'])) {
- if (isset($data['unencrypted_size'])
- && $data['unencrypted_size'] > 0
- ) {
- return $data['unencrypted_size'];
- }
return $data['size'];
} else {
return \OCP\Files\FileInfo::SPACE_NOT_COMPUTED;
diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
index ddef9067bad..b4e06c99943 100644
--- a/lib/private/files/stream/encryption.php
+++ b/lib/private/files/stream/encryption.php
@@ -31,6 +31,9 @@ class Encryption extends Wrapper {
/** @var \OC\Encryption\Util */
protected $util;
+ /** @var \OC\Encryption\File */
+ protected $file;
+
/** @var \OCP\Encryption\IEncryptionModule */
protected $encryptionModule;
@@ -43,6 +46,9 @@ class Encryption extends Wrapper {
/** @var string */
protected $internalPath;
+ /** @var string */
+ protected $cache;
+
/** @var integer */
protected $size;
@@ -72,13 +78,16 @@ class Encryption extends Wrapper {
/**
* user who perform the read/write operation null for public access
*
- * @var string
+ * @var string
*/
protected $uid;
/** @var bool */
protected $readOnly;
+ /** @var bool */
+ protected $writeFlag;
+
/** @var array */
protected $expectedContextProperties;
@@ -91,6 +100,7 @@ class Encryption extends Wrapper {
'encryptionModule',
'header',
'uid',
+ 'file',
'util',
'size',
'unencryptedSize',
@@ -106,11 +116,12 @@ class Encryption extends Wrapper {
* @param string $internalPath relative to mount point
* @param string $fullPath relative to data/
* @param array $header
- * @param sting $uid
+ * @param string $uid
* @param \OCP\Encryption\IEncryptionModule $encryptionModule
* @param \OC\Files\Storage\Storage $storage
- * @param OC\Files\Storage\Wrapper\Encryption $encStorage
+ * @param \OC\Files\Storage\Wrapper\Encryption $encStorage
* @param \OC\Encryption\Util $util
+ * @param \OC\Encryption\File $file
* @param string $mode
* @param int $size
* @param int $unencryptedSize
@@ -119,9 +130,15 @@ class Encryption extends Wrapper {
* @throws \BadMethodCallException
*/
public static function wrap($source, $internalPath, $fullPath, array $header,
- $uid, \OCP\Encryption\IEncryptionModule $encryptionModule,
- \OC\Files\Storage\Storage $storage, \OC\Files\Storage\Wrapper\Encryption $encStorage,
- \OC\Encryption\Util $util, $mode, $size, $unencryptedSize) {
+ $uid,
+ \OCP\Encryption\IEncryptionModule $encryptionModule,
+ \OC\Files\Storage\Storage $storage,
+ \OC\Files\Storage\Wrapper\Encryption $encStorage,
+ \OC\Encryption\Util $util,
+ \OC\Encryption\File $file,
+ $mode,
+ $size,
+ $unencryptedSize) {
$context = stream_context_create(array(
'ocencryption' => array(
@@ -133,6 +150,7 @@ class Encryption extends Wrapper {
'header' => $header,
'uid' => $uid,
'util' => $util,
+ 'file' => $file,
'size' => $size,
'unencryptedSize' => $unencryptedSize,
'encryptionStorage' => $encStorage
@@ -180,7 +198,7 @@ class Encryption extends Wrapper {
$context = parent::loadContext($name);
foreach ($this->expectedContextProperties as $property) {
- if (isset($context[$property])) {
+ if (array_key_exists($property, $context)) {
$this->{$property} = $context[$property];
} else {
throw new \BadMethodCallException('Invalid context, "' . $property . '" options not set');
@@ -194,6 +212,8 @@ class Encryption extends Wrapper {
$this->loadContext('ocencryption');
$this->position = 0;
+ $this->cache = '';
+ $this->writeFlag = false;
$this->unencryptedBlockSize = $this->encryptionModule->getUnencryptedBlockSize();
if (
@@ -216,7 +236,7 @@ class Encryption extends Wrapper {
$sharePath = dirname($path);
}
- $accessList = $this->util->getSharingUsersArray($sharePath);
+ $accessList = $this->file->getAccessList($sharePath);
$this->newHeader = $this->encryptionModule->begin($this->fullPath, $this->uid, $this->header, $accessList);
return true;
@@ -228,25 +248,26 @@ class Encryption extends Wrapper {
$result = '';
// skip the header if we read the file from the beginning
- if ($this->position === 0 && !empty($this->header)) {
- parent::stream_read($this->util->getBlockSize());
+ if ($this->position === 0) {
+ parent::stream_read($this->util->getHeaderSize());
}
+// $count = min($count, $this->unencryptedSize - $this->position);
while ($count > 0) {
$remainingLength = $count;
// update the cache of the current block
- $data = parent::stream_read($this->util->getBlockSize());
- $decrypted = $this->encryptionModule->decrypt($data);
+ $this->readCache();
// determine the relative position in the current block
$blockPosition = ($this->position % $this->unencryptedBlockSize);
// if entire read inside current block then only position needs to be updated
if ($remainingLength < ($this->unencryptedBlockSize - $blockPosition)) {
- $result .= substr($decrypted, $blockPosition, $remainingLength);
+ $result .= substr($this->cache, $blockPosition, $remainingLength);
$this->position += $remainingLength;
$count = 0;
- // otherwise remainder of current block is fetched, the block is flushed and the position updated
+ // otherwise remainder of current block is fetched, the block is flushed and the position updated
} else {
- $result .= substr($decrypted, $blockPosition);
+ $result .= substr($this->cache, $blockPosition);
+ $this->flush();
$this->position += ($this->unencryptedBlockSize - $blockPosition);
$count -= ($this->unencryptedBlockSize - $blockPosition);
}
@@ -259,6 +280,7 @@ class Encryption extends Wrapper {
if ($this->position === 0) {
$this->writeHeader();
+ $this->size+=$this->util->getHeaderSize();
}
$length = 0;
@@ -266,9 +288,8 @@ class Encryption extends Wrapper {
while (strlen($data) > 0) {
$remainingLength = strlen($data);
- // read current block
- $currentBlock = parent::stream_read($this->util->getBlockSize());
- $decrypted = $this->encryptionModule->decrypt($currentBlock, $this->uid);
+ // set the cache to the current 6126 block
+ $this->readCache();
// for seekable streams the pointer is moved back to the beginning of the encrypted block
// flush will start writing there when the position moves to another block
@@ -277,7 +298,10 @@ class Encryption extends Wrapper {
$resultFseek = parent::stream_seek($positionInFile);
// only allow writes on seekable streams, or at the end of the encrypted stream
- if ($resultFseek || $positionInFile === $this->size) {
+ if (!($this->readOnly) && ($resultFseek || $positionInFile === $this->size)) {
+
+ // switch the writeFlag so flush() will write the block
+ $this->writeFlag = true;
// determine the relative position in the current block
$blockPosition = ($this->position % $this->unencryptedBlockSize);
@@ -285,28 +309,22 @@ class Encryption extends Wrapper {
// if so, overwrite existing data (if any)
// update position and liberate $data
if ($remainingLength < ($this->unencryptedBlockSize - $blockPosition)) {
- $decrypted = substr($decrypted, 0, $blockPosition)
- . $data . substr($decrypted, $blockPosition + $remainingLength);
- $encrypted = $this->encryptionModule->encrypt($decrypted);
- parent::stream_write($encrypted);
+ $this->cache = substr($this->cache, 0, $blockPosition)
+ . $data . substr($this->cache, $blockPosition + $remainingLength);
$this->position += $remainingLength;
$length += $remainingLength;
$data = '';
- // if $data doens't fit the current block, the fill the current block and reiterate
- // after the block is filled, it is flushed and $data is updatedxxx
+ // if $data doesn't fit the current block, the fill the current block and reiterate
+ // after the block is filled, it is flushed and $data is updatedxxx
} else {
- $decrypted = substr($decrypted, 0, $blockPosition) .
+ $this->cache = substr($this->cache, 0, $blockPosition) .
substr($data, 0, $this->unencryptedBlockSize - $blockPosition);
- $encrypted = $this->encryptionModule->encrypt($decrypted);
- parent::stream_write($encrypted);
+ $this->flush();
$this->position += ($this->unencryptedBlockSize - $blockPosition);
- $this->size = max($this->size, $this->stream_tell());
$length += ($this->unencryptedBlockSize - $blockPosition);
$data = substr($data, $this->unencryptedBlockSize - $blockPosition);
}
} else {
- $encrypted = $this->encryptionModule->encrypt($data);
- parent::stream_write($encrypted);
$data = '';
}
}
@@ -345,7 +363,11 @@ class Encryption extends Wrapper {
$newFilePosition = floor($newPosition / $this->unencryptedBlockSize)
* $this->util->getBlockSize() + $this->util->getHeaderSize();
+ $oldFilePosition = parent::stream_tell();
if (parent::stream_seek($newFilePosition)) {
+ parent::stream_seek($oldFilePosition);
+ $this->flush();
+ parent::stream_seek($newFilePosition);
$this->position = $newPosition;
$return = true;
}
@@ -355,13 +377,6 @@ class Encryption extends Wrapper {
public function stream_close() {
$this->flush();
- return parent::stream_close();
- }
-
- /**
- * tell encryption module that we are done and write remaining data to the file
- */
- protected function flush() {
$remainingData = $this->encryptionModule->end($this->fullPath);
if ($this->readOnly === false) {
if(!empty($remainingData)) {
@@ -369,17 +384,50 @@ class Encryption extends Wrapper {
}
$this->encryptionStorage->updateUnencryptedSize($this->fullPath, $this->unencryptedSize);
}
+ return parent::stream_close();
}
+ /**
+ * write block to file
+ */
+ protected function flush() {
+ // write to disk only when writeFlag was set to 1
+ if ($this->writeFlag) {
+ // Disable the file proxies so that encryption is not
+ // automatically attempted when the file is written to disk -
+ // we are handling that separately here and we don't want to
+ // get into an infinite loop
+ $encrypted = $this->encryptionModule->encrypt($this->cache);
+ parent::stream_write($encrypted);
+ $this->writeFlag = false;
+ $this->size = max($this->size, parent::stream_tell());
+ }
+ // always empty the cache (otherwise readCache() will not fill it with the new block)
+ $this->cache = '';
+ }
+
+ /**
+ * read block to file
+ */
+ protected function readCache() {
+ // cache should always be empty string when this function is called
+ // don't try to fill the cache when trying to write at the end of the unencrypted file when it coincides with new block
+ if ($this->cache === '' && !($this->position === $this->unencryptedSize && ($this->position % $this->unencryptedBlockSize) === 0)) {
+ // Get the data from the file handle
+ $data = parent::stream_read($this->util->getBlockSize());
+ $this->cache = $this->encryptionModule->decrypt($data);
+ }
+ }
/**
* write header at beginning of encrypted file
*
+ * @return integer
* @throws EncryptionHeaderKeyExistsException if header key is already in use
*/
private function writeHeader() {
$header = $this->util->createHeader($this->newHeader, $this->encryptionModule);
- parent::stream_write($header);
+ return parent::stream_write($header);
}
}
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index f8ec4a0eb43..0f371bbc5ea 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -515,8 +515,7 @@ class View {
public function file_put_contents($path, $data) {
if (is_resource($data)) { //not having to deal with streams in file_put_contents makes life easier
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
- if (\OC_FileProxy::runPreProxies('file_put_contents', $absolutePath, $data)
- and Filesystem::isValidPath($path)
+ if (Filesystem::isValidPath($path)
and !Filesystem::isFileBlacklisted($path)
) {
$path = $this->getRelativePath($absolutePath);
@@ -537,7 +536,6 @@ class View {
if ($this->shouldEmitHooks($path) && $result !== false) {
$this->emit_file_hooks_post($exists, $path);
}
- \OC_FileProxy::runPostProxies('file_put_contents', $absolutePath, $count);
return $result;
} else {
return false;
@@ -591,8 +589,7 @@ class View {
$absolutePath1 = Filesystem::normalizePath($this->getAbsolutePath($path1));
$absolutePath2 = Filesystem::normalizePath($this->getAbsolutePath($path2));
if (
- \OC_FileProxy::runPreProxies('rename', $absolutePath1, $absolutePath2)
- and Filesystem::isValidPath($path2)
+ Filesystem::isValidPath($path2)
and Filesystem::isValidPath($path1)
and !Filesystem::isFileBlacklisted($path2)
) {
@@ -635,14 +632,12 @@ class View {
$sourceMountPoint = $mount->getMountPoint();
$result = $mount->moveMount($absolutePath2);
$manager->moveMount($sourceMountPoint, $mount->getMountPoint());
- \OC_FileProxy::runPostProxies('rename', $absolutePath1, $absolutePath2);
} else {
$result = false;
}
} elseif ($mp1 == $mp2) {
if ($storage1) {
$result = $storage1->rename($internalPath1, $internalPath2);
- \OC_FileProxy::runPostProxies('rename', $absolutePath1, $absolutePath2);
} else {
$result = false;
}
@@ -718,8 +713,7 @@ class View {
$absolutePath1 = Filesystem::normalizePath($this->getAbsolutePath($path1));
$absolutePath2 = Filesystem::normalizePath($this->getAbsolutePath($path2));
if (
- \OC_FileProxy::runPreProxies('copy', $absolutePath1, $absolutePath2)
- and Filesystem::isValidPath($path2)
+ Filesystem::isValidPath($path2)
and Filesystem::isValidPath($path1)
and !Filesystem::isFileBlacklisted($path2)
) {
@@ -927,7 +921,7 @@ class View {
public function hash($type, $path, $raw = false) {
$postFix = (substr($path, -1, 1) === '/') ? '/' : '';
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
- if (\OC_FileProxy::runPreProxies('hash', $absolutePath) && Filesystem::isValidPath($path)) {
+ if (Filesystem::isValidPath($path)) {
$path = $this->getRelativePath($absolutePath);
if ($path == null) {
return false;
@@ -942,7 +936,6 @@ class View {
list($storage, $internalPath) = Filesystem::resolvePath($absolutePath . $postFix);
if ($storage) {
$result = $storage->hash($type, $internalPath, $raw);
- $result = \OC_FileProxy::runPostProxies('hash', $absolutePath, $result);
return $result;
}
}
@@ -975,8 +968,7 @@ class View {
private function basicOperation($operation, $path, $hooks = array(), $extraParam = null) {
$postFix = (substr($path, -1, 1) === '/') ? '/' : '';
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
- if (\OC_FileProxy::runPreProxies($operation, $absolutePath, $extraParam)
- and Filesystem::isValidPath($path)
+ if (Filesystem::isValidPath($path)
and !Filesystem::isFileBlacklisted($path)
) {
$path = $this->getRelativePath($absolutePath);
@@ -993,8 +985,6 @@ class View {
$result = $storage->$operation($internalPath);
}
- $result = \OC_FileProxy::runPostProxies($operation, $this->getAbsolutePath($path), $result);
-
if (in_array('delete', $hooks) and $result) {
$this->updater->remove($path);
}
@@ -1168,8 +1158,6 @@ class View {
$data['permissions'] |= \OCP\Constants::PERMISSION_DELETE;
}
- $data = \OC_FileProxy::runPostProxies('getFileInfo', $path, $data);
-
return new FileInfo($path, $storage, $internalPath, $data, $mount);
}
diff --git a/lib/private/hook.php b/lib/private/hook.php
index d2a0fa898dd..c4ea1999b09 100644
--- a/lib/private/hook.php
+++ b/lib/private/hook.php
@@ -32,38 +32,39 @@ class OC_Hook{
/**
* connects a function to a hook
- * @param string $signalclass class name of emitter
- * @param string $signalname name of signal
- * @param string $slotclass class name of slot
- * @param string $slotname name of slot
+ *
+ * @param string $signalClass class name of emitter
+ * @param string $signalName name of signal
+ * @param string|object $slotClass class name of slot
+ * @param string $slotName name of slot
* @return bool
*
* This function makes it very easy to connect to use hooks.
*
* TODO: write example
*/
- static public function connect( $signalclass, $signalname, $slotclass, $slotname ) {
+ static public function connect($signalClass, $signalName, $slotClass, $slotName ) {
// If we're trying to connect to an emitting class that isn't
// yet registered, register it
- if( !array_key_exists( $signalclass, self::$registered )) {
- self::$registered[$signalclass] = array();
+ if( !array_key_exists($signalClass, self::$registered )) {
+ self::$registered[$signalClass] = array();
}
// If we're trying to connect to an emitting method that isn't
// yet registered, register it with the emitting class
- if( !array_key_exists( $signalname, self::$registered[$signalclass] )) {
- self::$registered[$signalclass][$signalname] = array();
+ if( !array_key_exists( $signalName, self::$registered[$signalClass] )) {
+ self::$registered[$signalClass][$signalName] = array();
}
// dont connect hooks twice
- foreach (self::$registered[$signalclass][$signalname] as $hook) {
- if ($hook['class'] === $slotclass and $hook['name'] === $slotname) {
+ foreach (self::$registered[$signalClass][$signalName] as $hook) {
+ if ($hook['class'] === $slotClass and $hook['name'] === $slotName) {
return false;
}
}
// Connect the hook handler to the requested emitter
- self::$registered[$signalclass][$signalname][] = array(
- "class" => $slotclass,
- "name" => $slotname
+ self::$registered[$signalClass][$signalName][] = array(
+ "class" => $slotClass,
+ "name" => $slotName
);
// No chance for failure ;-)
@@ -72,8 +73,9 @@ class OC_Hook{
/**
* emits a signal
- * @param string $signalclass class name of emitter
- * @param string $signalname name of signal
+ *
+ * @param string $signalClass class name of emitter
+ * @param string $signalName name of signal
* @param mixed $params default: array() array with additional data
* @return bool true if slots exists or false if not
*
@@ -81,28 +83,36 @@ class OC_Hook{
*
* TODO: write example
*/
- static public function emit( $signalclass, $signalname, $params = array()) {
+ static public function emit($signalClass, $signalName, $params = array()) {
// Return false if no hook handlers are listening to this
// emitting class
- if( !array_key_exists( $signalclass, self::$registered )) {
+ if( !array_key_exists($signalClass, self::$registered )) {
return false;
}
// Return false if no hook handlers are listening to this
// emitting method
- if( !array_key_exists( $signalname, self::$registered[$signalclass] )) {
+ if( !array_key_exists( $signalName, self::$registered[$signalClass] )) {
return false;
}
// Call all slots
- foreach( self::$registered[$signalclass][$signalname] as $i ) {
+ foreach( self::$registered[$signalClass][$signalName] as $i ) {
try {
call_user_func( array( $i["class"], $i["name"] ), $params );
} catch (Exception $e){
self::$thrownExceptions[] = $e;
+ $class = $i["class"];
+ if (is_object($i["class"])) {
+ $class = get_class($i["class"]);
+ }
+ $message = $e->getMessage();
+ if (empty($message)) {
+ $message = get_class($e);
+ }
OC_Log::write('hook',
- 'error while running hook (' . $i["class"] . '::' . $i["name"] . '): '.$e->getMessage(),
+ 'error while running hook (' . $class . '::' . $i["name"] . '): ' . $message,
OC_Log::ERROR);
}
}
diff --git a/lib/private/server.php b/lib/private/server.php
index 8c5169f229e..661aaf6786d 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -87,6 +87,11 @@ class Server extends SimpleContainer implements IServerContainer {
return new Encryption\Manager($c->getConfig());
});
+ $this->registerService('EncryptionFileHelper', function (Server $c) {
+ $util = new \OC\Encryption\Util(new \OC\Files\View(), $c->getUserManager(), $c->getConfig());
+ return new Encryption\File($util);
+ });
+
$this->registerService('EncryptionKeyStorageFactory', function ($c) {
return new Encryption\Keys\Factory();
});
@@ -408,13 +413,20 @@ class Server extends SimpleContainer implements IServerContainer {
}
/**
+ * @return \OC\Encryption\File
+ */
+ function getEncryptionFilesHelper() {
+ return $this->query('EncryptionFileHelper');
+ }
+
+ /**
* @param string $encryptionModuleId encryption module ID
*
* @return \OCP\Encryption\Keys\IStorage
*/
function getEncryptionKeyStorage($encryptionModuleId) {
$view = new \OC\Files\View();
- $util = new \OC\Encryption\Util($view, \OC::$server->getUserManager());
+ $util = new \OC\Encryption\Util($view, \OC::$server->getUserManager(), \OC::$server->getConfig());
return $this->query('EncryptionKeyStorageFactory')->get($encryptionModuleId, $view, $util);
}
@@ -496,19 +508,7 @@ class Server extends SimpleContainer implements IServerContainer {
$dir = '/files';
if (!$folder->nodeExists($dir)) {
$folder = $folder->newFolder($dir);
-
- if (\OCP\App::isEnabled('files_encryption')) {
- // disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
- }
-
\OC_Util::copySkeleton($user, $folder);
-
- if (\OCP\App::isEnabled('files_encryption')) {
- // re-enable proxy - our work is done
- \OC_FileProxy::$enabled = $proxyStatus;
- }
} else {
$folder = $folder->get($dir);
}
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 90f3f28f2ee..98c612d5eb6 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -2214,7 +2214,7 @@ class Share extends \OC\Share\Constants {
$select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `*PREFIX*share`.`parent`, `uid_owner`, '
. '`share_type`, `share_with`, `file_source`, `path`, `file_target`, `stime`, '
. '`*PREFIX*share`.`permissions`, `expiration`, `storage`, `*PREFIX*filecache`.`parent` as `file_parent`, '
- . '`name`, `mtime`, `mimetype`, `mimepart`, `size`, `unencrypted_size`, `encrypted`, `etag`, `mail_send`';
+ . '`name`, `mtime`, `mimetype`, `mimepart`, `size`, `encrypted`, `etag`, `mail_send`';
} else {
$select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `item_target`,'
. '`*PREFIX*share`.`parent`, `share_type`, `share_with`, `uid_owner`,'
diff --git a/lib/private/util.php b/lib/private/util.php
index e6dd307faea..3fd0f844684 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -812,51 +812,6 @@ class OC_Util {
return $errors;
}
-
- /**
- * check if there are still some encrypted files stored
- *
- * @return boolean
- */
- public static function encryptedFiles() {
- //check if encryption was enabled in the past
- $encryptedFiles = false;
- if (OC_App::isEnabled('files_encryption') === false) {
- $view = new OC\Files\View('/' . OCP\User::getUser());
- $keysPath = '/files_encryption/keys';
- if ($view->is_dir($keysPath)) {
- $dircontent = $view->getDirectoryContent($keysPath);
- if (!empty($dircontent)) {
- $encryptedFiles = true;
- }
- }
- }
-
- return $encryptedFiles;
- }
-
- /**
- * check if a backup from the encryption keys exists
- *
- * @return boolean
- */
- public static function backupKeysExists() {
- //check if encryption was enabled in the past
- $backupExists = false;
- if (OC_App::isEnabled('files_encryption') === false) {
- $view = new OC\Files\View('/' . OCP\User::getUser());
- $backupPath = '/files_encryption/backup.decryptAll';
- if ($view->is_dir($backupPath)) {
- $dircontent = $view->getDirectoryContent($backupPath);
- if (!empty($dircontent)) {
- $backupExists = true;
- }
- }
- }
-
- return $backupExists;
- }
-
/**
* Check for correct file permissions of data directory
*
diff --git a/lib/public/encryption/exceptions/genericencryptionexception.php b/lib/public/encryption/exceptions/genericencryptionexception.php
new file mode 100644
index 00000000000..b7addd3b0c1
--- /dev/null
+++ b/lib/public/encryption/exceptions/genericencryptionexception.php
@@ -0,0 +1,34 @@
+<?php
+ /**
+ * @author Clark Tomlinson <clark@owncloud.com>
+ * @since 2/25/15, 9:30 AM
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCP\Encryption\Exceptions;
+
+
+class GenericEncryptionException extends \Exception {
+
+ public function __construct($message = "", $code = 0, \Exception $previous = null) {
+ if (empty($message)) {
+ $message = 'Unspecified encryption exception';
+ }
+ parent::__construct($message, $code, $previous);
+ }
+
+}
diff --git a/lib/public/encryption/ifile.php b/lib/public/encryption/ifile.php
new file mode 100644
index 00000000000..464f41509d2
--- /dev/null
+++ b/lib/public/encryption/ifile.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * ownCloud
+ *
+ * @copyright (C) 2015 ownCloud, Inc.
+ *
+ * @author Bjoern Schiessle <schiessle@owncloud.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace OCP\Encryption;
+
+interface IFile {
+
+ /**
+ * get list of users with access to the file
+ *
+ * @param string $path to the file
+ * @return array
+ */
+ public function getAccessList($path);
+
+}
diff --git a/lib/public/encryption/imanager.php b/lib/public/encryption/imanager.php
index 9a12e401593..2691604ac37 100644
--- a/lib/public/encryption/imanager.php
+++ b/lib/public/encryption/imanager.php
@@ -22,9 +22,7 @@
*/
namespace OCP\Encryption;
-//
-// TODO: move exceptions to OCP
-//
+
use OC\Encryption\Exceptions\ModuleDoesNotExistsException;
use OC\Encryption\Exceptions\ModuleAlreadyExistsException;
diff --git a/lib/public/encryption/keys/istorage.php b/lib/public/encryption/keys/istorage.php
index 4c2b01f4ad0..2d1672face5 100644
--- a/lib/public/encryption/keys/istorage.php
+++ b/lib/public/encryption/keys/istorage.php
@@ -122,4 +122,20 @@ interface IStorage {
*/
public function deleteSystemUserKey($keyId);
+ /**
+ * copy keys if a file was renamed
+ *
+ * @param string $source
+ * @param string $target
+ */
+ public function renameKeys($source, $target);
+
+ /**
+ * move keys if a file was renamed
+ *
+ * @param string $source
+ * @param string $target
+ */
+ public function copyKeys($source, $target);
+
}
diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php
index d7df884adf8..509e5894d47 100644
--- a/lib/public/iservercontainer.php
+++ b/lib/public/iservercontainer.php
@@ -150,13 +150,19 @@ interface IServerContainer {
function getHasher();
/**
+ * Returns a SecureRandom instance
+ *
+ * @return \OCP\Security\ISecureRandom
+ */
+ function getSecureRandom();
+
+ /**
* Returns an instance of the db facade
* @deprecated use getDatabaseConnection, will be removed in ownCloud 10
* @return \OCP\IDb
*/
function getDb();
-
/**
* Returns the app config manager
*
@@ -173,6 +179,23 @@ interface IServerContainer {
function getL10N($app, $lang = null);
/**
+ * @return \OC\Encryption\Manager
+ */
+ function getEncryptionManager();
+
+ /**
+ * @return \OC\Encryption\File
+ */
+ function getEncryptionFilesHelper();
+
+ /**
+ * @param string $encryptionModuleId encryption module ID
+ *
+ * @return \OCP\Encryption\Keys\IStorage
+ */
+ function getEncryptionKeyStorage($encryptionModuleId);
+
+ /**
* Returns the URL generator
*
* @return \OCP\IURLGenerator
diff --git a/lib/public/util.php b/lib/public/util.php
index b50ce54839b..721bcaadb62 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -219,9 +219,11 @@ class Util {
/**
* check if some encrypted files are stored
* @return bool
+ *
+ * @deprecated No longer required
*/
public static function encryptedFiles() {
- return \OC_Util::encryptedFiles();
+ return false;
}
/**
@@ -392,18 +394,19 @@ class Util {
/**
* connects a function to a hook
- * @param string $signalclass class name of emitter
- * @param string $signalname name of signal
- * @param string $slotclass class name of slot
- * @param string $slotname name of slot
+ *
+ * @param string $signalClass class name of emitter
+ * @param string $signalName name of signal
+ * @param string|object $slotClass class name of slot
+ * @param string $slotName name of slot
* @return bool
*
* This function makes it very easy to connect to use hooks.
*
* TODO: write example
*/
- static public function connectHook( $signalclass, $signalname, $slotclass, $slotname ) {
- return(\OC_Hook::connect( $signalclass, $signalname, $slotclass, $slotname ));
+ static public function connectHook($signalClass, $signalName, $slotClass, $slotName ) {
+ return(\OC_Hook::connect($signalClass, $signalName, $slotClass, $slotName ));
}
/**
diff --git a/settings/admin.php b/settings/admin.php
index 95afaf1ac0a..976d0a5c3f1 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -159,6 +159,7 @@ foreach ($forms as $index => $form) {
if ($filesExternal) {
$formsAndMore[] = array('anchor' => 'files_external', 'section-name' => $l->t('External Storage'));
}
+
$template->assign('fileSharingSettings', $fileSharingSettings);
$template->assign('filesExternal', $filesExternal);
$template->assign('updaterAppPanel', $updaterAppPanel);
@@ -184,12 +185,13 @@ $formsMap = array_map(function ($form) {
$formsAndMore = array_merge($formsAndMore, $formsMap);
// add bottom hardcoded forms from the template
-$formsAndMore[] = array('anchor' => 'backgroundjobs', 'section-name' => $l->t('Cron'));
-$formsAndMore[] = array('anchor' => 'mail_general_settings', 'section-name' => $l->t('Email Server'));
-$formsAndMore[] = array('anchor' => 'log-section', 'section-name' => $l->t('Log'));
-$formsAndMore[] = array('anchor' => 'admin-tips', 'section-name' => $l->t('Tips & tricks'));
+$formsAndMore[] = ['anchor' => 'encryptionAPI', 'section-name' => $l->t('Server Side Encryption')];
+$formsAndMore[] = ['anchor' => 'backgroundjobs', 'section-name' => $l->t('Cron')];
+$formsAndMore[] = ['anchor' => 'mail_general_settings', 'section-name' => $l->t('Email Server')];
+$formsAndMore[] = ['anchor' => 'log-section', 'section-name' => $l->t('Log')];
+$formsAndMore[] = ['anchor' => 'admin-tips', 'section-name' => $l->t('Tips & tricks')];
if ($updaterAppPanel) {
- $formsAndMore[] = array('anchor' => 'updater', 'section-name' => $l->t('Updates'));
+ $formsAndMore[] = ['anchor' => 'updater', 'section-name' => $l->t('Updates')];
}
$template->assign('forms', $formsAndMore);
diff --git a/settings/ajax/decryptall.php b/settings/ajax/decryptall.php
deleted file mode 100644
index 5925cee9dfd..00000000000
--- a/settings/ajax/decryptall.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Volkan Gezer <volkangezer@gmail.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-OCP\JSON::checkLoggedIn();
-OCP\JSON::callCheck();
-
-//encryption app needs to be loaded
-OC_App::loadApp('files_encryption');
-
-// init encryption app
-$params = array('uid' => \OCP\User::getUser(),
- 'password' => (string)$_POST['password']);
-
-$view = new OC\Files\View('/');
-$util = new \OCA\Files_Encryption\Util($view, \OCP\User::getUser());
-$l = \OC::$server->getL10N('settings');
-
-$result = $util->initEncryption($params);
-
-if ($result !== false) {
-
- try {
- $successful = $util->decryptAll();
- } catch (\Exception $ex) {
- \OCP\Util::writeLog('encryption library', "Decryption finished unexpected: " . $ex->getMessage(), \OCP\Util::ERROR);
- $successful = false;
- }
-
- $util->closeEncryptionSession();
-
- if ($successful === true) {
- \OCP\JSON::success(array('data' => array('message' => $l->t('Files decrypted successfully'))));
- } else {
- \OCP\JSON::error(array('data' => array('message' => $l->t('Couldn\'t decrypt your files, please check your owncloud.log or ask your administrator'))));
- }
-} else {
- \OCP\JSON::error(array('data' => array('message' => $l->t('Couldn\'t decrypt your files, check your password and try again'))));
-}
-
diff --git a/settings/ajax/deletekeys.php b/settings/ajax/deletekeys.php
deleted file mode 100644
index 2192eb8c725..00000000000
--- a/settings/ajax/deletekeys.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-OCP\JSON::checkLoggedIn();
-OCP\JSON::callCheck();
-
-$l = \OC::$server->getL10N('settings');
-
-$util = new \OCA\Files_Encryption\Util(new \OC\Files\View(), \OC_User::getUser());
-$result = $util->deleteBackup('decryptAll');
-
-if ($result) {
- \OCP\JSON::success(array('data' => array('message' => $l->t('Encryption keys deleted permanently'))));
-} else {
- \OCP\JSON::error(array('data' => array('message' => $l->t('Couldn\'t permanently delete your encryption keys, please check your owncloud.log or ask your administrator'))));
-}
diff --git a/settings/ajax/restorekeys.php b/settings/ajax/restorekeys.php
deleted file mode 100644
index 52c02b3aba4..00000000000
--- a/settings/ajax/restorekeys.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <icewind@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-OCP\JSON::checkLoggedIn();
-OCP\JSON::callCheck();
-
-$l = \OC::$server->getL10N('settings');
-
-$util = new \OCA\Files_Encryption\Util(new \OC\Files\View(), \OC_User::getUser());
-$result = $util->restoreBackup('decryptAll');
-
-if ($result) {
- \OCP\JSON::success(array('data' => array('message' => $l->t('Backups restored successfully'))));
-} else {
- \OCP\JSON::error(array('data' => array('message' => $l->t('Couldn\'t restore your encryption keys, please check your owncloud.log or ask your administrator'))));
-}
diff --git a/settings/changepassword/controller.php b/settings/changepassword/controller.php
index 1be30b725df..f041cb5b29f 100644
--- a/settings/changepassword/controller.php
+++ b/settings/changepassword/controller.php
@@ -77,16 +77,43 @@ class Controller {
exit();
}
- if (\OC_App::isEnabled('files_encryption')) {
+ if (\OC_App::isEnabled('encryption')) {
//handle the recovery case
- $util = new \OCA\Files_Encryption\Util(new \OC\Files\View('/'), $username);
- $recoveryAdminEnabled = \OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
+ $crypt = new \OCA\Encryption\Crypto\Crypt(
+ \OC::$server->getLogger(),
+ \OC::$server->getUserSession(),
+ \OC::$server->getConfig());
+ $keyStorage = \OC::$server->getEncryptionKeyStorage(\OCA\Encryption\Crypto\Encryption::ID);
+ $util = new \OCA\Encryption\Util(
+ new \OC\Files\View(),
+ $crypt,
+ \OC::$server->getLogger(),
+ \OC::$server->getUserSession(),
+ \OC::$server->getConfig());
+ $keyManager = new \OCA\Encryption\KeyManager(
+ $keyStorage,
+ $crypt,
+ \OC::$server->getConfig(),
+ \OC::$server->getUserSession(),
+ new \OCA\Encryption\Session(\OC::$server->getSession()),
+ \OC::$server->getLogger(),
+ $util);
+ $recovery = new \OCA\Encryption\Recovery(
+ \OC::$server->getUserSession(),
+ $crypt,
+ \OC::$server->getSecureRandom(),
+ $keyManager,
+ \OC::$server->getConfig(),
+ $keyStorage,
+ \OC::$server->getEncryptionFilesHelper(),
+ new \OC\Files\View());
+ $recoveryAdminEnabled = $recovery->isRecoveryKeyEnabled();
$validRecoveryPassword = false;
$recoveryEnabledForUser = false;
if ($recoveryAdminEnabled) {
- $validRecoveryPassword = $util->checkRecoveryPassword($recoveryPassword);
- $recoveryEnabledForUser = $util->recoveryEnabledForUser();
+ $validRecoveryPassword = $keyManager->checkRecoveryPassword($recoveryPassword);
+ $recoveryEnabledForUser = $recovery->isRecoveryEnabledForUser();
}
if ($recoveryEnabledForUser && $recoveryPassword === '') {
diff --git a/settings/js/personal.js b/settings/js/personal.js
index b269ebae3bc..43f328d2223 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -230,40 +230,6 @@ $(document).ready(function () {
return false;
});
- $('button:button[name="submitDecryptAll"]').click(function () {
- var privateKeyPassword = $('#decryptAll input:password[id="privateKeyPassword"]').val();
- $('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", true);
- $('#decryptAll input:password[name="privateKeyPassword"]').prop("disabled", true);
- OC.Encryption.decryptAll(privateKeyPassword);
- });
-
-
- $('button:button[name="submitRestoreKeys"]').click(function () {
- $('#restoreBackupKeys button:button[name="submitDeleteKeys"]').prop("disabled", true);
- $('#restoreBackupKeys button:button[name="submitRestoreKeys"]').prop("disabled", true);
- OC.Encryption.restoreKeys();
- });
-
- $('button:button[name="submitDeleteKeys"]').click(function () {
- $('#restoreBackupKeys button:button[name="submitDeleteKeys"]').prop("disabled", true);
- $('#restoreBackupKeys button:button[name="submitRestoreKeys"]').prop("disabled", true);
- OC.Encryption.deleteKeys();
- });
-
- $('#decryptAll input:password[name="privateKeyPassword"]').keyup(function (event) {
- var privateKeyPassword = $('#decryptAll input:password[id="privateKeyPassword"]').val();
- if (privateKeyPassword !== '') {
- $('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", false);
- if (event.which === 13) {
- $('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", true);
- $('#decryptAll input:password[name="privateKeyPassword"]').prop("disabled", true);
- OC.Encryption.decryptAll(privateKeyPassword);
- }
- } else {
- $('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", true);
- }
- });
-
var uploadparms = {
done: function (e, data) {
avatarResponseHandler(data.result);
@@ -371,47 +337,6 @@ $(document).ready(function () {
});
OC.Encryption = {
- decryptAll: function (password) {
- var message = t('settings', 'Decrypting files... Please wait, this can take some time.');
- OC.Encryption.msg.start('#decryptAll .msg', message);
- $.post('ajax/decryptall.php', {password: password}, function (data) {
- if (data.status === "error") {
- OC.Encryption.msg.finished('#decryptAll .msg', data);
- $('#decryptAll input:password[name="privateKeyPassword"]').prop("disabled", false);
- } else {
- OC.Encryption.msg.finished('#decryptAll .msg', data);
- }
- $('#restoreBackupKeys').removeClass('hidden');
- });
- },
-
- deleteKeys: function () {
- var message = t('settings', 'Delete encryption keys permanently.');
- OC.Encryption.msg.start('#restoreBackupKeys .msg', message);
- $.post('ajax/deletekeys.php', null, function (data) {
- if (data.status === "error") {
- OC.Encryption.msg.finished('#restoreBackupKeys .msg', data);
- $('#restoreBackupKeys button:button[name="submitDeleteKeys"]').prop("disabled", false);
- $('#restoreBackupKeys button:button[name="submitRestoreKeys"]').prop("disabled", false);
- } else {
- OC.Encryption.msg.finished('#restoreBackupKeys .msg', data);
- }
- });
- },
-
- restoreKeys: function () {
- var message = t('settings', 'Restore encryption keys.');
- OC.Encryption.msg.start('#restoreBackupKeys .msg', message);
- $.post('ajax/restorekeys.php', {}, function (data) {
- if (data.status === "error") {
- OC.Encryption.msg.finished('#restoreBackupKeys .msg', data);
- $('#restoreBackupKeys button:button[name="submitDeleteKeys"]').prop("disabled", false);
- $('#restoreBackupKeys button:button[name="submitRestoreKeys"]').prop("disabled", false);
- } else {
- OC.Encryption.msg.finished('#restoreBackupKeys .msg', data);
- }
- });
- }
};
OC.Encryption.msg = {
diff --git a/settings/personal.php b/settings/personal.php
index e4d278d4f28..12b320ac001 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -59,11 +59,6 @@ $email=$config->getUserValue(OC_User::getUser(), 'settings', 'email', '');
$userLang=$config->getUserValue( OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage() );
$languageCodes=OC_L10N::findAvailableLanguages();
-//check if encryption was enabled in the past
-$filesStillEncrypted = OC_Util::encryptedFiles();
-$backupKeysExists = OC_Util::backupKeysExists();
-$enableDecryptAll = $filesStillEncrypted || $backupKeysExists;
-
// array of common languages
$commonlangcodes = array(
'en', 'es', 'fr', 'de', 'de_DE', 'ja', 'ar', 'ru', 'nl', 'it', 'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'tr', 'zh_CN', 'ko'
@@ -120,9 +115,6 @@ $tmpl->assign('activelanguage', $userLang);
$tmpl->assign('passwordChangeSupported', OC_User::canUserChangePassword(OC_User::getUser()));
$tmpl->assign('displayNameChangeSupported', OC_User::canUserChangeDisplayName(OC_User::getUser()));
$tmpl->assign('displayName', OC_User::getDisplayName());
-$tmpl->assign('enableDecryptAll' , $enableDecryptAll);
-$tmpl->assign('backupKeysExists' , $backupKeysExists);
-$tmpl->assign('filesStillEncrypted' , $filesStillEncrypted);
$tmpl->assign('enableAvatars', $config->getSystemValue('enable_avatars', true));
$tmpl->assign('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser()));
$tmpl->assign('certs', $certificateManager->listCertificates());
@@ -163,9 +155,6 @@ $formsAndMore = array_merge($formsAndMore, $formsMap);
// add bottom hardcoded forms from the template
$formsAndMore[]= array( 'anchor' => 'ssl-root-certificates', 'section-name' => $l->t('SSL root certificates') );
-if($enableDecryptAll) {
- $formsAndMore[]= array( 'anchor' => 'encryption', 'section-name' => $l->t('Encryption') );
-}
$tmpl->assign('forms', $formsAndMore);
$tmpl->printPage();
diff --git a/settings/routes.php b/settings/routes.php
index 5a069e5a1c6..af9ac1d8eea 100644
--- a/settings/routes.php
+++ b/settings/routes.php
@@ -89,12 +89,6 @@ $this->create('settings_personal_changepassword', '/settings/personal/changepass
->action('OC\Settings\ChangePassword\Controller', 'changePersonalPassword');
$this->create('settings_ajax_setlanguage', '/settings/ajax/setlanguage.php')
->actionInclude('settings/ajax/setlanguage.php');
-$this->create('settings_ajax_decryptall', '/settings/ajax/decryptall.php')
- ->actionInclude('settings/ajax/decryptall.php');
-$this->create('settings_ajax_restorekeys', '/settings/ajax/restorekeys.php')
- ->actionInclude('settings/ajax/restorekeys.php');
-$this->create('settings_ajax_deletekeys', '/settings/ajax/deletekeys.php')
- ->actionInclude('settings/ajax/deletekeys.php');
$this->create('settings_cert_post', '/settings/ajax/addRootCertificate')
->actionInclude('settings/ajax/addRootCertificate.php');
$this->create('settings_cert_remove', '/settings/ajax/removeRootCertificate')
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 1b0ed66563e..1b8ab0e3819 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -295,73 +295,6 @@ if ($_['cronErrors']) {
</p>
</div>
-<div class="section" id="shareAPI">
- <h2><?php p($l->t('Sharing'));?></h2>
- <p id="enable">
- <input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled"
- value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> />
- <label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/>
- </p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
- <input type="checkbox" name="shareapi_allow_links" id="allowLinks"
- value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> />
- <label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/>
- </p>
-
- <p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
- <input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword"
- value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> />
- <label for="enforceLinkPassword"><?php p($l->t('Enforce password protection'));?></label><br/>
-
- <input type="checkbox" name="shareapi_allow_public_upload" id="allowPublicUpload"
- value="1" <?php if ($_['allowPublicUpload'] == 'yes') print_unescaped('checked="checked"'); ?> />
- <label for="allowPublicUpload"><?php p($l->t('Allow public uploads'));?></label><br/>
-
- <input type="checkbox" name="shareapi_allow_public_notification" id="allowPublicMailNotification"
- value="1" <?php if ($_['allowPublicMailNotification'] == 'yes') print_unescaped('checked="checked"'); ?> />
- <label for="allowPublicMailNotification"><?php p($l->t('Allow users to send mail notification for shared files'));?></label><br/>
-
- <input type="checkbox" name="shareapi_default_expire_date" id="shareapiDefaultExpireDate"
- value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> />
- <label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date'));?></label><br/>
-
- </p>
- <p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
- <?php p($l->t( 'Expire after ' )); ?>
- <input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
- value='<?php p($_['shareExpireAfterNDays']) ?>' />
- <?php p($l->t( 'days' )); ?>
- <input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate"
- value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
- <label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
- </p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
- <input type="checkbox" name="shareapi_allow_resharing" id="allowResharing"
- value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
- <label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/>
- </p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
- <input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers"
- value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> />
- <label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/>
- </p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
- <input type="checkbox" name="shareapi_allow_mail_notification" id="allowMailNotification"
- value="1" <?php if ($_['allowMailNotification'] === 'yes') print_unescaped('checked="checked"'); ?> />
- <label for="allowMailNotification"><?php p($l->t('Allow users to send mail notification for shared files to other users'));?></label><br/>
- </p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
- <input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups"
- value="1" <?php if ($_['shareExcludeGroups']) print_unescaped('checked="checked"'); ?> />
- <label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/>
- </p>
- <p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
- <input name="shareapi_exclude_groups_list" type="hidden" id="excludedGroups" value="<?php p($_['shareExcludedGroupsList']) ?>" style="width: 400px"/>
- <br />
- <em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em>
- </p>
-</div>
-
<div class="section" id='encryptionAPI'>
<h2><?php p($l->t('Server Side Encryption'));?></h2>
<p id="enable">
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index 2a0b4bb0dc4..dfdc6191805 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -242,58 +242,6 @@ if($_['passwordChangeSupported']) {
</form>
</div>
-<?php if($_['enableDecryptAll']): ?>
-<div id="encryption" class="section">
-
- <h2>
- <?php p( $l->t( 'Encryption' ) ); ?>
- </h2>
-
- <?php if($_['filesStillEncrypted']): ?>
-
- <div id="decryptAll">
- <?php p($l->t( "The encryption app is no longer enabled, please decrypt all your files" )); ?>
- <p>
- <input
- type="password"
- name="privateKeyPassword"
- id="privateKeyPassword" />
- <label for="privateKeyPassword"><?php p($l->t( "Log-in password" )); ?></label>
- <br />
- <button
- type="button"
- disabled
- name="submitDecryptAll"><?php p($l->t( "Decrypt all Files" )); ?>
- </button>
- <span class="msg"></span>
- </p>
- <br />
- </div>
- <?php endif; ?>
-
- <div id="restoreBackupKeys" <?php $_['backupKeysExists'] ? '' : print_unescaped("class='hidden'") ?>>
-
- <?php p($l->t( "Your encryption keys are moved to a backup location. If something went wrong you can restore the keys. Only delete them permanently if you are sure that all files are decrypted correctly." )); ?>
- <p>
- <button
- type="button"
- name="submitRestoreKeys"><?php p($l->t( "Restore Encryption Keys" )); ?>
- </button>
- <button
- type="button"
- name="submitDeleteKeys"><?php p($l->t( "Delete Encryption Keys" )); ?>
- </button>
- <span class="msg"></span>
-
- </p>
- <br />
-
- </div>
-
-
-</div>
- <?php endif; ?>
-
<div class="section">
<h2><?php p($l->t('Version'));?></h2>
<strong><?php p($theme->getTitle()); ?></strong> <?php p(OC_Util::getHumanVersion()) ?><br />
diff --git a/settings/users.php b/settings/users.php
index 08498edec29..0fc9fbeafc2 100644
--- a/settings/users.php
+++ b/settings/users.php
@@ -45,8 +45,8 @@ $groupsInfo = new \OC\Group\MetaData(OC_User::getUser(), $isAdmin, $groupManager
$groupsInfo->setSorting($groupsInfo::SORT_USERCOUNT);
list($adminGroup, $groups) = $groupsInfo->get();
-$recoveryAdminEnabled = OC_App::isEnabled('files_encryption') &&
- $config->getAppValue( 'files_encryption', 'recoveryAdminEnabled', null );
+$recoveryAdminEnabled = OC_App::isEnabled('encryption') &&
+ $config->getAppValue( 'encryption', 'recoveryAdminEnabled', null );
if($isAdmin) {
$subadmins = OC_SubAdmin::getAllSubAdmins();
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index cebd899e785..5945dbdc11f 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -25,4 +25,3 @@ if (!class_exists('PHPUnit_Framework_TestCase')) {
OC_Hook::clear();
OC_Log::$enabled = false;
-OC_FileProxy::clearProxies();
diff --git a/tests/enable_all.php b/tests/enable_all.php
index e9b538713a5..464155b1f39 100644
--- a/tests/enable_all.php
+++ b/tests/enable_all.php
@@ -18,7 +18,7 @@ function enableApp($app) {
enableApp('files_sharing');
enableApp('files_trashbin');
-enableApp('files_encryption');
+enableApp('encryption');
enableApp('user_ldap');
enableApp('files_versions');
enableApp('provisioning_api');
diff --git a/tests/lib/avatar.php b/tests/lib/avatar.php
index e852a7fc6ff..9e1f367108d 100644
--- a/tests/lib/avatar.php
+++ b/tests/lib/avatar.php
@@ -10,7 +10,9 @@
use OC\Avatar;
class Test_Avatar extends \Test\TestCase {
+ private static $trashBinStatus;
+ /** @var @var string */
private $user;
protected function setUp() {
@@ -21,6 +23,17 @@ class Test_Avatar extends \Test\TestCase {
\OC\Files\Filesystem::mount($storage, array(), '/' . $this->user . '/');
}
+ public static function setUpBeforeClass() {
+ self::$trashBinStatus = \OC_App::isEnabled('files_trashbin');
+ \OC_App::disable('files_trashbin');
+ }
+
+ public static function tearDownAfterClass() {
+ if (self::$trashBinStatus) {
+ \OC_App::enable('files_trashbin');
+ }
+ }
+
public function testAvatar() {
$avatar = new Avatar($this->user);
diff --git a/tests/lib/cache/file.php b/tests/lib/cache/file.php
index d51322036c8..153cb198f13 100644
--- a/tests/lib/cache/file.php
+++ b/tests/lib/cache/file.php
@@ -38,15 +38,8 @@ class FileCache extends \Test_Cache {
parent::setUp();
//clear all proxies and hooks so we can do clean testing
- \OC_FileProxy::clearProxies();
\OC_Hook::clear('OC_Filesystem');
- //disabled atm
- //enable only the encryption hook if needed
- //if(OC_App::isEnabled('files_encryption')) {
- // OC_FileProxy::register(new OC_FileProxy_Encryption());
- //}
-
//set up temporary storage
$this->storage = \OC\Files\Filesystem::getStorage('/');
\OC\Files\Filesystem::clearMounts();
diff --git a/tests/lib/cache/usercache.php b/tests/lib/cache/usercache.php
index 3822a714d5a..26a9158ab3a 100644
--- a/tests/lib/cache/usercache.php
+++ b/tests/lib/cache/usercache.php
@@ -34,15 +34,8 @@ class UserCache extends \Test_Cache {
parent::setUp();
//clear all proxies and hooks so we can do clean testing
- \OC_FileProxy::clearProxies();
\OC_Hook::clear('OC_Filesystem');
- //disabled atm
- //enable only the encryption hook if needed
- //if(OC_App::isEnabled('files_encryption')) {
- // OC_FileProxy::register(new OC_FileProxy_Encryption());
- //}
-
//set up temporary storage
$this->storage = \OC\Files\Filesystem::getStorage('/');
\OC\Files\Filesystem::clearMounts();
diff --git a/tests/lib/encryption/keys/storage.php b/tests/lib/encryption/keys/storage.php
index c2e5bdbd3d1..8ab46987f8c 100644
--- a/tests/lib/encryption/keys/storage.php
+++ b/tests/lib/encryption/keys/storage.php
@@ -28,6 +28,9 @@ use Test\TestCase;
class StorageTest extends TestCase {
+ /** @var Storage */
+ protected $storage;
+
/** @var \PHPUnit_Framework_MockObject_MockObject */
protected $util;
@@ -45,6 +48,8 @@ class StorageTest extends TestCase {
->disableOriginalConstructor()
->getMock();
+ $this->storage = new Storage('encModule', $this->view, $this->util);
+
}
public function testSetFileKey() {
@@ -63,10 +68,8 @@ class StorageTest extends TestCase {
$this->equalTo('key'))
->willReturn(strlen('key'));
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertTrue(
- $storage->setFileKey('user1/files/foo.txt', 'fileKey', 'key')
+ $this->storage->setFileKey('user1/files/foo.txt', 'fileKey', 'key')
);
}
@@ -89,10 +92,8 @@ class StorageTest extends TestCase {
->with($this->equalTo('/user1/files_encryption/keys/files/foo.txt/encModule/fileKey'))
->willReturn(true);
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertSame('key',
- $storage->getFileKey('user1/files/foo.txt', 'fileKey')
+ $this->storage->getFileKey('user1/files/foo.txt', 'fileKey')
);
}
@@ -112,10 +113,8 @@ class StorageTest extends TestCase {
$this->equalTo('key'))
->willReturn(strlen('key'));
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertTrue(
- $storage->setFileKey('user1/files/foo.txt', 'fileKey', 'key')
+ $this->storage->setFileKey('user1/files/foo.txt', 'fileKey', 'key')
);
}
@@ -138,10 +137,8 @@ class StorageTest extends TestCase {
->with($this->equalTo('/files_encryption/keys/files/foo.txt/encModule/fileKey'))
->willReturn(true);
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertSame('key',
- $storage->getFileKey('user1/files/foo.txt', 'fileKey')
+ $this->storage->getFileKey('user1/files/foo.txt', 'fileKey')
);
}
@@ -152,10 +149,8 @@ class StorageTest extends TestCase {
$this->equalTo('key'))
->willReturn(strlen('key'));
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertTrue(
- $storage->setSystemUserKey('shareKey_56884', 'key')
+ $this->storage->setSystemUserKey('shareKey_56884', 'key')
);
}
@@ -166,10 +161,8 @@ class StorageTest extends TestCase {
$this->equalTo('key'))
->willReturn(strlen('key'));
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertTrue(
- $storage->setUserKey('user1', 'publicKey', 'key')
+ $this->storage->setUserKey('user1', 'publicKey', 'key')
);
}
@@ -183,10 +176,8 @@ class StorageTest extends TestCase {
->with($this->equalTo('/files_encryption/encModule/shareKey_56884'))
->willReturn(true);
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertSame('key',
- $storage->getSystemUserKey('shareKey_56884')
+ $this->storage->getSystemUserKey('shareKey_56884')
);
}
@@ -200,10 +191,8 @@ class StorageTest extends TestCase {
->with($this->equalTo('/user1/files_encryption/encModule/user1.publicKey'))
->willReturn(true);
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertSame('key',
- $storage->getUserKey('user1', 'publicKey')
+ $this->storage->getUserKey('user1', 'publicKey')
);
}
@@ -213,10 +202,8 @@ class StorageTest extends TestCase {
->with($this->equalTo('/user1/files_encryption/encModule/user1.publicKey'))
->willReturn(true);
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertTrue(
- $storage->deleteUserKey('user1', 'publicKey')
+ $this->storage->deleteUserKey('user1', 'publicKey')
);
}
@@ -226,10 +213,8 @@ class StorageTest extends TestCase {
->with($this->equalTo('/files_encryption/encModule/shareKey_56884'))
->willReturn(true);
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertTrue(
- $storage->deleteSystemUserKey('shareKey_56884')
+ $this->storage->deleteSystemUserKey('shareKey_56884')
);
}
@@ -248,10 +233,8 @@ class StorageTest extends TestCase {
->with($this->equalTo('/files_encryption/keys/files/foo.txt/encModule/fileKey'))
->willReturn(true);
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertTrue(
- $storage->deleteFileKey('user1/files/foo.txt', 'fileKey')
+ $this->storage->deleteFileKey('user1/files/foo.txt', 'fileKey')
);
}
@@ -270,11 +253,109 @@ class StorageTest extends TestCase {
->with($this->equalTo('/user1/files_encryption/keys/files/foo.txt/encModule/fileKey'))
->willReturn(true);
- $storage = new Storage('encModule', $this->view, $this->util);
-
$this->assertTrue(
- $storage->deleteFileKey('user1/files/foo.txt', 'fileKey')
+ $this->storage->deleteFileKey('user1/files/foo.txt', 'fileKey')
+ );
+ }
+
+ /**
+ * @dataProvider dataProviderCopyRename
+ */
+ public function testRenameKeys($source, $target, $systemWideMount, $expectedSource, $expectedTarget) {
+ $this->view->expects($this->any())
+ ->method('file_exists')
+ ->willReturn(true);
+ $this->view->expects($this->any())
+ ->method('is_dir')
+ ->willReturn(true);
+ $this->view->expects($this->once())
+ ->method('rename')
+ ->with(
+ $this->equalTo($expectedSource),
+ $this->equalTo($expectedTarget))
+ ->willReturn(true);
+ $this->util->expects($this->any())
+ ->method('getUidAndFilename')
+ ->will($this->returnCallback(array($this, 'getUidAndFilenameCallback')));
+ $this->util->expects($this->any())
+ ->method('isSystemWideMountPoint')
+ ->willReturn($systemWideMount);
+
+ $this->storage->renameKeys($source, $target);
+ }
+
+ /**
+ * @dataProvider dataProviderCopyRename
+ */
+ public function testCopyKeys($source, $target, $systemWideMount, $expectedSource, $expectedTarget) {
+ $this->view->expects($this->any())
+ ->method('file_exists')
+ ->willReturn(true);
+ $this->view->expects($this->any())
+ ->method('is_dir')
+ ->willReturn(true);
+ $this->view->expects($this->once())
+ ->method('copy')
+ ->with(
+ $this->equalTo($expectedSource),
+ $this->equalTo($expectedTarget))
+ ->willReturn(true);
+ $this->util->expects($this->any())
+ ->method('getUidAndFilename')
+ ->will($this->returnCallback(array($this, 'getUidAndFilenameCallback')));
+ $this->util->expects($this->any())
+ ->method('isSystemWideMountPoint')
+ ->willReturn($systemWideMount);
+
+ $this->storage->copyKeys($source, $target);
+ }
+
+ public function getUidAndFilenameCallback() {
+ $args = func_get_args();
+
+ $path = $args[0];
+ $parts = explode('/', $path);
+
+ return array($parts[1], '/' . implode('/', array_slice($parts, 2)));
+ }
+
+ public function dataProviderCopyRename() {
+ return array(
+ array('/user1/files/foo.txt', '/user1/files/bar.txt', false,
+ '/user1/files_encryption/keys/files/foo.txt/', '/user1/files_encryption/keys/files/bar.txt/'),
+ array('/user1/files/foo/foo.txt', '/user1/files/bar.txt', false,
+ '/user1/files_encryption/keys/files/foo/foo.txt/', '/user1/files_encryption/keys/files/bar.txt/'),
+ array('/user1/files/foo.txt', '/user1/files/foo/bar.txt', false,
+ '/user1/files_encryption/keys/files/foo.txt/', '/user1/files_encryption/keys/files/foo/bar.txt/'),
+ array('/user1/files/foo.txt', '/user1/files/foo/bar.txt', true,
+ '/files_encryption/keys/files/foo.txt/', '/files_encryption/keys/files/foo/bar.txt/'),
);
}
+ public function testKeySetPreparation() {
+ $this->view->expects($this->any())
+ ->method('file_exists')
+ ->willReturn(false);
+ $this->view->expects($this->any())
+ ->method('is_dir')
+ ->willReturn(false);
+ $this->view->expects($this->any())
+ ->method('mkdir')
+ ->will($this->returnCallback(array($this, 'mkdirCallback')));
+
+ $this->mkdirStack = array(
+ '/user1/files_encryption/keys/foo',
+ '/user1/files_encryption/keys',
+ '/user1/files_encryption',
+ '/user1');
+
+ \Test_Helper::invokePrivate($this->storage, 'keySetPreparation', array('/user1/files_encryption/keys/foo'));
+ }
+
+ public function mkdirCallback() {
+ $args = func_get_args();
+ $expected = array_pop($this->mkdirStack);
+ $this->assertSame($expected, $args[0]);
+ }
+
}
diff --git a/tests/lib/encryption/managertest.php b/tests/lib/encryption/managertest.php
index ab297bae0cb..4fcbc3b9983 100644
--- a/tests/lib/encryption/managertest.php
+++ b/tests/lib/encryption/managertest.php
@@ -111,4 +111,62 @@ class ManagerTest extends TestCase {
$en0 = $m->getEncryptionModule(0);
$this->assertEquals(0, $en0->getId());
}
+
+// /**
+// * @expectedException \OC\Encryption\Exceptions\ModuleAlreadyExistsException
+// * @expectedExceptionMessage Id "0" already used by encryption module "TestDummyModule0"
+// */
+// public function testModuleRegistration() {
+// $config = $this->getMock('\OCP\IConfig');
+// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
+// $em->expects($this->any())->method('getId')->willReturn(0);
+// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
+// $m = new Manager($config);
+// $m->registerEncryptionModule($em);
+// $this->assertTrue($m->isEnabled());
+// $m->registerEncryptionModule($em);
+// }
+//
+// public function testModuleUnRegistration() {
+// $config = $this->getMock('\OCP\IConfig');
+// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
+// $em->expects($this->any())->method('getId')->willReturn(0);
+// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
+// $m = new Manager($config);
+// $m->registerEncryptionModule($em);
+// $this->assertTrue($m->isEnabled());
+// $m->unregisterEncryptionModule($em);
+// $this->assertFalse($m->isEnabled());
+// }
+//
+// /**
+// * @expectedException \OC\Encryption\Exceptions\ModuleDoesNotExistsException
+// * @expectedExceptionMessage Module with id: unknown does not exists.
+// */
+// public function testGetEncryptionModuleUnknown() {
+// $config = $this->getMock('\OCP\IConfig');
+// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
+// $em->expects($this->any())->method('getId')->willReturn(0);
+// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
+// $m = new Manager($config);
+// $m->registerEncryptionModule($em);
+// $this->assertTrue($m->isEnabled());
+// $m->getEncryptionModule('unknown');
+// }
+//
+// public function testGetEncryptionModule() {
+// $config = $this->getMock('\OCP\IConfig');
+// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
+// $em->expects($this->any())->method('getId')->willReturn(0);
+// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
+// $m = new Manager($config);
+// $m->registerEncryptionModule($em);
+// $this->assertTrue($m->isEnabled());
+// $en0 = $m->getEncryptionModule(0);
+// $this->assertEquals(0, $en0->getId());
+// }
}
diff --git a/tests/lib/encryption/utiltest.php b/tests/lib/encryption/utiltest.php
index 672f9ff5e97..03aefe61151 100644
--- a/tests/lib/encryption/utiltest.php
+++ b/tests/lib/encryption/utiltest.php
@@ -20,6 +20,9 @@ class UtilTest extends TestCase {
/** @var \PHPUnit_Framework_MockObject_MockObject */
protected $userManager;
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $config;
+
public function setUp() {
parent::setUp();
$this->view = $this->getMockBuilder('OC\Files\View')
@@ -29,13 +32,18 @@ class UtilTest extends TestCase {
$this->userManager = $this->getMockBuilder('OC\User\Manager')
->disableOriginalConstructor()
->getMock();
+
+ $this->config = $this->getMockBuilder('OCP\IConfig')
+ ->disableOriginalConstructor()
+ ->getMock();
+
}
/**
* @dataProvider providesHeadersForEncryptionModule
*/
public function testGetEncryptionModuleId($expected, $header) {
- $u = new Util($this->view, $this->userManager);
+ $u = new Util($this->view, $this->userManager, $this->config);
$id = $u->getEncryptionModuleId($header);
$this->assertEquals($expected, $id);
}
@@ -53,7 +61,7 @@ class UtilTest extends TestCase {
*/
public function testReadHeader($header, $expected, $moduleId) {
$expected['oc_encryption_module'] = $moduleId;
- $u = new Util($this->view, $this->userManager);
+ $u = new Util($this->view, $this->userManager, $this->config);
$result = $u->readHeader($header);
$this->assertSameSize($expected, $result);
foreach ($expected as $key => $value) {
@@ -70,7 +78,7 @@ class UtilTest extends TestCase {
$em = $this->getMock('\OCP\Encryption\IEncryptionModule');
$em->expects($this->any())->method('getId')->willReturn($moduleId);
- $u = new Util($this->view, $this->userManager);
+ $u = new Util($this->view, $this->userManager, $this->config);
$result = $u->createHeader($header, $em);
$this->assertEquals($expected, $result);
}
@@ -94,7 +102,7 @@ class UtilTest extends TestCase {
$em = $this->getMock('\OCP\Encryption\IEncryptionModule');
$em->expects($this->any())->method('getId')->willReturn('moduleId');
- $u = new Util($this->view, $this->userManager);
+ $u = new Util($this->view, $this->userManager, $this->config);
$u->createHeader($header, $em);
}
@@ -107,7 +115,7 @@ class UtilTest extends TestCase {
->method('userExists')
->will($this->returnCallback(array($this, 'isExcludedCallback')));
- $u = new Util($this->view, $this->userManager);
+ $u = new Util($this->view, $this->userManager, $this->config);
$this->assertSame($expected,
$u->isExcluded($path)
diff --git a/tests/lib/files/cache/cache.php b/tests/lib/files/cache/cache.php
index f0ad6cf3ab1..9a64375f4e3 100644
--- a/tests/lib/files/cache/cache.php
+++ b/tests/lib/files/cache/cache.php
@@ -183,8 +183,8 @@ class Cache extends \Test\TestCase {
$file3 = 'folder/foo';
$data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
$fileData = array();
- $fileData['bar'] = array('size' => 1000, 'unencrypted_size' => 900, 'encrypted' => 1, 'mtime' => 20, 'mimetype' => 'foo/file');
- $fileData['foo'] = array('size' => 20, 'unencrypted_size' => 16, 'encrypted' => 1, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $fileData['bar'] = array('size' => 1000, 'encrypted' => 1, 'mtime' => 20, 'mimetype' => 'foo/file');
+ $fileData['foo'] = array('size' => 20, 'encrypted' => 1, 'mtime' => 25, 'mimetype' => 'foo/file');
$this->cache->put($file1, $data1);
$this->cache->put($file2, $fileData['bar']);
@@ -194,8 +194,6 @@ class Cache extends \Test\TestCase {
$this->assertEquals(count($content), 2);
foreach ($content as $cachedData) {
$data = $fileData[$cachedData['name']];
- // indirect retrieval swaps unencrypted_size and size
- $this->assertEquals($data['unencrypted_size'], $cachedData['size']);
}
$file4 = 'folder/unkownSize';
@@ -207,11 +205,10 @@ class Cache extends \Test\TestCase {
$fileData['unkownSize'] = array('size' => 5, 'mtime' => 25, 'mimetype' => 'foo/file');
$this->cache->put($file4, $fileData['unkownSize']);
- $this->assertEquals(916, $this->cache->calculateFolderSize($file1));
+ $this->assertEquals(1025, $this->cache->calculateFolderSize($file1));
// direct cache entry retrieval returns the original values
$entry = $this->cache->get($file1);
$this->assertEquals(1025, $entry['size']);
- $this->assertEquals(916, $entry['unencrypted_size']);
$this->cache->remove($file2);
$this->cache->remove($file3);
diff --git a/tests/lib/files/cache/updaterlegacy.php b/tests/lib/files/cache/updaterlegacy.php
index 99cacca8e95..6bdacbe34fe 100644
--- a/tests/lib/files/cache/updaterlegacy.php
+++ b/tests/lib/files/cache/updaterlegacy.php
@@ -22,8 +22,6 @@ class UpdaterLegacy extends \Test\TestCase {
*/
private $scanner;
- private $stateFilesEncryption;
-
/**
* @var \OC\Files\Cache\Cache $cache
*/
@@ -37,11 +35,6 @@ class UpdaterLegacy extends \Test\TestCase {
protected function setUp() {
parent::setUp();
- // remember files_encryption state
- $this->stateFilesEncryption = \OC_App::isEnabled('files_encryption');
- // we want to tests with the encryption app disabled
- \OC_App::disable('files_encryption');
-
$this->storage = new \OC\Files\Storage\Temporary(array());
$textData = "dummy file data\n";
$imgData = file_get_contents(\OC::$SERVERROOT . '/core/img/logo.png');
@@ -80,10 +73,6 @@ class UpdaterLegacy extends \Test\TestCase {
$this->assertTrue($result);
Filesystem::tearDown();
Filesystem::mount($this->originalStorage, array(), '/');
- // reset app files_encryption
- if ($this->stateFilesEncryption) {
- \OC_App::enable('files_encryption');
- }
parent::tearDown();
}
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index ad7522f1ea8..938fecb5bf3 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -253,7 +253,7 @@ abstract class Storage extends \Test\TestCase {
$this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile));
$localFile = $this->instance->getLocalFile('/lorem.txt');
$this->assertTrue(file_exists($localFile));
- $this->assertEquals(file_get_contents($localFile), file_get_contents($textFile));
+ $this->assertEquals(file_get_contents($textFile), file_get_contents($localFile));
$this->instance->mkdir('/folder');
$this->instance->file_put_contents('/folder/lorem.txt', file_get_contents($textFile));
diff --git a/tests/lib/files/storage/wrapper/encryption.php b/tests/lib/files/storage/wrapper/encryption.php
new file mode 100644
index 00000000000..bf4464f0eb9
--- /dev/null
+++ b/tests/lib/files/storage/wrapper/encryption.php
@@ -0,0 +1,125 @@
+<?php
+
+namespace Test\Files\Storage\Wrapper;
+
+use OC\Files\Storage\Temporary;
+use OC\Files\View;
+
+class Encryption extends \Test\Files\Storage\Storage {
+
+ /**
+ * @var Temporary
+ */
+ private $sourceStorage;
+
+ public function setUp() {
+
+ parent::setUp();
+
+ $mockModule = $this->buildMockModule();
+ $encryptionManager = $this->getMockBuilder('\OC\Encryption\Manager')
+ ->disableOriginalConstructor()
+ ->setMethods(['getDefaultEncryptionModule', 'getEncryptionModule', 'isEnabled'])
+ ->getMock();
+ $encryptionManager->expects($this->any())
+ ->method('getDefaultEncryptionModule')
+ ->willReturn($mockModule);
+ $encryptionManager->expects($this->any())
+ ->method('getEncryptionModule')
+ ->willReturn($mockModule);
+ $encryptionManager->expects($this->any())
+ ->method('isEnabled')
+ ->willReturn(true);
+
+ $config = $this->getMockBuilder('\OCP\IConfig')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $util = $this->getMock('\OC\Encryption\Util', ['getUidAndFilename'], [new View(), new \OC\User\Manager(), $config]);
+ $util->expects($this->any())
+ ->method('getUidAndFilename')
+ ->willReturnCallback(function ($path) {
+ return ['user1', $path];
+ });
+
+ $file = $this->getMockBuilder('\OC\Encryption\File')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $logger = $this->getMock('\OC\Log');
+
+ $this->sourceStorage = new Temporary(array());
+ $keyStore = $this->getMockBuilder('\OC\Encryption\Keys\Storage')
+ ->disableOriginalConstructor()->getMock();
+ $mount = $this->getMockBuilder('\OC\Files\Mount\MountPoint')
+ ->disableOriginalConstructor()
+ ->setMethods(['getOption'])
+ ->getMock();
+ $mount->expects($this->any())->method('getOption')->willReturn(true);
+ $this->instance = new EncryptionWrapper([
+ 'storage' => $this->sourceStorage,
+ 'root' => 'foo',
+ 'mountPoint' => '/',
+ 'mount' => $mount
+ ],
+ $encryptionManager, $util, $logger, $file, null, $keyStore
+ );
+ }
+
+ /**
+ * @return \PHPUnit_Framework_MockObject_MockObject
+ */
+ protected function buildMockModule() {
+ $encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
+ ->disableOriginalConstructor()
+ ->setMethods(['getId', 'getDisplayName', 'begin', 'end', 'encrypt', 'decrypt', 'update', 'shouldEncrypt', 'calculateUnencryptedSize', 'getUnencryptedBlockSize'])
+ ->getMock();
+
+ $encryptionModule->expects($this->any())->method('getId')->willReturn('UNIT_TEST_MODULE');
+ $encryptionModule->expects($this->any())->method('getDisplayName')->willReturn('Unit test module');
+ $encryptionModule->expects($this->any())->method('begin')->willReturn([]);
+ $encryptionModule->expects($this->any())->method('end')->willReturn('');
+ $encryptionModule->expects($this->any())->method('encrypt')->willReturnArgument(0);
+ $encryptionModule->expects($this->any())->method('decrypt')->willReturnArgument(0);
+ $encryptionModule->expects($this->any())->method('update')->willReturn(true);
+ $encryptionModule->expects($this->any())->method('shouldEncrypt')->willReturn(true);
+ $encryptionModule->expects($this->any())->method('calculateUnencryptedSize')->willReturn(42);
+ $encryptionModule->expects($this->any())->method('getUnencryptedBlockSize')->willReturn(8192);
+ return $encryptionModule;
+ }
+
+// public function testMkDirRooted() {
+// $this->instance->mkdir('bar');
+// $this->assertTrue($this->sourceStorage->is_dir('foo/bar'));
+// }
+//
+// public function testFilePutContentsRooted() {
+// $this->instance->file_put_contents('bar', 'asd');
+// $this->assertEquals('asd', $this->sourceStorage->file_get_contents('foo/bar'));
+// }
+}
+
+//
+// FIXME: this is too bad and needs adjustment
+//
+class EncryptionWrapper extends \OC\Files\Storage\Wrapper\Encryption {
+ private $keyStore;
+
+ public function __construct(
+ $parameters,
+ \OC\Encryption\Manager $encryptionManager = null,
+ \OC\Encryption\Util $util = null,
+ \OC\Log $logger = null,
+ \OC\Encryption\File $fileHelper = null,
+ $uid = null,
+ $keyStore = null
+ ) {
+ $this->keyStore = $keyStore;
+ parent::__construct($parameters, $encryptionManager, $util, $logger, $fileHelper, $uid);
+ }
+
+ protected function getKeyStorage($encryptionModuleId) {
+ return $this->keyStore;
+ }
+
+}
diff --git a/tests/lib/files/storage/wrapper/jail.php b/tests/lib/files/storage/wrapper/jail.php
index 270ce750ecf..a7bd684df44 100644
--- a/tests/lib/files/storage/wrapper/jail.php
+++ b/tests/lib/files/storage/wrapper/jail.php
@@ -9,10 +9,6 @@
namespace Test\Files\Storage\Wrapper;
class Jail extends \Test\Files\Storage\Storage {
- /**
- * @var string tmpDir
- */
- private $tmpDir;
/**
* @var \OC\Files\Storage\Temporary
diff --git a/tests/lib/files/storage/wrapper/quota.php b/tests/lib/files/storage/wrapper/quota.php
index 8ca8f308b71..a5828296be9 100644
--- a/tests/lib/files/storage/wrapper/quota.php
+++ b/tests/lib/files/storage/wrapper/quota.php
@@ -59,7 +59,7 @@ class Quota extends \Test\Files\Storage\Storage {
public function testFreeSpaceWithUsedSpace() {
$instance = $this->getLimitedStorage(9);
$instance->getCache()->put(
- '', array('size' => 3, 'unencrypted_size' => 0)
+ '', array('size' => 3)
);
$this->assertEquals(6, $instance->free_space(''));
}
@@ -77,7 +77,7 @@ class Quota extends \Test\Files\Storage\Storage {
$instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 9));
$instance->getCache()->put(
- '', array('size' => 3, 'unencrypted_size' => 0)
+ '', array('size' => 3)
);
$this->assertEquals(6, $instance->free_space(''));
}
@@ -85,9 +85,9 @@ class Quota extends \Test\Files\Storage\Storage {
public function testFreeSpaceWithUsedSpaceAndEncryption() {
$instance = $this->getLimitedStorage(9);
$instance->getCache()->put(
- '', array('size' => 7, 'unencrypted_size' => 3)
+ '', array('size' => 7)
);
- $this->assertEquals(6, $instance->free_space(''));
+ $this->assertEquals(2, $instance->free_space(''));
}
public function testFWriteNotEnoughSpace() {
diff --git a/tests/lib/files/stream/encryption.php b/tests/lib/files/stream/encryption.php
new file mode 100644
index 00000000000..84156337ad7
--- /dev/null
+++ b/tests/lib/files/stream/encryption.php
@@ -0,0 +1,104 @@
+<?php
+
+namespace Test\Files\Stream;
+
+use OC\Files\View;
+use OCA\Encryption_Dummy\DummyModule;
+
+class Encryption extends \Test\TestCase {
+
+ /**
+ * @param string $mode
+ * @param integer $limit
+ */
+ protected function getStream($fileName, $mode, $unencryptedSize) {
+
+ $size = filesize($fileName);
+ $source = fopen($fileName, $mode);
+ $internalPath = $fileName;
+ $fullPath = $fileName;
+ $header = [];
+ $uid = '';
+ $encryptionModule = $this->buildMockModule();
+ $storage = $this->getMockBuilder('\OC\Files\Storage\Storage')
+ ->disableOriginalConstructor()->getMock();
+ $encStorage = $this->getMockBuilder('\OC\Files\Storage\Wrapper\Encryption')
+ ->disableOriginalConstructor()->getMock();
+ $config = $this->getMockBuilder('\OCP\IConfig')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $file = $this->getMockBuilder('\OC\Encryption\File')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $util = $this->getMock('\OC\Encryption\Util', ['getUidAndFilename'], [new View(), new \OC\User\Manager(), $config]);
+ $util->expects($this->any())
+ ->method('getUidAndFilename')
+ ->willReturn(['user1', $internalPath]);
+
+ return \OC\Files\Stream\Encryption::wrap($source, $internalPath,
+ $fullPath, $header, $uid, $encryptionModule, $storage, $encStorage,
+ $util, $file, $mode, $size, $unencryptedSize);
+ }
+
+ public function testWriteRead() {
+ $fileName = tempnam("/tmp", "FOO");
+ $stream = $this->getStream($fileName, 'w+', 0);
+ $this->assertEquals(6, fwrite($stream, 'foobar'));
+ fclose($stream);
+
+ $stream = $this->getStream($fileName, 'r', 6);
+ $this->assertEquals('foobar', fread($stream, 100));
+ fclose($stream);
+ }
+
+ public function testSeek() {
+ $fileName = tempnam("/tmp", "FOO");
+ $stream = $this->getStream($fileName, 'w+', 0);
+ $this->assertEquals(6, fwrite($stream, 'foobar'));
+ $this->assertEquals(0, fseek($stream, 3));
+ $this->assertEquals(6, fwrite($stream, 'foobar'));
+ fclose($stream);
+
+ $stream = $this->getStream($fileName, 'r', 9);
+ $this->assertEquals('foofoobar', fread($stream, 100));
+ fclose($stream);
+ }
+
+ public function testWriteReadBigFile() {
+ $expectedData = file_get_contents(\OC::$SERVERROOT . '/tests/data/lorem-big.txt');
+ // write it
+ $fileName = tempnam("/tmp", "FOO");
+ $stream = $this->getStream($fileName, 'w+', 0);
+ fwrite($stream, $expectedData);
+ fclose($stream);
+
+ // read it all
+ $stream = $this->getStream($fileName, 'r', strlen($expectedData));
+ $data = stream_get_contents($stream);
+ fclose($stream);
+
+ $this->assertEquals($expectedData, $data);
+ }
+
+ /**
+ * @return \PHPUnit_Framework_MockObject_MockObject
+ */
+ protected function buildMockModule() {
+ $encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
+ ->disableOriginalConstructor()
+ ->setMethods(['getId', 'getDisplayName', 'begin', 'end', 'encrypt', 'decrypt', 'update', 'shouldEncrypt', 'calculateUnencryptedSize', 'getUnencryptedBlockSize'])
+ ->getMock();
+
+ $encryptionModule->expects($this->any())->method('getId')->willReturn('UNIT_TEST_MODULE');
+ $encryptionModule->expects($this->any())->method('getDisplayName')->willReturn('Unit test module');
+ $encryptionModule->expects($this->any())->method('begin')->willReturn([]);
+ $encryptionModule->expects($this->any())->method('end')->willReturn('');
+ $encryptionModule->expects($this->any())->method('encrypt')->willReturnArgument(0);
+ $encryptionModule->expects($this->any())->method('decrypt')->willReturnArgument(0);
+ $encryptionModule->expects($this->any())->method('update')->willReturn(true);
+ $encryptionModule->expects($this->any())->method('shouldEncrypt')->willReturn(true);
+ $encryptionModule->expects($this->any())->method('calculateUnencryptedSize')->willReturn(42);
+ $encryptionModule->expects($this->any())->method('getUnencryptedBlockSize')->willReturn(8192);
+ return $encryptionModule;
+ }
+}
diff --git a/tests/lib/streamwrappers.php b/tests/lib/streamwrappers.php
index 2a8c8676c16..fc3d02acae7 100644
--- a/tests/lib/streamwrappers.php
+++ b/tests/lib/streamwrappers.php
@@ -21,6 +21,20 @@
*/
class Test_StreamWrappers extends \Test\TestCase {
+
+ private static $trashBinStatus;
+
+ public static function setUpBeforeClass() {
+ self::$trashBinStatus = \OC_App::isEnabled('files_trashbin');
+ \OC_App::disable('files_trashbin');
+ }
+
+ public static function tearDownAfterClass() {
+ if (self::$trashBinStatus) {
+ \OC_App::enable('files_trashbin');
+ }
+ }
+
public function testFakeDir() {
$items = array('foo', 'bar');
\OC\Files\Stream\Dir::register('test', $items);
diff --git a/tests/lib/testcase.php b/tests/lib/testcase.php
index d532a3b01c0..a83be713194 100644
--- a/tests/lib/testcase.php
+++ b/tests/lib/testcase.php
@@ -71,7 +71,6 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
self::tearDownAfterClassCleanFileCache();
self::tearDownAfterClassCleanStrayDataFiles($dataDir);
self::tearDownAfterClassCleanStrayHooks();
- self::tearDownAfterClassCleanProxies();
parent::tearDownAfterClass();
}
@@ -165,16 +164,6 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
}
/**
- * Clean up the list of file proxies
- *
- * Also reenables file proxies, in case a test disabled them
- */
- static protected function tearDownAfterClassCleanProxies() {
- \OC_FileProxy::$enabled = true;
- \OC_FileProxy::clearProxies();
- }
-
- /**
* Login and setup FS as a given user,
* sets the given user as the current user.
*