summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption')
-rw-r--r--apps/files_encryption/hooks/hooks.php51
-rw-r--r--apps/files_encryption/l10n/ca.php1
-rw-r--r--apps/files_encryption/l10n/cs_CZ.php1
-rw-r--r--apps/files_encryption/l10n/de.php1
-rw-r--r--apps/files_encryption/l10n/de_DE.php1
-rw-r--r--apps/files_encryption/l10n/en_GB.php1
-rw-r--r--apps/files_encryption/l10n/es.php1
-rw-r--r--apps/files_encryption/l10n/et_EE.php1
-rw-r--r--apps/files_encryption/l10n/fr.php1
-rw-r--r--apps/files_encryption/l10n/gl.php1
-rw-r--r--apps/files_encryption/l10n/it.php1
-rw-r--r--apps/files_encryption/l10n/ja_JP.php1
-rw-r--r--apps/files_encryption/l10n/ko.php6
-rw-r--r--apps/files_encryption/l10n/nl.php1
-rw-r--r--apps/files_encryption/l10n/pt_BR.php1
-rw-r--r--apps/files_encryption/l10n/ru.php1
-rw-r--r--apps/files_encryption/l10n/sk_SK.php1
-rw-r--r--apps/files_encryption/l10n/sl.php1
-rw-r--r--apps/files_encryption/l10n/tr.php7
-rwxr-xr-xapps/files_encryption/lib/helper.php9
-rw-r--r--apps/files_encryption/lib/util.php58
-rw-r--r--apps/files_encryption/templates/settings-personal.php2
22 files changed, 98 insertions, 51 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index f142f525cfa..7b13ae2a1d0 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -179,9 +179,9 @@ class Hooks {
// the necessary keys)
if (Crypt::mode() === 'server') {
- if ($params['uid'] === \OCP\User::getUser()) {
+ $view = new \OC_FilesystemView('/');
- $view = new \OC_FilesystemView('/');
+ if ($params['uid'] === \OCP\User::getUser()) {
$session = new \OCA\Encryption\Session($view);
@@ -202,36 +202,41 @@ class Hooks {
} else { // admin changed the password for a different user, create new keys and reencrypt file keys
$user = $params['uid'];
- $recoveryPassword = $params['recoveryPassword'];
- $newUserPassword = $params['password'];
+ $util = new Util($view, $user);
+ $recoveryPassword = isset($params['recoveryPassword']) ? $params['recoveryPassword'] : null;
- $view = new \OC_FilesystemView('/');
+ if (($util->recoveryEnabledForUser() && $recoveryPassword)
+ || !$util->userKeysExists()) {
- // make sure that the users home is mounted
- \OC\Files\Filesystem::initMountPoints($user);
+ $recoveryPassword = $params['recoveryPassword'];
+ $newUserPassword = $params['password'];
- $keypair = Crypt::createKeypair();
+ // make sure that the users home is mounted
+ \OC\Files\Filesystem::initMountPoints($user);
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
+ $keypair = Crypt::createKeypair();
- // Save public key
- $view->file_put_contents('/public-keys/' . $user . '.public.key', $keypair['publicKey']);
+ // Disable encryption proxy to prevent recursive calls
+ $proxyStatus = \OC_FileProxy::$enabled;
+ \OC_FileProxy::$enabled = false;
- // Encrypt private key empty passphrase
- $encryptedPrivateKey = Crypt::symmetricEncryptFileContent($keypair['privateKey'], $newUserPassword);
+ // Save public key
+ $view->file_put_contents('/public-keys/' . $user . '.public.key', $keypair['publicKey']);
- // Save private key
- $view->file_put_contents(
- '/' . $user . '/files_encryption/' . $user . '.private.key', $encryptedPrivateKey);
+ // Encrypt private key empty passphrase
+ $encryptedPrivateKey = Crypt::symmetricEncryptFileContent($keypair['privateKey'], $newUserPassword);
- if ($recoveryPassword) { // if recovery key is set we can re-encrypt the key files
- $util = new Util($view, $user);
- $util->recoverUsersFiles($recoveryPassword);
- }
+ // Save private key
+ $view->file_put_contents(
+ '/' . $user . '/files_encryption/' . $user . '.private.key', $encryptedPrivateKey);
+
+ if ($recoveryPassword) { // if recovery key is set we can re-encrypt the key files
+ $util = new Util($view, $user);
+ $util->recoverUsersFiles($recoveryPassword);
+ }
- \OC_FileProxy::$enabled = $proxyStatus;
+ \OC_FileProxy::$enabled = $proxyStatus;
+ }
}
}
}
diff --git a/apps/files_encryption/l10n/ca.php b/apps/files_encryption/l10n/ca.php
index fc2886d7b94..33d2754483c 100644
--- a/apps/files_encryption/l10n/ca.php
+++ b/apps/files_encryption/l10n/ca.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Manca de requisits.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Assegureu-vos que teniu instal·lat PHP 5.3.3 o una versió superior i que està activat Open SSL i habilitada i configurada correctament l'extensió de PHP. De moment, l'aplicació d'encriptació s'ha desactivat.",
"Following users are not set up for encryption:" => "Els usuaris següents no estan configurats per a l'encriptació:",
+"Initial encryption started... This can take some time. Please wait." => "La encriptació inicial ha començat... Pot trigar una estona, espereu.",
"Saving..." => "Desant...",
"Go directly to your " => "Vés directament a",
"personal settings" => "arranjament personal",
diff --git a/apps/files_encryption/l10n/cs_CZ.php b/apps/files_encryption/l10n/cs_CZ.php
index b9de310a505..cf2776371df 100644
--- a/apps/files_encryption/l10n/cs_CZ.php
+++ b/apps/files_encryption/l10n/cs_CZ.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Nesplněné závislosti.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Ujistěte se prosím, že máte nainstalované PHP 5.3.3 nebo novější a že máte povolené a správně nakonfigurované OpenSSL včetně jeho rozšíření pro PHP. Prozatím byla aplikace pro šifrování vypnuta.",
"Following users are not set up for encryption:" => "Následující uživatelé nemají nastavené šifrování:",
+"Initial encryption started... This can take some time. Please wait." => "Počáteční šifrování zahájeno... Toto může chvíli trvat. Počkejte prosím.",
"Saving..." => "Ukládám...",
"Go directly to your " => "Běžte přímo do vašeho",
"personal settings" => "osobní nastavení",
diff --git a/apps/files_encryption/l10n/de.php b/apps/files_encryption/l10n/de.php
index 3feb1fbd323..08b655d2f32 100644
--- a/apps/files_encryption/l10n/de.php
+++ b/apps/files_encryption/l10n/de.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Fehlende Vorraussetzungen",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Bitte stelle sicher, dass PHP 5.3.3 oder neuer installiert und das OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Zur Zeit ist die Verschlüsselungs-App deaktiviert.",
"Following users are not set up for encryption:" => "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:",
+"Initial encryption started... This can take some time. Please wait." => "Initialverschlüsselung gestartet... Dies kann einige Zeit dauern. Bitte warten.",
"Saving..." => "Speichern...",
"Go directly to your " => "Direkt wechseln zu Deinem",
"personal settings" => "Private Einstellungen",
diff --git a/apps/files_encryption/l10n/de_DE.php b/apps/files_encryption/l10n/de_DE.php
index c9e677e70f6..6184fd8a898 100644
--- a/apps/files_encryption/l10n/de_DE.php
+++ b/apps/files_encryption/l10n/de_DE.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Fehlende Voraussetzungen",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Bitte stellen Sie sicher, dass PHP 5.3.3 oder neuer installiert und das OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Zur Zeit ist die Verschlüsselungs-App deaktiviert.",
"Following users are not set up for encryption:" => "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:",
+"Initial encryption started... This can take some time. Please wait." => "Initialverschlüsselung gestartet... Dies kann einige Zeit dauern. Bitte warten.",
"Saving..." => "Speichern...",
"Go directly to your " => "Direkt wechseln zu Ihrem",
"personal settings" => "Persönliche Einstellungen",
diff --git a/apps/files_encryption/l10n/en_GB.php b/apps/files_encryption/l10n/en_GB.php
index 3f7c6993415..55d56b9533e 100644
--- a/apps/files_encryption/l10n/en_GB.php
+++ b/apps/files_encryption/l10n/en_GB.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Missing requirements.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.",
"Following users are not set up for encryption:" => "Following users are not set up for encryption:",
+"Initial encryption started... This can take some time. Please wait." => "Initial encryption started... This can take some time. Please wait.",
"Saving..." => "Saving...",
"Go directly to your " => "Go directly to your ",
"personal settings" => "personal settings",
diff --git a/apps/files_encryption/l10n/es.php b/apps/files_encryption/l10n/es.php
index 42479d712fd..53453986883 100644
--- a/apps/files_encryption/l10n/es.php
+++ b/apps/files_encryption/l10n/es.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Requisitos incompletos.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Por favor, asegúrese de que PHP 5.3.3 o posterior está instalado y que la extensión OpenSSL de PHP está habilitada y configurada correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.",
"Following users are not set up for encryption:" => "Los siguientes usuarios no han sido configurados para el cifrado:",
+"Initial encryption started... This can take some time. Please wait." => "Encriptación iniciada..... Esto puede tomar un tiempo. Por favor espere.",
"Saving..." => "Guardando...",
"Go directly to your " => "Ir directamente a su",
"personal settings" => "opciones personales",
diff --git a/apps/files_encryption/l10n/et_EE.php b/apps/files_encryption/l10n/et_EE.php
index 0b6ca48732e..9182c5ef196 100644
--- a/apps/files_encryption/l10n/et_EE.php
+++ b/apps/files_encryption/l10n/et_EE.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Nõutavad on puudu.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Palun veendu, et on paigaldatud PHP 5.3.3 või uuem ning PHP OpenSSL laiendus on lubatud ning seadistatud korrektselt. Hetkel krüpteerimise rakendus on peatatud.",
"Following users are not set up for encryption:" => "Järgmised kasutajad pole seadistatud krüpteeringuks:",
+"Initial encryption started... This can take some time. Please wait." => "Algne krüpteerimine käivitati... See võib võtta natuke aega. Palun oota.",
"Saving..." => "Salvestamine...",
"Go directly to your " => "Liigu otse oma",
"personal settings" => "isiklikes seadetes",
diff --git a/apps/files_encryption/l10n/fr.php b/apps/files_encryption/l10n/fr.php
index a7096d54270..dbccbf74dcd 100644
--- a/apps/files_encryption/l10n/fr.php
+++ b/apps/files_encryption/l10n/fr.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Système minimum requis non respecté.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Veuillez vous assurer qu'une version de PHP 5.3.3 ou supérieure est installée et qu'OpenSSL et son extension PHP sont activés et configurés correctement. En attendant, l'application de chiffrement été désactivée.",
"Following users are not set up for encryption:" => "Les utilisateurs suivants ne sont pas configurés pour le chiffrement :",
+"Initial encryption started... This can take some time. Please wait." => "Chiffrement initial démarré... Cela peut prendre un certain temps. Veuillez patienter.",
"Saving..." => "Enregistrement...",
"Go directly to your " => "Allez directement à votre",
"personal settings" => "paramètres personnel",
diff --git a/apps/files_encryption/l10n/gl.php b/apps/files_encryption/l10n/gl.php
index 4599d14113f..7b3c899d1f5 100644
--- a/apps/files_encryption/l10n/gl.php
+++ b/apps/files_encryption/l10n/gl.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Non se cumpren os requisitos.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Asegúrese de que está instalado o PHP 5.3.3 ou posterior e de o OpenSSL xunto coa extensión PHP estean activados e configurados correctamente. Polo de agora foi desactivado o aplicativo de cifrado.",
"Following users are not set up for encryption:" => "Os seguintes usuarios non teñen configuración para o cifrado:",
+"Initial encryption started... This can take some time. Please wait." => "Comezou o cifrado inicial... Isto pode levar bastante tempo. Agarde.",
"Saving..." => "Gardando...",
"Go directly to your " => "Vaia directamente ao seu",
"personal settings" => "axustes persoais",
diff --git a/apps/files_encryption/l10n/it.php b/apps/files_encryption/l10n/it.php
index 420454afdb2..fc1aaffc025 100644
--- a/apps/files_encryption/l10n/it.php
+++ b/apps/files_encryption/l10n/it.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Requisiti mancanti.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Assicurati che sia installato PHP 5.3.3 o versioni successive e che l'estensione OpenSSL di PHP sia abilitata e configurata correttamente. Per ora, l'applicazione di cifratura è disabilitata.",
"Following users are not set up for encryption:" => "I seguenti utenti non sono configurati per la cifratura:",
+"Initial encryption started... This can take some time. Please wait." => "Cifratura iniziale avviata... Potrebbe richiedere del tempo. Attendi.",
"Saving..." => "Salvataggio in corso...",
"Go directly to your " => "Passa direttamente a",
"personal settings" => "impostazioni personali",
diff --git a/apps/files_encryption/l10n/ja_JP.php b/apps/files_encryption/l10n/ja_JP.php
index da9a4940f46..1206969746b 100644
--- a/apps/files_encryption/l10n/ja_JP.php
+++ b/apps/files_encryption/l10n/ja_JP.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "必要要件が満たされていません。",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "必ず、PHP 5.3.3もしくはそれ以上をインストールし、同時にOpenSSLのPHP拡張を有効にした上でOpenSSLも同様にインストール、適切に設定してください。現時点では暗号化アプリは無効になっています。",
"Following users are not set up for encryption:" => "以下のユーザーは、暗号化設定がされていません:",
+"Initial encryption started... This can take some time. Please wait." => "暗号化の初期化作業を開始しました... この処理にはしばらく時間がかかります。今しばらくお待ちください。",
"Saving..." => "保存中...",
"Go directly to your " => "あなたのディレクトリへ",
"personal settings" => "秘密鍵をアンロックできます",
diff --git a/apps/files_encryption/l10n/ko.php b/apps/files_encryption/l10n/ko.php
index cfe9f99fa19..cf06136c9b6 100644
--- a/apps/files_encryption/l10n/ko.php
+++ b/apps/files_encryption/l10n/ko.php
@@ -1,5 +1,9 @@
<?php
$TRANSLATIONS = array(
+"Recovery key successfully enabled" => "복구키가 성공적으로 활성화 되었습니다",
+"Could not enable recovery key. Please check your recovery key password!" => "복구키를 활성화 할수 없습니다. 복구키의 비밀번호를 확인해주세요!",
+"Recovery key successfully disabled" => "복구키가 성공적으로 비활성화 되었습니다",
+"Could not disable recovery key. Please check your recovery key password!" => "복구키를 비활성화 할수 없습니다. 복구키의 비밀번호를 확인해주세요!",
"Password successfully changed." => "암호가 성공적으로 변경되었습니다",
"Could not change the password. Maybe the old password was not correct." => "암호를 변경할수 없습니다. 아마도 예전 암호가 정확하지 않은것 같습니다.",
"Private key password successfully updated." => "개인키 암호가 성공적으로 업데이트 됨.",
@@ -7,6 +11,8 @@ $TRANSLATIONS = array(
"personal settings" => "개인 설정",
"Encryption" => "암호화",
"Recovery key password" => "키 비밀번호 복구",
+"Enabled" => "활성화",
+"Disabled" => "비활성화",
"Change recovery key password:" => "복구 키 비밀번호 변경",
"Old Recovery key password" => "예전 복구 키 비밀번호",
"New Recovery key password" => "새 복구 키 비밀번호",
diff --git a/apps/files_encryption/l10n/nl.php b/apps/files_encryption/l10n/nl.php
index dce0be56d99..081e46a785c 100644
--- a/apps/files_encryption/l10n/nl.php
+++ b/apps/files_encryption/l10n/nl.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Missende benodigdheden.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Wees er zeker van dat PHP5.3.3 of nieuwer is geïstalleerd en dat de OpenSSL PHP extensie is ingeschakeld en correct geconfigureerd. De versleutel-app is voorlopig uitgeschakeld.",
"Following users are not set up for encryption:" => "De volgende gebruikers hebben geen configuratie voor encryptie:",
+"Initial encryption started... This can take some time. Please wait." => "initiële versleuteling gestart... Dit kan even duren, geduld a.u.b.",
"Saving..." => "Opslaan",
"Go directly to your " => "Ga meteen naar uw",
"personal settings" => "persoonlijke instellingen",
diff --git a/apps/files_encryption/l10n/pt_BR.php b/apps/files_encryption/l10n/pt_BR.php
index b09b4367c4e..2fce7fd13a5 100644
--- a/apps/files_encryption/l10n/pt_BR.php
+++ b/apps/files_encryption/l10n/pt_BR.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Requisitos não encontrados.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Por favor, certifique-se que o PHP 5.3.3 ou mais recente está instalado e que a extensão PHP OpenSSL está habilitado e configurado corretamente. Por enquanto, o aplicativo de criptografia foi desativado.",
"Following users are not set up for encryption:" => "Seguintes usuários não estão configurados para criptografia:",
+"Initial encryption started... This can take some time. Please wait." => "Criptografia inicial inicializada... Isto pode tomar algum tempo. Por favor espere.",
"Saving..." => "Salvando...",
"Go directly to your " => "Ir diretamente para o seu",
"personal settings" => "configurações pessoais.",
diff --git a/apps/files_encryption/l10n/ru.php b/apps/files_encryption/l10n/ru.php
index ace2bad5fbe..e9744b3db4d 100644
--- a/apps/files_encryption/l10n/ru.php
+++ b/apps/files_encryption/l10n/ru.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Требования отсутствуют.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Пожалуйста, убедитесь, что версия PHP 5.3.3 или новее, а также, что OpenSSL и соответствующее расширение PHP включены и правильно настроены. На данный момент приложение шифрования отключено.",
"Following users are not set up for encryption:" => "Для следующих пользователей шифрование не настроено:",
+"Initial encryption started... This can take some time. Please wait." => "Начато начальное шифрование... Это может занять какое-то время. Пожалуйста, подождите.",
"Saving..." => "Сохранение...",
"Go directly to your " => "Перейти прямо в",
"personal settings" => "персональные настройки",
diff --git a/apps/files_encryption/l10n/sk_SK.php b/apps/files_encryption/l10n/sk_SK.php
index 1302bb96d92..9e2c01eba33 100644
--- a/apps/files_encryption/l10n/sk_SK.php
+++ b/apps/files_encryption/l10n/sk_SK.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Chýbajúce požiadavky.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Prosím uistite sa, že PHP verzie 5.3.3 alebo novšej je nainštalované a tiež, že OpenSSL knižnica spolu z PHP rozšírením je povolená a konfigurovaná správne. Nateraz bola aplikácia šifrovania zablokovaná.",
"Following users are not set up for encryption:" => "Nasledujúci používatelia nie sú nastavení pre šifrovanie:",
+"Initial encryption started... This can take some time. Please wait." => "Počiatočné šifrovanie započalo ... To môže nejakú dobu trvať. Čakajte prosím.",
"Saving..." => "Ukladám...",
"Go directly to your " => "Choďte priamo do vášho",
"personal settings" => "osobné nastavenia",
diff --git a/apps/files_encryption/l10n/sl.php b/apps/files_encryption/l10n/sl.php
index be814558f52..60faf34cf88 100644
--- a/apps/files_encryption/l10n/sl.php
+++ b/apps/files_encryption/l10n/sl.php
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Manjkajoče zahteve",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Preverite, ali je na strežniku nameščen paket PHP 5.3.3 ali novejši, da je omogočen in pravilno nastavljen PHP OpenSSL. Z obstoječimi možnostmi šifriranje ni mogoče.",
"Following users are not set up for encryption:" => "Navedeni uporabniki še nimajo nastavljenega šifriranja:",
+"Initial encryption started... This can take some time. Please wait." => "Začetno šifriranje je začeto ... Opravilo je lahko dolgotrajno.",
"Saving..." => "Poteka shranjevanje ...",
"Go directly to your " => "Skočite neposredno na",
"personal settings" => "osebne nastavitve",
diff --git a/apps/files_encryption/l10n/tr.php b/apps/files_encryption/l10n/tr.php
index 8dd058956dd..b8289ab71f9 100644
--- a/apps/files_encryption/l10n/tr.php
+++ b/apps/files_encryption/l10n/tr.php
@@ -4,8 +4,8 @@ $TRANSLATIONS = array(
"Could not enable recovery key. Please check your recovery key password!" => "Kurtarma anahtarı etkinleştirilemedi. Lütfen kurtarma anahtarı parolanızı kontrol edin!",
"Recovery key successfully disabled" => "Kurtarma anahtarı başarıyla devre dışı bırakıldı",
"Could not disable recovery key. Please check your recovery key password!" => "Kurtarma anahtarı devre dışı bırakılamadı. Lütfen kurtarma anahtarı parolanızı kontrol edin!",
-"Password successfully changed." => "Şifreniz başarıyla değiştirildi.",
-"Could not change the password. Maybe the old password was not correct." => "Parola değiştirilemedi. Eski parolanız doğru olmayabilir",
+"Password successfully changed." => "Parola başarıyla değiştirildi.",
+"Could not change the password. Maybe the old password was not correct." => "Parola değiştirilemedi. Eski parolanız doğru olmayabilir.",
"Private key password successfully updated." => "Gizli anahtar parolası başarıyla güncellendi",
"Could not update the private key password. Maybe the old password was not correct." => "Gizli anahtar parolası güncellenemedi. Eski parola hatalı olabilir.",
"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Şifreleme uygulaması başlatılamadı! Oturumunuz sırasında şifreleme uygulaması tekrar etkinleştirilmiş olabilir. Lütfen şifreleme uygulamasını başlatmak için oturumu kapatıp yeniden oturum açmayı deneyin.",
@@ -15,6 +15,7 @@ $TRANSLATIONS = array(
"Missing requirements." => "Gereklilikler eksik.",
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "PHP 5.3.3 veya daha sürümü ile birlikte OpenSSL ve OpenSSL PHP uzantısının birlikte etkin olduğunu ve doğru bir şekilde yapılandırıldığından emin olun. Şimdilik şifreleme uygulaması devre dışı bırakıldı",
"Following users are not set up for encryption:" => "Aşağıdaki kullanıcılar şifreleme için ayarlanmadılar:",
+"Initial encryption started... This can take some time. Please wait." => "İlk şifreleme başladı... Bu biraz zaman alabilir. Lütfen bekleyin.",
"Saving..." => "Kaydediliyor...",
"Go directly to your " => "Doğrudan şuraya gidin:",
"personal settings" => "kişisel ayarlar",
@@ -28,7 +29,7 @@ $TRANSLATIONS = array(
"Old Recovery key password" => "Eski Kurtarma anahtar parolası",
"New Recovery key password" => "Yeni Kurtarma anahtar parolası",
"Repeat New Recovery key password" => "Yeni Kurtarma anahtarı parolasını yenileyin",
-"Change Password" => "Parola değiştir",
+"Change Password" => "Parola Değiştir",
"Your private key password no longer match your log-in password:" => "Özel anahtar parolanız artık oturum açma parolanızla eşleşmiyor:",
"Set your old private key password to your current log-in password." => "Eski özel anahtar parolanızı geçerli oturum açma parolanız olarak ayarlayın.",
" If you don't remember your old password you can ask your administrator to recover your files." => "Eğer eski parolanızı hatırlamıyorsanız, yöneticinizden dosyalarınızı kurtarmasını talep edebilirsiniz.",
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index 9aa631d114e..17bcac5c585 100755
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -370,7 +370,14 @@ class Helper {
* @return bool true if requirements are met
*/
public static function checkRequirements() {
- return extension_loaded('openssl');
+ $result = true;
+
+ //openssl extension needs to be loaded
+ $result &= extension_loaded("openssl");
+ // we need php >= 5.3.3
+ $result &= version_compare(phpversion(), '5.3.3', '>=');
+
+ return (bool) $result;
}
/**
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 434ed225644..bf7c49504a2 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -101,15 +101,24 @@ class Util {
or !$this->view->file_exists($this->publicKeyPath)
or !$this->view->file_exists($this->privateKeyPath)
) {
-
return false;
-
} else {
-
return true;
-
}
+ }
+ /**
+ * @brief check if the users private & public key exists
+ * @return boolean
+ */
+ public function userKeysExists() {
+ if (
+ $this->view->file_exists($this->privateKeyPath) &&
+ $this->view->file_exists($this->publicKeyPath)) {
+ return true;
+ } else {
+ return false;
+ }
}
/**
@@ -761,7 +770,7 @@ class Util {
\OC\Files\Filesystem::putFileInfo($relPath, array(
'encrypted' => false,
'size' => $size,
- 'unencrypted_size' => $size,
+ 'unencrypted_size' => 0,
'etag' => $fileInfo['etag']
));
@@ -831,32 +840,35 @@ class Util {
// Open enc file handle for binary writing, with same filename as original plain file
$encHandle = fopen('crypt://' . $rawPath . '.part', 'wb');
- // Move plain file to a temporary location
- $size = stream_copy_to_stream($plainHandle, $encHandle);
+ if (is_resource($encHandle)) {
+ // Move plain file to a temporary location
+ $size = stream_copy_to_stream($plainHandle, $encHandle);
- fclose($encHandle);
- fclose($plainHandle);
+ fclose($encHandle);
+ fclose($plainHandle);
- $fakeRoot = $this->view->getRoot();
- $this->view->chroot('/' . $this->userId . '/files');
+ $fakeRoot = $this->view->getRoot();
+ $this->view->chroot('/' . $this->userId . '/files');
- $this->view->rename($relPath . '.part', $relPath);
+ $this->view->rename($relPath . '.part', $relPath);
- // set timestamp
- $this->view->touch($relPath, $timestamp);
+ // set timestamp
+ $this->view->touch($relPath, $timestamp);
- $this->view->chroot($fakeRoot);
+ $encSize = $this->view->filesize($relPath);
- // Add the file to the cache
- \OC\Files\Filesystem::putFileInfo($relPath, array(
- 'encrypted' => true,
- 'size' => $size,
- 'unencrypted_size' => $size,
- 'etag' => $fileInfo['etag']
- ));
+ $this->view->chroot($fakeRoot);
- $encryptedFiles[] = $relPath;
+ // Add the file to the cache
+ \OC\Files\Filesystem::putFileInfo($relPath, array(
+ 'encrypted' => true,
+ 'size' => $encSize,
+ 'unencrypted_size' => $size,
+ 'etag' => $fileInfo['etag']
+ ));
+ $encryptedFiles[] = $relPath;
+ }
}
// Encrypt legacy encrypted files
diff --git a/apps/files_encryption/templates/settings-personal.php b/apps/files_encryption/templates/settings-personal.php
index a4ed89b8a49..1b4239d82cd 100644
--- a/apps/files_encryption/templates/settings-personal.php
+++ b/apps/files_encryption/templates/settings-personal.php
@@ -2,7 +2,7 @@
<fieldset class="personalblock">
<h2><?php p( $l->t( 'Encryption' ) ); ?></h2>
- <?php if ( ! $_["privateKeySet"] && $_["initialized"] ): ?>
+ <?php if ( $_["initialized"] === '1' ): ?>
<p>
<a name="changePKPasswd" />
<label for="changePrivateKeyPasswd">