summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption')
-rw-r--r--apps/files_encryption/appinfo/app.php4
-rw-r--r--apps/files_encryption/hooks/hooks.php23
-rw-r--r--apps/files_encryption/l10n/bs.php5
-rw-r--r--apps/files_encryption/l10n/de_CH.php39
-rw-r--r--apps/files_encryption/l10n/en_GB.php39
-rw-r--r--apps/files_encryption/l10n/pa.php5
-rw-r--r--apps/files_encryption/l10n/te.php5
-rw-r--r--apps/files_encryption/l10n/uk.php3
-rw-r--r--apps/files_encryption/lib/util.php3
9 files changed, 114 insertions, 12 deletions
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php
index cd26cd10cd9..c930ac9eca8 100644
--- a/apps/files_encryption/appinfo/app.php
+++ b/apps/files_encryption/appinfo/app.php
@@ -25,7 +25,9 @@ if (!OC_Config::getValue('maintenance', false)) {
// App manager related hooks
OCA\Encryption\Helper::registerAppHooks();
- stream_wrapper_register('crypt', 'OCA\Encryption\Stream');
+ if(!in_array('crypt', stream_get_wrappers())) {
+ stream_wrapper_register('crypt', 'OCA\Encryption\Stream');
+ }
// check if we are logged in
if (OCP\User::isLoggedIn()) {
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 9824cb45684..2df860a8e57 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -44,17 +44,22 @@ class Hooks {
\OC_Util::setupFS($params['uid']);
}
- $util = new Util($view, $params['uid']);
-
- //check if all requirements are met
- if(!$util->ready() && (!Helper::checkRequirements() || !Helper::checkConfiguration())) {
- $error_msg = $l->t("Missing requirements.");
- $hint = $l->t('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.');
- \OC_App::disable('files_encryption');
- \OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR);
- \OCP\Template::printErrorPage($error_msg, $hint);
+ $privateKey = \OCA\Encryption\Keymanager::getPrivateKey($view, $params['uid']);
+
+ // if no private key exists, check server configuration
+ if(!$privateKey) {
+ //check if all requirements are met
+ if(!Helper::checkRequirements() || !Helper::checkConfiguration()) {
+ $error_msg = $l->t("Missing requirements.");
+ $hint = $l->t('Please make sure that 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.');
+ \OC_App::disable('files_encryption');
+ \OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR);
+ \OCP\Template::printErrorPage($error_msg, $hint);
+ }
}
+ $util = new Util($view, $params['uid']);
+
// setup user, if user not ready force relogin
if (Helper::setupUser($util, $params['password']) === false) {
return false;
diff --git a/apps/files_encryption/l10n/bs.php b/apps/files_encryption/l10n/bs.php
new file mode 100644
index 00000000000..708e045adeb
--- /dev/null
+++ b/apps/files_encryption/l10n/bs.php
@@ -0,0 +1,5 @@
+<?php
+$TRANSLATIONS = array(
+"Saving..." => "Spašavam..."
+);
+$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";
diff --git a/apps/files_encryption/l10n/de_CH.php b/apps/files_encryption/l10n/de_CH.php
new file mode 100644
index 00000000000..aa867645c8d
--- /dev/null
+++ b/apps/files_encryption/l10n/de_CH.php
@@ -0,0 +1,39 @@
+<?php
+$TRANSLATIONS = array(
+"Recovery key successfully enabled" => "Der Wiederherstellungsschlüssel wurde erfolgreich aktiviert.",
+"Could not enable recovery key. Please check your recovery key password!" => "Der Wiederherstellungsschlüssel konnte nicht aktiviert werden. Bitte überprüfen Sie das Passwort für den Wiederherstellungsschlüssel!",
+"Recovery key successfully disabled" => "Der Wiederherstellungsschlüssel wurde erfolgreich deaktiviert.",
+"Could not disable recovery key. Please check your recovery key password!" => "Der Wiederherstellungsschlüssel konnte nicht deaktiviert werden. Bitte überprüfen Sie das Passwort für den Wiederherstellungsschlüssel!",
+"Password successfully changed." => "Das Passwort wurde erfolgreich geändert.",
+"Could not change the password. Maybe the old password was not correct." => "Das Passwort konnte nicht geändert werden. Vielleicht war das alte Passwort nicht richtig.",
+"Private key password successfully updated." => "Das Passwort des privaten Schlüssels wurde erfolgreich aktualisiert.",
+"Could not update the private key password. Maybe the old password was not correct." => "Das Passwort des privaten Schlüssels konnte nicht aktualisiert werden. Vielleicht war das alte Passwort nicht richtig.",
+"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." => "Ihr privater Schlüssel ist ungültig. Möglicher Weise wurde von ausserhalb Ihr Passwort geändert (z.B. in Ihrem gemeinsamen Verzeichnis). Sie können das Passwort Ihres privaten Schlüssels in den persönlichen Einstellungen aktualisieren, um wieder an Ihre Dateien zu gelangen.",
+"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:",
+"Saving..." => "Speichern...",
+"Your private key is not valid! Maybe the your password was changed from outside." => "Ihr privater Schlüssel ist ungültig! Vielleicht wurde Ihr Passwort von ausserhalb geändert.",
+"You can unlock your private key in your " => "Sie können den privaten Schlüssel ändern und zwar in Ihrem",
+"personal settings" => "Persönliche Einstellungen",
+"Encryption" => "Verschlüsselung",
+"Enable recovery key (allow to recover users files in case of password loss):" => "Aktivieren Sie den Wiederherstellungsschlüssel (erlaubt die Wiederherstellung des Zugangs zu den Benutzerdateien, wenn das Passwort verloren geht).",
+"Recovery key password" => "Wiederherstellungschlüsselpasswort",
+"Enabled" => "Aktiviert",
+"Disabled" => "Deaktiviert",
+"Change recovery key password:" => "Wiederherstellungsschlüsselpasswort ändern",
+"Old Recovery key password" => "Altes Wiederherstellungsschlüsselpasswort",
+"New Recovery key password" => "Neues Wiederherstellungsschlüsselpasswort ",
+"Change Password" => "Passwort ändern",
+"Your private key password no longer match your log-in password:" => "Das Privatschlüsselpasswort darf nicht länger mit den Login-Passwort übereinstimmen.",
+"Set your old private key password to your current log-in password." => "Setzen Sie Ihr altes Privatschlüsselpasswort auf Ihr aktuelles LogIn-Passwort.",
+" If you don't remember your old password you can ask your administrator to recover your files." => "Falls Sie sich nicht an Ihr altes Passwort erinnern können, fragen Sie bitte Ihren Administrator, um Ihre Dateien wiederherzustellen.",
+"Old log-in password" => "Altes Login-Passwort",
+"Current log-in password" => "Momentanes Login-Passwort",
+"Update Private Key Password" => "Das Passwort des privaten Schlüssels aktualisieren",
+"Enable password recovery:" => "Die Passwort-Wiederherstellung aktivieren:",
+"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" => "Durch die Aktivierung dieser Option haben Sie die Möglichkeit, wieder auf Ihre verschlüsselten Dateien zugreifen zu können, wenn Sie Ihr Passwort verloren haben.",
+"File recovery settings updated" => "Die Einstellungen für die Dateiwiederherstellung wurden aktualisiert.",
+"Could not update file recovery" => "Die Dateiwiederherstellung konnte nicht aktualisiert werden."
+);
+$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/apps/files_encryption/l10n/en_GB.php b/apps/files_encryption/l10n/en_GB.php
new file mode 100644
index 00000000000..c220a4bdf04
--- /dev/null
+++ b/apps/files_encryption/l10n/en_GB.php
@@ -0,0 +1,39 @@
+<?php
+$TRANSLATIONS = array(
+"Recovery key successfully enabled" => "Recovery key enabled successfully",
+"Could not enable recovery key. Please check your recovery key password!" => "Could not enable recovery key. Please check your recovery key password!",
+"Recovery key successfully disabled" => "Recovery key disabled successfully",
+"Could not disable recovery key. Please check your recovery key password!" => "Could not disable recovery key. Please check your recovery key password!",
+"Password successfully changed." => "Password changed successfully.",
+"Could not change the password. Maybe the old password was not correct." => "Could not change the password. Maybe the old password was incorrect.",
+"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.",
+"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...",
+"Your private key is not valid! Maybe the your password was changed from outside." => "Your private key is not valid! Maybe the your password was changed externally.",
+"You can unlock your private key in your " => "You can unlock your private key in 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",
+"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",
+"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:",
+"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",
+"Current log-in password" => "Current login password",
+"Update Private Key Password" => "Update Private Key Password",
+"Enable password recovery:" => "Enable password recovery:",
+"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" => "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss",
+"File recovery settings updated" => "File recovery settings updated",
+"Could not update file recovery" => "Could not update file recovery"
+);
+$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/apps/files_encryption/l10n/pa.php b/apps/files_encryption/l10n/pa.php
new file mode 100644
index 00000000000..58670990409
--- /dev/null
+++ b/apps/files_encryption/l10n/pa.php
@@ -0,0 +1,5 @@
+<?php
+$TRANSLATIONS = array(
+"Saving..." => "...ਸੰਭਾਲਿਆ ਜਾ ਰਿਹਾ ਹੈ"
+);
+$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/apps/files_encryption/l10n/te.php b/apps/files_encryption/l10n/te.php
new file mode 100644
index 00000000000..10c7a08a554
--- /dev/null
+++ b/apps/files_encryption/l10n/te.php
@@ -0,0 +1,5 @@
+<?php
+$TRANSLATIONS = array(
+"personal settings" => "వ్యక్తిగత అమరికలు"
+);
+$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/apps/files_encryption/l10n/uk.php b/apps/files_encryption/l10n/uk.php
index 680beddfe68..e4fb053a71a 100644
--- a/apps/files_encryption/l10n/uk.php
+++ b/apps/files_encryption/l10n/uk.php
@@ -1,6 +1,7 @@
<?php
$TRANSLATIONS = array(
"Saving..." => "Зберігаю...",
-"Encryption" => "Шифрування"
+"Encryption" => "Шифрування",
+"Change Password" => "Змінити Пароль"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index f0378a8faf2..53d58fbf40d 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -200,10 +200,11 @@ class Util {
if (false === $this->recoveryEnabledForUser()) {
// create database configuration
- $sql = 'INSERT INTO `*PREFIX*encryption` (`uid`,`mode`,`recovery_enabled`) VALUES (?,?,?)';
+ $sql = 'INSERT INTO `*PREFIX*encryption` (`uid`,`mode`,`recovery_enabled`,`migration_status`) VALUES (?,?,?,?)';
$args = array(
$this->userId,
'server-side',
+ 0,
0
);
$query = \OCP\DB::prepare($sql);