aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption
diff options
context:
space:
mode:
Diffstat (limited to 'apps/encryption')
-rw-r--r--apps/encryption/appinfo/application.php3
-rw-r--r--apps/encryption/controller/settingscontroller.php16
-rw-r--r--apps/encryption/l10n/el.js3
-rw-r--r--apps/encryption/l10n/el.json3
-rw-r--r--apps/encryption/l10n/id.js3
-rw-r--r--apps/encryption/l10n/id.json3
-rw-r--r--apps/encryption/l10n/nl.js3
-rw-r--r--apps/encryption/l10n/nl.json3
-rw-r--r--apps/encryption/l10n/tr.js3
-rw-r--r--apps/encryption/l10n/tr.json3
-rw-r--r--apps/encryption/lib/crypto/crypt.php2
-rw-r--r--apps/encryption/tests/controller/SettingsControllerTest.php32
-rw-r--r--apps/encryption/tests/lib/crypto/cryptTest.php15
13 files changed, 80 insertions, 12 deletions
diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php
index cba8964eefb..75107b2723c 100644
--- a/apps/encryption/appinfo/application.php
+++ b/apps/encryption/appinfo/application.php
@@ -198,7 +198,8 @@ class Application extends \OCP\AppFramework\App {
$server->getUserSession(),
$c->query('KeyManager'),
$c->query('Crypt'),
- $c->query('Session')
+ $c->query('Session'),
+ $server->getSession()
);
});
diff --git a/apps/encryption/controller/settingscontroller.php b/apps/encryption/controller/settingscontroller.php
index 2a668f7cd4a..8e6de19e784 100644
--- a/apps/encryption/controller/settingscontroller.php
+++ b/apps/encryption/controller/settingscontroller.php
@@ -31,6 +31,7 @@ use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\IL10N;
use OCP\IRequest;
+use OCP\ISession;
use OCP\IUserManager;
use OCP\IUserSession;
@@ -54,6 +55,9 @@ class SettingsController extends Controller {
/** @var Session */
private $session;
+ /** @var ISession */
+ private $ocSession;
+
/**
* @param string $AppName
* @param IRequest $request
@@ -63,6 +67,7 @@ class SettingsController extends Controller {
* @param KeyManager $keyManager
* @param Crypt $crypt
* @param Session $session
+ * @param ISession $ocSession
*/
public function __construct($AppName,
IRequest $request,
@@ -71,7 +76,8 @@ class SettingsController extends Controller {
IUserSession $userSession,
KeyManager $keyManager,
Crypt $crypt,
- Session $session) {
+ Session $session,
+ ISession $ocSession) {
parent::__construct($AppName, $request);
$this->l = $l10n;
$this->userSession = $userSession;
@@ -79,6 +85,7 @@ class SettingsController extends Controller {
$this->keyManager = $keyManager;
$this->crypt = $crypt;
$this->session = $session;
+ $this->ocSession = $ocSession;
}
@@ -97,6 +104,13 @@ class SettingsController extends Controller {
//check if password is correct
$passwordCorrect = $this->userManager->checkPassword($uid, $newPassword);
+ if ($passwordCorrect === false) {
+ // if check with uid fails we need to check the password with the login name
+ // e.g. in the ldap case. For local user we need to check the password with
+ // the uid because in this case the login name is case insensitive
+ $loginName = $this->ocSession->get('loginname');
+ $passwordCorrect = $this->userManager->checkPassword($loginName, $newPassword);
+ }
if ($passwordCorrect !== false) {
$encryptedKey = $this->keyManager->getPrivateKey($uid);
diff --git a/apps/encryption/l10n/el.js b/apps/encryption/l10n/el.js
index 1c9178831b6..d27098ddb04 100644
--- a/apps/encryption/l10n/el.js
+++ b/apps/encryption/l10n/el.js
@@ -25,10 +25,13 @@ OC.L10N.register(
"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Άκυρο προσωπικό κλειδί για την εφαρμογή κρυπτογράφησης. Παρακαλώ ενημερώστε τον κωδικό του προσωπικού κλειδίου σας στις προσωπικές ρυθμίσεις για να επανακτήσετε πρόσβαση στα κρυπτογραφημένα σας αρχεία.",
"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Η εφαρμογή κρυπτογράφησης είναι ενεργοποιημένη αλλά τα κλειδιά σας δεν έχουν καταγραφεί, παρακαλώ αποσυνδεθείτε και επανασυνδεθείτε.",
"Encryption App is enabled and ready" : "Η Εφαρμογή Κρυπτογράφησης είναι ενεργοποιημένη και έτοιμη.",
+ "one-time password for server-side-encryption" : "κωδικός μιας χρήσης για κρυπτογράφηση στο διακομιστή",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Δεν ήταν δυνατό να αποκρυπτογραφηθεί αυτό το αρχείο, πιθανόν πρόκειται για κοινόχρηστο αρχείο. Παρακαλώ ζητήστε από τον ιδιοκτήτη του αρχείου να το ξαναμοιραστεί μαζί σας.",
"Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Αδυναμία ανάγνωσης αυτού του αρχείου, πιθανό να είναι διαμοιραζόμενο αρχείο. Παρακαλώ ρωτήστε τον κάτοχο του αρχείου να το διαμοιράσει ξανά μαζί σας.",
+ "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" : "Χαίρετε,\n\nο διαχειριστής ενεργοποίηση την κρυπτογράφηση στο διακομιστή. Τα αρχεία σας κρυπτογραφήθηκαν με τον κωδικό '%s'.\n\nΠαρακαλούμε συνδεθείτε στη διεπαφή ιστού, πηγαίνετε στην ενότητα 'μονάδα βασικής κρυπτογράφησης ownCloud' στις προσωπικές σας ρυθμίσεις και ενημερώστε τον κωδικό κρυπτογράφησης εισάγοντας αυτό τον κωδικό στο πεδίο 'παλιός κωδικός σύνδεσης' και τον τωρινό σας κωδικό σύνδεσης.\n",
"The share will expire on %s." : "Ο διαμοιρασμός θα λήξει σε %s.",
"Cheers!" : "Χαιρετισμούς!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>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.<br><br>" : "Χαίρετε,<br><br>ο διαχειριστής ενεργοποίησε την κρυπτογράφηση στο διακομιστή. Τα αρχεία σας κρυπτογραφήθηκαν με τον κωδικό <strong>%s</strong>.<br><br>Παρακαλούμε συνδεθείτε στη διεπαφή ιστού, πηγαίνετε στην ενότητα \"μονάδα βασικής κρυπτογράφησης ownCloud\" τωνπ ροσωπικών σας ρυθμίσεων και ενημερώστε τον κωδικό κρυπτογράφησης εισάγοντας αυτό τον κωδικό στο πεδίο \"παλιός κωδικός σύνδεσης\" και τον τωρινό σας κωδικό σύνδεσης.",
"Enable recovery key" : "Ενεργοποίηση κλειδιού ανάκτησης",
"Disable recovery key" : "Απενεργοποίηση κλειδιού ανάκτησης",
"The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "Το κλειδί ανάκτησης είναι ένα επιπλέον κλειδί κρυπτογράφησης που χρησιμοποιείται για να κρυπτογραφήσει αρχεία. Επιτρέπει την ανάκτηση των αρχείων ενός χρήστη αν αυτός/αυτή ξεχάσει τον κωδικό πρόσβασης.",
diff --git a/apps/encryption/l10n/el.json b/apps/encryption/l10n/el.json
index 1fdf329d852..3ed5e39b7c0 100644
--- a/apps/encryption/l10n/el.json
+++ b/apps/encryption/l10n/el.json
@@ -23,10 +23,13 @@
"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Άκυρο προσωπικό κλειδί για την εφαρμογή κρυπτογράφησης. Παρακαλώ ενημερώστε τον κωδικό του προσωπικού κλειδίου σας στις προσωπικές ρυθμίσεις για να επανακτήσετε πρόσβαση στα κρυπτογραφημένα σας αρχεία.",
"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Η εφαρμογή κρυπτογράφησης είναι ενεργοποιημένη αλλά τα κλειδιά σας δεν έχουν καταγραφεί, παρακαλώ αποσυνδεθείτε και επανασυνδεθείτε.",
"Encryption App is enabled and ready" : "Η Εφαρμογή Κρυπτογράφησης είναι ενεργοποιημένη και έτοιμη.",
+ "one-time password for server-side-encryption" : "κωδικός μιας χρήσης για κρυπτογράφηση στο διακομιστή",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Δεν ήταν δυνατό να αποκρυπτογραφηθεί αυτό το αρχείο, πιθανόν πρόκειται για κοινόχρηστο αρχείο. Παρακαλώ ζητήστε από τον ιδιοκτήτη του αρχείου να το ξαναμοιραστεί μαζί σας.",
"Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Αδυναμία ανάγνωσης αυτού του αρχείου, πιθανό να είναι διαμοιραζόμενο αρχείο. Παρακαλώ ρωτήστε τον κάτοχο του αρχείου να το διαμοιράσει ξανά μαζί σας.",
+ "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" : "Χαίρετε,\n\nο διαχειριστής ενεργοποίηση την κρυπτογράφηση στο διακομιστή. Τα αρχεία σας κρυπτογραφήθηκαν με τον κωδικό '%s'.\n\nΠαρακαλούμε συνδεθείτε στη διεπαφή ιστού, πηγαίνετε στην ενότητα 'μονάδα βασικής κρυπτογράφησης ownCloud' στις προσωπικές σας ρυθμίσεις και ενημερώστε τον κωδικό κρυπτογράφησης εισάγοντας αυτό τον κωδικό στο πεδίο 'παλιός κωδικός σύνδεσης' και τον τωρινό σας κωδικό σύνδεσης.\n",
"The share will expire on %s." : "Ο διαμοιρασμός θα λήξει σε %s.",
"Cheers!" : "Χαιρετισμούς!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>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.<br><br>" : "Χαίρετε,<br><br>ο διαχειριστής ενεργοποίησε την κρυπτογράφηση στο διακομιστή. Τα αρχεία σας κρυπτογραφήθηκαν με τον κωδικό <strong>%s</strong>.<br><br>Παρακαλούμε συνδεθείτε στη διεπαφή ιστού, πηγαίνετε στην ενότητα \"μονάδα βασικής κρυπτογράφησης ownCloud\" τωνπ ροσωπικών σας ρυθμίσεων και ενημερώστε τον κωδικό κρυπτογράφησης εισάγοντας αυτό τον κωδικό στο πεδίο \"παλιός κωδικός σύνδεσης\" και τον τωρινό σας κωδικό σύνδεσης.",
"Enable recovery key" : "Ενεργοποίηση κλειδιού ανάκτησης",
"Disable recovery key" : "Απενεργοποίηση κλειδιού ανάκτησης",
"The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "Το κλειδί ανάκτησης είναι ένα επιπλέον κλειδί κρυπτογράφησης που χρησιμοποιείται για να κρυπτογραφήσει αρχεία. Επιτρέπει την ανάκτηση των αρχείων ενός χρήστη αν αυτός/αυτή ξεχάσει τον κωδικό πρόσβασης.",
diff --git a/apps/encryption/l10n/id.js b/apps/encryption/l10n/id.js
index c0eb1576f11..1247b35bad6 100644
--- a/apps/encryption/l10n/id.js
+++ b/apps/encryption/l10n/id.js
@@ -25,10 +25,13 @@ OC.L10N.register(
"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Kunci privat tidak sah untuk Aplikasi Enskripsi. Silakan perbarui sandi kunci privat anda pada pengaturan pribadi untuk memulihkan akses ke berkas anda yang dienskripsi.",
"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikasi Enskripsi telah diaktifkan tetapi kunci tidak diinisialisasi, silakan log-out dan log-in lagi",
"Encryption App is enabled and ready" : "Apl Enkripsi telah diaktifkan dan siap",
+ "one-time password for server-side-encryption" : "Sandi sekali pakai untuk server-side-encryption",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tidak dapat mendekripsi berkas ini, mungkin ini adalah berkas bersama. Silakan meminta pemilik berkas ini untuk membagikan kembali dengan Anda.",
"Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tidak dapat membaca berkas ini, kemungkinan merupakan berkas berbagi. Silakan minta pemilik berkas untuk membagikan ulang kepada Anda.",
+ "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" : "Hai,\n\nadmin mengaktifkan server-side-encryption. Berkas-berkas Anda dienkripsi menggunakan sandi '%s'.\n\nSilakan masuk di antarmuka web, pergi ke bagian 'modul enkripsi dasar ownCloud' pada pengaturan pribadi Anda dan perbarui sandi enkripsi Anda dengan memasukkan sandi ini kedalam kolom 'sandi masuk yang lama' dan sandi-masuk saat ini.\n\n",
"The share will expire on %s." : "Pembagian akan berakhir pada %s.",
"Cheers!" : "Horee!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>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.<br><br>" : "Hai,<br><br>admin mengaktifkan server-side-encryption. Berkas-berkas Anda dienkripsi menggunakan sandi <strong>%s</strong>.<br><br>Silakan masuk di antarmuka web, pergi ke bagian 'modul enkripsi dasar ownCloud' pada pengaturan pribadi Anda dan perbarui sandi enkripsi Anda dengan memasukkan sandi ini kedalam kolom 'sandi masuk yang lama' dan sandi masuk yang baru.<br><br>",
"Enable recovery key" : "Aktifkan kunci pemulihan",
"Disable recovery key" : "Nonaktifkan kunci pemulihan",
"The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "Kunci pemulihan adalah kunci enkripsi tambahan yang digunakan untuk mengenkripsi berkas. Kunci pemulihan memungkinkan untuk memulihkan berkas-berkas pengguna ketika pengguna tersebut melupakan sandi mereka.",
diff --git a/apps/encryption/l10n/id.json b/apps/encryption/l10n/id.json
index 59f39b2ea3a..3771f7e935f 100644
--- a/apps/encryption/l10n/id.json
+++ b/apps/encryption/l10n/id.json
@@ -23,10 +23,13 @@
"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Kunci privat tidak sah untuk Aplikasi Enskripsi. Silakan perbarui sandi kunci privat anda pada pengaturan pribadi untuk memulihkan akses ke berkas anda yang dienskripsi.",
"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikasi Enskripsi telah diaktifkan tetapi kunci tidak diinisialisasi, silakan log-out dan log-in lagi",
"Encryption App is enabled and ready" : "Apl Enkripsi telah diaktifkan dan siap",
+ "one-time password for server-side-encryption" : "Sandi sekali pakai untuk server-side-encryption",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tidak dapat mendekripsi berkas ini, mungkin ini adalah berkas bersama. Silakan meminta pemilik berkas ini untuk membagikan kembali dengan Anda.",
"Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tidak dapat membaca berkas ini, kemungkinan merupakan berkas berbagi. Silakan minta pemilik berkas untuk membagikan ulang kepada Anda.",
+ "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" : "Hai,\n\nadmin mengaktifkan server-side-encryption. Berkas-berkas Anda dienkripsi menggunakan sandi '%s'.\n\nSilakan masuk di antarmuka web, pergi ke bagian 'modul enkripsi dasar ownCloud' pada pengaturan pribadi Anda dan perbarui sandi enkripsi Anda dengan memasukkan sandi ini kedalam kolom 'sandi masuk yang lama' dan sandi-masuk saat ini.\n\n",
"The share will expire on %s." : "Pembagian akan berakhir pada %s.",
"Cheers!" : "Horee!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>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.<br><br>" : "Hai,<br><br>admin mengaktifkan server-side-encryption. Berkas-berkas Anda dienkripsi menggunakan sandi <strong>%s</strong>.<br><br>Silakan masuk di antarmuka web, pergi ke bagian 'modul enkripsi dasar ownCloud' pada pengaturan pribadi Anda dan perbarui sandi enkripsi Anda dengan memasukkan sandi ini kedalam kolom 'sandi masuk yang lama' dan sandi masuk yang baru.<br><br>",
"Enable recovery key" : "Aktifkan kunci pemulihan",
"Disable recovery key" : "Nonaktifkan kunci pemulihan",
"The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "Kunci pemulihan adalah kunci enkripsi tambahan yang digunakan untuk mengenkripsi berkas. Kunci pemulihan memungkinkan untuk memulihkan berkas-berkas pengguna ketika pengguna tersebut melupakan sandi mereka.",
diff --git a/apps/encryption/l10n/nl.js b/apps/encryption/l10n/nl.js
index ec7da324218..0655b6d29bd 100644
--- a/apps/encryption/l10n/nl.js
+++ b/apps/encryption/l10n/nl.js
@@ -25,10 +25,13 @@ OC.L10N.register(
"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Ongeldige privésleutel voor crypto app. Werk het privésleutel wachtwoord bij in uw persoonlijke instellingen om opnieuw toegang te krijgen tot uw versleutelde bestanden.",
"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is geactiveerd, maar uw sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.",
"Encryption App is enabled and ready" : "Encryptie app is geactiveerd en gereed",
+ "one-time password for server-side-encryption" : "eenmalig wachtwoord voor server-side versleuteling",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan dit bestand niet ontcijferen, waarschijnlijk is het een gedeeld bestand, Vraag de eigenaar om het bestand opnieuw met u te delen.",
"Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan dit bestand niet lezen, waarschijnlijk is het een gedeeld bestand. Vraag de eigenaar om het bestand opnieuw met u te delen.",
+ "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" : "Hallo daar,\n\nde beheerder heeft server-side versleuteling ingeschakeld. Uw bestanden werden versleuteld met het wachtwoord '%s'.\n\nLogin op de webinterface, ga naar 'ownCloud basis cryptomodule' in uw persoonlijke instellingen en pas uw cryptowachtwoord aan door dit wachtwoord in het 'oude inlog wachtwoord' veld in te vullen alsmede in uw huidige inlogwachtwoord.\n",
"The share will expire on %s." : "De share vervalt op %s.",
"Cheers!" : "Proficiat!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>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.<br><br>" : "Hallo daar,<br><br>de beheerder heeft server-side versleuteling ingeschakeld. Uw bestanden werden versleuteld met het wachtwoord <strong>%s</strong>.<br><br>Login op de webinterface, ga naar 'ownCloud basis cryptomodule' in uw persoonlijke instellingen en pas uw cryptowachtwoord aan door dit wachtwoord in het \"oude inlog wachtwoord\" veld in te vullen alsmede in uw huidige inlogwachtwoord.<br><br>",
"Enable recovery key" : "Activeer herstelsleutel",
"Disable recovery key" : "Deactiveer herstelsleutel",
"The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "De herstelsleutel is een extra cryptografische sleutel die wordt gebruikt om bestanden te versleutelen. Die maakt het mogelijk bestanden te herstellen als de gebruiker zijn of haar wachtwoord vergeet.",
diff --git a/apps/encryption/l10n/nl.json b/apps/encryption/l10n/nl.json
index 40ac3349e14..00f6e67822e 100644
--- a/apps/encryption/l10n/nl.json
+++ b/apps/encryption/l10n/nl.json
@@ -23,10 +23,13 @@
"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Ongeldige privésleutel voor crypto app. Werk het privésleutel wachtwoord bij in uw persoonlijke instellingen om opnieuw toegang te krijgen tot uw versleutelde bestanden.",
"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is geactiveerd, maar uw sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.",
"Encryption App is enabled and ready" : "Encryptie app is geactiveerd en gereed",
+ "one-time password for server-side-encryption" : "eenmalig wachtwoord voor server-side versleuteling",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan dit bestand niet ontcijferen, waarschijnlijk is het een gedeeld bestand, Vraag de eigenaar om het bestand opnieuw met u te delen.",
"Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan dit bestand niet lezen, waarschijnlijk is het een gedeeld bestand. Vraag de eigenaar om het bestand opnieuw met u te delen.",
+ "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" : "Hallo daar,\n\nde beheerder heeft server-side versleuteling ingeschakeld. Uw bestanden werden versleuteld met het wachtwoord '%s'.\n\nLogin op de webinterface, ga naar 'ownCloud basis cryptomodule' in uw persoonlijke instellingen en pas uw cryptowachtwoord aan door dit wachtwoord in het 'oude inlog wachtwoord' veld in te vullen alsmede in uw huidige inlogwachtwoord.\n",
"The share will expire on %s." : "De share vervalt op %s.",
"Cheers!" : "Proficiat!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>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.<br><br>" : "Hallo daar,<br><br>de beheerder heeft server-side versleuteling ingeschakeld. Uw bestanden werden versleuteld met het wachtwoord <strong>%s</strong>.<br><br>Login op de webinterface, ga naar 'ownCloud basis cryptomodule' in uw persoonlijke instellingen en pas uw cryptowachtwoord aan door dit wachtwoord in het \"oude inlog wachtwoord\" veld in te vullen alsmede in uw huidige inlogwachtwoord.<br><br>",
"Enable recovery key" : "Activeer herstelsleutel",
"Disable recovery key" : "Deactiveer herstelsleutel",
"The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "De herstelsleutel is een extra cryptografische sleutel die wordt gebruikt om bestanden te versleutelen. Die maakt het mogelijk bestanden te herstellen als de gebruiker zijn of haar wachtwoord vergeet.",
diff --git a/apps/encryption/l10n/tr.js b/apps/encryption/l10n/tr.js
index 2c8eff7e62b..96db8f91209 100644
--- a/apps/encryption/l10n/tr.js
+++ b/apps/encryption/l10n/tr.js
@@ -25,10 +25,13 @@ OC.L10N.register(
"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Şifreleme Uygulaması için geçersiz özel anahtar. Lütfen şifreli dosyalarınıza erişimi tekrar kazanabilmek için kişisel ayarlarınızdan özel anahtar parolanızı güncelleyin.",
"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Şifreleme Uygulaması etkin ancak anahtarlarınız başlatılmamış. Lütfen oturumu kapatıp yeniden açın",
"Encryption App is enabled and ready" : "Şifreleme Uygulaması etkin ve hazır",
+ "one-time password for server-side-encryption" : "sunucu tarafında şifleme için tek kullanımlık parola",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Bu dosya muhtemelen bir paylaşılan dosya olduğundan şifrelemesi kaldırılamıyor. Lütfen dosyayı sizinle bir daha paylaşması için dosya sahibi ile iletişime geçin.",
"Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Bu dosya muhtemelen bir paylaşılan dosya olduğundan okunamıyor. Lütfen dosyayı sizinle bir daha paylaşması için dosya sahibi ile iletişime geçin.",
+ "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" : "Selam,\n\nsistem yöneticisi sunucu tarafında şifrelemeyi etkinleştirdi. Dosyalarınız '%s' parolası kullanılarak şifrelendi.\n\nLütfen web arayüzünde oturum açın ve kişisel ayarlarınızdan 'ownCloud temel şifreleme modülü'ne giderek 'eski oturum parolası' alanına bu parolayı girerek şifreleme parolanızı ve mevcut oturum açma parolanızı güncelleyin.\n\n",
"The share will expire on %s." : "Bu paylaşım %s tarihinde sona erecek.",
"Cheers!" : "Hoşçakalın!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>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.<br><br>" : "Selam,<br><br>sistem yöneticisi sunucu tarafında şifrelemeyi etkinleştirdi. Dosyalarınız <strong>%s</strong> parolası kullanılarak şifrelendi.<br><br>Lütfen web arayüzünde oturum açın ve kişisel ayarlarınızdan 'ownCloud temel şifreleme modülü'ne giderek 'eski oturum parolası' alanına bu parolayı girerek şifreleme parolanızı ve mevcut oturum açma parolanızı güncelleyin.<br><br>",
"Enable recovery key" : "Kurtarma anahtarını etkinleştir",
"Disable recovery key" : "Kurtarma anahtarını devre dışı bırak",
"The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "Kurtarma anahtarı, dosyaların şifrelenmesi için daha fazla \nşifreleme sunar. Bu kullanıcının dosyasının şifresini unuttuğunda kurtarmasına imkan verir.",
diff --git a/apps/encryption/l10n/tr.json b/apps/encryption/l10n/tr.json
index a1bb9b6a5d9..be6f6a5dfdd 100644
--- a/apps/encryption/l10n/tr.json
+++ b/apps/encryption/l10n/tr.json
@@ -23,10 +23,13 @@
"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Şifreleme Uygulaması için geçersiz özel anahtar. Lütfen şifreli dosyalarınıza erişimi tekrar kazanabilmek için kişisel ayarlarınızdan özel anahtar parolanızı güncelleyin.",
"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Şifreleme Uygulaması etkin ancak anahtarlarınız başlatılmamış. Lütfen oturumu kapatıp yeniden açın",
"Encryption App is enabled and ready" : "Şifreleme Uygulaması etkin ve hazır",
+ "one-time password for server-side-encryption" : "sunucu tarafında şifleme için tek kullanımlık parola",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Bu dosya muhtemelen bir paylaşılan dosya olduğundan şifrelemesi kaldırılamıyor. Lütfen dosyayı sizinle bir daha paylaşması için dosya sahibi ile iletişime geçin.",
"Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Bu dosya muhtemelen bir paylaşılan dosya olduğundan okunamıyor. Lütfen dosyayı sizinle bir daha paylaşması için dosya sahibi ile iletişime geçin.",
+ "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" : "Selam,\n\nsistem yöneticisi sunucu tarafında şifrelemeyi etkinleştirdi. Dosyalarınız '%s' parolası kullanılarak şifrelendi.\n\nLütfen web arayüzünde oturum açın ve kişisel ayarlarınızdan 'ownCloud temel şifreleme modülü'ne giderek 'eski oturum parolası' alanına bu parolayı girerek şifreleme parolanızı ve mevcut oturum açma parolanızı güncelleyin.\n\n",
"The share will expire on %s." : "Bu paylaşım %s tarihinde sona erecek.",
"Cheers!" : "Hoşçakalın!",
+ "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>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.<br><br>" : "Selam,<br><br>sistem yöneticisi sunucu tarafında şifrelemeyi etkinleştirdi. Dosyalarınız <strong>%s</strong> parolası kullanılarak şifrelendi.<br><br>Lütfen web arayüzünde oturum açın ve kişisel ayarlarınızdan 'ownCloud temel şifreleme modülü'ne giderek 'eski oturum parolası' alanına bu parolayı girerek şifreleme parolanızı ve mevcut oturum açma parolanızı güncelleyin.<br><br>",
"Enable recovery key" : "Kurtarma anahtarını etkinleştir",
"Disable recovery key" : "Kurtarma anahtarını devre dışı bırak",
"The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "Kurtarma anahtarı, dosyaların şifrelenmesi için daha fazla \nşifreleme sunar. Bu kullanıcının dosyasının şifresini unuttuğunda kurtarmasına imkan verir.",
diff --git a/apps/encryption/lib/crypto/crypt.php b/apps/encryption/lib/crypto/crypt.php
index 6c4c108f50a..5d1bb92460a 100644
--- a/apps/encryption/lib/crypto/crypt.php
+++ b/apps/encryption/lib/crypto/crypt.php
@@ -398,7 +398,7 @@ class Crypt {
}
}
- return true;
+ return false;
}
/**
diff --git a/apps/encryption/tests/controller/SettingsControllerTest.php b/apps/encryption/tests/controller/SettingsControllerTest.php
index d985c7d7d25..34aa5a27a75 100644
--- a/apps/encryption/tests/controller/SettingsControllerTest.php
+++ b/apps/encryption/tests/controller/SettingsControllerTest.php
@@ -54,6 +54,9 @@ class SettingsControllerTest extends TestCase {
/** @var \PHPUnit_Framework_MockObject_MockObject */
private $sessionMock;
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $ocSessionMock;
+
protected function setUp() {
parent::setUp();
@@ -91,9 +94,11 @@ class SettingsControllerTest extends TestCase {
])
->getMock();
+ $this->ocSessionMock = $this->getMockBuilder('\OCP\ISession')->disableOriginalConstructor()->getMock();
+
$this->userSessionMock->expects($this->any())
->method('getUID')
- ->willReturn('testUser');
+ ->willReturn('testUserUid');
$this->userSessionMock->expects($this->any())
->method($this->anything())
@@ -110,7 +115,8 @@ class SettingsControllerTest extends TestCase {
$this->userSessionMock,
$this->keyManagerMock,
$this->cryptMock,
- $this->sessionMock
+ $this->sessionMock,
+ $this->ocSessionMock
);
}
@@ -122,8 +128,10 @@ class SettingsControllerTest extends TestCase {
$oldPassword = 'old';
$newPassword = 'new';
+ $this->userSessionMock->expects($this->once())->method('getUID')->willReturn('uid');
+
$this->userManagerMock
- ->expects($this->once())
+ ->expects($this->exactly(2))
->method('checkPassword')
->willReturn(false);
@@ -171,16 +179,22 @@ class SettingsControllerTest extends TestCase {
$oldPassword = 'old';
$newPassword = 'new';
- $this->userSessionMock
- ->expects($this->once())
- ->method('getUID')
- ->willReturn('testUser');
+ $this->ocSessionMock->expects($this->once())
+ ->method('get')->with('loginname')->willReturn('testUser');
$this->userManagerMock
- ->expects($this->once())
+ ->expects($this->at(0))
+ ->method('checkPassword')
+ ->with('testUserUid', 'new')
+ ->willReturn(false);
+ $this->userManagerMock
+ ->expects($this->at(1))
->method('checkPassword')
+ ->with('testUser', 'new')
->willReturn(true);
+
+
$this->cryptMock
->expects($this->once())
->method('decryptPrivateKey')
@@ -200,7 +214,7 @@ class SettingsControllerTest extends TestCase {
$this->keyManagerMock
->expects($this->once())
->method('setPrivateKey')
- ->with($this->equalTo('testUser'), $this->equalTo('header.encryptedKey'));
+ ->with($this->equalTo('testUserUid'), $this->equalTo('header.encryptedKey'));
$this->sessionMock
->expects($this->once())
diff --git a/apps/encryption/tests/lib/crypto/cryptTest.php b/apps/encryption/tests/lib/crypto/cryptTest.php
index 3c7767a8908..c6f16e952d7 100644
--- a/apps/encryption/tests/lib/crypto/cryptTest.php
+++ b/apps/encryption/tests/lib/crypto/cryptTest.php
@@ -363,4 +363,19 @@ class cryptTest extends TestCase {
];
}
+ public function testIsValidPrivateKey() {
+ $res = openssl_pkey_new();
+ openssl_pkey_export($res, $privateKey);
+
+ // valid private key
+ $this->assertTrue(
+ $this->invokePrivate($this->crypt, 'isValidPrivateKey', [$privateKey])
+ );
+
+ // invalid private key
+ $this->assertFalse(
+ $this->invokePrivate($this->crypt, 'isValidPrivateKey', ['foo'])
+ );
+ }
+
}