├── .drone.star ├── .gitignore ├── .phan └── config.php ├── .php-cs-fixer.dist.php ├── CHANGELOG.md ├── LICENSE ├── Makefile ├── README.md ├── appinfo ├── Migrations │ └── Version20170913113840.php ├── app.php ├── info.xml └── routes.php ├── composer.json ├── composer.lock ├── css ├── settings-admin.css └── settings-personal.css ├── img └── app.svg ├── js ├── encryption.js ├── settings-admin.js └── settings-personal.js ├── l10n ├── .gitkeep ├── .tx │ └── config ├── ar.js ├── ar.json ├── ast.js ├── ast.json ├── az.js ├── az.json ├── bg_BG.js ├── bg_BG.json ├── bn_BD.js ├── bn_BD.json ├── bs.js ├── bs.json ├── ca.js ├── ca.json ├── cs_CZ.js ├── cs_CZ.json ├── cy_GB.js ├── cy_GB.json ├── da.js ├── da.json ├── de.js ├── de.json ├── de_AT.js ├── de_AT.json ├── de_CH.js ├── de_CH.json ├── de_DE.js ├── de_DE.json ├── el.js ├── el.json ├── en_GB.js ├── en_GB.json ├── eo.js ├── eo.json ├── es.js ├── es.json ├── es_AR.js ├── es_AR.json ├── es_MX.js ├── es_MX.json ├── et_EE.js ├── et_EE.json ├── eu.js ├── eu.json ├── fa.js ├── fa.json ├── fi_FI.js ├── fi_FI.json ├── fr.js ├── fr.json ├── gl.js ├── gl.json ├── he.js ├── he.json ├── hr.js ├── hr.json ├── hu_HU.js ├── hu_HU.json ├── hy.js ├── hy.json ├── ia.js ├── ia.json ├── id.js ├── id.json ├── is.js ├── is.json ├── it.js ├── it.json ├── ja.js ├── ja.json ├── ka_GE.js ├── ka_GE.json ├── km.js ├── km.json ├── kn.js ├── kn.json ├── ko.js ├── ko.json ├── ku_IQ.js ├── ku_IQ.json ├── lb.js ├── lb.json ├── lt_LT.js ├── lt_LT.json ├── lv.js ├── lv.json ├── mk.js ├── mk.json ├── nb_NO.js ├── nb_NO.json ├── nl.js ├── nl.json ├── nn_NO.js ├── nn_NO.json ├── oc.js ├── oc.json ├── pl.js ├── pl.json ├── pt_BR.js ├── pt_BR.json ├── pt_PT.js ├── pt_PT.json ├── ro.js ├── ro.json ├── ru.js ├── ru.json ├── ru_RU.js ├── ru_RU.json ├── si_LK.js ├── si_LK.json ├── sk_SK.js ├── sk_SK.json ├── sl.js ├── sl.json ├── sq.js ├── sq.json ├── sr.js ├── sr.json ├── sr@latin.js ├── sr@latin.json ├── sv.js ├── sv.json ├── ta_LK.js ├── ta_LK.json ├── th_TH.js ├── th_TH.json ├── tr.js ├── tr.json ├── ug.js ├── ug.json ├── uk.js ├── uk.json ├── ur_PK.js ├── ur_PK.json ├── vi.js ├── vi.json ├── zh_CN.js ├── zh_CN.json ├── zh_HK.js ├── zh_HK.json ├── zh_TW.js └── zh_TW.json ├── lib ├── AppInfo │ └── Application.php ├── Command │ ├── FixEncryptedVersion.php │ ├── HSMDaemon.php │ ├── HSMDaemonDecrypt.php │ ├── MigrateKeys.php │ └── RecreateMasterKey.php ├── Controller │ ├── RecoveryController.php │ ├── SettingsController.php │ └── StatusController.php ├── Crypto │ ├── Crypt.php │ ├── CryptHSM.php │ ├── DecryptAll.php │ ├── EncryptAll.php │ └── Encryption.php ├── Exceptions │ ├── MultiKeyDecryptException.php │ ├── MultiKeyEncryptException.php │ ├── PrivateKeyMissingException.php │ └── PublicKeyMissingException.php ├── Factory │ └── EncDecAllFactory.php ├── HookManager.php ├── Hooks │ ├── Contracts │ │ └── IHook.php │ └── UserHooks.php ├── JWT.php ├── KeyManager.php ├── Migration.php ├── Panels │ ├── Admin.php │ └── Personal.php ├── Recovery.php ├── Session.php ├── Users │ └── Setup.php └── Util.php ├── phpcs.xml ├── phpstan.neon ├── phpunit.xml ├── sonar-project.properties ├── templates ├── altmail.php ├── mail.php ├── settings-admin.php └── settings-personal.php ├── tests ├── acceptance │ ├── config │ │ └── behat.yml │ ├── expected-failures-cli.md │ └── features │ │ ├── apiEncryption │ │ └── encoding.feature │ │ ├── bootstrap │ │ ├── EncryptionContext.php │ │ ├── WebUIAdminEncryptionSettingsContext.php │ │ ├── WebUIPersonalEncryptionSettingsContext.php │ │ └── bootstrap.php │ │ ├── cliEncryption │ │ └── recreatemasterkey.feature │ │ ├── lib │ │ ├── AdminEncryptionSettingsPage.php │ │ └── PersonalEncryptionSettingsPage.php │ │ └── webUIMasterKeyType │ │ └── webUIMasterKeys.feature └── unit │ ├── Command │ ├── FixEncryptedVersionTest.php │ ├── HSMDaemonDecryptTest.php │ ├── HSMDaemonTest.php │ ├── RecreateMasterKeyTest.php │ ├── TestEnableMasterKey.php │ └── TestEnableUserKey.php │ ├── Controller │ ├── RecoveryControllerTest.php │ ├── SettingsControllerTest.php │ └── StatusControllerTest.php │ ├── Crypto │ ├── CryptHSMTest.php │ ├── CryptTest.php │ ├── DecryptAllTest.php │ ├── EncryptAllTest.php │ └── EncryptionTest.php │ ├── Factory │ └── EncDecAllFactoryTest.php │ ├── HookManagerTest.php │ ├── Hooks │ └── UserHooksTest.php │ ├── JWTTest.php │ ├── KeyManagerTest.php │ ├── MigrationTest.php │ ├── Panels │ ├── AdminTest.php │ └── PersonalTest.php │ ├── RecoveryTest.php │ ├── SessionTest.php │ ├── Users │ └── SetupTest.php │ ├── UtilTest.php │ └── bootstrap.php └── vendor-bin ├── behat └── composer.json ├── owncloud-codestyle └── composer.json ├── phan └── composer.json ├── php_codesniffer └── composer.json └── phpstan └── composer.json /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /l10n/.transifexrc 3 | .php_cs.cache 4 | .php-cs-fixer.cache 5 | 6 | # Composer 7 | vendor/ 8 | vendor-bin/**/vendor 9 | vendor-bin/**/composer.lock 10 | 11 | # Mac OS 12 | .DS_Store 13 | 14 | # Tests - auto-generated files 15 | /tests/acceptance/output* 16 | /tests/output 17 | .phpunit.result.cache 18 | 19 | # SonarCloud scanner 20 | .scannerwork 21 | 22 | .idea/ 23 | 24 | -------------------------------------------------------------------------------- /.phan/config.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license GPL-2.0 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the Free 10 | * Software Foundation; either version 2 of the License, or (at your option) 11 | * any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but WITHOUT 14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 16 | * more details. 17 | * 18 | * You should have received a copy of the GNU General Public License along 19 | * with this program; if not, write to the Free Software Foundation, Inc., 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 21 | * 22 | */ 23 | 24 | return [ 25 | 26 | // Supported values: '7.2', '7.3', '7.4', '8.0', null. 27 | // If this is set to null, 28 | // then Phan assumes the PHP version which is closest to the minor version 29 | // of the php executable used to execute phan. 30 | 'target_php_version' => null, 31 | 32 | // A list of directories that should be parsed for class and 33 | // method information. After excluding the directories 34 | // defined in exclude_analysis_directory_list, the remaining 35 | // files will be statically analyzed for errors. 36 | // 37 | // Thus, both first-party and third-party code being used by 38 | // your application should be included in this list. 39 | 'directory_list' => [ 40 | 'appinfo', 41 | 'lib', 42 | 'vendor', 43 | '../../lib', 44 | '../../core' 45 | ], 46 | 47 | // A directory list that defines files that will be excluded 48 | // from static analysis, but whose class and method 49 | // information should be included. 50 | // 51 | // Generally, you'll want to include the directories for 52 | // third-party code (such as "vendor/") in this list. 53 | // 54 | // n.b.: If you'd like to parse but not analyze 3rd 55 | // party code, directories containing that code 56 | // should be added to both the `directory_list` 57 | // and `exclude_analysis_directory_list` arrays. 58 | 'exclude_analysis_directory_list' => [ 59 | 'vendor', 60 | '../../lib', 61 | '../../core' 62 | ], 63 | 64 | // A regular expression to match files to be excluded 65 | // from parsing and analysis and will not be read at all. 66 | // 67 | // This is useful for excluding groups of test or example 68 | // directories/files, unanalyzable files, or files that 69 | // can't be removed for whatever reason. 70 | // (e.g. '@Test\.php$@', or '@vendor/.*/(tests|Tests)/@') 71 | 'exclude_file_regex' => '@.*/[^/]*(tests|Tests|templates)/@', 72 | 73 | // If true, missing properties will be created when 74 | // they are first seen. If false, we'll report an 75 | // error message. 76 | "allow_missing_properties" => false, 77 | 78 | // If enabled, allow null to be cast as any array-like type. 79 | // This is an incremental step in migrating away from null_casts_as_any_type. 80 | // If null_casts_as_any_type is true, this has no effect. 81 | "null_casts_as_any_type" => true, 82 | 83 | // Backwards Compatibility Checking. This is slow 84 | // and expensive, but you should consider running 85 | // it before upgrading your version of PHP to a 86 | // new version that has backward compatibility 87 | // breaks. 88 | 'backward_compatibility_checks' => false, 89 | 90 | // The initial scan of the function's code block has no 91 | // type information for `$arg`. It isn't until we see 92 | // the call and rescan test()'s code block that we can 93 | // detect that it is actually returning the passed in 94 | // `string` instead of an `int` as declared. 95 | 'quick_mode' => false, 96 | 97 | // The minimum severity level to report on. This can be 98 | // set to Issue::SEVERITY_LOW, Issue::SEVERITY_NORMAL or 99 | // Issue::SEVERITY_CRITICAL. Setting it to only 100 | // critical issues is a good place to start on a big 101 | // sloppy mature code base. 102 | 'minimum_severity' => 5, 103 | 104 | // A set of fully qualified class-names for which 105 | // a call to parent::__construct() is required 106 | 'parent_constructor_required' => [ 107 | ], 108 | 109 | ]; 110 | -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | setUsingCache(true) 7 | ->getFinder() 8 | ->exclude('l10n') 9 | ->exclude('vendor') 10 | ->exclude('vendor-bin') 11 | ->notPath('/^c3.php/') 12 | ->in(__DIR__); 13 | 14 | return $config; 15 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). 6 | 7 | ## [Unreleased] - XXXX-XX-XX 8 | 9 | 10 | 11 | ## [1.6.0] - 2023-03-29 12 | 13 | ### Changed 14 | 15 | - [#389](https://github.com/owncloud/encryption/issues/389) - feat: drop setup of user based encryption 16 | - This version of the encryption app requires core 10.12.0 or later. 17 | 18 | 19 | ## [1.5.3] - 2022-08-01 20 | 21 | - Handle the versions in the trashbin for the checksum verify command [#361](https://github.com/owncloud/encryption/issues/361) 22 | 23 | ## [1.5.2] - 2022-05-25 24 | 25 | ### Added 26 | - Add increment option to fix-encrypted-version command [#279](https://github.com/owncloud/encryption/issues/279) 27 | 28 | ## [1.5.1] - 2021-05-28 29 | 30 | ### Fixed 31 | 32 | - Use legacy-encoding setting for HSM also [#269](https://github.com/owncloud/encryption/issues/269) 33 | - `fix-encrypted-version` command restores value to original if no fix is found [#275](https://github.com/owncloud/encryption/issues/275) 34 | - Determine encryption format correctly when using HSM [#261](https://github.com/owncloud/encryption/pull/261) 35 | 36 | ## [1.5.0] - 2021-03-11 37 | 38 | ### Added 39 | 40 | - Add path option to FixEncryptedVersion command [#218](https://github.com/owncloud/encryption/pull/218) 41 | - Make encryption repair for file and folder [#4276](https://github.com/owncloud/enterprise/issues/4276) 42 | 43 | ### Changed 44 | 45 | - Use PHP's built-in hash_hkdf function [#215](https://github.com/owncloud/encryption/pull/215) 46 | - Unnecessary file size overhead (binary instead of base64) [#210](https://github.com/owncloud/encryption/issues/210) 47 | - Code needs updating due to core icewind/streams 0.7.2 [#198](https://github.com/owncloud/encryption/issues/198) 48 | 49 | ### Fixed 50 | 51 | - Prevent command encryption:fix-encrypted-version from printing file binary data [#226](https://github.com/owncloud/encryption/pull/226) 52 | 53 | ## 1.4.0 - 2019-09-02 54 | 55 | ### Added 56 | 57 | - `encryption:fixencryptedversion` command to address issues related to encrypted versions [#115](https://github.com/owncloud/encryption/pull/115) 58 | 59 | ### Changed 60 | 61 | - Improved wording for several user/administrator interactions [#21](https://github.com/owncloud/encryption/pull/21) [#117](https://github.com/owncloud/encryption/pull/117) 62 | 63 | ### Fixed 64 | 65 | - Issues with recreating masterkeys when HSM is used [#128](https://github.com/owncloud/encryption/pull/128) 66 | 67 | 68 | [Unreleased]: https://github.com/owncloud/encryption/compare/v1.6.0...HEAD 69 | [1.6.0]: https://github.com/owncloud/encryption/compare/v1.5.3...v1.6.0 70 | [1.5.3]: https://github.com/owncloud/encryption/compare/v1.5.2...v1.5.3 71 | [1.5.2]: https://github.com/owncloud/encryption/compare/v1.5.1...v1.5.2 72 | [1.5.1]: https://github.com/owncloud/encryption/compare/v1.5.0...v1.5.1 73 | [1.5.0]: https://github.com/owncloud/encryption/compare/v1.4.0...v1.5.0 74 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # encryption 2 | :lock_with_ink_pen: server side encryption of files 3 | 4 | [![Build Status](https://drone.owncloud.com/api/badges/owncloud/encryption/status.svg)](https://drone.owncloud.com/owncloud/encryption) 5 | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=owncloud_encryption&metric=alert_status)](https://sonarcloud.io/dashboard?id=owncloud_encryption) 6 | [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=owncloud_encryption&metric=security_rating)](https://sonarcloud.io/dashboard?id=owncloud_encryption) 7 | [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=owncloud_encryption&metric=coverage)](https://sonarcloud.io/dashboard?id=owncloud_encryption) 8 | 9 | In order to use this encryption module you need to enable server-side 10 | encryption in the admin settings. Once enabled this module will encrypt 11 | all your files transparently. The encryption is based on AES 256 keys. 12 | The module won't touch existing files, only new files will be encrypted 13 | after server-side encryption was enabled. It is also not possible to 14 | disable the encryption again and switch back to a unencrypted system. 15 | Please read the documentation to know all implications before you decide 16 | to enable server-side encryption. 17 | 18 | ## The following occ commands are not documented in the official documentation but added here for completness 19 | 20 | The values bellow mostly represent internal configuration state and should not be set by the user directly. They are controlled by respective encryption-commands. Change only if you know what you are doing or are debugging. 21 | 22 | `config:app:set encryption masterKeyId --value ??` 23 | 24 | `config:app:set encryption recoveryKeyId --value ??` 25 | 26 | The ID of the respective key. Background: Instead of giving a path to a keyfile (which might be error-prone) an explicit key-id which is part of the key is given. This is also done to accomodate for Keystorages which might not be file-based. 27 | 28 | `config:app:set encryption useMasterKey --value 1/0` 29 | 30 | Is masterkey encryption enabled? 31 | 32 | `config:app:set encryption crypto.engine --value 'internal | hsm'` 33 | 34 | Normal ownCloud encryption vs storing decryption-keys in a HSM 35 | 36 | `config:app:set encryption recoveryAdminEnabled --value 1/0` 37 | 38 | 39 | > Note : You need openSSL version 1.1.x installed for encryption app to work. With the release change of openSSL v1.x to openSSL version 3.x in December 2021, some ciphers which were valid in version 1.x, have been retired with immediate effect. This impacts the ownCloud encryption app. Your encryption environment will break due to openSSL v3 retired (legacy) ciphers. As a result, encrypted files cant be accessed. As a temporary solution, you have to manually reenable in the openSSL v3 config the legacy ciphers. To do so, see the example in the OpenSSL 3.0 Wiki at section 6.2 Providers. -------------------------------------------------------------------------------- /appinfo/Migrations/Version20170913113840.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Encryption\Migrations; 23 | 24 | use OCP\Migration\ISimpleMigration; 25 | use OCP\Migration\IOutput; 26 | 27 | class Version20170913113840 implements ISimpleMigration { 28 | /** 29 | * @param IOutput $out 30 | */ 31 | public function run(IOutput $out) { 32 | $installedVersion = \OC::$server->getConfig()->getSystemValue('version', '0.0.0'); 33 | 34 | if (\version_compare('10.0.3', $installedVersion, '>=') === true) { 35 | /** @phan-suppress-next-line PhanDeprecatedFunction */ 36 | $encryptionEnable = \OC::$server->getAppConfig()->getValue('encryption', 'enabled', 'yes'); 37 | /** @phan-suppress-next-line PhanDeprecatedFunction */ 38 | $coreEncryptionEnable = \OC::$server->getAppConfig()->getValue('core', 'encryption_enabled', 'yes'); 39 | /** @phan-suppress-next-line PhanDeprecatedFunction */ 40 | $userSpecificKey = \OC::$server->getAppConfig()->getValue('encryption', 'userSpecificKey', ''); 41 | /** @phan-suppress-next-line PhanDeprecatedFunction */ 42 | $masterKey = \OC::$server->getAppConfig()->getValue('encryption', 'useMasterKey', ''); 43 | 44 | if (($userSpecificKey === '') && ($masterKey === '') && 45 | ($encryptionEnable === 'yes') && ($coreEncryptionEnable === 'yes')) { 46 | \OC::$server->getConfig()->setAppValue('encryption', 'userSpecificKey', '1'); 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /appinfo/app.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Clark Tomlinson 5 | * @author Thomas Müller 6 | * 7 | * @copyright Copyright (c) 2019, ownCloud GmbH 8 | * @license AGPL-3.0 9 | * 10 | * This code is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU Affero General Public License, version 3, 12 | * as published by the Free Software Foundation. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License, version 3, 20 | * along with this program. If not, see 21 | * 22 | */ 23 | 24 | namespace OCA\Encryption\AppInfo; 25 | 26 | \OCP\Util::addScript('encryption', 'encryption'); 27 | 28 | $encryptionSystemReady = \OC::$server->getEncryptionManager()->isReady(); 29 | 30 | $app = new Application([], $encryptionSystemReady); 31 | if ($encryptionSystemReady) { 32 | $app->registerEncryptionModule(); 33 | $app->registerHooks(); 34 | } 35 | -------------------------------------------------------------------------------- /appinfo/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | encryption 4 | 5 | In order to use this encryption module you need to enable server-side 6 | encryption in the admin settings. Once enabled this module will encrypt 7 | all your files transparently. The encryption is based on AES 256 keys. 8 | The module won't touch existing files, only new files will be encrypted 9 | after server-side encryption was enabled. It is also not possible to 10 | disable the encryption again and switch back to a unencrypted system. 11 | Please read the documentation to know all implications before you decide 12 | to enable server-side encryption. 13 | 14 | Default encryption module 15 | AGPL 16 | Bjoern Schiessle, Clark Tomlinson 17 | 18 | user-encryption 19 | admin-encryption 20 | 21 | false 22 | 1.6.0 23 | security 24 | 25 | 26 | 27 | true 28 | 29 | openssl 30 | 31 | 32 | 33 | 34 | OCA\Encryption\Command\RecreateMasterKey 35 | OCA\Encryption\Command\MigrateKeys 36 | OCA\Encryption\Command\HSMDaemon 37 | OCA\Encryption\Command\HSMDaemonDecrypt 38 | OCA\Encryption\Command\FixEncryptedVersion 39 | 40 | 41 | OCA\Encryption\Panels\Admin 42 | OCA\Encryption\Panels\Personal 43 | 44 | 45 | -------------------------------------------------------------------------------- /appinfo/routes.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Clark Tomlinson 5 | * @author Thomas Müller 6 | * 7 | * @copyright Copyright (c) 2019, ownCloud GmbH 8 | * @license AGPL-3.0 9 | * 10 | * This code is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU Affero General Public License, version 3, 12 | * as published by the Free Software Foundation. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License, version 3, 20 | * along with this program. If not, see 21 | * 22 | */ 23 | 24 | namespace OCA\Encryption\AppInfo; 25 | 26 | /** @phan-suppress-next-line PhanUndeclaredThis */ 27 | (new Application())->registerRoutes($this, ['routes' => [ 28 | 29 | [ 30 | 'name' => 'Recovery#adminRecovery', 31 | 'url' => '/ajax/adminRecovery', 32 | 'verb' => 'POST' 33 | ], 34 | [ 35 | 'name' => 'Settings#updatePrivateKeyPassword', 36 | 'url' => '/ajax/updatePrivateKeyPassword', 37 | 'verb' => 'POST' 38 | ], 39 | [ 40 | 'name' => 'Settings#setEncryptHomeStorage', 41 | 'url' => '/ajax/setEncryptHomeStorage', 42 | 'verb' => 'POST' 43 | ], 44 | [ 45 | 'name' => 'Recovery#changeRecoveryPassword', 46 | 'url' => '/ajax/changeRecoveryPassword', 47 | 'verb' => 'POST' 48 | ], 49 | [ 50 | 'name' => 'Recovery#userSetRecovery', 51 | 'url' => '/ajax/userSetRecovery', 52 | 'verb' => 'POST' 53 | ], 54 | [ 55 | 'name' => 'Status#getStatus', 56 | 'url' => '/ajax/getStatus', 57 | 'verb' => 'GET' 58 | ] 59 | 60 | ]]); 61 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "owncloud/encryption", 3 | "config" : { 4 | "platform": { 5 | "php": "7.4" 6 | }, 7 | "allow-plugins": { 8 | "bamarni/composer-bin-plugin": true 9 | } 10 | }, 11 | "require": { 12 | "php": ">=7.4" 13 | }, 14 | "require-dev": { 15 | "bamarni/composer-bin-plugin": "^1.8" 16 | }, 17 | "extra": { 18 | "bamarni-bin": { 19 | "bin-links": false 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "876ee9936a3ee7fdbe15d3c6a373be8e", 8 | "packages": [], 9 | "packages-dev": [ 10 | { 11 | "name": "bamarni/composer-bin-plugin", 12 | "version": "1.8.2", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/bamarni/composer-bin-plugin.git", 16 | "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880", 21 | "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "composer-plugin-api": "^2.0", 26 | "php": "^7.2.5 || ^8.0" 27 | }, 28 | "require-dev": { 29 | "composer/composer": "^2.0", 30 | "ext-json": "*", 31 | "phpstan/extension-installer": "^1.1", 32 | "phpstan/phpstan": "^1.8", 33 | "phpstan/phpstan-phpunit": "^1.1", 34 | "phpunit/phpunit": "^8.5 || ^9.5", 35 | "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", 36 | "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", 37 | "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" 38 | }, 39 | "type": "composer-plugin", 40 | "extra": { 41 | "class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin" 42 | }, 43 | "autoload": { 44 | "psr-4": { 45 | "Bamarni\\Composer\\Bin\\": "src" 46 | } 47 | }, 48 | "notification-url": "https://packagist.org/downloads/", 49 | "license": [ 50 | "MIT" 51 | ], 52 | "description": "No conflicts for your bin dependencies", 53 | "keywords": [ 54 | "composer", 55 | "conflict", 56 | "dependency", 57 | "executable", 58 | "isolation", 59 | "tool" 60 | ], 61 | "support": { 62 | "issues": "https://github.com/bamarni/composer-bin-plugin/issues", 63 | "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2" 64 | }, 65 | "time": "2022-10-31T08:38:03+00:00" 66 | } 67 | ], 68 | "aliases": [], 69 | "minimum-stability": "stable", 70 | "stability-flags": [], 71 | "prefer-stable": false, 72 | "prefer-lowest": false, 73 | "platform": { 74 | "php": ">=7.4" 75 | }, 76 | "platform-dev": [], 77 | "platform-overrides": { 78 | "php": "7.4" 79 | }, 80 | "plugin-api-version": "2.3.0" 81 | } 82 | -------------------------------------------------------------------------------- /css/settings-admin.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Björn Schießle 3 | * 4 | * @copyright Copyright (c) 2019, ownCloud GmbH 5 | * @license AGPL-3.0 6 | * 7 | * This code is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License, version 3, 9 | * as published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License, version 3, 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | #encryptionAPI input[type=password] { 22 | width: 300px; 23 | } 24 | -------------------------------------------------------------------------------- /css/settings-personal.css: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Sam Tuke, 2 | This file is licensed under the Affero General Public License version 3 or later. 3 | See the COPYING-README file. */ 4 | 5 | #encryptAllError 6 | , #encryptAllSuccess 7 | , #recoveryEnabledError 8 | , #recoveryEnabledSuccess { 9 | display: none; 10 | } 11 | -------------------------------------------------------------------------------- /img/app.svg: -------------------------------------------------------------------------------- 1 | 2 | image/svg+xml -------------------------------------------------------------------------------- /js/encryption.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 3 | * Bjoern Schiessle 4 | * This file is licensed under the Affero General Public License version 3 or later. 5 | * See the COPYING-README file. 6 | */ 7 | 8 | /** 9 | * @namespace 10 | * @memberOf OC 11 | */ 12 | OC.Encryption = _.extend(OC.Encryption || {}, { 13 | displayEncryptionWarning: function () { 14 | if (!OC.currentUser || !OC.Notification.isHidden()) { 15 | return; 16 | } 17 | 18 | $.get( 19 | OC.generateUrl('/apps/encryption/ajax/getStatus'), 20 | function (result) { 21 | if (result.status === "interactionNeeded") { 22 | OC.Notification.show(result.data.message); 23 | } 24 | } 25 | ); 26 | } 27 | }); 28 | $(document).ready(function() { 29 | // wait for other apps/extensions to register their event handlers and file actions 30 | // in the "ready" clause 31 | _.defer(function() { 32 | OC.Encryption.displayEncryptionWarning(); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /js/settings-personal.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2013, Sam Tuke 3 | * This file is licensed under the Affero General Public License version 3 or later. 4 | * See the COPYING-README file. 5 | */ 6 | 7 | OC.Encryption = _.extend(OC.Encryption || {}, { 8 | updatePrivateKeyPassword: function () { 9 | var oldPrivateKeyPassword = $('input:password[id="oldPrivateKeyPassword"]').val(); 10 | var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val(); 11 | OC.msg.startSaving('#ocDefaultEncryptionModule .msg'); 12 | $.post( 13 | OC.generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword'), 14 | { 15 | oldPassword: oldPrivateKeyPassword, 16 | newPassword: newPrivateKeyPassword 17 | } 18 | ).done(function (data) { 19 | OC.msg.finishedSuccess('#ocDefaultEncryptionModule .msg', data.message); 20 | }) 21 | .fail(function (jqXHR) { 22 | OC.msg.finishedError('#ocDefaultEncryptionModule .msg', JSON.parse(jqXHR.responseText).message); 23 | }); 24 | } 25 | }); 26 | 27 | $(document).ready(function () { 28 | 29 | // Trigger ajax on recoveryAdmin status change 30 | $('input:radio[name="userEnableRecovery"]').change( 31 | function () { 32 | var recoveryStatus = $(this).val(); 33 | OC.msg.startAction('#userEnableRecovery .msg', 'Updating recovery keys. This can take some time...'); 34 | $.post( 35 | OC.generateUrl('/apps/encryption/ajax/userSetRecovery'), 36 | { 37 | userEnableRecovery: recoveryStatus 38 | } 39 | ).done(function (data) { 40 | OC.msg.finishedSuccess('#userEnableRecovery .msg', data.data.message); 41 | }) 42 | .fail(function (jqXHR) { 43 | OC.msg.finishedError('#userEnableRecovery .msg', JSON.parse(jqXHR.responseText).data.message); 44 | }); 45 | // Ensure page is not reloaded on form submit 46 | return false; 47 | } 48 | ); 49 | 50 | // update private key password 51 | 52 | $('input:password[name="changePrivateKeyPassword"]').keyup(function (event) { 53 | var oldPrivateKeyPassword = $('input:password[id="oldPrivateKeyPassword"]').val(); 54 | var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val(); 55 | if (newPrivateKeyPassword !== '' && oldPrivateKeyPassword !== '') { 56 | $('button:button[name="submitChangePrivateKeyPassword"]').removeAttr("disabled"); 57 | if (event.which === 13) { 58 | OC.Encryption.updatePrivateKeyPassword(); 59 | } 60 | } else { 61 | $('button:button[name="submitChangePrivateKeyPassword"]').attr("disabled", "true"); 62 | } 63 | }); 64 | 65 | $('button:button[name="submitChangePrivateKeyPassword"]').click(function () { 66 | OC.Encryption.updatePrivateKeyPassword(); 67 | }); 68 | 69 | }); 70 | -------------------------------------------------------------------------------- /l10n/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owncloud/encryption/a753aff4ec602c6b8cd7621a61af385dc95a1859/l10n/.gitkeep -------------------------------------------------------------------------------- /l10n/.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | lang_map = ja_JP: ja 4 | 5 | [o:owncloud-org:p:owncloud:r:files_encryption] 6 | file_filter = /encryption.po 7 | source_file = templates/encryption.pot 8 | source_lang = en 9 | type = PO 10 | -------------------------------------------------------------------------------- /l10n/az.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Missing recovery key password" : "Bərpa açarının şifrəsi çatışmır", 5 | "Please repeat the recovery key password" : "Xahiş olunur bərpa açarı şifrəsini təkrarlayasınız", 6 | "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 ", 7 | "Recovery key successfully enabled" : "Bərpa açarı uğurla aktivləşdi", 8 | "Could not enable recovery key. Please check your recovery key password!" : "Geriqaytarılma açarının aktivləşdirilməsi mümkün olmadı. Xahiş olunur geriqaytarılma açarı üçün tələb edilən şifrəni yoxlayasınız.", 9 | "Recovery key successfully disabled" : "Bərpa açarı uğurla söndürüldü", 10 | "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.", 11 | "Please provide the old recovery password" : "Xahiş olunur köhnə bərpa açarını daxil edəsiniz", 12 | "Please provide a new recovery password" : "Xahiş olunur yeni bərpa açarı şifrəsini daxil esəsiniz", 13 | "Please repeat the new recovery password" : "Xahiş olunur yeni bərpa açarını təkrarlayasınız", 14 | "Password successfully changed." : "Şifrə uğurla dəyişdirildi.", 15 | "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.", 16 | "Could not update the private key password." : "Gizli açarın şifrəsini yeniləmək mümkün olmadı.", 17 | "The old password was not correct, please try again." : "Köhnə şifrə düzgün deyildi, xahiş olunur yenidən cəhd edəsiniz.", 18 | "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.", 19 | "Private key password successfully updated." : "Gizli aşar şifrəsi uğurla yeniləndi.", 20 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Şifrələnmə proqramı üçün yalnış şəxsi açar. Xahiş olunur öz şəxsi quraşdırmalarınızda şəxsi açarınızı yeniləyəsiniz ki, şifrələnmiş fayllara yetki ala biləsiniz. ", 21 | "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. ", 22 | "Cheers!" : "Şərəfə!", 23 | "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", 24 | "Recovery key password" : "Açar şifrənin bərpa edilməsi", 25 | "Change recovery key password:" : "Bərpa açarın şifrəsini dəyişdir:", 26 | "Change Password" : "Şifrəni dəyişdir", 27 | "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.", 28 | "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: ", 29 | " 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.", 30 | "Old log-in password" : "Köhnə giriş şifrəsi", 31 | "Current log-in password" : "Hal-hazırki giriş şifrəsi", 32 | "Update Private Key Password" : "Gizli açar şifrəsini yenilə", 33 | "Enable password recovery:" : "Şifrə bərpasını işə sal:", 34 | "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", 35 | "Enabled" : "İşə salınıb", 36 | "Disabled" : "Dayandırılıb" 37 | }, 38 | "nplurals=2; plural=(n != 1);"); 39 | -------------------------------------------------------------------------------- /l10n/az.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Missing recovery key password" : "Bərpa açarının şifrəsi çatışmır", 3 | "Please repeat the recovery key password" : "Xahiş olunur bərpa açarı şifrəsini təkrarlayasınız", 4 | "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 ", 5 | "Recovery key successfully enabled" : "Bərpa açarı uğurla aktivləşdi", 6 | "Could not enable recovery key. Please check your recovery key password!" : "Geriqaytarılma açarının aktivləşdirilməsi mümkün olmadı. Xahiş olunur geriqaytarılma açarı üçün tələb edilən şifrəni yoxlayasınız.", 7 | "Recovery key successfully disabled" : "Bərpa açarı uğurla söndürüldü", 8 | "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.", 9 | "Please provide the old recovery password" : "Xahiş olunur köhnə bərpa açarını daxil edəsiniz", 10 | "Please provide a new recovery password" : "Xahiş olunur yeni bərpa açarı şifrəsini daxil esəsiniz", 11 | "Please repeat the new recovery password" : "Xahiş olunur yeni bərpa açarını təkrarlayasınız", 12 | "Password successfully changed." : "Şifrə uğurla dəyişdirildi.", 13 | "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.", 14 | "Could not update the private key password." : "Gizli açarın şifrəsini yeniləmək mümkün olmadı.", 15 | "The old password was not correct, please try again." : "Köhnə şifrə düzgün deyildi, xahiş olunur yenidən cəhd edəsiniz.", 16 | "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.", 17 | "Private key password successfully updated." : "Gizli aşar şifrəsi uğurla yeniləndi.", 18 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Şifrələnmə proqramı üçün yalnış şəxsi açar. Xahiş olunur öz şəxsi quraşdırmalarınızda şəxsi açarınızı yeniləyəsiniz ki, şifrələnmiş fayllara yetki ala biləsiniz. ", 19 | "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. ", 20 | "Cheers!" : "Şərəfə!", 21 | "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", 22 | "Recovery key password" : "Açar şifrənin bərpa edilməsi", 23 | "Change recovery key password:" : "Bərpa açarın şifrəsini dəyişdir:", 24 | "Change Password" : "Şifrəni dəyişdir", 25 | "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.", 26 | "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: ", 27 | " 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.", 28 | "Old log-in password" : "Köhnə giriş şifrəsi", 29 | "Current log-in password" : "Hal-hazırki giriş şifrəsi", 30 | "Update Private Key Password" : "Gizli açar şifrəsini yenilə", 31 | "Enable password recovery:" : "Şifrə bərpasını işə sal:", 32 | "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", 33 | "Enabled" : "İşə salınıb", 34 | "Disabled" : "Dayandırılıb" 35 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 36 | } -------------------------------------------------------------------------------- /l10n/bn_BD.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Recovery key successfully enabled" : "পূনরুদ্ধার চাবি সার্থকভাবে কার্যকর করা হয়েছে", 5 | "Recovery key successfully disabled" : "পূনরুদ্ধার চাবি সার্থকভাবে অকার্যকর করা হয়েছে", 6 | "Password successfully changed." : "আপনার কূটশব্দটি সার্থকভাবে পরিবর্তন করা হয়েছে ", 7 | "Cheers!" : "শুভেচ্ছা!", 8 | "Change recovery key password:" : "পূণরূদ্ধার কি এর কুটশব্দ পরিবর্তন করুন:", 9 | "Change Password" : "কূটশব্দ পরিবর্তন করুন", 10 | "Enabled" : "কার্যকর", 11 | "Disabled" : "অকার্যকর" 12 | }, 13 | "nplurals=2; plural=(n != 1);"); 14 | -------------------------------------------------------------------------------- /l10n/bn_BD.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Recovery key successfully enabled" : "পূনরুদ্ধার চাবি সার্থকভাবে কার্যকর করা হয়েছে", 3 | "Recovery key successfully disabled" : "পূনরুদ্ধার চাবি সার্থকভাবে অকার্যকর করা হয়েছে", 4 | "Password successfully changed." : "আপনার কূটশব্দটি সার্থকভাবে পরিবর্তন করা হয়েছে ", 5 | "Cheers!" : "শুভেচ্ছা!", 6 | "Change recovery key password:" : "পূণরূদ্ধার কি এর কুটশব্দ পরিবর্তন করুন:", 7 | "Change Password" : "কূটশব্দ পরিবর্তন করুন", 8 | "Enabled" : "কার্যকর", 9 | "Disabled" : "অকার্যকর" 10 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 11 | } -------------------------------------------------------------------------------- /l10n/bs.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Neispravan privatni ključ za šifriranje. Molim ažurirajte lozinku svoga privatnog ključa u svojim osobnim postavkama da biste obnovili pristup svojim šifriranim datotekama.", 5 | "The share will expire on %s." : "Podijeljeni resurs će isteći na %s.", 6 | "Cheers!" : "Cheers!", 7 | "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", 8 | "Enabled" : "Aktivirano", 9 | "Disabled" : "Onemogućeno" 10 | }, 11 | "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); 12 | -------------------------------------------------------------------------------- /l10n/bs.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Neispravan privatni ključ za šifriranje. Molim ažurirajte lozinku svoga privatnog ključa u svojim osobnim postavkama da biste obnovili pristup svojim šifriranim datotekama.", 3 | "The share will expire on %s." : "Podijeljeni resurs će isteći na %s.", 4 | "Cheers!" : "Cheers!", 5 | "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", 6 | "Enabled" : "Aktivirano", 7 | "Disabled" : "Onemogućeno" 8 | },"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);" 9 | } -------------------------------------------------------------------------------- /l10n/ca.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Recovery key successfully enabled" : "La clau de recuperació s'ha activat", 5 | "Could not enable recovery key. Please check your recovery key password!" : "No s'ha pogut activar la clau de recuperació. Comproveu contrasenya de la clau de recuperació!", 6 | "Recovery key successfully disabled" : "La clau de recuperació s'ha descativat", 7 | "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ó!", 8 | "Please provide a new recovery password" : "Siusplau proporcioneu una nova contrasenya de recuperació", 9 | "Please repeat the new recovery password" : "Repetiu la nova contrasenya de recuperació", 10 | "Password successfully changed." : "La contrasenya s'ha canviat.", 11 | "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.", 12 | "Private key password successfully updated." : "La contrasenya de la clau privada s'ha actualitzat.", 13 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "La clau privada de l'aplicació d'encriptació no és vàlida! Actualitzeu la contrasenya de la clau privada a l'arranjament personal per recuperar els fitxers encriptats.", 14 | "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.", 15 | "The share will expire on %s." : "La compartició venç el %s.", 16 | "Cheers!" : "Salut!", 17 | "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.", 18 | "Recovery key password" : "Clau de recuperació de la contrasenya", 19 | "Change recovery key password:" : "Canvia la clau de recuperació de contrasenya:", 20 | "Change Password" : "Canvia la contrasenya", 21 | "Your private key password no longer matches your log-in password." : "La clau privada ja no es correspon amb la contrasenya d'accés:", 22 | "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:", 23 | " 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.", 24 | "Old log-in password" : "Contrasenya anterior d'accés", 25 | "Current log-in password" : "Contrasenya d'accés actual", 26 | "Update Private Key Password" : "Actualitza la contrasenya de clau privada", 27 | "Enable password recovery:" : "Habilita la recuperació de contrasenya:", 28 | "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", 29 | "Enabled" : "Activat", 30 | "Disabled" : "Desactivat" 31 | }, 32 | "nplurals=2; plural=(n != 1);"); 33 | -------------------------------------------------------------------------------- /l10n/ca.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Recovery key successfully enabled" : "La clau de recuperació s'ha activat", 3 | "Could not enable recovery key. Please check your recovery key password!" : "No s'ha pogut activar la clau de recuperació. Comproveu contrasenya de la clau de recuperació!", 4 | "Recovery key successfully disabled" : "La clau de recuperació s'ha descativat", 5 | "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ó!", 6 | "Please provide a new recovery password" : "Siusplau proporcioneu una nova contrasenya de recuperació", 7 | "Please repeat the new recovery password" : "Repetiu la nova contrasenya de recuperació", 8 | "Password successfully changed." : "La contrasenya s'ha canviat.", 9 | "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.", 10 | "Private key password successfully updated." : "La contrasenya de la clau privada s'ha actualitzat.", 11 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "La clau privada de l'aplicació d'encriptació no és vàlida! Actualitzeu la contrasenya de la clau privada a l'arranjament personal per recuperar els fitxers encriptats.", 12 | "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.", 13 | "The share will expire on %s." : "La compartició venç el %s.", 14 | "Cheers!" : "Salut!", 15 | "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.", 16 | "Recovery key password" : "Clau de recuperació de la contrasenya", 17 | "Change recovery key password:" : "Canvia la clau de recuperació de contrasenya:", 18 | "Change Password" : "Canvia la contrasenya", 19 | "Your private key password no longer matches your log-in password." : "La clau privada ja no es correspon amb la contrasenya d'accés:", 20 | "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:", 21 | " 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.", 22 | "Old log-in password" : "Contrasenya anterior d'accés", 23 | "Current log-in password" : "Contrasenya d'accés actual", 24 | "Update Private Key Password" : "Actualitza la contrasenya de clau privada", 25 | "Enable password recovery:" : "Habilita la recuperació de contrasenya:", 26 | "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", 27 | "Enabled" : "Activat", 28 | "Disabled" : "Desactivat" 29 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 30 | } -------------------------------------------------------------------------------- /l10n/cy_GB.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Encryption" : "Amgryptiad" 5 | }, 6 | "nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;"); 7 | -------------------------------------------------------------------------------- /l10n/cy_GB.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Encryption" : "Amgryptiad" 3 | },"pluralForm" :"nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;" 4 | } -------------------------------------------------------------------------------- /l10n/de_AT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "The share will expire on %s." : "Die Freigabe wird am %s ablaufen.", 5 | "Cheers!" : "Noch einen schönen Tag!" 6 | }, 7 | "nplurals=2; plural=(n != 1);"); 8 | -------------------------------------------------------------------------------- /l10n/de_AT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The share will expire on %s." : "Die Freigabe wird am %s ablaufen.", 3 | "Cheers!" : "Noch einen schönen Tag!" 4 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 5 | } -------------------------------------------------------------------------------- /l10n/eo.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Missing parameters" : "Mankas parametroj", 5 | "Password successfully changed." : "La pasvorto sukcese ŝanĝiĝis.", 6 | "Could not change the password. Maybe the old password was not correct." : "Ne eblis ŝanĝi la pasvorton. Eble la malnova pasvorto malĝustis.", 7 | "Recovery Key disabled" : "Restaŭroŝlosilo malkapabliĝis", 8 | "Recovery Key enabled" : "Restaŭroŝlosilo kapabliĝis", 9 | "Private key password successfully updated." : "La pasvorto de la malpublika ŝlosilo sukcese ĝisdatiĝis.", 10 | "Encryption App is enabled and ready" : "Aplikaĵo Ĉifrado kapabligitas kaj pretas", 11 | "The share will expire on %s." : "La kunhavo senvalidiĝos je %s.", 12 | "Enable recovery key" : "Kapabligi restaŭroŝlosilon", 13 | "Disable recovery key" : "Malkapabligi restaŭroŝlosilon", 14 | "Recovery key password" : "Pasvorto de restaŭroŝlosilo", 15 | "Repeat recovery key password" : "Ripetu la pasvorton de restaŭroŝlosilo", 16 | "Change recovery key password:" : "Ŝanĝi la pasvorton de la restaŭroŝlosilo:", 17 | "Old recovery key password" : "Malnova pasvorto de restaŭroŝlosilo", 18 | "New recovery key password" : "Nova pasvorto de restaŭroŝlosilo", 19 | "Repeat new recovery key password" : "Ripetu la novan pasvorton de restaŭroŝlosilo", 20 | "Change Password" : "Ŝarĝi pasvorton", 21 | "ownCloud basic encryption module" : "Baza ĉifrada modulo de ownCloud", 22 | "Old log-in password" : "Malnova ensaluta pasvorto", 23 | "Current log-in password" : "Nuna ensaluta pasvorto", 24 | "Update Private Key Password" : "Ĝisdatigi la pasvorton de la malpublika ŝlosilo", 25 | "Enable password recovery:" : "Kapabligi restaŭron de pasvorto:", 26 | "Enabled" : "Kapabligita", 27 | "Disabled" : "Malkapabligita" 28 | }, 29 | "nplurals=2; plural=(n != 1);"); 30 | -------------------------------------------------------------------------------- /l10n/eo.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Missing parameters" : "Mankas parametroj", 3 | "Password successfully changed." : "La pasvorto sukcese ŝanĝiĝis.", 4 | "Could not change the password. Maybe the old password was not correct." : "Ne eblis ŝanĝi la pasvorton. Eble la malnova pasvorto malĝustis.", 5 | "Recovery Key disabled" : "Restaŭroŝlosilo malkapabliĝis", 6 | "Recovery Key enabled" : "Restaŭroŝlosilo kapabliĝis", 7 | "Private key password successfully updated." : "La pasvorto de la malpublika ŝlosilo sukcese ĝisdatiĝis.", 8 | "Encryption App is enabled and ready" : "Aplikaĵo Ĉifrado kapabligitas kaj pretas", 9 | "The share will expire on %s." : "La kunhavo senvalidiĝos je %s.", 10 | "Enable recovery key" : "Kapabligi restaŭroŝlosilon", 11 | "Disable recovery key" : "Malkapabligi restaŭroŝlosilon", 12 | "Recovery key password" : "Pasvorto de restaŭroŝlosilo", 13 | "Repeat recovery key password" : "Ripetu la pasvorton de restaŭroŝlosilo", 14 | "Change recovery key password:" : "Ŝanĝi la pasvorton de la restaŭroŝlosilo:", 15 | "Old recovery key password" : "Malnova pasvorto de restaŭroŝlosilo", 16 | "New recovery key password" : "Nova pasvorto de restaŭroŝlosilo", 17 | "Repeat new recovery key password" : "Ripetu la novan pasvorton de restaŭroŝlosilo", 18 | "Change Password" : "Ŝarĝi pasvorton", 19 | "ownCloud basic encryption module" : "Baza ĉifrada modulo de ownCloud", 20 | "Old log-in password" : "Malnova ensaluta pasvorto", 21 | "Current log-in password" : "Nuna ensaluta pasvorto", 22 | "Update Private Key Password" : "Ĝisdatigi la pasvorton de la malpublika ŝlosilo", 23 | "Enable password recovery:" : "Kapabligi restaŭron de pasvorto:", 24 | "Enabled" : "Kapabligita", 25 | "Disabled" : "Malkapabligita" 26 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 27 | } -------------------------------------------------------------------------------- /l10n/es_AR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Missing recovery key password" : "Falta contraseña de recuperación", 5 | "Recovery key successfully enabled" : "Se habilitó la recuperación de archivos", 6 | "Could not enable recovery key. Please check your recovery key password!" : "No se pudo habilitar la clave de recuperación. Por favor, comprobá tu contraseña.", 7 | "Recovery key successfully disabled" : "Clave de recuperación deshabilitada", 8 | "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.", 9 | "Password successfully changed." : "Tu contraseña fue cambiada", 10 | "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.", 11 | "Private key password successfully updated." : "Contraseña de clave privada actualizada con éxito.", 12 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Llave privada inválida para la aplicación de encriptación. Por favor actualice la clave de la llave privada en las configuraciones personales para recobrar el acceso a sus archivos encriptados.", 13 | "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.", 14 | "The share will expire on %s." : "El compartir expirará en %s.", 15 | "Cheers!" : "¡Saludos!", 16 | "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", 17 | "Recovery key password" : "Contraseña de recuperación de clave", 18 | "Change recovery key password:" : "Cambiar contraseña para recuperar la clave:", 19 | "Change Password" : "Cambiar contraseña", 20 | " 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", 21 | "Old log-in password" : "Contraseña anterior", 22 | "Current log-in password" : "Contraseña actual", 23 | "Update Private Key Password" : "Actualizar contraseña de la clave privada", 24 | "Enable password recovery:" : "Habilitar recuperación de contraseña:", 25 | "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", 26 | "Enabled" : "Habilitado", 27 | "Disabled" : "Deshabilitado" 28 | }, 29 | "nplurals=2; plural=(n != 1);"); 30 | -------------------------------------------------------------------------------- /l10n/es_AR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Missing recovery key password" : "Falta contraseña de recuperación", 3 | "Recovery key successfully enabled" : "Se habilitó la recuperación de archivos", 4 | "Could not enable recovery key. Please check your recovery key password!" : "No se pudo habilitar la clave de recuperación. Por favor, comprobá tu contraseña.", 5 | "Recovery key successfully disabled" : "Clave de recuperación deshabilitada", 6 | "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.", 7 | "Password successfully changed." : "Tu contraseña fue cambiada", 8 | "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.", 9 | "Private key password successfully updated." : "Contraseña de clave privada actualizada con éxito.", 10 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Llave privada inválida para la aplicación de encriptación. Por favor actualice la clave de la llave privada en las configuraciones personales para recobrar el acceso a sus archivos encriptados.", 11 | "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.", 12 | "The share will expire on %s." : "El compartir expirará en %s.", 13 | "Cheers!" : "¡Saludos!", 14 | "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", 15 | "Recovery key password" : "Contraseña de recuperación de clave", 16 | "Change recovery key password:" : "Cambiar contraseña para recuperar la clave:", 17 | "Change Password" : "Cambiar contraseña", 18 | " 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", 19 | "Old log-in password" : "Contraseña anterior", 20 | "Current log-in password" : "Contraseña actual", 21 | "Update Private Key Password" : "Actualizar contraseña de la clave privada", 22 | "Enable password recovery:" : "Habilitar recuperación de contraseña:", 23 | "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", 24 | "Enabled" : "Habilitado", 25 | "Disabled" : "Deshabilitado" 26 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 27 | } -------------------------------------------------------------------------------- /l10n/es_MX.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Missing recovery key password" : "Falta contraseña para llave de recuperación", 5 | "Please repeat the recovery key password" : "Por favor repite la contraseña de la llave de recuperación", 6 | "Repeated recovery key password does not match the provided recovery key password" : "La contraseña repetida para la llave de recuperación no es igual la contraseña especificada para la llave de recuperación", 7 | "Recovery key successfully enabled" : "Se ha habilitado la recuperación de archivos", 8 | "Could not enable recovery key. Please check your recovery key password!" : "No se pudo habilitar la clave de recuperación. Por favor compruebe su contraseña.", 9 | "Recovery key successfully disabled" : "Clave de recuperación deshabilitada", 10 | "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!", 11 | "Password successfully changed." : "Su contraseña ha sido cambiada", 12 | "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.", 13 | "Private key password successfully updated." : "Contraseña de clave privada actualizada con éxito.", 14 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "La clave privada no es válida para la aplicación de cifrado. Por favor, actualiza la contraseña de tu clave privada en tus ajustes personales para recuperar el acceso a tus archivos cifrados.", 15 | "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.", 16 | "The share will expire on %s." : "El objeto dejará de ser compartido el %s.", 17 | "Cheers!" : "¡Saludos!", 18 | "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.", 19 | "Recovery key password" : "Contraseña de clave de recuperación", 20 | "Change recovery key password:" : "Cambiar la contraseña de la clave de recuperación", 21 | "Change Password" : "Cambiar contraseña", 22 | " 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.", 23 | "Old log-in password" : "Contraseña de acceso antigua", 24 | "Current log-in password" : "Contraseña de acceso actual", 25 | "Update Private Key Password" : "Actualizar Contraseña de Clave Privada", 26 | "Enable password recovery:" : "Habilitar la recuperación de contraseña:", 27 | "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", 28 | "Enabled" : "Habilitar", 29 | "Disabled" : "Deshabilitado" 30 | }, 31 | "nplurals=2; plural=(n != 1);"); 32 | -------------------------------------------------------------------------------- /l10n/es_MX.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Missing recovery key password" : "Falta contraseña para llave de recuperación", 3 | "Please repeat the recovery key password" : "Por favor repite la contraseña de la llave de recuperación", 4 | "Repeated recovery key password does not match the provided recovery key password" : "La contraseña repetida para la llave de recuperación no es igual la contraseña especificada para la llave de recuperación", 5 | "Recovery key successfully enabled" : "Se ha habilitado la recuperación de archivos", 6 | "Could not enable recovery key. Please check your recovery key password!" : "No se pudo habilitar la clave de recuperación. Por favor compruebe su contraseña.", 7 | "Recovery key successfully disabled" : "Clave de recuperación deshabilitada", 8 | "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!", 9 | "Password successfully changed." : "Su contraseña ha sido cambiada", 10 | "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.", 11 | "Private key password successfully updated." : "Contraseña de clave privada actualizada con éxito.", 12 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "La clave privada no es válida para la aplicación de cifrado. Por favor, actualiza la contraseña de tu clave privada en tus ajustes personales para recuperar el acceso a tus archivos cifrados.", 13 | "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.", 14 | "The share will expire on %s." : "El objeto dejará de ser compartido el %s.", 15 | "Cheers!" : "¡Saludos!", 16 | "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.", 17 | "Recovery key password" : "Contraseña de clave de recuperación", 18 | "Change recovery key password:" : "Cambiar la contraseña de la clave de recuperación", 19 | "Change Password" : "Cambiar contraseña", 20 | " 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.", 21 | "Old log-in password" : "Contraseña de acceso antigua", 22 | "Current log-in password" : "Contraseña de acceso actual", 23 | "Update Private Key Password" : "Actualizar Contraseña de Clave Privada", 24 | "Enable password recovery:" : "Habilitar la recuperación de contraseña:", 25 | "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", 26 | "Enabled" : "Habilitar", 27 | "Disabled" : "Deshabilitado" 28 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 29 | } -------------------------------------------------------------------------------- /l10n/et_EE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Missing recovery key password" : "Muuda taastevõtme parool", 5 | "Please repeat the recovery key password" : "Palun korda uut taastevõtme parooli", 6 | "Repeated recovery key password does not match the provided recovery key password" : "Lahtritesse sisestatud taastevõtme paroolid ei kattu", 7 | "Recovery key successfully enabled" : "Taastevõtme lubamine õnnestus", 8 | "Could not enable recovery key. Please check your recovery key password!" : "Ei suutnud lubada taastevõtit. Palun kontrolli oma taastevõtme parooli!", 9 | "Recovery key successfully disabled" : "Taastevõtme keelamine õnnestus", 10 | "Could not disable recovery key. Please check your recovery key password!" : "Ei suuda keelata taastevõtit. Palun kontrolli oma taastevõtme parooli!", 11 | "Missing parameters" : "Paramttrid puuduvad", 12 | "Please provide the old recovery password" : "Palun sisesta vana taastevõtme parool", 13 | "Please provide a new recovery password" : "Palun sisesta uus taastevõtme parool", 14 | "Please repeat the new recovery password" : "Palun korda uut taastevõtme parooli", 15 | "Password successfully changed." : "Parool edukalt vahetatud.", 16 | "Could not change the password. Maybe the old password was not correct." : "Ei suutnud vahetada parooli. Võib-olla on vana parool valesti sisestatud.", 17 | "Recovery Key disabled" : "Taastevõti on välja lülitatud", 18 | "Recovery Key enabled" : "Taastevõti on sisse lülitatud", 19 | "Could not update the private key password." : "Ei suutnud uuendada privaatse võtme parooli.", 20 | "The old password was not correct, please try again." : "Vana parool polnud õige, palun proovi uuesti.", 21 | "The current log-in password was not correct, please try again." : "Praeguse sisselogimise parool polnud õige, palun proovi uuesti.", 22 | "Private key password successfully updated." : "Privaatse võtme parool edukalt uuendatud.", 23 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Vigane Krüpteerimisrakendi privaatvõti . Palun uuenda oma privaatse võtme parool oma personaasete seadete all taastamaks ligipääsu oma krüpteeritud failidele.", 24 | "Bad Signature" : "Vigane allkiri", 25 | "Missing Signature" : "Allkiri puudub", 26 | "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.", 27 | "The share will expire on %s." : "Jagamine aegub %s.", 28 | "Cheers!" : "Terekest!", 29 | "Default encryption module" : "Vaikimisi krüpteerimise moodul", 30 | "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.", 31 | "Master Key" : "Peavõti", 32 | "Enable recovery key" : "Luba taastevõtme kasutamine", 33 | "Disable recovery key" : "Keela taastevõtme kasutamine", 34 | "Recovery key password" : "Taastevõtme parool", 35 | "Repeat recovery key password" : "Korda taastevõtme parooli", 36 | "Change recovery key password:" : "Muuda taastevõtme parooli:", 37 | "Old recovery key password" : "Vana taastevõtme parool", 38 | "New recovery key password" : "Uus taastevõtme parool", 39 | "Repeat new recovery key password" : "Korda uut taastevõtme parooli", 40 | "Change Password" : "Muuda parooli", 41 | "ownCloud basic encryption module" : "ownCloud peamine küpteerimismoodul", 42 | "Your private key password no longer matches your log-in password." : "Sinu provaatvõtme parool ei kattu enam sinu sisselogimise parooliga.", 43 | "Set your old private key password to your current log-in password:" : "Pane oma vana privaatvõtme parooliks oma praegune sisselogimise parool.", 44 | " 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.", 45 | "Old log-in password" : "Vana sisselogimise parool", 46 | "Current log-in password" : "Praegune sisselogimise parool", 47 | "Update Private Key Password" : "Uuenda privaatse võtme parooli", 48 | "Enable password recovery:" : "Luba parooli taaste:", 49 | "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", 50 | "Enabled" : "Sisse lülitatud", 51 | "Disabled" : "Väljalülitatud" 52 | }, 53 | "nplurals=2; plural=(n != 1);"); 54 | -------------------------------------------------------------------------------- /l10n/et_EE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Missing recovery key password" : "Muuda taastevõtme parool", 3 | "Please repeat the recovery key password" : "Palun korda uut taastevõtme parooli", 4 | "Repeated recovery key password does not match the provided recovery key password" : "Lahtritesse sisestatud taastevõtme paroolid ei kattu", 5 | "Recovery key successfully enabled" : "Taastevõtme lubamine õnnestus", 6 | "Could not enable recovery key. Please check your recovery key password!" : "Ei suutnud lubada taastevõtit. Palun kontrolli oma taastevõtme parooli!", 7 | "Recovery key successfully disabled" : "Taastevõtme keelamine õnnestus", 8 | "Could not disable recovery key. Please check your recovery key password!" : "Ei suuda keelata taastevõtit. Palun kontrolli oma taastevõtme parooli!", 9 | "Missing parameters" : "Paramttrid puuduvad", 10 | "Please provide the old recovery password" : "Palun sisesta vana taastevõtme parool", 11 | "Please provide a new recovery password" : "Palun sisesta uus taastevõtme parool", 12 | "Please repeat the new recovery password" : "Palun korda uut taastevõtme parooli", 13 | "Password successfully changed." : "Parool edukalt vahetatud.", 14 | "Could not change the password. Maybe the old password was not correct." : "Ei suutnud vahetada parooli. Võib-olla on vana parool valesti sisestatud.", 15 | "Recovery Key disabled" : "Taastevõti on välja lülitatud", 16 | "Recovery Key enabled" : "Taastevõti on sisse lülitatud", 17 | "Could not update the private key password." : "Ei suutnud uuendada privaatse võtme parooli.", 18 | "The old password was not correct, please try again." : "Vana parool polnud õige, palun proovi uuesti.", 19 | "The current log-in password was not correct, please try again." : "Praeguse sisselogimise parool polnud õige, palun proovi uuesti.", 20 | "Private key password successfully updated." : "Privaatse võtme parool edukalt uuendatud.", 21 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Vigane Krüpteerimisrakendi privaatvõti . Palun uuenda oma privaatse võtme parool oma personaasete seadete all taastamaks ligipääsu oma krüpteeritud failidele.", 22 | "Bad Signature" : "Vigane allkiri", 23 | "Missing Signature" : "Allkiri puudub", 24 | "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.", 25 | "The share will expire on %s." : "Jagamine aegub %s.", 26 | "Cheers!" : "Terekest!", 27 | "Default encryption module" : "Vaikimisi krüpteerimise moodul", 28 | "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.", 29 | "Master Key" : "Peavõti", 30 | "Enable recovery key" : "Luba taastevõtme kasutamine", 31 | "Disable recovery key" : "Keela taastevõtme kasutamine", 32 | "Recovery key password" : "Taastevõtme parool", 33 | "Repeat recovery key password" : "Korda taastevõtme parooli", 34 | "Change recovery key password:" : "Muuda taastevõtme parooli:", 35 | "Old recovery key password" : "Vana taastevõtme parool", 36 | "New recovery key password" : "Uus taastevõtme parool", 37 | "Repeat new recovery key password" : "Korda uut taastevõtme parooli", 38 | "Change Password" : "Muuda parooli", 39 | "ownCloud basic encryption module" : "ownCloud peamine küpteerimismoodul", 40 | "Your private key password no longer matches your log-in password." : "Sinu provaatvõtme parool ei kattu enam sinu sisselogimise parooliga.", 41 | "Set your old private key password to your current log-in password:" : "Pane oma vana privaatvõtme parooliks oma praegune sisselogimise parool.", 42 | " 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.", 43 | "Old log-in password" : "Vana sisselogimise parool", 44 | "Current log-in password" : "Praegune sisselogimise parool", 45 | "Update Private Key Password" : "Uuenda privaatse võtme parooli", 46 | "Enable password recovery:" : "Luba parooli taaste:", 47 | "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", 48 | "Enabled" : "Sisse lülitatud", 49 | "Disabled" : "Väljalülitatud" 50 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 51 | } -------------------------------------------------------------------------------- /l10n/eu.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Missing recovery key password" : "Berreskurapen gakoaren pasahitza falta da", 5 | "Please repeat the recovery key password" : "Mesedez errepikatu berreskuratze gakoaren pasahitza", 6 | "Repeated recovery key password does not match the provided recovery key password" : "Errepikatutako berreskuratze gakoaren pasahitza ez dator bat berreskuratze gakoaren pasahitzarekin", 7 | "Recovery key successfully enabled" : "Berreskuratze gakoa behar bezala gaitua", 8 | "Could not enable recovery key. Please check your recovery key password!" : "Ezin da berreskuratze gako gaitu. Egiaztatu berreskuratze gako pasahitza!", 9 | "Recovery key successfully disabled" : "Berreskuratze gakoa behar bezala desgaitu da", 10 | "Could not disable recovery key. Please check your recovery key password!" : "Ezin da berreskuratze gako desgaitu. Egiaztatu berreskuratze gako pasahitza!", 11 | "Please provide the old recovery password" : "Mesedez sartu berreskuratze pasahitz zaharra", 12 | "Please provide a new recovery password" : "Mesedez sartu berreskuratze pasahitz berria", 13 | "Please repeat the new recovery password" : "Mesedez errepikatu berreskuratze pasahitz berria", 14 | "Password successfully changed." : "Pasahitza behar bezala aldatu da.", 15 | "Could not change the password. Maybe the old password was not correct." : "Ezin izan da pasahitza aldatu. Agian pasahitz zaharra okerrekoa da.", 16 | "Could not update the private key password." : "Ezin izan da gako pribatu pasahitza eguneratu. ", 17 | "The old password was not correct, please try again." : "Pasahitz zaharra ez da egokia. Mesedez, saiatu berriro.", 18 | "The current log-in password was not correct, please try again." : "Oraingo pasahitza ez da egokia. Mesedez, saiatu berriro.", 19 | "Private key password successfully updated." : "Gako pasahitz pribatu behar bezala eguneratu da.", 20 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Enkriptazio aplikaziorako gako pribatu okerra. Mesedez eguneratu zure gako pribatuaren pasahitza zure ezarpen pertsonaletan zure enkriptatuko fitxategietarako sarrera berreskuratzeko.", 21 | "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.", 22 | "The share will expire on %s." : "Elkarbanaketa %s-n iraungiko da.", 23 | "Cheers!" : "Ongi izan!", 24 | "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", 25 | "Recovery key password" : "Berreskuratze gako pasahitza", 26 | "Change recovery key password:" : "Aldatu berreskuratze gako pasahitza:", 27 | "Change Password" : "Aldatu Pasahitza", 28 | "Your private key password no longer matches your log-in password." : "Zure gako pasahitza pribatua ez da dagoeneko bat etortzen zure sartzeko pasahitzarekin.", 29 | "Set your old private key password to your current log-in password:" : "Ezarri zure gako pasahitz zaharra orain duzun sartzeko pasahitzan:", 30 | " 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.", 31 | "Old log-in password" : "Sartzeko pasahitz zaharra", 32 | "Current log-in password" : "Sartzeko oraingo pasahitza", 33 | "Update Private Key Password" : "Eguneratu gako pasahitza pribatua", 34 | "Enable password recovery:" : "Gaitu pasahitzaren berreskuratzea:", 35 | "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", 36 | "Enabled" : "Gaitua", 37 | "Disabled" : "Ez-gaitua" 38 | }, 39 | "nplurals=2; plural=(n != 1);"); 40 | -------------------------------------------------------------------------------- /l10n/eu.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Missing recovery key password" : "Berreskurapen gakoaren pasahitza falta da", 3 | "Please repeat the recovery key password" : "Mesedez errepikatu berreskuratze gakoaren pasahitza", 4 | "Repeated recovery key password does not match the provided recovery key password" : "Errepikatutako berreskuratze gakoaren pasahitza ez dator bat berreskuratze gakoaren pasahitzarekin", 5 | "Recovery key successfully enabled" : "Berreskuratze gakoa behar bezala gaitua", 6 | "Could not enable recovery key. Please check your recovery key password!" : "Ezin da berreskuratze gako gaitu. Egiaztatu berreskuratze gako pasahitza!", 7 | "Recovery key successfully disabled" : "Berreskuratze gakoa behar bezala desgaitu da", 8 | "Could not disable recovery key. Please check your recovery key password!" : "Ezin da berreskuratze gako desgaitu. Egiaztatu berreskuratze gako pasahitza!", 9 | "Please provide the old recovery password" : "Mesedez sartu berreskuratze pasahitz zaharra", 10 | "Please provide a new recovery password" : "Mesedez sartu berreskuratze pasahitz berria", 11 | "Please repeat the new recovery password" : "Mesedez errepikatu berreskuratze pasahitz berria", 12 | "Password successfully changed." : "Pasahitza behar bezala aldatu da.", 13 | "Could not change the password. Maybe the old password was not correct." : "Ezin izan da pasahitza aldatu. Agian pasahitz zaharra okerrekoa da.", 14 | "Could not update the private key password." : "Ezin izan da gako pribatu pasahitza eguneratu. ", 15 | "The old password was not correct, please try again." : "Pasahitz zaharra ez da egokia. Mesedez, saiatu berriro.", 16 | "The current log-in password was not correct, please try again." : "Oraingo pasahitza ez da egokia. Mesedez, saiatu berriro.", 17 | "Private key password successfully updated." : "Gako pasahitz pribatu behar bezala eguneratu da.", 18 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Enkriptazio aplikaziorako gako pribatu okerra. Mesedez eguneratu zure gako pribatuaren pasahitza zure ezarpen pertsonaletan zure enkriptatuko fitxategietarako sarrera berreskuratzeko.", 19 | "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.", 20 | "The share will expire on %s." : "Elkarbanaketa %s-n iraungiko da.", 21 | "Cheers!" : "Ongi izan!", 22 | "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", 23 | "Recovery key password" : "Berreskuratze gako pasahitza", 24 | "Change recovery key password:" : "Aldatu berreskuratze gako pasahitza:", 25 | "Change Password" : "Aldatu Pasahitza", 26 | "Your private key password no longer matches your log-in password." : "Zure gako pasahitza pribatua ez da dagoeneko bat etortzen zure sartzeko pasahitzarekin.", 27 | "Set your old private key password to your current log-in password:" : "Ezarri zure gako pasahitz zaharra orain duzun sartzeko pasahitzan:", 28 | " 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.", 29 | "Old log-in password" : "Sartzeko pasahitz zaharra", 30 | "Current log-in password" : "Sartzeko oraingo pasahitza", 31 | "Update Private Key Password" : "Eguneratu gako pasahitza pribatua", 32 | "Enable password recovery:" : "Gaitu pasahitzaren berreskuratzea:", 33 | "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", 34 | "Enabled" : "Gaitua", 35 | "Disabled" : "Ez-gaitua" 36 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 37 | } -------------------------------------------------------------------------------- /l10n/fa.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Missing recovery key password" : "فاقد رمزعبور کلید بازیابی", 5 | "Please repeat the recovery key password" : "لطفا رمز کلید بازیابی را تکرار کنید", 6 | "Recovery key successfully enabled" : "کلید بازیابی با موفقیت فعال شده است.", 7 | "Could not enable recovery key. Please check your recovery key password!" : "کلید بازیابی نمی تواند فعال شود. لطفا رمزعبور کلید بازیابی خود را بررسی نمایید!", 8 | "Recovery key successfully disabled" : "کلید بازیابی با موفقیت غیر فعال شده است.", 9 | "Could not disable recovery key. Please check your recovery key password!" : "کلید بازیابی را نمی تواند غیرفعال نماید. لطفا رمزعبور کلید بازیابی خود را بررسی کنید!", 10 | "Missing parameters" : "پارامترهای فراموش شده", 11 | "Please provide the old recovery password" : "لطفا رمز بازیابی قدیمی را وارد کنید", 12 | "Please provide a new recovery password" : "لطفا رمز بازیابی جدید را وارد کنید", 13 | "Please repeat the new recovery password" : "لطفا رمز بازیابی جدید را مجددا وارد کنید", 14 | "Password successfully changed." : "رمزعبور با موفقیت تغییر یافت.", 15 | "Could not change the password. Maybe the old password was not correct." : "رمزعبور را نمیتواند تغییر دهد. شاید رمزعبورقدیمی صحیح نمی باشد.", 16 | "Recovery Key disabled" : "کلید بازیابی غیرفعال شد", 17 | "Recovery Key enabled" : "کلید بازیابی فعال شد", 18 | "Could not enable the recovery key, please try again or contact your administrator" : "امکان فعال‌سازی کلید بازیابی وجود ندارد، لطفا مجددا تلاش کرده و یا با مدیر تماس بگیرید", 19 | "Could not update the private key password." : "امکان بروزرسانی رمزعبور کلید خصوصی وجود ندارد.", 20 | "The old password was not correct, please try again." : "رمزعبور قدیمی اشتباه است، لطفا مجددا تلاش کنید.", 21 | "Private key password successfully updated." : "رمزعبور کلید خصوصی با موفقیت به روز شد.", 22 | "Encryption App is enabled and ready" : "برنامه رمزگذاری فعال و آماده است", 23 | "The share will expire on %s." : "اشتراک‌گذاری در %s منقضی خواهد شد.", 24 | "Cheers!" : "سلامتی!", 25 | "Enable recovery key" : "فعال‌سازی کلید بازیابی", 26 | "Disable recovery key" : "غیرفعال‌سازی کلید بازیابی", 27 | "Recovery key password" : "رمزعبور کلید بازیابی", 28 | "Repeat recovery key password" : "تکرار رمزعبور کلید بازیابی", 29 | "Change recovery key password:" : "تغییر رمزعبور کلید بازیابی:", 30 | "Old recovery key password" : "رمزعبور قدیمی کلید بازیابی", 31 | "New recovery key password" : "رمزعبور جدید کلید بازیابی", 32 | "Repeat new recovery key password" : "تکرار رمزعبور جدید کلید بازیابی", 33 | "Change Password" : "تغییر رمزعبور", 34 | "ownCloud basic encryption module" : "ماژول پایه رمزگذاری ownCloud", 35 | " If you don't remember your old password you can ask your administrator to recover your files." : "اگر رمزعبور قدیمی را فراموش کرده اید میتوانید از مدیر خود برای بازیابی فایل هایتان درخواست نمایید.", 36 | "Old log-in password" : "رمزعبور قدیمی", 37 | "Current log-in password" : "رمزعبور فعلی", 38 | "Update Private Key Password" : "به روز رسانی رمزعبور کلید خصوصی", 39 | "Enable password recovery:" : "فعال سازی بازیابی رمزعبور:", 40 | "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "فعال کردن این گزینه به شما اجازه خواهد داد در صورت از دست دادن رمزعبور به فایل های رمزگذاری شده خود دسترسی داشته باشید.", 41 | "Enabled" : "فعال شده", 42 | "Disabled" : "غیرفعال شده" 43 | }, 44 | "nplurals=1; plural=0;"); 45 | -------------------------------------------------------------------------------- /l10n/fa.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Missing recovery key password" : "فاقد رمزعبور کلید بازیابی", 3 | "Please repeat the recovery key password" : "لطفا رمز کلید بازیابی را تکرار کنید", 4 | "Recovery key successfully enabled" : "کلید بازیابی با موفقیت فعال شده است.", 5 | "Could not enable recovery key. Please check your recovery key password!" : "کلید بازیابی نمی تواند فعال شود. لطفا رمزعبور کلید بازیابی خود را بررسی نمایید!", 6 | "Recovery key successfully disabled" : "کلید بازیابی با موفقیت غیر فعال شده است.", 7 | "Could not disable recovery key. Please check your recovery key password!" : "کلید بازیابی را نمی تواند غیرفعال نماید. لطفا رمزعبور کلید بازیابی خود را بررسی کنید!", 8 | "Missing parameters" : "پارامترهای فراموش شده", 9 | "Please provide the old recovery password" : "لطفا رمز بازیابی قدیمی را وارد کنید", 10 | "Please provide a new recovery password" : "لطفا رمز بازیابی جدید را وارد کنید", 11 | "Please repeat the new recovery password" : "لطفا رمز بازیابی جدید را مجددا وارد کنید", 12 | "Password successfully changed." : "رمزعبور با موفقیت تغییر یافت.", 13 | "Could not change the password. Maybe the old password was not correct." : "رمزعبور را نمیتواند تغییر دهد. شاید رمزعبورقدیمی صحیح نمی باشد.", 14 | "Recovery Key disabled" : "کلید بازیابی غیرفعال شد", 15 | "Recovery Key enabled" : "کلید بازیابی فعال شد", 16 | "Could not enable the recovery key, please try again or contact your administrator" : "امکان فعال‌سازی کلید بازیابی وجود ندارد، لطفا مجددا تلاش کرده و یا با مدیر تماس بگیرید", 17 | "Could not update the private key password." : "امکان بروزرسانی رمزعبور کلید خصوصی وجود ندارد.", 18 | "The old password was not correct, please try again." : "رمزعبور قدیمی اشتباه است، لطفا مجددا تلاش کنید.", 19 | "Private key password successfully updated." : "رمزعبور کلید خصوصی با موفقیت به روز شد.", 20 | "Encryption App is enabled and ready" : "برنامه رمزگذاری فعال و آماده است", 21 | "The share will expire on %s." : "اشتراک‌گذاری در %s منقضی خواهد شد.", 22 | "Cheers!" : "سلامتی!", 23 | "Enable recovery key" : "فعال‌سازی کلید بازیابی", 24 | "Disable recovery key" : "غیرفعال‌سازی کلید بازیابی", 25 | "Recovery key password" : "رمزعبور کلید بازیابی", 26 | "Repeat recovery key password" : "تکرار رمزعبور کلید بازیابی", 27 | "Change recovery key password:" : "تغییر رمزعبور کلید بازیابی:", 28 | "Old recovery key password" : "رمزعبور قدیمی کلید بازیابی", 29 | "New recovery key password" : "رمزعبور جدید کلید بازیابی", 30 | "Repeat new recovery key password" : "تکرار رمزعبور جدید کلید بازیابی", 31 | "Change Password" : "تغییر رمزعبور", 32 | "ownCloud basic encryption module" : "ماژول پایه رمزگذاری ownCloud", 33 | " If you don't remember your old password you can ask your administrator to recover your files." : "اگر رمزعبور قدیمی را فراموش کرده اید میتوانید از مدیر خود برای بازیابی فایل هایتان درخواست نمایید.", 34 | "Old log-in password" : "رمزعبور قدیمی", 35 | "Current log-in password" : "رمزعبور فعلی", 36 | "Update Private Key Password" : "به روز رسانی رمزعبور کلید خصوصی", 37 | "Enable password recovery:" : "فعال سازی بازیابی رمزعبور:", 38 | "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "فعال کردن این گزینه به شما اجازه خواهد داد در صورت از دست دادن رمزعبور به فایل های رمزگذاری شده خود دسترسی داشته باشید.", 39 | "Enabled" : "فعال شده", 40 | "Disabled" : "غیرفعال شده" 41 | },"pluralForm" :"nplurals=1; plural=0;" 42 | } -------------------------------------------------------------------------------- /l10n/hr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Recovery key successfully enabled" : "Ključ za oporavak uspješno aktiviran", 5 | "Could not enable recovery key. Please check your recovery key password!" : "Ključ za oporavak nije moguće aktivirati. Molimo provjerite svoju lozinku ključa za oporavak!", 6 | "Recovery key successfully disabled" : "Ključ za ooravak uspješno deaktiviran", 7 | "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!", 8 | "Password successfully changed." : "Lozinka uspješno promijenjena.", 9 | "Could not change the password. Maybe the old password was not correct." : "Lozinku nije moguće promijeniti. Možda je stara lozinka bila neispravna.", 10 | "Private key password successfully updated." : "Lozinka privatnog ključa uspješno ažurirana.", 11 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Neispravan privatni ključ za šifriranje. Molimo ažurirajte lozinku svoga privatnog ključa u svojim osobnimpostavkama da biste obnovili pristup svojim šifriranim datotekama.", 12 | "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.", 13 | "The share will expire on %s." : "Podijeljeni resurs će isteći na %s.", 14 | "Cheers!" : "Cheers!", 15 | "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.", 16 | "Recovery key password" : "Lozinka ključa za oporavak", 17 | "Change recovery key password:" : "Promijenite lozinku ključa za oporavak", 18 | "Change Password" : "Promijenite lozinku", 19 | "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.", 20 | "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.", 21 | " 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.", 22 | "Old log-in password" : "Stara lozinka za prijavu", 23 | "Current log-in password" : "Aktualna lozinka za prijavu", 24 | "Update Private Key Password" : "Ažurirajte lozinku privatnog ključa", 25 | "Enable password recovery:" : "Omogućite oporavak lozinke:", 26 | "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", 27 | "Enabled" : "Aktivirano", 28 | "Disabled" : "Onemogućeno" 29 | }, 30 | "nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;"); 31 | -------------------------------------------------------------------------------- /l10n/hr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Recovery key successfully enabled" : "Ključ za oporavak uspješno aktiviran", 3 | "Could not enable recovery key. Please check your recovery key password!" : "Ključ za oporavak nije moguće aktivirati. Molimo provjerite svoju lozinku ključa za oporavak!", 4 | "Recovery key successfully disabled" : "Ključ za ooravak uspješno deaktiviran", 5 | "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!", 6 | "Password successfully changed." : "Lozinka uspješno promijenjena.", 7 | "Could not change the password. Maybe the old password was not correct." : "Lozinku nije moguće promijeniti. Možda je stara lozinka bila neispravna.", 8 | "Private key password successfully updated." : "Lozinka privatnog ključa uspješno ažurirana.", 9 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Neispravan privatni ključ za šifriranje. Molimo ažurirajte lozinku svoga privatnog ključa u svojim osobnimpostavkama da biste obnovili pristup svojim šifriranim datotekama.", 10 | "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.", 11 | "The share will expire on %s." : "Podijeljeni resurs će isteći na %s.", 12 | "Cheers!" : "Cheers!", 13 | "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.", 14 | "Recovery key password" : "Lozinka ključa za oporavak", 15 | "Change recovery key password:" : "Promijenite lozinku ključa za oporavak", 16 | "Change Password" : "Promijenite lozinku", 17 | "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.", 18 | "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.", 19 | " 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.", 20 | "Old log-in password" : "Stara lozinka za prijavu", 21 | "Current log-in password" : "Aktualna lozinka za prijavu", 22 | "Update Private Key Password" : "Ažurirajte lozinku privatnog ključa", 23 | "Enable password recovery:" : "Omogućite oporavak lozinke:", 24 | "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", 25 | "Enabled" : "Aktivirano", 26 | "Disabled" : "Onemogućeno" 27 | },"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;" 28 | } -------------------------------------------------------------------------------- /l10n/hy.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Cheers!" : "Չը՛խկ", 5 | "Enabled" : "Միացված" 6 | }, 7 | "nplurals=2; plural=(n != 1);"); 8 | -------------------------------------------------------------------------------- /l10n/hy.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Cheers!" : "Չը՛խկ", 3 | "Enabled" : "Միացված" 4 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 5 | } -------------------------------------------------------------------------------- /l10n/ia.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "The share will expire on %s." : "Le compartir expirara le %s.", 5 | "Cheers!" : "Acclamationes!" 6 | }, 7 | "nplurals=2; plural=(n != 1);"); 8 | -------------------------------------------------------------------------------- /l10n/ia.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The share will expire on %s." : "Le compartir expirara le %s.", 3 | "Cheers!" : "Acclamationes!" 4 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 5 | } -------------------------------------------------------------------------------- /l10n/ka_GE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Encryption" : "ენკრიპცია" 5 | }, 6 | "nplurals=1; plural=0;"); 7 | -------------------------------------------------------------------------------- /l10n/ka_GE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Encryption" : "ენკრიპცია" 3 | },"pluralForm" :"nplurals=1; plural=0;" 4 | } -------------------------------------------------------------------------------- /l10n/km.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Password successfully changed." : "បាន​ប្ដូរ​ពាក្យ​សម្ងាត់​ដោយ​ជោគជ័យ។", 5 | "Could not change the password. Maybe the old password was not correct." : "មិន​អាច​ប្ដូរ​ពាក្យ​សម្ងាត់​បាន​ទេ។ ប្រហែល​ពាក្យ​សម្ងាត់​ចាស់​មិន​ត្រឹម​ត្រូវ។", 6 | "Change Password" : "ប្ដូរ​ពាក្យ​សម្ងាត់", 7 | "Enabled" : "បាន​បើក", 8 | "Disabled" : "បាន​បិទ" 9 | }, 10 | "nplurals=1; plural=0;"); 11 | -------------------------------------------------------------------------------- /l10n/km.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Password successfully changed." : "បាន​ប្ដូរ​ពាក្យ​សម្ងាត់​ដោយ​ជោគជ័យ។", 3 | "Could not change the password. Maybe the old password was not correct." : "មិន​អាច​ប្ដូរ​ពាក្យ​សម្ងាត់​បាន​ទេ។ ប្រហែល​ពាក្យ​សម្ងាត់​ចាស់​មិន​ត្រឹម​ត្រូវ។", 4 | "Change Password" : "ប្ដូរ​ពាក្យ​សម្ងាត់", 5 | "Enabled" : "បាន​បើក", 6 | "Disabled" : "បាន​បិទ" 7 | },"pluralForm" :"nplurals=1; plural=0;" 8 | } -------------------------------------------------------------------------------- /l10n/kn.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Cheers!" : "ಆನಂದಿಸಿ !", 5 | "Enabled" : "ಸಕ್ರಿಯಗೊಳಿಸಿದೆ", 6 | "Disabled" : "ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ" 7 | }, 8 | "nplurals=1; plural=0;"); 9 | -------------------------------------------------------------------------------- /l10n/kn.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Cheers!" : "ಆನಂದಿಸಿ !", 3 | "Enabled" : "ಸಕ್ರಿಯಗೊಳಿಸಿದೆ", 4 | "Disabled" : "ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ" 5 | },"pluralForm" :"nplurals=1; plural=0;" 6 | } -------------------------------------------------------------------------------- /l10n/ku_IQ.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Encryption" : "نهێنیکردن" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/ku_IQ.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Encryption" : "نهێنیکردن" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/lb.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Cheers!" : "Prost!", 5 | "Change Password" : "Passwuert änneren", 6 | "Enabled" : "Aktivéiert", 7 | "Disabled" : "Deaktivéiert" 8 | }, 9 | "nplurals=2; plural=(n != 1);"); 10 | -------------------------------------------------------------------------------- /l10n/lb.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Cheers!" : "Prost!", 3 | "Change Password" : "Passwuert änneren", 4 | "Enabled" : "Aktivéiert", 5 | "Disabled" : "Deaktivéiert" 6 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 7 | } -------------------------------------------------------------------------------- /l10n/lv.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Šifrēšanas lietotnei nepareiza privātā atslēga. Lūdzu atjaunojiet savu privāto atslēgu personīgo uzstādījumu sadaļā, lai atjaunot pieeju šifrētajiem failiem.", 5 | "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ļ.", 6 | "Enabled" : "Pievienots" 7 | }, 8 | "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"); 9 | -------------------------------------------------------------------------------- /l10n/lv.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Šifrēšanas lietotnei nepareiza privātā atslēga. Lūdzu atjaunojiet savu privāto atslēgu personīgo uzstādījumu sadaļā, lai atjaunot pieeju šifrētajiem failiem.", 3 | "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ļ.", 4 | "Enabled" : "Pievienots" 5 | },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);" 6 | } -------------------------------------------------------------------------------- /l10n/mk.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Missing recovery key password" : "Недостасува лозинката за клучевите за обновување", 5 | "Password successfully changed." : "Лозинката е успешно променета.", 6 | "Could not change the password. Maybe the old password was not correct." : "Лозинката не можеше да се промени. Можеби старата лозинка не беше исправна.", 7 | "Bad Signature" : "Лош потпис", 8 | "Missing Signature" : "Недостасува потписот", 9 | "Cheers!" : "Поздрав!", 10 | "Change Password" : "Смени лозинка", 11 | "Old log-in password" : "Старата лозинка за најавување", 12 | "Current log-in password" : "Тековната лозинка за најавување", 13 | "Enable password recovery:" : "Овозможи го обновувањето на лозинката:", 14 | "Enabled" : "Овозможен", 15 | "Disabled" : "Оневозможен" 16 | }, 17 | "nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"); 18 | -------------------------------------------------------------------------------- /l10n/mk.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Missing recovery key password" : "Недостасува лозинката за клучевите за обновување", 3 | "Password successfully changed." : "Лозинката е успешно променета.", 4 | "Could not change the password. Maybe the old password was not correct." : "Лозинката не можеше да се промени. Можеби старата лозинка не беше исправна.", 5 | "Bad Signature" : "Лош потпис", 6 | "Missing Signature" : "Недостасува потписот", 7 | "Cheers!" : "Поздрав!", 8 | "Change Password" : "Смени лозинка", 9 | "Old log-in password" : "Старата лозинка за најавување", 10 | "Current log-in password" : "Тековната лозинка за најавување", 11 | "Enable password recovery:" : "Овозможи го обновувањето на лозинката:", 12 | "Enabled" : "Овозможен", 13 | "Disabled" : "Оневозможен" 14 | },"pluralForm" :"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;" 15 | } -------------------------------------------------------------------------------- /l10n/nn_NO.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "The share will expire on %s." : "Deling har gyldigheit til %s.", 5 | "Cheers!" : "Skål!" 6 | }, 7 | "nplurals=2; plural=(n != 1);"); 8 | -------------------------------------------------------------------------------- /l10n/nn_NO.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "The share will expire on %s." : "Deling har gyldigheit til %s.", 3 | "Cheers!" : "Skål!" 4 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 5 | } -------------------------------------------------------------------------------- /l10n/ro.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Missing recovery key password" : "Lipsește parola cheii de recuperare", 5 | "Please repeat the recovery key password" : "Te rog repetă parola cheii de recuperare", 6 | "Repeated recovery key password does not match the provided recovery key password" : "Parolele cheii de recuperare nu se potrivesc", 7 | "Recovery key successfully enabled" : "Cheia de recuperare a fost activată cu succes", 8 | "Could not enable recovery key. Please check your recovery key password!" : "Nu s-a putut activa cheia de recuperare. Verifică-ți parola de recuperare!", 9 | "Recovery key successfully disabled" : "Cheia de recuperare dezactivată cu succes", 10 | "Could not disable recovery key. Please check your recovery key password!" : "Nu s-a putut dezactiva cheia de recuperare. Verifică-ți parola cheii de recuperare!", 11 | "Missing parameters" : "Parametri lipsă", 12 | "Please provide the old recovery password" : "Te rog oferă parola de recuperare veche", 13 | "Please provide a new recovery password" : "Te rog oferă o nouă parolă de recuperare", 14 | "Please repeat the new recovery password" : "Te rog repetă noua parolă de recuperare", 15 | "Password successfully changed." : "Parola a fost modificată cu succes.", 16 | "Could not change the password. Maybe the old password was not correct." : "Parola nu a putut fi schimbată. Poate ca parola veche este incorectă.", 17 | "Recovery Key disabled" : "Cheia de recuperare a fost dezactivată", 18 | "Recovery Key enabled" : "Cheie de recuperare activată", 19 | "Could not enable the recovery key, please try again or contact your administrator" : "Nu poate fi activată cheia de recuperare, te rog încearcă din nou sau contactează administratorul", 20 | "Could not update the private key password." : "Nu a putut fi actualizată parola cheii private.", 21 | "The old password was not correct, please try again." : "Parola veche nu este cea corectă, încearcă din nou.", 22 | "The current log-in password was not correct, please try again." : "Parola curentă de autentificare nu este corectă, încearcă din nou.", 23 | "Private key password successfully updated." : "Parola cheii private a fost actualizată cu succes.", 24 | "You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "Este necesar să migrezi cheile de criptare de la vechiul algoritm (ownCloud <= 8.0) la cel nou. Rulează 'occ encryption:migrate' sau contactează-ți administratorul.", 25 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Cheie privată invalidă pentru aplicația de criptare. Actualizează-ți parola cheii private folosind setările personale pentru a redobândi accesul la fișierele tale criptate.", 26 | "Encryption App is enabled and ready" : "Aplicația de criptare este activată", 27 | "Bad Signature" : "Semnătură greșită", 28 | "Missing Signature" : "Semnătură lipsă", 29 | "The share will expire on %s." : "Partajarea va expira în data de %s.", 30 | "Cheers!" : "Noroc!", 31 | "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplicația de criptare este activată dar cheile nu sunt inițializate, te rugăm reautentifică-te", 32 | "Enable recovery key" : "Activează cheia de recuperare", 33 | "Disable recovery key" : "Dezactivează cheia de recuperare", 34 | "Recovery key password" : "Parola cheii de recuperare", 35 | "Repeat recovery key password" : "Repetă parola cheii de recuperare", 36 | "Change recovery key password:" : "Schimbă parola cheii de recuperare:", 37 | "Old recovery key password" : "Parola veche a cheii de recuperare", 38 | "New recovery key password" : "Parola nouă a cheii de recuperare", 39 | "Repeat new recovery key password" : "Repetă parola nouă a cheii de recuperare", 40 | "Change Password" : "Schimbă parola", 41 | "ownCloud basic encryption module" : "modulul ownCloud de bază pentru criptare", 42 | "Your private key password no longer matches your log-in password." : "Parola cheii tale private nu se mai potrivește cu parola pentru autentificare.", 43 | "Old log-in password" : "Parola veche pentru autentificare", 44 | "Current log-in password" : "Parola curentă pentru autentificare", 45 | "Update Private Key Password" : "Actualizează parola cheii private", 46 | "Enable password recovery:" : "Activează recuperarea parolei:", 47 | "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Activarea acestei opțiuni îți va permite să redobândești accesul la fișierele tale criptate în cazul pierderii parolei", 48 | "Enabled" : "Activat", 49 | "Disabled" : "Dezactivat" 50 | }, 51 | "nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));"); 52 | -------------------------------------------------------------------------------- /l10n/ro.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Missing recovery key password" : "Lipsește parola cheii de recuperare", 3 | "Please repeat the recovery key password" : "Te rog repetă parola cheii de recuperare", 4 | "Repeated recovery key password does not match the provided recovery key password" : "Parolele cheii de recuperare nu se potrivesc", 5 | "Recovery key successfully enabled" : "Cheia de recuperare a fost activată cu succes", 6 | "Could not enable recovery key. Please check your recovery key password!" : "Nu s-a putut activa cheia de recuperare. Verifică-ți parola de recuperare!", 7 | "Recovery key successfully disabled" : "Cheia de recuperare dezactivată cu succes", 8 | "Could not disable recovery key. Please check your recovery key password!" : "Nu s-a putut dezactiva cheia de recuperare. Verifică-ți parola cheii de recuperare!", 9 | "Missing parameters" : "Parametri lipsă", 10 | "Please provide the old recovery password" : "Te rog oferă parola de recuperare veche", 11 | "Please provide a new recovery password" : "Te rog oferă o nouă parolă de recuperare", 12 | "Please repeat the new recovery password" : "Te rog repetă noua parolă de recuperare", 13 | "Password successfully changed." : "Parola a fost modificată cu succes.", 14 | "Could not change the password. Maybe the old password was not correct." : "Parola nu a putut fi schimbată. Poate ca parola veche este incorectă.", 15 | "Recovery Key disabled" : "Cheia de recuperare a fost dezactivată", 16 | "Recovery Key enabled" : "Cheie de recuperare activată", 17 | "Could not enable the recovery key, please try again or contact your administrator" : "Nu poate fi activată cheia de recuperare, te rog încearcă din nou sau contactează administratorul", 18 | "Could not update the private key password." : "Nu a putut fi actualizată parola cheii private.", 19 | "The old password was not correct, please try again." : "Parola veche nu este cea corectă, încearcă din nou.", 20 | "The current log-in password was not correct, please try again." : "Parola curentă de autentificare nu este corectă, încearcă din nou.", 21 | "Private key password successfully updated." : "Parola cheii private a fost actualizată cu succes.", 22 | "You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "Este necesar să migrezi cheile de criptare de la vechiul algoritm (ownCloud <= 8.0) la cel nou. Rulează 'occ encryption:migrate' sau contactează-ți administratorul.", 23 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Cheie privată invalidă pentru aplicația de criptare. Actualizează-ți parola cheii private folosind setările personale pentru a redobândi accesul la fișierele tale criptate.", 24 | "Encryption App is enabled and ready" : "Aplicația de criptare este activată", 25 | "Bad Signature" : "Semnătură greșită", 26 | "Missing Signature" : "Semnătură lipsă", 27 | "The share will expire on %s." : "Partajarea va expira în data de %s.", 28 | "Cheers!" : "Noroc!", 29 | "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplicația de criptare este activată dar cheile nu sunt inițializate, te rugăm reautentifică-te", 30 | "Enable recovery key" : "Activează cheia de recuperare", 31 | "Disable recovery key" : "Dezactivează cheia de recuperare", 32 | "Recovery key password" : "Parola cheii de recuperare", 33 | "Repeat recovery key password" : "Repetă parola cheii de recuperare", 34 | "Change recovery key password:" : "Schimbă parola cheii de recuperare:", 35 | "Old recovery key password" : "Parola veche a cheii de recuperare", 36 | "New recovery key password" : "Parola nouă a cheii de recuperare", 37 | "Repeat new recovery key password" : "Repetă parola nouă a cheii de recuperare", 38 | "Change Password" : "Schimbă parola", 39 | "ownCloud basic encryption module" : "modulul ownCloud de bază pentru criptare", 40 | "Your private key password no longer matches your log-in password." : "Parola cheii tale private nu se mai potrivește cu parola pentru autentificare.", 41 | "Old log-in password" : "Parola veche pentru autentificare", 42 | "Current log-in password" : "Parola curentă pentru autentificare", 43 | "Update Private Key Password" : "Actualizează parola cheii private", 44 | "Enable password recovery:" : "Activează recuperarea parolei:", 45 | "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Activarea acestei opțiuni îți va permite să redobândești accesul la fișierele tale criptate în cazul pierderii parolei", 46 | "Enabled" : "Activat", 47 | "Disabled" : "Dezactivat" 48 | },"pluralForm" :"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));" 49 | } -------------------------------------------------------------------------------- /l10n/si_LK.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Encryption" : "ගුප්ත කේතනය" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/si_LK.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Encryption" : "ගුප්ත කේතනය" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/sr@latin.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Neispravan privatni ključ za Aplikaciju za šifrovanje. Molimo da osvežite vašu lozinku privatnog ključa u ličnim podešavanjima kako bi dobili pristup šifrovanim fajlovima.", 5 | "The share will expire on %s." : "Deljeni sadržaj će isteći: %s", 6 | "Cheers!" : "U zdravlje!", 7 | "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.", 8 | "Disabled" : "Onemogućeno" 9 | }, 10 | "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); 11 | -------------------------------------------------------------------------------- /l10n/sr@latin.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Neispravan privatni ključ za Aplikaciju za šifrovanje. Molimo da osvežite vašu lozinku privatnog ključa u ličnim podešavanjima kako bi dobili pristup šifrovanim fajlovima.", 3 | "The share will expire on %s." : "Deljeni sadržaj će isteći: %s", 4 | "Cheers!" : "U zdravlje!", 5 | "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.", 6 | "Disabled" : "Onemogućeno" 7 | },"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);" 8 | } -------------------------------------------------------------------------------- /l10n/ta_LK.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Encryption" : "மறைக்குறியீடு" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/ta_LK.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Encryption" : "மறைக்குறியீடு" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/ur_PK.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Cheers!" : "واہ!" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/ur_PK.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Cheers!" : "واہ!" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/vi.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Missing recovery key password" : "Thiếu khóa khôi phục mật khẩu", 5 | "Please repeat the recovery key password" : "Nhập lại khóa khôi phục mật khẩu", 6 | "Recovery key successfully enabled" : "Khóa khôi phục kích hoạt thành công", 7 | "Could not enable recovery key. Please check your recovery key password!" : "Không thể kích hoạt khóa khôi phục. Vui lòng kiểm tra mật khẩu khóa khôi phục!", 8 | "Recovery key successfully disabled" : "Vô hiệu hóa khóa khôi phục thành công", 9 | "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!", 10 | "Password successfully changed." : "Đã đổi mật khẩu.", 11 | "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.", 12 | "Private key password successfully updated." : "Cập nhật thành công mật khẩu khóa cá nhân", 13 | "The share will expire on %s." : "Chia sẻ này sẽ hết hiệu lực vào %s.", 14 | "Cheers!" : "Chúc mừng!", 15 | "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", 16 | "Change Password" : "Đổi Mật khẩu", 17 | " 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.", 18 | "Old log-in password" : "Mật khẩu đăng nhập cũ", 19 | "Current log-in password" : "Mật khẩu đăng nhập hiện tại", 20 | "Update Private Key Password" : "Cập nhật mật khẩu khóa cá nhân", 21 | "Enable password recovery:" : "Kích hoạt khôi phục mật khẩu:", 22 | "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", 23 | "Enabled" : "Bật", 24 | "Disabled" : "Tắt" 25 | }, 26 | "nplurals=1; plural=0;"); 27 | -------------------------------------------------------------------------------- /l10n/vi.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Missing recovery key password" : "Thiếu khóa khôi phục mật khẩu", 3 | "Please repeat the recovery key password" : "Nhập lại khóa khôi phục mật khẩu", 4 | "Recovery key successfully enabled" : "Khóa khôi phục kích hoạt thành công", 5 | "Could not enable recovery key. Please check your recovery key password!" : "Không thể kích hoạt khóa khôi phục. Vui lòng kiểm tra mật khẩu khóa khôi phục!", 6 | "Recovery key successfully disabled" : "Vô hiệu hóa khóa khôi phục thành công", 7 | "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!", 8 | "Password successfully changed." : "Đã đổi mật khẩu.", 9 | "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.", 10 | "Private key password successfully updated." : "Cập nhật thành công mật khẩu khóa cá nhân", 11 | "The share will expire on %s." : "Chia sẻ này sẽ hết hiệu lực vào %s.", 12 | "Cheers!" : "Chúc mừng!", 13 | "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", 14 | "Change Password" : "Đổi Mật khẩu", 15 | " 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.", 16 | "Old log-in password" : "Mật khẩu đăng nhập cũ", 17 | "Current log-in password" : "Mật khẩu đăng nhập hiện tại", 18 | "Update Private Key Password" : "Cập nhật mật khẩu khóa cá nhân", 19 | "Enable password recovery:" : "Kích hoạt khôi phục mật khẩu:", 20 | "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", 21 | "Enabled" : "Bật", 22 | "Disabled" : "Tắt" 23 | },"pluralForm" :"nplurals=1; plural=0;" 24 | } -------------------------------------------------------------------------------- /l10n/zh_HK.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "encryption", 3 | { 4 | "Change Password" : "更改密碼", 5 | "Enabled" : "啟用", 6 | "Disabled" : "停用" 7 | }, 8 | "nplurals=1; plural=0;"); 9 | -------------------------------------------------------------------------------- /l10n/zh_HK.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Change Password" : "更改密碼", 3 | "Enabled" : "啟用", 4 | "Disabled" : "停用" 5 | },"pluralForm" :"nplurals=1; plural=0;" 6 | } -------------------------------------------------------------------------------- /lib/Command/HSMDaemon.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Encryption\Command; 23 | 24 | use OCP\IConfig; 25 | use Symfony\Component\Console\Command\Command; 26 | use Symfony\Component\Console\Input\InputInterface; 27 | use Symfony\Component\Console\Input\InputOption; 28 | use Symfony\Component\Console\Output\OutputInterface; 29 | 30 | class HSMDaemon extends Command { 31 | /** @var IConfig */ 32 | private $config; 33 | 34 | /** 35 | * @param IConfig $config 36 | */ 37 | public function __construct(IConfig $config) { 38 | $this->config = $config; 39 | parent::__construct(); 40 | } 41 | 42 | // TODO add route for hsmdaemon to post current secret 43 | // TODO add encrypt masterkey command / as option 44 | protected function configure() { 45 | $this 46 | ->setName('encryption:hsmdaemon') 47 | ->setDescription('hsmdaemon tool'); 48 | $this->addOption( 49 | 'export-masterkey', 50 | null, 51 | InputOption::VALUE_NONE, 52 | 'export the private master key in base64' 53 | ); 54 | $this->addOption( 55 | 'import-masterkey', 56 | null, 57 | InputOption::VALUE_REQUIRED, 58 | 'import a base64 encoded private masterkey' 59 | ); 60 | } 61 | 62 | /** 63 | * @param InputInterface $input 64 | * @param OutputInterface $output 65 | * @return int 66 | * @throws \Exception 67 | */ 68 | protected function execute(InputInterface $input, OutputInterface $output): int { 69 | /** @var string|null $hsmUrl */ 70 | $hsmUrl = $this->config->getAppValue('encryption', 'hsm.url'); 71 | if (\is_string($hsmUrl) && $hsmUrl !== '') { 72 | if ($input->getOption('export-masterkey')) { 73 | $manager = \OC::$server->getEncryptionKeyStorage(); 74 | $keyId = $this->config->getAppValue('encryption', 'masterKeyId').'.privateKey'; 75 | $key = $manager->getSystemUserKey($keyId, \OC::$server->getEncryptionManager()->getDefaultEncryptionModuleId()); 76 | // FIXME key might be too long to encrypt in one piece 77 | $output->writeln("current masterkey (base64 encoded): '".\base64_encode($key)."'"); 78 | } 79 | } else { 80 | $output->writeln("hsm.url not set"); 81 | return 1; 82 | } 83 | return 0; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/Command/MigrateKeys.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Thomas Müller 5 | * 6 | * @copyright Copyright (c) 2019, ownCloud GmbH 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | namespace OCA\Encryption\Command; 24 | 25 | use OC\Files\View; 26 | use OCA\Encryption\Migration; 27 | use OCP\IConfig; 28 | use OCP\IDBConnection; 29 | use OCP\ILogger; 30 | use OCP\IUserBackend; 31 | use OCP\IUserManager; 32 | use Symfony\Component\Console\Command\Command; 33 | use Symfony\Component\Console\Input\InputArgument; 34 | use Symfony\Component\Console\Input\InputInterface; 35 | use Symfony\Component\Console\Output\OutputInterface; 36 | 37 | class MigrateKeys extends Command { 38 | /** @var IUserManager */ 39 | private $userManager; 40 | /** @var View */ 41 | private $view; 42 | /** @var IDBConnection */ 43 | private $connection; 44 | /** @var IConfig */ 45 | private $config; 46 | /** @var ILogger */ 47 | private $logger; 48 | 49 | /** 50 | * @param IUserManager $userManager 51 | * @param View $view 52 | * @param IDBConnection $connection 53 | * @param IConfig $config 54 | * @param ILogger $logger 55 | */ 56 | public function __construct( 57 | IUserManager $userManager, 58 | View $view, 59 | IDBConnection $connection, 60 | IConfig $config, 61 | ILogger $logger 62 | ) { 63 | $this->userManager = $userManager; 64 | $this->view = $view; 65 | $this->connection = $connection; 66 | $this->config = $config; 67 | $this->logger = $logger; 68 | parent::__construct(); 69 | } 70 | 71 | protected function configure() { 72 | $this 73 | ->setName('encryption:migrate') 74 | ->setDescription('initial migration to encryption 2.0') 75 | ->addArgument( 76 | 'user_id', 77 | InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 78 | 'will migrate keys of the given user(s)' 79 | ); 80 | } 81 | 82 | /** 83 | * @param InputInterface $input 84 | * @param OutputInterface $output 85 | * @return int 86 | */ 87 | protected function execute(InputInterface $input, OutputInterface $output): int { 88 | // perform system reorganization 89 | $migration = new Migration($this->config, $this->view, $this->connection, $this->logger); 90 | 91 | $users = $input->getArgument('user_id'); 92 | if (!empty($users)) { 93 | foreach ($users as $user) { 94 | if ($this->userManager->userExists($user)) { 95 | $output->writeln("Migrating keys $user"); 96 | $migration->reorganizeFolderStructureForUser($user); 97 | } else { 98 | $output->writeln("Unknown user $user"); 99 | } 100 | } 101 | } else { 102 | $output->writeln("Reorganize system folder structure"); 103 | $migration->reorganizeSystemFolderStructure(); 104 | $migration->updateDB(); 105 | foreach ($this->userManager->getBackends() as $backend) { 106 | $name = \get_class($backend); 107 | 108 | if ($backend instanceof IUserBackend) { 109 | $name = $backend->getBackendName(); 110 | } 111 | 112 | $output->writeln("Migrating keys for users on backend $name"); 113 | 114 | $limit = 500; 115 | $offset = 0; 116 | do { 117 | $users = $backend->getUsers('', $limit, $offset); 118 | foreach ($users as $user) { 119 | $output->writeln(" $user"); 120 | $migration->reorganizeFolderStructureForUser($user); 121 | } 122 | $offset += $limit; 123 | } while (\count($users) >= $limit); 124 | } 125 | } 126 | 127 | $migration->finalCleanUp(); 128 | return 0; 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /lib/Controller/StatusController.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Thomas Müller 5 | * 6 | * @copyright Copyright (c) 2019, ownCloud GmbH 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | namespace OCA\Encryption\Controller; 24 | 25 | use OCA\Encryption\Session; 26 | use OCP\AppFramework\Controller; 27 | use OCP\AppFramework\Http\DataResponse; 28 | use OCP\IL10N; 29 | use OCP\IRequest; 30 | 31 | class StatusController extends Controller { 32 | /** @var IL10N */ 33 | private $l; 34 | 35 | /** @var Session */ 36 | private $session; 37 | 38 | /** 39 | * @param string $AppName 40 | * @param IRequest $request 41 | * @param IL10N $l10n 42 | * @param Session $session 43 | */ 44 | public function __construct( 45 | $AppName, 46 | IRequest $request, 47 | IL10N $l10n, 48 | Session $session 49 | ) { 50 | parent::__construct($AppName, $request); 51 | $this->l = $l10n; 52 | $this->session = $session; 53 | } 54 | 55 | /** 56 | * @NoAdminRequired 57 | * @return DataResponse 58 | */ 59 | public function getStatus() { 60 | $status = 'error'; 61 | $message = 'no valid init status'; 62 | switch ($this->session->getStatus()) { 63 | case Session::RUN_MIGRATION: 64 | $status = 'interactionNeeded'; 65 | $message = (string)$this->l->t( 66 | 'You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run \'occ encryption:migrate\' or contact your administrator' 67 | ); 68 | break; 69 | case Session::INIT_EXECUTED: 70 | $status = 'interactionNeeded'; 71 | $message = (string)$this->l->t( 72 | 'Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files.' 73 | ); 74 | break; 75 | case Session::NOT_INITIALIZED: 76 | $status = 'interactionNeeded'; 77 | $message = (string)$this->l->t( 78 | 'Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again.' 79 | ); 80 | break; 81 | case Session::INIT_SUCCESSFUL: 82 | $status = 'success'; 83 | $message = (string)$this->l->t('Encryption App is enabled and ready'); 84 | } 85 | 86 | return new DataResponse( 87 | [ 88 | 'status' => $status, 89 | 'data' => [ 90 | 'message' => $message] 91 | ] 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/Exceptions/MultiKeyDecryptException.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | namespace OCA\Encryption\Exceptions; 22 | 23 | use OCP\Encryption\Exceptions\GenericEncryptionException; 24 | 25 | class MultiKeyDecryptException extends GenericEncryptionException { 26 | } 27 | -------------------------------------------------------------------------------- /lib/Exceptions/MultiKeyEncryptException.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | namespace OCA\Encryption\Exceptions; 22 | 23 | use OCP\Encryption\Exceptions\GenericEncryptionException; 24 | 25 | class MultiKeyEncryptException extends GenericEncryptionException { 26 | } 27 | -------------------------------------------------------------------------------- /lib/Exceptions/PrivateKeyMissingException.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Clark Tomlinson 5 | * @author Thomas Müller 6 | * 7 | * @copyright Copyright (c) 2019, ownCloud GmbH 8 | * @license AGPL-3.0 9 | * 10 | * This code is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU Affero General Public License, version 3, 12 | * as published by the Free Software Foundation. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License, version 3, 20 | * along with this program. If not, see 21 | * 22 | */ 23 | 24 | namespace OCA\Encryption\Exceptions; 25 | 26 | use OCP\Encryption\Exceptions\GenericEncryptionException; 27 | 28 | class PrivateKeyMissingException extends GenericEncryptionException { 29 | /** 30 | * @param string $userId 31 | */ 32 | public function __construct($userId) { 33 | if (empty($userId)) { 34 | $userId = ""; 35 | } 36 | parent::__construct("Private Key missing for user: $userId"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/Exceptions/PublicKeyMissingException.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | namespace OCA\Encryption\Exceptions; 22 | 23 | use OCP\Encryption\Exceptions\GenericEncryptionException; 24 | 25 | class PublicKeyMissingException extends GenericEncryptionException { 26 | /** 27 | * @param string $userId 28 | */ 29 | public function __construct($userId) { 30 | if (empty($userId)) { 31 | $userId = ""; 32 | } 33 | parent::__construct("Public Key missing for user: $userId"); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/HookManager.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Clark Tomlinson 5 | * 6 | * @copyright Copyright (c) 2019, ownCloud GmbH 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | namespace OCA\Encryption; 24 | 25 | use OCA\Encryption\Hooks\Contracts\IHook; 26 | 27 | class HookManager { 28 | private $hookInstances = []; 29 | 30 | /** 31 | * @param array|IHook $instances 32 | * - This accepts either a single instance of IHook or an array of instances of IHook 33 | * @return bool 34 | */ 35 | public function registerHook($instances) { 36 | if (\is_array($instances)) { 37 | foreach ($instances as $instance) { 38 | if (!$instance instanceof IHook) { 39 | return false; 40 | } 41 | $this->hookInstances[] = $instance; 42 | } 43 | } elseif ($instances instanceof IHook) { 44 | $this->hookInstances[] = $instances; 45 | } 46 | return true; 47 | } 48 | 49 | public function fireHooks() { 50 | foreach ($this->hookInstances as $instance) { 51 | /** 52 | * Fire off the add hooks method of each instance stored in cache 53 | * 54 | * @var $instance IHook 55 | */ 56 | $instance->addHooks(); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/Hooks/Contracts/IHook.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Encryption\Hooks\Contracts; 23 | 24 | interface IHook { 25 | /** 26 | * Connects Hooks 27 | * 28 | * @return null 29 | */ 30 | public function addHooks(); 31 | } 32 | -------------------------------------------------------------------------------- /lib/JWT.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | namespace OCA\Encryption; 22 | 23 | class JWT { 24 | public static function base64UrlEncode($data) { 25 | return \str_replace('=', '', \strtr(\base64_encode($data), '+/', '-_')); 26 | } 27 | /** 28 | * @return string 29 | */ 30 | public static function header() { 31 | return self::base64UrlEncode(\json_encode([ 32 | 'typ' => 'JWT', 33 | 'alg' => 'HS256' 34 | ])); 35 | } 36 | 37 | /** 38 | * @param array $payload 39 | * @return string 40 | */ 41 | public static function payload($payload) { 42 | $payload = \array_merge($payload, [ 43 | 'iat' => \time(), 44 | 'jti' => \uniqid('', true) 45 | ]); 46 | return self::base64UrlEncode(\json_encode($payload)); 47 | } 48 | 49 | public static function signature($data, $key) { 50 | return self::base64UrlEncode(\hash_hmac('sha256', $data, $key, true)); 51 | } 52 | 53 | public static function token($payload, $secret) { 54 | $token = self::header().'.'.self::payload($payload); 55 | return $token.'.'.self::signature($token, $secret); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/Panels/Admin.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | namespace OCA\Encryption\Panels; 22 | 23 | use OCP\IL10N; 24 | use OCP\Settings\ISettings; 25 | use OCP\Template; 26 | use OCA\Encryption\Crypto\Crypt; 27 | use OCA\Encryption\Util; 28 | use OC\Files\View; 29 | use OCP\IConfig; 30 | use OCA\Encryption\Session; 31 | use OCP\ILogger; 32 | use OCP\IUserManager; 33 | use OCP\ISession; 34 | use OCP\IUserSession; 35 | 36 | class Admin implements ISettings { 37 | /** @var IConfig */ 38 | protected $config; 39 | /** @var ILogger */ 40 | protected $logger; 41 | /** @var IUserSession */ 42 | protected $userSession; 43 | /** @var IUserManager */ 44 | protected $userManager; 45 | /** @var ISession */ 46 | protected $session; 47 | /** @var IL10N */ 48 | protected $l; 49 | 50 | public function __construct( 51 | IConfig $config, 52 | ILogger $logger, 53 | IUserSession $userSession, 54 | IUserManager $userManager, 55 | ISession $session, 56 | IL10N $l 57 | ) { 58 | $this->config = $config; 59 | $this->logger = $logger; 60 | $this->userSession = $userSession; 61 | $this->userManager = $userManager; 62 | $this->session = $session; 63 | $this->l = $l; 64 | } 65 | 66 | public function getPriority() { 67 | return 0; 68 | } 69 | 70 | public function getSectionID() { 71 | return 'encryption'; 72 | } 73 | 74 | public function getPanel() { 75 | $tmpl = new Template('encryption', 'settings-admin'); 76 | $crypt = new Crypt( 77 | $this->logger, 78 | $this->userSession, 79 | $this->config, 80 | $this->l 81 | ); 82 | $util = new Util( 83 | new View(), 84 | $crypt, 85 | $this->logger, 86 | $this->userSession, 87 | $this->config, 88 | $this->userManager 89 | ); 90 | // Check if an adminRecovery account is enabled for recovering files after lost pwd 91 | $recoveryAdminEnabled = $this->config->getAppValue('encryption', 'recoveryAdminEnabled', '0'); 92 | $session = new Session($this->session); 93 | $encryptHomeStorage = $util->shouldEncryptHomeStorage(); 94 | $tmpl->assign('recoveryEnabled', $recoveryAdminEnabled); 95 | $tmpl->assign('initStatus', $session->getStatus()); 96 | $tmpl->assign('encryptHomeStorage', $encryptHomeStorage); 97 | $tmpl->assign('masterKeyEnabled', $util->isMasterKeyEnabled()); 98 | return $tmpl; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /lib/Panels/Personal.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | namespace OCA\Encryption\Panels; 22 | 23 | use OCP\Encryption\Keys\IStorage; 24 | use OCP\IConfig; 25 | use OCP\IL10N; 26 | use OCP\ILogger; 27 | use OCP\ISession; 28 | use OCP\IUserManager; 29 | use OCP\IUserSession; 30 | use OCP\Settings\ISettings; 31 | use OCP\Template; 32 | 33 | class Personal implements ISettings { 34 | /** @var ILogger */ 35 | protected $logger; 36 | /** @var IUserSession */ 37 | protected $userSession; 38 | /** @var IConfig */ 39 | protected $config; 40 | /** @var IL10N */ 41 | protected $l; 42 | /** @varIUserManager */ 43 | protected $userManager; 44 | /** @var ISession */ 45 | protected $session; 46 | /** @var IStorage */ 47 | protected $encKeyStorage; 48 | 49 | public function __construct( 50 | ILogger $logger, 51 | IUserSession $userSession, 52 | IConfig $config, 53 | IL10N $l, 54 | IUserManager $userManager, 55 | ISession $session, 56 | IStorage $encKeyStorage 57 | ) { 58 | $this->logger = $logger; 59 | $this->userSession = $userSession; 60 | $this->config = $config; 61 | $this->l = $l; 62 | $this->userManager = $userManager; 63 | $this->session = $session; 64 | $this->encKeyStorage = $encKeyStorage; 65 | } 66 | 67 | public function getPriority() { 68 | return 0; 69 | } 70 | 71 | public function getSectionID() { 72 | return 'encryption'; 73 | } 74 | 75 | /** 76 | * @return \OCP\AppFramework\Http\TemplateResponse|Template|null 77 | */ 78 | public function getPanel() { 79 | $session = new \OCA\Encryption\Session($this->session); 80 | $template = new Template('encryption', 'settings-personal'); 81 | $crypt = new \OCA\Encryption\Crypto\Crypt( 82 | $this->logger, 83 | $this->userSession, 84 | $this->config, 85 | $this->l 86 | ); 87 | 88 | $util = new \OCA\Encryption\Util( 89 | new \OC\Files\View(), 90 | $crypt, 91 | $this->logger, 92 | $this->userSession, 93 | $this->config, 94 | $this->userManager 95 | ); 96 | 97 | $user = $this->userSession->getUser()->getUID(); 98 | $privateKeySet = $session->isPrivateKeySet(); 99 | 100 | // did we tried to initialize the keys for this session? 101 | $initialized = $session->getStatus(); 102 | $recoveryAdminEnabled = $this->config->getAppValue('encryption', 'recoveryAdminEnabled'); 103 | $recoveryEnabledForUser = $util->isRecoveryEnabledForUser($user); 104 | if ($recoveryAdminEnabled || !$privateKeySet) { 105 | $template->assign('recoveryEnabled', $recoveryAdminEnabled); 106 | $template->assign('recoveryEnabledForUser', $recoveryEnabledForUser); 107 | $template->assign('privateKeySet', $privateKeySet); 108 | $template->assign('initialized', $initialized); 109 | return $template; 110 | } 111 | return null; 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /lib/Users/Setup.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Clark Tomlinson 5 | * @author Lukas Reschke 6 | * @author Thomas Müller 7 | * 8 | * @copyright Copyright (c) 2019, ownCloud GmbH 9 | * @license AGPL-3.0 10 | * 11 | * This code is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License, version 3, 13 | * as published by the Free Software Foundation. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Affero General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Affero General Public License, version 3, 21 | * along with this program. If not, see 22 | * 23 | */ 24 | 25 | namespace OCA\Encryption\Users; 26 | 27 | use OCA\Encryption\Crypto\Crypt; 28 | use OCA\Encryption\KeyManager; 29 | use OCP\ILogger; 30 | use OCP\IUserSession; 31 | 32 | class Setup { 33 | /** 34 | * @var Crypt 35 | */ 36 | private $crypt; 37 | /** 38 | * @var KeyManager 39 | */ 40 | private $keyManager; 41 | /** 42 | * @var ILogger 43 | */ 44 | private $logger; 45 | /** 46 | * @var bool|string 47 | */ 48 | private $user; 49 | 50 | /** 51 | * @param ILogger $logger 52 | * @param IUserSession $userSession 53 | * @param Crypt $crypt 54 | * @param KeyManager $keyManager 55 | */ 56 | public function __construct( 57 | ILogger $logger, 58 | IUserSession $userSession, 59 | Crypt $crypt, 60 | KeyManager $keyManager 61 | ) { 62 | $this->logger = $logger; 63 | $this->user = $userSession !== null && $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : false; 64 | $this->crypt = $crypt; 65 | $this->keyManager = $keyManager; 66 | } 67 | 68 | /** 69 | * @param string $uid user id 70 | * @param string $password user password 71 | * @return bool 72 | */ 73 | public function setupUser($uid, $password) { 74 | if (!$this->keyManager->userHasKeys($uid)) { 75 | return $this->keyManager->storeKeyPair( 76 | $uid, 77 | $password, 78 | $this->crypt->createKeyPair() 79 | ); 80 | } 81 | return true; 82 | } 83 | 84 | /** 85 | * make sure that all system keys exists 86 | */ 87 | public function setupSystem() { 88 | $this->keyManager->validateShareKey(); 89 | $this->keyManager->validateMasterKey(); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /phpcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ownCloud coding standard 4 | 5 | 6 | 7 | */vendor/* 8 | */3rdparty/* 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 49 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 69 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | */lib/storagewrapper.php 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | bootstrapFiles: 3 | - %currentWorkingDirectory%/../../lib/base.php 4 | inferPrivatePropertyTypeFromConstructor: true 5 | excludePaths: 6 | - %currentWorkingDirectory%/appinfo/routes.php 7 | ignoreErrors: 8 | - 9 | message: '#^Property OCA\\Encryption\\[^"]* is never read, only written.$#' 10 | path: lib/Command/FixEncryptedVersion.php 11 | count: 1 12 | - 13 | message: '#^Property OCA\\Encryption\\[^"]* is never read, only written.$#' 14 | path: lib/Controller/RecoveryController.php 15 | count: 1 16 | - 17 | message: '#^Property OCA\\Encryption\\[^"]* is never read, only written.$#' 18 | path: lib/Hooks/UserHooks.php 19 | count: 2 20 | - 21 | message: '#^Property OCA\\Encryption\\[^"]* is never read, only written.$#' 22 | path: lib/KeyManager.php 23 | count: 1 24 | - 25 | message: '#^Property OCA\\Encryption\\[^"]* is never read, only written.$#' 26 | path: lib/Recovery.php 27 | count: 2 28 | - 29 | message: '#^Property OCA\\Encryption\\[^"]* is never read, only written.$#' 30 | path: lib/Users/Setup.php 31 | count: 2 32 | - 33 | message: '#^Property OCA\\Encryption\\[^"]* is never read, only written.$#' 34 | path: lib/Util.php 35 | count: 2 36 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | ./tests/unit 15 | 16 | 17 | 18 | 19 | ./lib 20 | ./appinfo 21 | ./templates 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | # Organization and project keys are displayed in the right sidebar of the project homepage 2 | sonar.organization=owncloud-1 3 | sonar.projectKey=owncloud_encryption 4 | sonar.projectVersion=1.6.0 5 | sonar.host.url=https://sonarcloud.io 6 | 7 | # ===================================================== 8 | # Meta-data for the project 9 | # ===================================================== 10 | 11 | sonar.links.homepage=https://github.com/owncloud/encryption 12 | sonar.links.ci=https://drone.owncloud.com/owncloud/encryption/ 13 | sonar.links.scm=https://github.com/owncloud/encryption 14 | sonar.links.issue=https://github.com/owncloud/encryption/issues 15 | 16 | # ===================================================== 17 | # Properties that will be shared amongst all modules 18 | # ===================================================== 19 | 20 | # Just look in these directories for code 21 | sonar.sources=. 22 | sonar.inclusions=appinfo/**,lib/** 23 | 24 | # Pull Requests 25 | sonar.pullrequest.provider=GitHub 26 | sonar.pullrequest.github.repository=owncloud/encryption 27 | sonar.pullrequest.base=${env.SONAR_PULL_REQUEST_BASE} 28 | sonar.pullrequest.branch=${env.SONAR_PULL_REQUEST_BRANCH} 29 | sonar.pullrequest.key=${env.SONAR_PULL_REQUEST_KEY} 30 | 31 | # Properties specific to language plugins: 32 | sonar.php.coverage.reportPaths=results/clover-phpunit-php7.4-mysql8.0.xml,results/clover-phpunit-php7.4-postgres9.4.xml,results/clover-phpunit-php7.4-sqlite.xml 33 | sonar.javascript.lcov.reportPaths=results/lcov.info 34 | -------------------------------------------------------------------------------- /templates/altmail.php: -------------------------------------------------------------------------------- 1 | t("Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'ownCloud basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n", [$_['password']])); 6 | if (isset($_['expiration'])) { 7 | print_unescaped($l->t("The share will expire on %s.", [$_['expiration']])); 8 | print_unescaped("\n\n"); 9 | } 10 | // TRANSLATORS term at the end of a mail 11 | p($l->t("Cheers!")); 12 | ?> 13 | 14 | -- 15 | getName() . ' - ' . $theme->getSlogan()); ?> 16 | getBaseUrl()); 17 | -------------------------------------------------------------------------------- /templates/mail.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 39 |
7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 33 | 34 | 35 | 36 | 37 |
  11 | <?php p($theme->getName()); ?> 12 |
 
  18 | t('Hey there,

the admin enabled server-side-encryption. Your files were encrypted using the password %s.

Please login to the web interface, go to the section "ownCloud basic encryption module" of your personal settings and update your encryption password by entering this password into the "old log-in password" field and your current login-password.

', [$_['password']])); 20 | // TRANSLATORS term at the end of a mail 21 | p($l->t('Cheers!')); 22 | ?> 23 |
 
 --
29 | getName()); ?> - 30 | getSlogan()); ?> 31 |
getBaseUrl()); ?> 32 |
 
