diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index cbf34279f54..a0a3ec26ce1 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -105,8 +105,6 @@ table th#headerDate, table td.date {
box-sizing: border-box;
position: relative;
min-width: 11em;
- display: block;
- height: 51px;
}
/* Multiselect bar */
@@ -161,8 +159,6 @@ table td.filename .nametext, .uploadtext, .modified { float:left; padding:.3em 0
}
.modified {
position: relative;
- top: 11px;
- left: 5px;
}
/* TODO fix usability bug (accidental file/folder selection) */
diff --git a/apps/files/l10n/en_GB.php b/apps/files/l10n/en_GB.php
index c747555e40b..96a4be20b5c 100644
--- a/apps/files/l10n/en_GB.php
+++ b/apps/files/l10n/en_GB.php
@@ -44,6 +44,8 @@ $TRANSLATIONS = array(
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Invalid name: '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed.",
"Your storage is full, files can not be updated or synced anymore!" => "Your storage is full, files can not be updated or synced anymore!",
"Your storage is almost full ({usedSpacePercent}%)" => "Your storage is almost full ({usedSpacePercent}%)",
+"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Encryption App is enabled but your keys are not initialised, please log-out and log-in again",
+"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files.",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files.",
"Your download is being prepared. This might take some time if the files are big." => "Your download is being prepared. This might take some time if the files are big.",
"Error moving file" => "Error moving file",
diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php
index bfed4b22276..b7091fe544d 100644
--- a/apps/files/l10n/es.php
+++ b/apps/files/l10n/es.php
@@ -44,6 +44,8 @@ $TRANSLATIONS = array(
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nombre Invalido, \"\\\", \"/\", \"<\", \">\", \":\", \"\", \"|\" \"?\" y \"*\" no están permitidos ",
"Your storage is full, files can not be updated or synced anymore!" => "Su almacenamiento está lleno, ¡no se pueden actualizar o sincronizar más!",
"Your storage is almost full ({usedSpacePercent}%)" => "Su almacenamiento está casi lleno ({usedSpacePercent}%)",
+"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Encryption App está habilitada pero tus claves no han sido inicializadas, por favor, cierra la sesión y vuelva a iniciarla de nuevo.",
+"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 Encryption App. Por favor, actualiza la contraseña de tu clave privada en tus ajustes personales para recuperar el acceso a tus archivos encriptados.",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "El cifrado ha sido deshabilitado pero tus archivos permanecen cifrados. Por favor, ve a tus ajustes personales para descifrar tus archivos.",
"Your download is being prepared. This might take some time if the files are big." => "Su descarga está siendo preparada. Esto puede tardar algún tiempo si los archivos son grandes.",
"Error moving file" => "Error moviendo archivo",
diff --git a/apps/files/l10n/et_EE.php b/apps/files/l10n/et_EE.php
index cb637d849b3..d25b737037f 100644
--- a/apps/files/l10n/et_EE.php
+++ b/apps/files/l10n/et_EE.php
@@ -17,6 +17,7 @@ $TRANSLATIONS = array(
"Upload failed. Could not find uploaded file" => "Üleslaadimine ebaõnnestus. Üleslaetud faili ei leitud",
"Invalid directory." => "Vigane kaust.",
"Files" => "Failid",
+"Unable to upload {filename} as it is a directory or has 0 bytes" => "Ei saa üles laadida {filename}, kuna see on kataloog või selle suurus on 0 baiti",
"Not enough space available" => "Pole piisavalt ruumi",
"Upload cancelled." => "Üleslaadimine tühistati.",
"Could not get result from server." => "Serverist ei saadud tulemusi",
@@ -43,6 +44,8 @@ $TRANSLATIONS = array(
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Vigane nimi, '\\', '/', '<', '>', ':', '\"', '|', '?' ja '*' pole lubatud.",
"Your storage is full, files can not be updated or synced anymore!" => "Sinu andmemaht on täis! Faile ei uuendata ega sünkroniseerita!",
"Your storage is almost full ({usedSpacePercent}%)" => "Su andmemaht on peaaegu täis ({usedSpacePercent}%)",
+"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.",
+"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.",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Krüpteering on keelatud, kuid sinu failid on endiselt krüpteeritud. Palun vaata oma personaalseid seadeid oma failide dekrüpteerimiseks.",
"Your download is being prepared. This might take some time if the files are big." => "Valmistatakse allalaadimist. See võib võtta veidi aega, kui on tegu suurte failidega. ",
"Error moving file" => "Viga faili eemaldamisel",
diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php
index 03505a2a269..ca1ed09ef3d 100644
--- a/apps/files/l10n/fr.php
+++ b/apps/files/l10n/fr.php
@@ -44,6 +44,8 @@ $TRANSLATIONS = array(
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nom invalide, les caractères '\\', '/', '<', '>', ':', '\"', '|', '?' et '*' ne sont pas autorisés.",
"Your storage is full, files can not be updated or synced anymore!" => "Votre espage de stockage est plein, les fichiers ne peuvent plus être téléversés ou synchronisés !",
"Your storage is almost full ({usedSpacePercent}%)" => "Votre espace de stockage est presque plein ({usedSpacePercent}%)",
+"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "L'application de chiffrement est activée mais vos clés ne sont pas initialisées, veuillez vous déconnecter et ensuite vous reconnecter.",
+"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "Votre clef privée pour l'application de chiffrement est invalide ! Veuillez mettre à jour le mot de passe de votre clef privée dans vos paramètres personnels pour récupérer l'accès à vos fichiers chiffrés.",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Le chiffrement était désactivé mais vos fichiers sont toujours chiffrés. Veuillez vous rendre sur vos Paramètres personnels pour déchiffrer vos fichiers.",
"Your download is being prepared. This might take some time if the files are big." => "Votre téléchargement est cours de préparation. Ceci peut nécessiter un certain temps si les fichiers sont volumineux.",
"Error moving file" => "Erreur lors du déplacement du fichier",
diff --git a/apps/files/l10n/pt_PT.php b/apps/files/l10n/pt_PT.php
index f6d61fc9873..342cab2bf4e 100644
--- a/apps/files/l10n/pt_PT.php
+++ b/apps/files/l10n/pt_PT.php
@@ -13,10 +13,12 @@ $TRANSLATIONS = array(
"Missing a temporary folder" => "Está a faltar a pasta temporária",
"Failed to write to disk" => "Falhou a escrita no disco",
"Not enough storage available" => "Não há espaço suficiente em disco",
+"Upload failed. Could not get file info." => "O carregamento falhou. Não foi possível obter a informação do ficheiro.",
"Invalid directory." => "Directório Inválido",
"Files" => "Ficheiros",
"Not enough space available" => "Espaço em disco insuficiente!",
"Upload cancelled." => "Envio cancelado.",
+"Could not get result from server." => "Não foi possível obter o resultado do servidor.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Envio de ficheiro em progresso. Irá cancelar o envio se sair da página agora.",
"URL cannot be empty." => "O URL não pode estar vazio.",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Nome da pasta inválido. Palavra 'Shared' é reservado pela ownCloud",
@@ -42,6 +44,7 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "O seu espaço de armazenamento está quase cheiro ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "A encriptação foi desactivada mas os seus ficheiros continuam encriptados. Por favor consulte as suas definições pessoais para desencriptar os ficheiros.",
"Your download is being prepared. This might take some time if the files are big." => "O seu download está a ser preparado. Este processo pode demorar algum tempo se os ficheiros forem grandes.",
+"Error moving file" => "Erro ao mover o ficheiro",
"Name" => "Nome",
"Size" => "Tamanho",
"Modified" => "Modificado",
diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php
index 0679da334de..a6d2e44f34f 100644
--- a/apps/files/templates/part.list.php
+++ b/apps/files/templates/part.list.php
@@ -36,7 +36,7 @@ $totalsize = 0; ?>
-
+
diff --git a/apps/files_encryption/files/error.php b/apps/files_encryption/files/error.php
index ac0c0269164..61574edf509 100644
--- a/apps/files_encryption/files/error.php
+++ b/apps/files_encryption/files/error.php
@@ -5,26 +5,39 @@ if (!isset($_)) { //also provide standalone error page
$l = OC_L10N::get('files_encryption');
- if (isset($_GET['i']) && $_GET['i'] === '0') {
- $errorMsg = $l->t('Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app.');
- $init = '0';
+ if (isset($_GET['errorCode'])) {
+ $errorCode = $_GET['errorCode'];
+ switch ($errorCode) {
+ case \OCA\Encryption\Crypt::ENCRYPTION_NOT_INITIALIZED_ERROR:
+ $errorMsg = $l->t('Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app.');
+ break;
+ case \OCA\Encryption\Crypt::ENCRYPTION_PRIVATE_KEY_NOT_VALID_ERROR:
+ $errorMsg = $l->t('Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files.');
+ break;
+ case \OCA\Encryption\Crypt::ENCRYPTION_NO_SHARE_KEY_FOUND:
+ $errorMsg = $l->t('Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
+ break;
+ default:
+ $errorMsg = $l->t("Unknown error please check your system settings or contact your administrator");
+ break;
+ }
} else {
- $errorMsg = $l->t('Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files.');
- $init = '1';
+ $errorCode = \OCA\Encryption\Crypt::ENCRYPTION_UNKNOWN_ERROR;
+ $errorMsg = $l->t("Unknown error please check your system settings or contact your administrator");
}
if (isset($_GET['p']) && $_GET['p'] === '1') {
- header('HTTP/1.0 404 ' . $errorMsg);
+ header('HTTP/1.0 403 ' . $errorMsg);
}
// check if ajax request
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
\OCP\JSON::error(array('data' => array('message' => $errorMsg)));
} else {
- header('HTTP/1.0 404 ' . $errorMsg);
+ header('HTTP/1.0 403 ' . $errorMsg);
$tmpl = new OC_Template('files_encryption', 'invalid_private_key', 'guest');
$tmpl->assign('message', $errorMsg);
- $tmpl->assign('init', $init);
+ $tmpl->assign('errorCode', $errorCode);
$tmpl->printPage();
}
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 2df860a8e57..d9a76becf25 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -92,8 +92,6 @@ class Hooks {
}
// Encrypt existing user files:
- // This serves to upgrade old versions of the encryption
- // app (see appinfo/spec.txt)
if (
$util->encryptAll('/' . $params['uid'] . '/' . 'files', $session->getLegacyKey(), $params['password'])
) {
diff --git a/apps/files_encryption/l10n/en_GB.php b/apps/files_encryption/l10n/en_GB.php
index d2bfdfa9ea4..53eef77eb54 100644
--- a/apps/files_encryption/l10n/en_GB.php
+++ b/apps/files_encryption/l10n/en_GB.php
@@ -8,22 +8,26 @@ $TRANSLATIONS = array(
"Could not change the password. Maybe the old password was not correct." => "Could not change the password. Maybe the old password was incorrect.",
"Private key password successfully updated." => "Private key password updated successfully.",
"Could not update the private key password. Maybe the old password was not correct." => "Could not update the private key password. Maybe the old password was not correct.",
+"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Encryption app not initialised! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialise the encryption app.",
"Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files.",
"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:",
"Saving..." => "Saving...",
+"Go directly to your " => "Go directly to your ",
"personal settings" => "personal settings",
"Encryption" => "Encryption",
"Enable recovery key (allow to recover users files in case of password loss):" => "Enable recovery key (allow to recover users files in case of password loss):",
"Recovery key password" => "Recovery key password",
+"Repeat Recovery key password" => "Repeat recovery key password",
"Enabled" => "Enabled",
"Disabled" => "Disabled",
"Change recovery key password:" => "Change recovery key password:",
-"Old Recovery key password" => "Old Recovery key password",
-"New Recovery key password" => "New Recovery key password",
+"Old Recovery key password" => "Old recovery key password",
+"New Recovery key password" => "New recovery key password",
+"Repeat New Recovery key password" => "Repeat new recovery key password",
"Change Password" => "Change Password",
-"Your private key password no longer match your log-in password:" => "Your private key password no longer match your login password:",
+"Your private key password no longer match your log-in password:" => "Your private key password no longer matches your login password:",
"Set your old private key password to your current log-in password." => "Set your old private key password to your current login password.",
" If you don't remember your old password you can ask your administrator to recover your files." => " If you don't remember your old password you can ask your administrator to recover your files.",
"Old log-in password" => "Old login password",
diff --git a/apps/files_encryption/l10n/es.php b/apps/files_encryption/l10n/es.php
index 138d51b09be..2e3c7c58163 100644
--- a/apps/files_encryption/l10n/es.php
+++ b/apps/files_encryption/l10n/es.php
@@ -8,6 +8,7 @@ $TRANSLATIONS = array(
"Could not change the password. Maybe the old password was not correct." => "No se pudo cambiar la contraseña. Compruebe que la contraseña actual sea correcta.",
"Private key password successfully updated." => "Contraseña de clave privada actualizada con éxito.",
"Could not update the private key password. Maybe the old password was not correct." => "No se pudo cambiar la contraseña. Puede que la contraseña antigua no sea correcta.",
+"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "¡Encryption App no está inicializada!. Quizás la aplicación fue reiniciada durante tu sesión. Por favor, cierra la sesión y vuelva a iniciarla para intentar inicializar la Encryption App.",
"Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "¡Su clave privada no es válida! Tal vez su contraseña ha sido cambiada desde fuera. Puede actualizar su clave privada en sus opciones personales para recuperar el acceso a sus ficheros.",
"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.",
diff --git a/apps/files_encryption/l10n/et_EE.php b/apps/files_encryption/l10n/et_EE.php
index 0c9234d3a51..c49e4e9e5a5 100644
--- a/apps/files_encryption/l10n/et_EE.php
+++ b/apps/files_encryption/l10n/et_EE.php
@@ -8,20 +8,24 @@ $TRANSLATIONS = array(
"Could not change the password. Maybe the old password was not correct." => "Ei suutnud vahetada parooli. Võib-olla on vana parool valesti sisestatud.",
"Private key password successfully updated." => "Privaatse võtme parool edukalt uuendatud.",
"Could not update the private key password. Maybe the old password was not correct." => "Ei suutnud uuendada privaatse võtme parooli. Võib-olla polnud vana parool õige.",
+"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Krüpteerimise rakend pole käivitatud. Võib-olla krüpteerimise rakend taaskäivitati sinu sessiooni kestel. Palun proovi logida välja ning uuesti sisse käivitamaks krüpteerimise rakendit.",
"Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Sinu privaatne võti pole toimiv! Tõenäoliselt on sinu parool muutunud väljaspool ownCloud süsteemi (näiteks ettevõtte keskhaldus). Sa saad uuendada oma privaatse võtme parooli seadete all taastamaks ligipääsu oma krüpteeritud failidele.",
"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:",
"Saving..." => "Salvestamine...",
+"Go directly to your " => "Liigu otse oma",
"personal settings" => "isiklikes seadetes",
"Encryption" => "Krüpteerimine",
"Enable recovery key (allow to recover users files in case of password loss):" => "Luba taastevõti (võimada kasutaja failide taastamine parooli kaotuse puhul):",
"Recovery key password" => "Taastevõtme parool",
+"Repeat Recovery key password" => "Korda taastevõtme parooli",
"Enabled" => "Sisse lülitatud",
"Disabled" => "Väljalülitatud",
"Change recovery key password:" => "Muuda taastevõtme parooli:",
"Old Recovery key password" => "Vana taastevõtme parool",
"New Recovery key password" => "Uus taastevõtme parool",
+"Repeat New Recovery key password" => "Korda uut taastevõtme parooli",
"Change Password" => "Muuda parooli",
"Your private key password no longer match your log-in password:" => "Sinu privaatse võtme parool ei ühti enam sinu sisselogimise parooliga:",
"Set your old private key password to your current log-in password." => "Pane oma vana privaatvõtme parooliks oma praegune sisselogimise parool.",
diff --git a/apps/files_encryption/l10n/fr.php b/apps/files_encryption/l10n/fr.php
index b222aa10e4b..afce2ccfd35 100644
--- a/apps/files_encryption/l10n/fr.php
+++ b/apps/files_encryption/l10n/fr.php
@@ -8,20 +8,24 @@ $TRANSLATIONS = array(
"Could not change the password. Maybe the old password was not correct." => "Ne peut pas changer le mot de passe. L'ancien mot de passe est peut-être incorrect.",
"Private key password successfully updated." => "Mot de passe de la clé privé mis à jour avec succès.",
"Could not update the private key password. Maybe the old password was not correct." => "Impossible de mettre à jour le mot de passe de la clé privé. Peut-être que l'ancien mot de passe n'était pas correcte.",
+"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "L'application de chiffrement n'est pas initialisée ! Peut-être que cette application a été réactivée pendant votre session. Veuillez essayer de vous déconnecter et ensuite de vous reconnecter pour initialiser l'application de chiffrement.",
"Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Votre clé de sécurité privée n'est pas valide! Il est probable que votre mot de passe ait été changé sans passer par le système ownCloud (par éxemple: le serveur de votre entreprise). Ain d'avoir à nouveau accès à vos fichiers cryptés, vous pouvez mettre à jour votre clé de sécurité privée dans les paramètres personnels de votre compte.",
"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 :",
"Saving..." => "Enregistrement...",
+"Go directly to your " => "Allez directement à votre",
"personal settings" => "paramètres personnel",
"Encryption" => "Chiffrement",
"Enable recovery key (allow to recover users files in case of password loss):" => "Activer la clef de récupération (permet de récupérer les fichiers des utilisateurs en cas de perte de mot de passe).",
"Recovery key password" => "Mot de passe de la clef de récupération",
+"Repeat Recovery key password" => "Répétez le mot de passe de la clé de récupération",
"Enabled" => "Activer",
"Disabled" => "Désactiver",
"Change recovery key password:" => "Modifier le mot de passe de la clef de récupération :",
"Old Recovery key password" => "Ancien mot de passe de la clef de récupération",
"New Recovery key password" => "Nouveau mot de passe de la clef de récupération",
+"Repeat New Recovery key password" => "Répétez le nouveau mot de passe de la clé de récupération",
"Change Password" => "Changer de mot de passe",
"Your private key password no longer match your log-in password:" => "Le mot de passe de votre clef privée ne correspond plus à votre mot de passe de connexion :",
"Set your old private key password to your current log-in password." => "Configurez le mot de passe de votre ancienne clef privée avec votre mot de passe courant de connexion. ",
diff --git a/apps/files_encryption/l10n/pl.php b/apps/files_encryption/l10n/pl.php
index 4eb1ca00dda..b448aaef148 100644
--- a/apps/files_encryption/l10n/pl.php
+++ b/apps/files_encryption/l10n/pl.php
@@ -8,20 +8,24 @@ $TRANSLATIONS = array(
"Could not change the password. Maybe the old password was not correct." => "Nie można zmienić hasła. Może stare hasło nie było poprawne.",
"Private key password successfully updated." => "Pomyślnie zaktualizowano hasło klucza prywatnego.",
"Could not update the private key password. Maybe the old password was not correct." => "Nie można zmienić prywatnego hasła. Może stare hasło nie było poprawne.",
+"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Szyfrowanie aplikacja nie została zainicjowane! Może szyfrowanie aplikacji zostało ponownie włączone podczas tej sesji. Spróbuj się wylogować i zalogować ponownie aby zainicjować szyfrowanie aplikacji.",
"Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Klucz prywatny nie jest ważny! Prawdopodobnie Twoje hasło zostało zmienione poza systemem ownCloud (np. w katalogu firmy). Aby odzyskać dostęp do zaszyfrowanych plików można zaktualizować hasło klucza prywatnego w ustawieniach osobistych.",
"Missing requirements." => "Brak wymagań.",
"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." => "Proszę upewnić się, że PHP 5.3.3 lub nowszy jest zainstalowany i że OpenSSL oraz rozszerzenie PHP jest włączone i poprawnie skonfigurowane. Obecnie szyfrowanie aplikacji zostało wyłączone.",
"Following users are not set up for encryption:" => "Następujący użytkownicy nie mają skonfigurowanego szyfrowania:",
"Saving..." => "Zapisywanie...",
+"Go directly to your " => "Przejdź bezpośrednio do",
"personal settings" => "Ustawienia osobiste",
"Encryption" => "Szyfrowanie",
"Enable recovery key (allow to recover users files in case of password loss):" => "Włączhasło klucza odzyskiwania (pozwala odzyskać pliki użytkowników w przypadku utraty hasła):",
"Recovery key password" => "Hasło klucza odzyskiwania",
+"Repeat Recovery key password" => "Powtórz hasło klucza odzyskiwania",
"Enabled" => "Włączone",
"Disabled" => "Wyłączone",
"Change recovery key password:" => "Zmień hasło klucza odzyskiwania",
"Old Recovery key password" => "Stare hasło klucza odzyskiwania",
"New Recovery key password" => "Nowe hasło klucza odzyskiwania",
+"Repeat New Recovery key password" => "Powtórz nowe hasło klucza odzyskiwania",
"Change Password" => "Zmień hasło",
"Your private key password no longer match your log-in password:" => "Hasło klucza prywatnego nie pasuje do hasła logowania:",
"Set your old private key password to your current log-in password." => "Podaj swoje stare prywatne hasło aby ustawić nowe",
diff --git a/apps/files_encryption/l10n/pt_PT.php b/apps/files_encryption/l10n/pt_PT.php
index 53335ab7297..788e102dd67 100644
--- a/apps/files_encryption/l10n/pt_PT.php
+++ b/apps/files_encryption/l10n/pt_PT.php
@@ -9,6 +9,7 @@ $TRANSLATIONS = array(
"Could not update the private key password. Maybe the old password was not correct." => "Não foi possível alterar a chave. Possivelmente a password antiga não está correcta.",
"Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Chave privada não é válida! Provavelmente senha foi alterada fora do sistema ownCloud (exemplo, o diretório corporativo). Pode atualizar password da chave privada em configurações personalizadas para recuperar o acesso aos seus arquivos encriptados.",
"Missing requirements." => "Faltam alguns requisitos.",
+"Following users are not set up for encryption:" => "Os utilizadores seguintes não estão marcados para cifragem:",
"Saving..." => "A guardar...",
"personal settings" => "configurações personalizadas ",
"Encryption" => "Encriptação",
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
index c009718160a..9155d238c77 100755
--- a/apps/files_encryption/lib/crypt.php
+++ b/apps/files_encryption/lib/crypt.php
@@ -33,6 +33,12 @@ require_once __DIR__ . '/../3rdparty/Crypt_Blowfish/Blowfish.php';
class Crypt {
+ const ENCRYPTION_UNKNOWN_ERROR = -1;
+ const ENCRYPTION_NOT_INITIALIZED_ERROR = 1;
+ const ENCRYPTION_PRIVATE_KEY_NOT_VALID_ERROR = 2;
+ const ENCRYPTION_NO_SHARE_KEY_FOUND = 3;
+
+
/**
* @brief return encryption mode client or server side encryption
* @param string $user name (use system wide setting if name=null)
@@ -183,8 +189,8 @@ class Crypt {
// Fetch all file metadata from DB
$metadata = \OC\Files\Filesystem::getFileInfo($relPath, '');
- // If a file is flagged with encryption in DB, but isn't a
- // valid content + IV combination, it's probably using the
+ // If a file is flagged with encryption in DB, but isn't a
+ // valid content + IV combination, it's probably using the
// legacy encryption system
if (isset($metadata['encrypted'])
&& $metadata['encrypted'] === true
@@ -388,7 +394,7 @@ class Crypt {
*/
public static function multiKeyEncrypt($plainContent, array $publicKeys) {
- // openssl_seal returns false without errors if $plainContent
+ // openssl_seal returns false without errors if $plainContent
// is empty, so trigger our own error
if (empty($plainContent)) {
@@ -405,7 +411,7 @@ class Crypt {
$i = 0;
- // Ensure each shareKey is labelled with its
+ // Ensure each shareKey is labelled with its
// corresponding userId
foreach ($publicKeys as $userId => $publicKey) {
@@ -476,7 +482,7 @@ class Crypt {
}
- // We encode the iv purely for string manipulation
+ // We encode the iv purely for string manipulation
// purposes - it gets decoded before use
$iv = base64_encode($random);
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index ebfc00157f7..a754f9f28c4 100755
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -235,16 +235,28 @@ class Helper {
/**
* @brief redirect to a error page
*/
- public static function redirectToErrorPage($session) {
-
- $init = $session->getInitialized();
+ public static function redirectToErrorPage($session, $errorCode = null) {
+
+ if ($errorCode === null) {
+ $init = $session->getInitialized();
+ switch ($init) {
+ case \OCA\Encryption\Session::INIT_EXECUTED:
+ $errorCode = \OCA\Encryption\Crypt::ENCRYPTION_PRIVATE_KEY_NOT_VALID_ERROR;
+ break;
+ case \OCA\Encryption\Session::NOT_INITIALIZED:
+ $errorCode = \OCA\Encryption\Crypt::ENCRYPTION_NOT_INITIALIZED_ERROR;
+ break;
+ default:
+ $errorCode = \OCA\Encryption\Crypt::ENCRYPTION_UNKNOWN_ERROR;
+ }
+ }
$location = \OC_Helper::linkToAbsolute('apps/files_encryption/files', 'error.php');
$post = 0;
if(count($_POST) > 0) {
$post = 1;
}
- header('Location: ' . $location . '?p=' . $post . '&i=' . $init);
+ header('Location: ' . $location . '?p=' . $post . '&errorCode=' . $errorCode);
exit();
}
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 6f630c83a3f..8621c1ba51d 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -38,8 +38,6 @@ class Proxy extends \OC_FileProxy {
private static $blackList = null; //mimetypes blacklisted from encryption
- private static $enableEncryption = null;
-
/**
* Check if a file requires encryption
* @param string $path
@@ -49,46 +47,22 @@ class Proxy extends \OC_FileProxy {
*/
private static function shouldEncrypt($path) {
- if (is_null(self::$enableEncryption)) {
- if (
- \OCP\App::isEnabled('files_encryption') === true
- && Crypt::mode() === 'server'
- ) {
-
- self::$enableEncryption = true;
-
- } else {
-
- self::$enableEncryption = false;
-
- }
-
- }
-
- if (!self::$enableEncryption) {
-
+ if (\OCP\App::isEnabled('files_encryption') === false || Crypt::mode() !== 'server') {
return false;
-
}
if (is_null(self::$blackList)) {
-
self::$blackList = explode(',', \OCP\Config::getAppValue('files_encryption', 'type_blacklist', ''));
-
}
if (Crypt::isCatfileContent($path)) {
-
return true;
-
}
$extension = substr($path, strrpos($path, '.') + 1);
if (array_search($extension, self::$blackList) === false) {
-
return true;
-
}
return false;
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index 02955bb064e..5ce5caf80ce 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -254,16 +254,20 @@ class Stream {
// If a keyfile already exists
if ($this->encKeyfile) {
+ $shareKey = Keymanager::getShareKey($this->rootView, $this->userId, $this->relPath);
+
// if there is no valid private key return false
if ($this->privateKey === false) {
-
// if private key is not valid redirect user to a error page
- \OCA\Encryption\Helper::redirectToErrorPage();
-
+ \OCA\Encryption\Helper::redirectToErrorPage($this->session);
return false;
}
- $shareKey = Keymanager::getShareKey($this->rootView, $this->userId, $this->relPath);
+ if ($shareKey === false) {
+ // if no share key is available redirect user to a error page
+ \OCA\Encryption\Helper::redirectToErrorPage($this->session, \OCA\Encryption\Crypt::ENCRYPTION_NO_SHARE_KEY_FOUND);
+ return false;
+ }
$this->plainKey = Crypt::multiKeyDecrypt($this->encKeyfile, $shareKey, $this->privateKey);
@@ -506,9 +510,10 @@ class Stream {
// Get all users sharing the file includes current user
$uniqueUserIds = $util->getSharingUsersArray($sharingEnabled, $this->relPath, $this->userId);
+ $checkedUserIds = $util->filterShareReadyUsers($uniqueUserIds);
// Fetch public keys for all sharing users
- $publicKeys = Keymanager::getPublicKeys($this->rootView, $uniqueUserIds);
+ $publicKeys = Keymanager::getPublicKeys($this->rootView, $checkedUserIds['ready']);
// Encrypt enc key for all sharing users
$this->encKeyfiles = Crypt::multiKeyEncrypt($this->plainKey, $publicKeys);
diff --git a/apps/files_encryption/templates/invalid_private_key.php b/apps/files_encryption/templates/invalid_private_key.php
index 9af65f831b4..a3cae60b1da 100644
--- a/apps/files_encryption/templates/invalid_private_key.php
+++ b/apps/files_encryption/templates/invalid_private_key.php
@@ -4,7 +4,7 @@
-
+
p($l->t('Go directly to your ')); ?> t('personal settings')); ?>.
diff --git a/apps/files_encryption/templates/settings-admin.php b/apps/files_encryption/templates/settings-admin.php
index 3a6adc09f4b..231a68b6a58 100644
--- a/apps/files_encryption/templates/settings-admin.php
+++ b/apps/files_encryption/templates/settings-admin.php
@@ -1,10 +1,7 @@