38 |
40 | -------------------------------------------------------------------------------- /templates/settings-personal.php: -------------------------------------------------------------------------------- 1 | 6 |
7 |

t('ownCloud basic encryption module')); ?>

8 | 9 | 10 | 11 | t("Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again.")); ?> 12 | 13 | 14 |

15 | 16 | 19 |
20 | t("Set your old private key password to your current log-in password:")); ?> 21 | t(" If you don't remember your old password you can ask your administrator to recover your files.")); 23 | endif; ?> 24 |
25 | 29 | 30 |
31 | 35 | 36 |
37 | 42 | 43 |

44 | 45 | 46 |
47 |

48 | 49 | 50 |
51 | t("Enabling this option will allow you to reobtain access to your encrypted files in case of password loss")); ?> 52 |
53 | /> 59 | 60 |
61 | 62 | /> 68 | 69 |

70 | 71 | 72 | -------------------------------------------------------------------------------- /tests/acceptance/config/behat.yml: -------------------------------------------------------------------------------- 1 | default: 2 | autoload: 3 | '': '%paths.base%/../features/bootstrap' 4 | 5 | suites: 6 | cliEncryption: 7 | paths: 8 | - '%paths.base%/../features/cliEncryption' 9 | contexts: 10 | - EncryptionContext: 11 | - FeatureContext: &common_feature_context_params 12 | baseUrl: http://localhost:8080 13 | adminUsername: admin 14 | adminPassword: admin 15 | regularUserPassword: 123456 16 | ocPath: apps/testing/api/v1/occ 17 | - OccContext: 18 | 19 | apiEncryption: 20 | paths: 21 | - '%paths.base%/../features/apiEncryption' 22 | contexts: 23 | - EncryptionContext: 24 | - FeatureContext: *common_feature_context_params 25 | - OccContext: 26 | - TrashbinContext: 27 | 28 | webUIUserKeysType: 29 | paths: 30 | - '%paths.base%/../features/webUIUserKeysType' 31 | contexts: 32 | - EncryptionContext: 33 | - WebUIAdminEncryptionSettingsContext: 34 | - WebUIPersonalEncryptionSettingsContext: 35 | - WebUIGeneralContext: 36 | - WebUILoginContext: 37 | - FeatureContext: *common_feature_context_params 38 | - OccContext: 39 | 40 | webUIMasterKeyType: 41 | paths: 42 | - '%paths.base%/../features/webUIMasterKeyType' 43 | contexts: 44 | - EncryptionContext: 45 | - WebUIAdminEncryptionSettingsContext: 46 | - WebUIPersonalEncryptionSettingsContext: 47 | - WebUIGeneralContext: 48 | - WebUILoginContext: 49 | - WebUIFilesContext: 50 | - FeatureContext: *common_feature_context_params 51 | - OccContext: 52 | 53 | extensions: 54 | Cjm\Behat\StepThroughExtension: ~ 55 | -------------------------------------------------------------------------------- /tests/acceptance/expected-failures-cli.md: -------------------------------------------------------------------------------- 1 | ## Scenarios that fail in the core cli suites when run with encryption 2 | The expected failures in this file are from features in the owncloud/core repo. 3 | 4 | #### [File remains encrypted when moved to external ownCloud storage](https://github.com/owncloud/encryption/issues/326) 5 | 6 | - [cliExternalStorage/filesExternalWebdavOwncloud.feature:273](https://github.com/owncloud/core/blob/master/tests/acceptance/features/cliExternalStorage/filesExternalWebdavOwncloud.feature#L273) 7 | -------------------------------------------------------------------------------- /tests/acceptance/features/bootstrap/WebUIAdminEncryptionSettingsContext.php: -------------------------------------------------------------------------------- 1 | 6 | * @copyright Copyright (c) 2018 Paurakh Sharma Humagain 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE 10 | * License as published by the Free Software Foundation; either 11 | * version 3 of the License, or any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU AFFERO GENERAL PUBLIC LICENSE for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public 19 | * License along with this library. If not, see . 20 | * 21 | */ 22 | 23 | use Behat\Behat\Context\Context; 24 | use Behat\Behat\Hook\Scope\BeforeScenarioScope; 25 | use Behat\MinkExtension\Context\RawMinkContext; 26 | use Page\OwncloudPage; 27 | use Page\AdminEncryptionSettingsPage; 28 | 29 | require_once 'bootstrap.php'; 30 | 31 | /** 32 | * Context for admin encryption settings specific webUI steps 33 | */ 34 | class WebUIAdminEncryptionSettingsContext extends RawMinkContext implements Context { 35 | /** 36 | * @var FeatureContext 37 | */ 38 | private $featureContext; 39 | 40 | /** 41 | * 42 | * @var WebUIGeneralContext 43 | */ 44 | private $webUIGeneralContext; 45 | 46 | /** 47 | * 48 | * @var OwncloudPage 49 | */ 50 | private $owncloudPage; 51 | 52 | /** 53 | * 54 | * @var AdminEncryptionSettingsPage 55 | */ 56 | private $adminEncryptionSettingsPage; 57 | 58 | /** 59 | * WebUIAdminEncryptionSettingsContext constructor. 60 | * 61 | * @param OwncloudPage $owncloudPage 62 | * @param AdminEncryptionSettingsPage $adminEncryptionSettingsPage 63 | */ 64 | public function __construct( 65 | OwncloudPage $owncloudPage, 66 | AdminEncryptionSettingsPage $adminEncryptionSettingsPage 67 | ) { 68 | $this->owncloudPage = $owncloudPage; 69 | $this->adminEncryptionSettingsPage = $adminEncryptionSettingsPage; 70 | } 71 | 72 | /** 73 | * @Given the administrator has browsed to the admin encryption settings page 74 | * 75 | * @return void 76 | */ 77 | public function theAdministratorHasBrowsedToTheAdminEncryptionSettingsPage():void { 78 | $this->webUIGeneralContext->adminLogsInUsingTheWebUI(); 79 | $this->adminEncryptionSettingsPage->open(); 80 | $this->adminEncryptionSettingsPage->waitTillPageIsLoaded($this->getSession()); 81 | } 82 | 83 | /** 84 | * @Given the administrator has enabled recovery key and set the recovery key to :recoveryKey 85 | * 86 | * @param string $recoveryKey 87 | * 88 | * @return void 89 | */ 90 | public function theAdministratorHasEnabledRecoveryKeyAndSetRecoveryKeyTo(string $recoveryKey):void { 91 | $this->adminEncryptionSettingsPage->enableRecoveryKeyAndSetRecoveryKeyTo($recoveryKey); 92 | $this->adminEncryptionSettingsPage->waitForAjaxCallsToStartAndFinish($this->getSession()); 93 | } 94 | 95 | /** 96 | * @BeforeScenario 97 | * 98 | * @param BeforeScenarioScope $scope 99 | * 100 | * @return void 101 | */ 102 | public function setUpScenario(BeforeScenarioScope $scope):void { 103 | // Get the environment 104 | $environment = $scope->getEnvironment(); 105 | // Get all the contexts you need in this context 106 | $this->featureContext = $environment->getContext('FeatureContext'); 107 | $this->webUIGeneralContext = $environment->getContext('WebUIGeneralContext'); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /tests/acceptance/features/bootstrap/WebUIPersonalEncryptionSettingsContext.php: -------------------------------------------------------------------------------- 1 | 6 | * @copyright Copyright (c) 2018 Paurakh Sharma Humagain 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE 10 | * License as published by the Free Software Foundation; either 11 | * version 3 of the License, or any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU AFFERO GENERAL PUBLIC LICENSE for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public 19 | * License along with this library. If not, see . 20 | * 21 | */ 22 | 23 | use Behat\Behat\Context\Context; 24 | use Behat\Behat\Hook\Scope\BeforeScenarioScope; 25 | use Behat\MinkExtension\Context\RawMinkContext; 26 | use Page\PersonalEncryptionSettingsPage; 27 | use Page\OwncloudPage; 28 | 29 | require_once 'bootstrap.php'; 30 | 31 | /** 32 | * Context for personal encryption settings specific webUI steps 33 | */ 34 | class WebUIPersonalEncryptionSettingsContext extends RawMinkContext implements Context { 35 | /** 36 | * @var FeatureContext 37 | */ 38 | private $featureContext; 39 | 40 | /** 41 | * 42 | * @var WebUIGeneralContext 43 | */ 44 | private $webUIGeneralContext; 45 | 46 | /** 47 | * 48 | * @var OwncloudPage 49 | */ 50 | private $owncloudPage; 51 | 52 | /** 53 | * 54 | * @var PersonalEncryptionSettingsPage 55 | */ 56 | private $personalEncryptionSettingsPage; 57 | 58 | /** 59 | * WebUIPersonalEncryptionSettingsContext constructor. 60 | * 61 | * @param OwncloudPage $owncloudPage 62 | * @param PersonalEncryptionSettingsPage $personalEncryptionSettingsPage 63 | */ 64 | public function __construct( 65 | OwncloudPage $owncloudPage, 66 | PersonalEncryptionSettingsPage $personalEncryptionSettingsPage 67 | ) { 68 | $this->owncloudPage = $owncloudPage; 69 | $this->personalEncryptionSettingsPage = $personalEncryptionSettingsPage; 70 | } 71 | 72 | /** 73 | * @Given the user/administrator has browsed to the personal encryption settings page 74 | * 75 | * @return void 76 | */ 77 | public function theUserHasBrowsedToThePersonalEncryptionSettingsPage():void { 78 | $this->personalEncryptionSettingsPage->open(); 79 | $this->personalEncryptionSettingsPage->waitTillPageIsLoaded($this->getSession()); 80 | } 81 | 82 | /** 83 | * @Given the user/administrator has enabled password recovery 84 | * 85 | * @return void 86 | */ 87 | public function theUserHasEnabledPasswordRecovery():void { 88 | $this->personalEncryptionSettingsPage->enablePasswordRecovery(); 89 | $this->personalEncryptionSettingsPage->waitForAjaxCallsToStartAndFinish($this->getSession()); 90 | } 91 | 92 | /** 93 | * @BeforeScenario 94 | * 95 | * @param BeforeScenarioScope $scope 96 | * 97 | * @return void 98 | */ 99 | public function setUpScenario(BeforeScenarioScope $scope):void { 100 | // Get the environment 101 | $environment = $scope->getEnvironment(); 102 | // Get all the contexts you need in this context 103 | $this->featureContext = $environment->getContext('FeatureContext'); 104 | $this->webUIGeneralContext = $environment->getContext('WebUIGeneralContext'); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /tests/acceptance/features/bootstrap/bootstrap.php: -------------------------------------------------------------------------------- 1 | 6 | * @copyright Copyright (c) 2018 Artur Neumann info@jankaritech.com 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE 10 | * License as published by the Free Software Foundation; either 11 | * version 3 of the License, or any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU AFFERO GENERAL PUBLIC LICENSE for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public 19 | * License along with this library. If not, see . 20 | * 21 | */ 22 | 23 | require_once __DIR__ . '/../../../../../../tests/acceptance/features/bootstrap/bootstrap.php'; 24 | 25 | $classLoader = new \Composer\Autoload\ClassLoader(); 26 | $classLoader->addPsr4( 27 | "", 28 | __DIR__ . "/../../../../../../tests/acceptance/features/bootstrap", 29 | true 30 | ); 31 | $classLoader->addPsr4("Page\\", __DIR__ . "/../lib", true); 32 | $classLoader->addPsr4( 33 | "Page\\", 34 | __DIR__ . "/../../../../../../tests/acceptance/features/lib", 35 | true 36 | ); 37 | 38 | $classLoader->register(); 39 | -------------------------------------------------------------------------------- /tests/acceptance/features/cliEncryption/recreatemasterkey.feature: -------------------------------------------------------------------------------- 1 | @cli @skip_on_objectstore @encryption 2 | Feature: recreate-master-key 3 | 4 | 5 | Scenario: recreate masterkey 6 | Given user "admin" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt" 7 | When the administrator successfully recreates the encryption masterkey using the occ command 8 | Then the downloaded content when downloading file "/somefile.txt" for user "admin" with range "bytes=0-6" should be "This is" 9 | 10 | 11 | Scenario: recreate masterkey and upload data 12 | Given user "Alice" has been created with default attributes and small skeleton files 13 | And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt" 14 | When the administrator successfully recreates the encryption masterkey using the occ command 15 | And user "Alice" uploads chunk file "1" of "1" with "AA" to "/somefile.txt" using the WebDAV API 16 | Then the downloaded content when downloading file "/somefile.txt" for user "Alice" with range "bytes=0-3" should be "AA" 17 | -------------------------------------------------------------------------------- /tests/acceptance/features/lib/AdminEncryptionSettingsPage.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright Copyright (c) 2018 Paurakh Sharma Humagain 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE 11 | * License as published by the Free Software Foundation; either 12 | * version 3 of the License, or any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU AFFERO GENERAL PUBLIC LICENSE for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public 20 | * License along with this library. If not, see . 21 | * 22 | */ 23 | 24 | namespace Page; 25 | 26 | use Behat\Mink\Session; 27 | 28 | /** 29 | * PageObject for the admin encryption settings page 30 | * 31 | */ 32 | class AdminEncryptionSettingsPage extends OwncloudPage { 33 | /** 34 | * 35 | * @var string $path 36 | */ 37 | protected $path = '/index.php/settings/admin?sectionid=encryption'; 38 | 39 | private $encryptionRecoveryPasswordFieldId = 'encryptionRecoveryPassword'; 40 | private $repeatEncryptionRecoveryPasswordFieldId = 'repeatEncryptionRecoveryPassword'; 41 | private $enableRecoveryBtnId = 'enableRecoveryKey'; 42 | private $enableEncryptionCheckboxId = 'enableEncryption'; 43 | 44 | /** 45 | * Enable recovery key and set recovery key 46 | * 47 | * @param string $recoveryKey 48 | * 49 | * @return void 50 | */ 51 | public function enableRecoveryKeyAndSetRecoveryKeyTo(string $recoveryKey):void { 52 | $enableRecoveryKeyBtn = $this->findById($this->enableRecoveryBtnId); 53 | $this->assertElementNotNull( 54 | $enableRecoveryKeyBtn, 55 | __METHOD__ . 56 | " id $this->enableRecoveryBtnId " . 57 | "could not find enable/disable recovery key button" 58 | ); 59 | 60 | $action = $enableRecoveryKeyBtn->getAttribute("value"); 61 | if ($action === "Disable recovery key") { 62 | return; 63 | } 64 | $this->fillField($this->encryptionRecoveryPasswordFieldId, $recoveryKey); 65 | $this->fillField($this->repeatEncryptionRecoveryPasswordFieldId, $recoveryKey); 66 | $enableRecoveryKeyBtn->click(); 67 | } 68 | 69 | /** 70 | * there is no reliable loading indicator on the admin encryption settings page, 71 | * so just wait for the enable encryption checkbox to be there. 72 | * 73 | * @param Session $session 74 | * @param int $timeout_msec 75 | * 76 | * @return void 77 | * @throws \Exception 78 | */ 79 | public function waitTillPageIsLoaded( 80 | Session $session, 81 | int $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC 82 | ):void { 83 | $currentTime = \microtime(true); 84 | $end = $currentTime + ($timeout_msec / 1000); 85 | while ($currentTime <= $end) { 86 | if ($this->findById($this->enableEncryptionCheckboxId) !== null) { 87 | break; 88 | } 89 | \usleep(STANDARD_SLEEP_TIME_MICROSEC); 90 | $currentTime = \microtime(true); 91 | } 92 | 93 | if ($currentTime > $end) { 94 | throw new \Exception( 95 | __METHOD__ . " timeout waiting for admin encryption settings page to load" 96 | ); 97 | } 98 | 99 | $this->waitForOutstandingAjaxCalls($session); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /tests/acceptance/features/lib/PersonalEncryptionSettingsPage.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright Copyright (c) 2018 Paurakh Sharma Humagain 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE 11 | * License as published by the Free Software Foundation; either 12 | * version 3 of the License, or any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU AFFERO GENERAL PUBLIC LICENSE for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public 20 | * License along with this library. If not, see . 21 | * 22 | */ 23 | 24 | namespace Page; 25 | 26 | use Behat\Mink\Session; 27 | 28 | /** 29 | * PageObject for the personal encryption settings page 30 | * 31 | */ 32 | class PersonalEncryptionSettingsPage extends OwncloudPage { 33 | /** 34 | * 35 | * @var string $path 36 | */ 37 | protected $path = '/index.php/settings/personal?sectionid=encryption'; 38 | 39 | private $userEnableRecoveryCheckboxId = 'userEnableRecoveryCheckbox'; 40 | private $userEnableRecoveryCheckboxXpath = '//label[@for="userEnableRecoveryCheckbox"]'; 41 | /** 42 | * Enable password recovery 43 | * 44 | * @return void 45 | */ 46 | public function enablePasswordRecovery():void { 47 | $userEnableRecoveryCheckbox = $this->find('xpath', $this->userEnableRecoveryCheckboxXpath); 48 | $this->assertElementNotNull( 49 | $userEnableRecoveryCheckbox, 50 | __METHOD__ . 51 | " id $this->userEnableRecoveryCheckboxXpath " . 52 | "could not find enable checkbox" 53 | ); 54 | 55 | $userEnableRecoveryCheckbox->click(); 56 | } 57 | 58 | /** 59 | * there is no reliable loading indicator on the personal encryption settings page, 60 | * so just wait for the enable encryption checkbox to be there. 61 | * 62 | * @param Session $session 63 | * @param int $timeout_msec 64 | * 65 | * @return void 66 | * @throws \Exception 67 | */ 68 | public function waitTillPageIsLoaded( 69 | Session $session, 70 | int $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC 71 | ):void { 72 | $currentTime = \microtime(true); 73 | $end = $currentTime + ($timeout_msec / 1000); 74 | while ($currentTime <= $end) { 75 | if ($this->findById($this->userEnableRecoveryCheckboxId) !== null) { 76 | break; 77 | } 78 | \usleep(STANDARD_SLEEP_TIME_MICROSEC); 79 | $currentTime = \microtime(true); 80 | } 81 | 82 | if ($currentTime > $end) { 83 | throw new \Exception( 84 | __METHOD__ . " timeout waiting for personal encryption settings page to load" 85 | ); 86 | } 87 | 88 | $this->waitForOutstandingAjaxCalls($session); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /tests/acceptance/features/webUIMasterKeyType/webUIMasterKeys.feature: -------------------------------------------------------------------------------- 1 | @webUI @skipOnEncryptionType:user-keys @skipOnStorage:ceph 2 | Feature: encrypt files using master keys 3 | As an admin 4 | I want to be able to encrypt user files using master keys 5 | So that I can use a common key to encrypt files of all user 6 | 7 | @skip @issue-409 8 | Scenario: user cannot access their file after recreating master key with re-login 9 | Given user "Alice" has been created with default attributes and large skeleton files 10 | And the administrator has set the encryption type to "masterkey" 11 | And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt" 12 | And user "Alice" has logged in using the webUI 13 | When the administrator successfully recreates the encryption masterkey using the occ command 14 | Then the command output should contain the text 'Note: All users are required to relogin.' 15 | When the user opens file "lorem.txt" expecting to fail using the webUI 16 | Then the user should be redirected to the general exception webUI page with the title "%productname%" 17 | And the title of the exception on general exception webUI page should be "Forbidden" 18 | And a message should be displayed on the general exception webUI page containing "Encryption not ready" 19 | 20 | 21 | Scenario: user can access their file after recreating master key with re-login 22 | Given user "Alice" has been created with default attributes and large skeleton files 23 | And the administrator has set the encryption type to "masterkey" 24 | And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt" 25 | And user "Alice" has logged in using the webUI 26 | When the administrator successfully recreates the encryption masterkey using the occ command 27 | And the user re-logs in as "Alice" using the webUI 28 | And the user opens file "lorem.txt" using the webUI 29 | Then no dialog should be displayed on the webUI 30 | And the user should be redirected to a webUI page with the title "Files - %productname%" 31 | -------------------------------------------------------------------------------- /tests/unit/Command/HSMDaemonTest.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Encryption\Tests\Command; 23 | 24 | use OCA\Encryption\Command\HSMDaemon; 25 | use OCP\IConfig; 26 | use Symfony\Component\Console\Input\InputInterface; 27 | use Symfony\Component\Console\Output\OutputInterface; 28 | use Test\TestCase; 29 | 30 | class HSMDaemonTest extends TestCase { 31 | /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */ 32 | private $config; 33 | /** @var HSMDaemon */ 34 | private $hsmDeamon; 35 | 36 | public function setUp(): void { 37 | parent::setUp(); 38 | $this->config = $this->createMock(IConfig::class); 39 | $this->hsmDeamon = new HSMDaemon($this->config); 40 | } 41 | 42 | public function testExecuteWithExportMasterKey() { 43 | $inputInterface = $this->createMock(InputInterface::class); 44 | $inputInterface->method('getOption') 45 | ->willReturnMap([ 46 | ['decrypt', false], 47 | ['export-masterkey', true] 48 | ]); 49 | 50 | $outputInterface = $this->createMock(OutputInterface::class); 51 | $outputInterface->expects($this->once())->method('writeln') 52 | ->with("current masterkey (base64 encoded): ''"); 53 | 54 | $this->config->method('getAppValue') 55 | ->willReturnMap([ 56 | ['encryption', 'hsm.url', '', 'http://localhost:1234'], 57 | ['encryption', 'masterKeyId', '', 'abcd'] 58 | ]); 59 | 60 | $this->invokePrivate($this->hsmDeamon, 'execute', [$inputInterface, $outputInterface]); 61 | } 62 | 63 | public function testExecuteFailsNoHSMURLSet() { 64 | $inputInterface = $this->createMock(InputInterface::class); 65 | $inputInterface->method('getOption') 66 | ->willReturn(null); 67 | 68 | $outputInterface = $this->createMock(OutputInterface::class); 69 | $outputInterface->expects($this->once()) 70 | ->method('writeln') 71 | ->with("hsm.url not set"); 72 | 73 | $this->invokePrivate($this->hsmDeamon, 'execute', [$inputInterface, $outputInterface]); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /tests/unit/Command/TestEnableMasterKey.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Joas Schilling 5 | * 6 | * @copyright Copyright (c) 2019, ownCloud GmbH 7 | * @license AGPL-3.0 8 | * 9 | * This code is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License, version 3, 11 | * as published by the Free Software Foundation. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License, version 3, 19 | * along with this program. If not, see 20 | * 21 | */ 22 | 23 | namespace OCA\Encryption\Tests\Command; 24 | 25 | use OCA\Encryption\Command\SelectEncryptionType; 26 | use OCA\Encryption\Util; 27 | use Test\TestCase; 28 | 29 | class TestEnableMasterKey extends TestCase { 30 | /** @var EnableMasterKey */ 31 | protected $enableMasterKey; 32 | 33 | /** @var Util | \PHPUnit\Framework\MockObject\MockObject */ 34 | protected $util; 35 | 36 | /** @var \OCP\IConfig | \PHPUnit\Framework\MockObject\MockObject */ 37 | protected $config; 38 | 39 | /** @var \Symfony\Component\Console\Helper\QuestionHelper | \PHPUnit\Framework\MockObject\MockObject */ 40 | protected $questionHelper; 41 | 42 | /** @var \Symfony\Component\Console\Output\OutputInterface | \PHPUnit\Framework\MockObject\MockObject */ 43 | protected $output; 44 | 45 | /** @var \Symfony\Component\Console\Input\InputInterface | \PHPUnit\Framework\MockObject\MockObject */ 46 | protected $input; 47 | 48 | public function setUp(): void { 49 | parent::setUp(); 50 | 51 | $this->util = $this->getMockBuilder('OCA\Encryption\Util') 52 | ->disableOriginalConstructor()->getMock(); 53 | $this->config = $this->getMockBuilder('OCP\IConfig') 54 | ->disableOriginalConstructor()->getMock(); 55 | $this->questionHelper = $this->getMockBuilder('Symfony\Component\Console\Helper\QuestionHelper') 56 | ->disableOriginalConstructor()->getMock(); 57 | $this->output = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface') 58 | ->disableOriginalConstructor()->getMock(); 59 | $this->input = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface') 60 | ->disableOriginalConstructor()->getMock(); 61 | 62 | $this->enableMasterKey = new SelectEncryptionType($this->util, $this->config, $this->questionHelper); 63 | } 64 | 65 | /** 66 | * @dataProvider dataTestExecute 67 | * 68 | * @param bool $isAlreadyEnabled 69 | * @param string $answer 70 | */ 71 | public function testExecute($isAlreadyEnabled, $answer) { 72 | $this->config 73 | ->expects($this->exactly(2)) 74 | ->method('getAppValue') 75 | ->withConsecutive( 76 | ['core', 'encryption_enabled', 'no'], 77 | ['encryption', 'userSpecificKey', ''], 78 | ) 79 | ->willReturnOnConsecutiveCalls("yes", ""); 80 | 81 | $this->util->expects($this->once())->method('isMasterKeyEnabled') 82 | ->willReturn($isAlreadyEnabled); 83 | 84 | if ($isAlreadyEnabled) { 85 | $this->output->expects($this->once())->method('writeln') 86 | ->with('Master key already enabled'); 87 | } else { 88 | if ($answer === 'y') { 89 | $this->input->expects($this->once())->method('getOption') 90 | ->with('yes') 91 | ->willReturn(true); 92 | 93 | $this->config->expects($this->once())->method('setAppValue') 94 | ->with('encryption', 'useMasterKey', '1'); 95 | } else { 96 | $this->input->expects($this->once())->method('getOption') 97 | ->with('yes') 98 | ->willReturn(false); 99 | 100 | $this->questionHelper->expects($this->once())->method('ask')->willReturn(false); 101 | $this->config->expects($this->never())->method('setAppValue'); 102 | } 103 | } 104 | 105 | $this->input->expects($this->once())->method('getArgument') 106 | ->with('encryption-type') 107 | ->willReturn("masterkey"); 108 | 109 | $this->invokePrivate($this->enableMasterKey, 'execute', [$this->input, $this->output]); 110 | } 111 | 112 | public function dataTestExecute() { 113 | return [ 114 | [true, ''], 115 | [false, 'y'], 116 | [false, 'n'], 117 | [false, ''] 118 | ]; 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /tests/unit/Command/TestEnableUserKey.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Encryption\Tests\Command; 23 | 24 | use OCA\Encryption\Command\SelectEncryptionType; 25 | use OCA\Encryption\Util; 26 | use Test\TestCase; 27 | 28 | class TestEnableUserKey extends TestCase { 29 | /** @var EnableUserKey */ 30 | protected $enableUserKey; 31 | 32 | /** @var Util | \PHPUnit\Framework\MockObject\MockObject */ 33 | protected $util; 34 | 35 | /** @var \OCP\IConfig | \PHPUnit\Framework\MockObject\MockObject */ 36 | protected $config; 37 | 38 | /** @var \Symfony\Component\Console\Helper\QuestionHelper | \PHPUnit\Framework\MockObject\MockObject */ 39 | protected $questionHelper; 40 | 41 | /** @var \Symfony\Component\Console\Output\OutputInterface | \PHPUnit\Framework\MockObject\MockObject */ 42 | protected $output; 43 | 44 | /** @var \Symfony\Component\Console\Input\InputInterface | \PHPUnit\Framework\MockObject\MockObject */ 45 | protected $input; 46 | 47 | public function setUp(): void { 48 | parent::setUp(); 49 | 50 | $this->util = $this->getMockBuilder('OCA\Encryption\Util') 51 | ->disableOriginalConstructor()->getMock(); 52 | $this->config = $this->getMockBuilder('OCP\IConfig') 53 | ->disableOriginalConstructor()->getMock(); 54 | $this->questionHelper = $this->getMockBuilder('Symfony\Component\Console\Helper\QuestionHelper') 55 | ->disableOriginalConstructor()->getMock(); 56 | $this->output = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface') 57 | ->disableOriginalConstructor()->getMock(); 58 | $this->input = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface') 59 | ->disableOriginalConstructor()->getMock(); 60 | 61 | $this->enableUserKey = new SelectEncryptionType($this->util, $this->config, $this->questionHelper); 62 | } 63 | 64 | /** 65 | * @dataProvider dataTestExecute 66 | * 67 | * @param bool $isAlreadyEnabled 68 | * @param string $answer 69 | */ 70 | public function testExecute($isAlreadyEnabled, $answer) { 71 | $userSpecificVal = $isAlreadyEnabled ? 1 : ''; 72 | 73 | $this->config 74 | ->expects($this->exactly(2)) 75 | ->method('getAppValue') 76 | ->withConsecutive( 77 | ['core', 'encryption_enabled', 'no'], 78 | ['encryption', 'userSpecificKey', ''], 79 | ) 80 | ->willReturnOnConsecutiveCalls("yes", $userSpecificVal); 81 | 82 | $this->util->expects($this->once())->method('isMasterKeyEnabled') 83 | ->willReturn(false); 84 | 85 | if ($isAlreadyEnabled) { 86 | $this->output->expects($this->once())->method('writeln') 87 | ->with('User keys already enabled'); 88 | } else { 89 | if ($answer === 'y') { 90 | $this->input->expects($this->once())->method('getOption') 91 | ->with('yes') 92 | ->willReturn(true); 93 | 94 | $this->config->expects($this->once())->method('setAppValue') 95 | ->with('encryption', 'userSpecificKey', '1'); 96 | } else { 97 | $this->input->expects($this->once())->method('getOption') 98 | ->with('yes') 99 | ->willReturn(false); 100 | 101 | $this->questionHelper->expects($this->once())->method('ask')->willReturn(false); 102 | $this->config->expects($this->never())->method('setAppValue'); 103 | } 104 | } 105 | 106 | $this->input->expects($this->once())->method('getArgument') 107 | ->with('encryption-type') 108 | ->willReturn("user-keys"); 109 | 110 | $this->invokePrivate($this->enableUserKey, 'execute', [$this->input, $this->output]); 111 | } 112 | 113 | public function dataTestExecute() { 114 | return [ 115 | [true, ''], 116 | [false, 'y'], 117 | [false, 'n'], 118 | [false, ''] 119 | ]; 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /tests/unit/Controller/StatusControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Joas Schilling 5 | * @author Thomas Müller 6 | * 7 | * @copyright Copyright (c) 2019, ownCloud GmbH 8 | * @license AGPL-3.0 9 | * 10 | * This code is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU Affero General Public License, version 3, 12 | * as published by the Free Software Foundation. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License, version 3, 20 | * along with this program. If not, see 21 | * 22 | */ 23 | 24 | namespace OCA\Encryption\Tests\Controller; 25 | 26 | use OCA\Encryption\Controller\StatusController; 27 | use OCA\Encryption\Session; 28 | use Test\TestCase; 29 | 30 | class StatusControllerTest extends TestCase { 31 | /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */ 32 | private $requestMock; 33 | 34 | /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */ 35 | private $l10nMock; 36 | 37 | /** @var \OCA\Encryption\Session | \PHPUnit\Framework\MockObject\MockObject */ 38 | protected $sessionMock; 39 | 40 | /** @var StatusController */ 41 | protected $controller; 42 | 43 | protected function setUp(): void { 44 | parent::setUp(); 45 | 46 | $this->sessionMock = $this->getMockBuilder('OCA\Encryption\Session') 47 | ->disableOriginalConstructor()->getMock(); 48 | $this->requestMock = $this->createMock('OCP\IRequest'); 49 | 50 | $this->l10nMock = $this->getMockBuilder('OCP\IL10N') 51 | ->disableOriginalConstructor()->getMock(); 52 | $this->l10nMock->expects($this->any()) 53 | ->method('t') 54 | ->will($this->returnCallback(function ($message) { 55 | return $message; 56 | })); 57 | 58 | $this->controller = new StatusController( 59 | 'encryptionTest', 60 | $this->requestMock, 61 | $this->l10nMock, 62 | $this->sessionMock 63 | ); 64 | } 65 | 66 | /** 67 | * @dataProvider dataTestGetStatus 68 | * 69 | * @param string $status 70 | * @param string $expectedStatus 71 | */ 72 | public function testGetStatus($status, $expectedStatus) { 73 | $this->sessionMock->expects($this->once()) 74 | ->method('getStatus')->willReturn($status); 75 | $result = $this->controller->getStatus(); 76 | $data = $result->getData(); 77 | $this->assertSame($expectedStatus, $data['status']); 78 | } 79 | 80 | public function dataTestGetStatus() { 81 | return [ 82 | [Session::RUN_MIGRATION, 'interactionNeeded'], 83 | [Session::INIT_EXECUTED, 'interactionNeeded'], 84 | [Session::INIT_SUCCESSFUL, 'success'], 85 | [Session::NOT_INITIALIZED, 'interactionNeeded'], 86 | ['unknown', 'error'], 87 | ]; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /tests/unit/Factory/EncDecAllFactoryTest.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Encryption\Tests\Factory; 23 | 24 | use OC\Encryption\DecryptAll; 25 | use OC\Encryption\Manager; 26 | use OC\Files\View; 27 | use OCA\Encryption\Crypto\Crypt; 28 | use OCA\Encryption\Crypto\CryptHSM; 29 | use OCA\Encryption\Crypto\EncryptAll; 30 | use OCA\Encryption\Factory\EncDecAllFactory; 31 | use OCA\Encryption\Session; 32 | use OCA\Encryption\Util; 33 | use OCP\Encryption\Keys\IStorage; 34 | use OCP\IConfig; 35 | use OCP\IL10N; 36 | use OCP\ILogger; 37 | use OCP\IUserManager; 38 | use OCP\IUserSession; 39 | use OCP\Mail\IMailer; 40 | use OCP\Security\ISecureRandom; 41 | use Symfony\Component\Console\Helper\QuestionHelper; 42 | use Test\TestCase; 43 | 44 | class EncDecAllFactoryTest extends TestCase { 45 | private $encryptionManager; 46 | private $userManager; 47 | private $rootView; 48 | private $logger; 49 | private $encUtil; 50 | private $config; 51 | private $mailer; 52 | private $l10n; 53 | private $questionHelper; 54 | private $secureRandom; 55 | private $encStorage; 56 | private $encSession; 57 | private $cryptHSM; 58 | private $crypt; 59 | private $userSession; 60 | private $encdecAllFactory; 61 | 62 | public function setUp(): void { 63 | parent::setUp(); 64 | 65 | $this->encryptionManager = $this->createMock(Manager::class); 66 | $this->userManager = $this->createMock(IUserManager::class); 67 | $this->rootView = $this->createMock(View::class); 68 | $this->logger = $this->createMock(ILogger::class); 69 | $this->encUtil = $this->createMock(Util::class); 70 | $this->config = $this->createMock(IConfig::class); 71 | $this->mailer = $this->createMock(IMailer::class); 72 | $this->l10n = $this->createMock(IL10N::class); 73 | $this->questionHelper = $this->createMock(QuestionHelper::class); 74 | $this->secureRandom = $this->createMock(ISecureRandom::class); 75 | $this->encStorage = $this->createMock(IStorage::class); 76 | $this->encSession = $this->createMock(Session::class); 77 | $this->cryptHSM = $this->createMock(CryptHSM::class); 78 | $this->crypt = $this->createMock(Crypt::class); 79 | $this->userSession = $this->createMock(IUserSession::class); 80 | $this->encdecAllFactory = new EncDecAllFactory( 81 | $this->encryptionManager, 82 | $this->userManager, 83 | $this->logger, 84 | $this->encUtil, 85 | $this->config, 86 | $this->mailer, 87 | $this->l10n, 88 | $this->questionHelper, 89 | $this->secureRandom, 90 | $this->encStorage, 91 | $this->encSession, 92 | $this->cryptHSM, 93 | $this->crypt, 94 | $this->userSession 95 | ); 96 | } 97 | 98 | public function testGetDecryptAllObj() { 99 | $decAllObj = $this->encdecAllFactory->getDecryptAllObj(); 100 | $this->assertInstanceOf(DecryptAll::class, $decAllObj); 101 | } 102 | 103 | /** 104 | * @dataProvider providesHSMData 105 | * @param bool $hsmEnabled 106 | */ 107 | public function testGetEncryptAllObjWithHSM($hsmEnabled) { 108 | $hsm = ''; 109 | if ($hsmEnabled === true) { 110 | $hsm = 'hsm'; 111 | } 112 | $this->config->method('getAppValue') 113 | ->will($this->returnValueMap([ 114 | ['encryption', 'recoveryKeyId', '', 'foo'], 115 | ['crypto.engine', 'internal', '', $hsm] 116 | ])); 117 | 118 | $encObject = $this->encdecAllFactory->getEncryptAllObj(); 119 | $this->assertInstanceOf(EncryptAll::class, $encObject); 120 | } 121 | 122 | public function providesHSMData() { 123 | return [ 124 | [true], 125 | [false], 126 | ]; 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /tests/unit/HookManagerTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Joas Schilling 5 | * @author Thomas Müller 6 | * 7 | * @copyright Copyright (c) 2019, ownCloud GmbH 8 | * @license AGPL-3.0 9 | * 10 | * This code is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU Affero General Public License, version 3, 12 | * as published by the Free Software Foundation. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License, version 3, 20 | * along with this program. If not, see 21 | * 22 | */ 23 | 24 | namespace OCA\Encryption\Tests; 25 | 26 | use OCA\Encryption\HookManager; 27 | use OCA\Encryption\Hooks\Contracts\IHook; 28 | use Test\TestCase; 29 | 30 | class HookManagerTest extends TestCase { 31 | /** 32 | * @var HookManager 33 | */ 34 | private static $instance; 35 | 36 | /** 37 | * 38 | */ 39 | public function testRegisterHookWithArray() { 40 | self::$instance->registerHook([ 41 | $this->getMockBuilder(IHook::class) 42 | ->disableOriginalConstructor() 43 | ->getMock(), 44 | $this->getMockBuilder(IHook::class) 45 | ->disableOriginalConstructor() 46 | ->getMock(), 47 | $this->getMockBuilder('NotIHook') 48 | ->getMock() 49 | ]); 50 | 51 | $hookInstances = self::invokePrivate(self::$instance, 'hookInstances'); 52 | // Make sure our type checking works 53 | $this->assertCount(2, $hookInstances); 54 | } 55 | 56 | /** 57 | * 58 | */ 59 | public static function setUpBeforeClass(): void { 60 | parent::setUpBeforeClass(); 61 | // have to make instance static to preserve data between tests 62 | self::$instance = new HookManager(); 63 | } 64 | 65 | /** 66 | * 67 | */ 68 | public function testRegisterHooksWithInstance() { 69 | $mock = $this->getMockBuilder(IHook::class) 70 | ->disableOriginalConstructor() 71 | ->getMock(); 72 | /** @var \OCA\Encryption\Hooks\Contracts\IHook $mock */ 73 | self::$instance->registerHook($mock); 74 | 75 | $hookInstances = self::invokePrivate(self::$instance, 'hookInstances'); 76 | $this->assertCount(3, $hookInstances); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /tests/unit/JWTTest.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Encryption\Tests; 23 | 24 | use OCA\Encryption\JWT; 25 | use Test\TestCase; 26 | 27 | class JWTTest extends TestCase { 28 | /** @var JWT | \PHPUnit\Framework\MockObject\MockObject */ 29 | private $jwt; 30 | 31 | public function setUp(): void { 32 | parent::setUp(); 33 | $this->jwt = new JWT(); 34 | } 35 | 36 | public function testBase64UrlEncode() { 37 | $expectedResult = "Zm9v"; 38 | $result = $this->jwt->base64UrlEncode('foo'); 39 | $this->assertEquals($expectedResult, $result); 40 | } 41 | 42 | public function testHeader() { 43 | $expectedResult = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"; 44 | $result = $this->jwt->header(); 45 | $this->assertEquals($expectedResult, $result); 46 | } 47 | 48 | public function testPayload() { 49 | $this->jwt->payload(['foo' => 'bar']); 50 | $this->assertTrue(true); 51 | } 52 | 53 | public function testSignature() { 54 | $expected = 'kFaZPruDYO6RIqibVuF8UqWucdn_Ig0PoCZ8Sq2r_X8'; 55 | $result = $this->jwt->signature('foo', 'abcd'); 56 | $this->assertEquals($expected, $result); 57 | } 58 | 59 | public function testToken() { 60 | $this->jwt->token(['foo' => 'bar'], 'secret'); 61 | $this->assertTrue(true); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tests/unit/Panels/AdminTest.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Encryption\Tests\Panels; 23 | 24 | use OCA\Encryption\Panels\Admin; 25 | use OCP\IConfig; 26 | use OCP\IL10N; 27 | use OCP\ILogger; 28 | use OCP\ISession; 29 | use OCP\IUserManager; 30 | use OCP\IUserSession; 31 | 32 | /** 33 | * @package OCA\Encryption\Tests\Panels 34 | */ 35 | class AdminTest extends \Test\TestCase { 36 | /** @var Admin */ 37 | private $panel; 38 | /** @var IConfig */ 39 | private $config; 40 | /** @var ILogger */ 41 | private $logger; 42 | /** @var IUserSession */ 43 | private $userSession; 44 | /** @var IUserManager */ 45 | private $userManager; 46 | /** @var ISession */ 47 | private $session; 48 | /** @var IL10N */ 49 | private $l; 50 | 51 | public function setUp(): void { 52 | parent::setUp(); 53 | $this->config = $this->getMockBuilder(IConfig::class)->getMock(); 54 | $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); 55 | $this->userSession = $this->getMockBuilder(IUserSession::class)->getMock(); 56 | $this->userManager = $this->getMockBuilder(IUserManager::class)->getMock(); 57 | $this->session = $this->getMockBuilder(ISession::class)->getMock(); 58 | $this->l = $this->getMockBuilder(IL10N::class)->getMock(); 59 | $this->panel = new Admin( 60 | $this->config, 61 | $this->logger, 62 | $this->userSession, 63 | $this->userManager, 64 | $this->session, 65 | $this->l 66 | ); 67 | } 68 | 69 | public function testGetSection() { 70 | $this->assertEquals('encryption', $this->panel->getSectionID()); 71 | } 72 | 73 | public function testGetPriority() { 74 | $this->assertTrue(\is_integer($this->panel->getPriority())); 75 | } 76 | 77 | public function testGetPanel() { 78 | $templateHtml = $this->panel->getPanel()->fetchPage(); 79 | $this->assertStringContainsString('
', $templateHtml); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /tests/unit/Panels/PersonalTest.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | namespace OCA\Encryption\Tests\Panels; 23 | 24 | use OCA\Encryption\Panels\Personal; 25 | use OCP\Encryption\Keys\IStorage; 26 | use OCP\IConfig; 27 | use OCP\IL10N; 28 | use OCP\ILogger; 29 | use OCP\ISession; 30 | use OCP\IUser; 31 | use OCP\IUserManager; 32 | use OCP\IUserSession; 33 | 34 | /** 35 | * @package OCA\Encryption\Tests\Panels 36 | */ 37 | class PersonalTest extends \Test\TestCase { 38 | /** @var Personal */ 39 | private $panel; 40 | /** @var IConfig */ 41 | private $config; 42 | /** @var ILogger */ 43 | private $logger; 44 | /** @var IUserSession */ 45 | private $userSession; 46 | /** @var IUserManager */ 47 | private $userManager; 48 | /** @var ISession */ 49 | private $session; 50 | /** @var IL10N */ 51 | private $l; 52 | /** @var IStorage */ 53 | private $encKeyStorage; 54 | 55 | public function setUp(): void { 56 | parent::setUp(); 57 | $this->config = $this->getMockBuilder(IConfig::class)->getMock(); 58 | $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); 59 | $this->userSession = $this->getMockBuilder(IUserSession::class)->getMock(); 60 | $this->userManager = $this->getMockBuilder(IUserManager::class)->getMock(); 61 | $this->session = $this->getMockBuilder(ISession::class)->getMock(); 62 | $this->l = $this->getMockBuilder(IL10N::class)->getMock(); 63 | $this->encKeyStorage = $this->getMockBuilder(IStorage::class)->getMock(); 64 | $this->panel = new Personal( 65 | $this->logger, 66 | $this->userSession, 67 | $this->config, 68 | $this->l, 69 | $this->userManager, 70 | $this->session, 71 | $this->encKeyStorage 72 | ); 73 | } 74 | 75 | public function testGetSection() { 76 | $this->assertEquals('encryption', $this->panel->getSectionID()); 77 | } 78 | 79 | public function testGetPriority() { 80 | $this->assertTrue(\is_integer($this->panel->getPriority())); 81 | } 82 | 83 | public function testGetPanel() { 84 | $mockUser = $this->getMockBuilder(IUser::class)->getMock(); 85 | $mockUser->expects($this->once())->method('getUID')->willReturn('testUser'); 86 | $this->userSession->expects($this->once())->method('getUser')->willReturn($mockUser); 87 | $templateHtml = $this->panel->getPanel()->fetchPage(); 88 | $this->assertStringContainsString('', $templateHtml); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /tests/unit/Users/SetupTest.php: -------------------------------------------------------------------------------- 1 | 4 | * @author Clark Tomlinson 5 | * @author Joas Schilling 6 | * @author Thomas Müller 7 | * 8 | * @copyright Copyright (c) 2019, ownCloud GmbH 9 | * @license AGPL-3.0 10 | * 11 | * This code is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License, version 3, 13 | * as published by the Free Software Foundation. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Affero General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Affero General Public License, version 3, 21 | * along with this program. If not, see 22 | * 23 | */ 24 | 25 | namespace OCA\Encryption\Tests\Users; 26 | 27 | use OCA\Encryption\Users\Setup; 28 | use Test\TestCase; 29 | 30 | class SetupTest extends TestCase { 31 | /** 32 | * @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject 33 | */ 34 | private $keyManagerMock; 35 | /** 36 | * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject 37 | */ 38 | private $cryptMock; 39 | /** 40 | * @var Setup 41 | */ 42 | private $instance; 43 | 44 | protected function setUp(): void { 45 | parent::setUp(); 46 | $logMock = $this->createMock('OCP\ILogger'); 47 | $userSessionMock = $this->getMockBuilder('OCP\IUserSession') 48 | ->disableOriginalConstructor() 49 | ->getMock(); 50 | $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt') 51 | ->disableOriginalConstructor() 52 | ->getMock(); 53 | 54 | $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager') 55 | ->disableOriginalConstructor() 56 | ->getMock(); 57 | 58 | /** @var \OCP\ILogger $logMock */ 59 | /** @var \OCP\IUserSession $userSessionMock */ 60 | $this->instance = new Setup( 61 | $logMock, 62 | $userSessionMock, 63 | $this->cryptMock, 64 | $this->keyManagerMock 65 | ); 66 | } 67 | 68 | public function testSetupSystem() { 69 | $this->keyManagerMock->expects($this->once())->method('validateShareKey'); 70 | $this->keyManagerMock->expects($this->once())->method('validateMasterKey'); 71 | 72 | $this->instance->setupSystem(); 73 | } 74 | 75 | /** 76 | * @dataProvider dataTestSetupUser 77 | * 78 | * @param bool $hasKeys 79 | * @param bool $expected 80 | */ 81 | public function testSetupUser($hasKeys, $expected) { 82 | $this->keyManagerMock->expects($this->once())->method('userHasKeys') 83 | ->with('uid')->willReturn($hasKeys); 84 | 85 | if ($hasKeys) { 86 | $this->keyManagerMock->expects($this->never())->method('storeKeyPair'); 87 | } else { 88 | $this->cryptMock->expects($this->once())->method('createKeyPair')->willReturn('keyPair'); 89 | $this->keyManagerMock->expects($this->once())->method('storeKeyPair') 90 | ->with('uid', 'password', 'keyPair')->willReturn(true); 91 | } 92 | 93 | $this->assertSame( 94 | $expected, 95 | $this->instance->setupUser('uid', 'password') 96 | ); 97 | } 98 | 99 | public function dataTestSetupUser() { 100 | return [ 101 | [true, true], 102 | [false, true] 103 | ]; 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /tests/unit/bootstrap.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @copyright Copyright (c) 2019, ownCloud GmbH 6 | * @license AGPL-3.0 7 | * 8 | * This code is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License, version 3, 10 | * as published by the Free Software Foundation. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License, version 3, 18 | * along with this program. If not, see 19 | * 20 | */ 21 | 22 | if (!\defined('PHPUNIT_RUN')) { 23 | \define('PHPUNIT_RUN', 1); 24 | } 25 | 26 | require_once __DIR__ . '/../../../../lib/base.php'; 27 | 28 | // Fix for "Autoload path not allowed: .../tests/lib/testcase.php" 29 | \OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests'); 30 | 31 | \OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true); 32 | \OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true); 33 | 34 | // Fix for "Autoload path not allowed: .../notifications/tests/testcase.php" 35 | \OC_App::loadApp('encryption'); 36 | \OC_App::enable('encryption'); 37 | -------------------------------------------------------------------------------- /vendor-bin/behat/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "config" : { 3 | "platform": { 4 | "php": "7.4" 5 | } 6 | }, 7 | "require": { 8 | "behat/behat": "^3.13", 9 | "behat/mink": "1.7.1", 10 | "friends-of-behat/mink-extension": "^2.7", 11 | "behat/mink-selenium2-driver": "^1.5", 12 | "ciaranmcnulty/behat-stepthroughextension" : "dev-master", 13 | "rdx/behat-variables": "^1.2", 14 | "sensiolabs/behat-page-object-extension": "^2.3", 15 | "symfony/translation": "^5.4", 16 | "sabre/xml": "^2.2", 17 | "guzzlehttp/guzzle": "^7.7", 18 | "phpunit/phpunit": "^9.6", 19 | "helmich/phpunit-json-assert": "^3.4" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor-bin/owncloud-codestyle/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "owncloud/coding-standard": "^4.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /vendor-bin/phan/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phan/phan": "^5.4" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /vendor-bin/php_codesniffer/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "squizlabs/php_codesniffer": "^3.7" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /vendor-bin/phpstan/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpstan/phpstan": "^1.10.3" 4 | } 5 | } 6 | --------------------------------------------------------------------------------