diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-06-12 20:53:45 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-06-12 20:53:45 +0200 |
commit | 27fcdb3af5d1b1012695a09e04c0a654a1dde710 (patch) | |
tree | 6de492454c862852de3f51bd8834e2012139b5ac /apps/files_encryption | |
parent | 46e5e9bd73a68f7b50bb79f883a8bc6efacaca97 (diff) | |
parent | 3584d48d65900b15dc3ef6831926f4a52e508625 (diff) | |
download | nextcloud-server-27fcdb3af5d1b1012695a09e04c0a654a1dde710.tar.gz nextcloud-server-27fcdb3af5d1b1012695a09e04c0a654a1dde710.zip |
Merge branch 'master' into files_encryption_upgrade_fix
Conflicts:
apps/files_encryption/tests/crypt.php
Diffstat (limited to 'apps/files_encryption')
25 files changed, 375 insertions, 18 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index f823999dcb0..94fc19fae2a 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -142,6 +142,15 @@ class Hooks { }
/**
+ * @brief If the password can't be changed within ownCloud, than update the key password in advance.
+ */
+ public static function preSetPassphrase($params) {
+ if ( ! \OC_User::canUserChangePassword($params['uid']) ) {
+ self::setPassphrase($params);
+ }
+ }
+
+ /**
* @brief Change a user's encryption passphrase
* @param array $params keys: uid, password
*/
diff --git a/apps/files_encryption/l10n/ca.php b/apps/files_encryption/l10n/ca.php index 46e91d1f070..5db1d7e58c5 100644 --- a/apps/files_encryption/l10n/ca.php +++ b/apps/files_encryption/l10n/ca.php @@ -1,4 +1,22 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "La clau de recuperació s'ha activat", +"Could not enable recovery key. Please check your recovery key password!" => "No s'ha pogut activar la clau de recuperació. Comproveu contrasenya de la clau de recuperació!", +"Recovery key successfully disabled" => "La clau de recuperació s'ha descativat", +"Could not disable recovery key. Please check your recovery key password!" => "No s'ha pogut desactivar la calu de recuperació. Comproveu la contrasenya de la clau de recuperació!", +"Password successfully changed." => "La contrasenya s'ha canviat.", +"Could not change the password. Maybe the old password was not correct." => "No s'ha pogut canviar la contrasenya. Potser la contrasenya anterior no era correcta.", "Saving..." => "Desant...", -"Encryption" => "Xifrat" +"Encryption" => "Xifrat", +"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Activa la clau de recuperació de contrasenya (permet compartir la clau de recuperació):", +"Recovery account password" => "Contrasenya de recuperació del compte", +"Enabled" => "Activat", +"Disabled" => "Desactivat", +"Change encryption passwords recovery key:" => "Canvia la clau de recuperació de la contrasenya:", +"Old Recovery account password" => "Contrasenya de recuperació anterior", +"New Recovery account password" => "Nova contrasenya de recuperació de compte", +"Change Password" => "Canvia la contrasenya", +"Enable password recovery by sharing all files with your administrator:" => "Activa la recuperació de contrasenya compartint tots els fitxers amb l'administrador:", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Activant aquesta opció us permetrà obtenir de nou accés als fitxers encriptats si perdeu la contrasenya", +"File recovery settings updated" => "S'han actualitzat els arranjaments de recuperació de fitxers", +"Could not update file recovery" => "No s'ha pogut actualitzar la recuperació de fitxers" ); diff --git a/apps/files_encryption/l10n/cs_CZ.php b/apps/files_encryption/l10n/cs_CZ.php index f9b2dd06b6f..e8c365972ca 100644 --- a/apps/files_encryption/l10n/cs_CZ.php +++ b/apps/files_encryption/l10n/cs_CZ.php @@ -1,4 +1,22 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Záchranný klíč byl úspěšně povolen", +"Could not enable recovery key. Please check your recovery key password!" => "Nepodařilo se povolit záchranný klíč. Zkontrolujte prosím vaše heslo záchranného klíče!", +"Recovery key successfully disabled" => "Záchranný klíč byl úspěšně zakázán", +"Could not disable recovery key. Please check your recovery key password!" => "Nelze zakázat záchranný klíč. Zkontrolujte prosím heslo vašeho záchranného klíče.", +"Password successfully changed." => "Heslo bylo úspěšně změněno.", +"Could not change the password. Maybe the old password was not correct." => "Nelze změnit heslo. Pravděpodobně nebylo stávající heslo zadáno správně.", "Saving..." => "Ukládám...", -"Encryption" => "Šifrování" +"Encryption" => "Šifrování", +"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Povolit záchranný klíč šifrovacích hesel (povolí sdílený záchranný klíč):", +"Recovery account password" => "Heslo pro obnovu účtu", +"Enabled" => "Povoleno", +"Disabled" => "Zakázáno", +"Change encryption passwords recovery key:" => "Změnit záchranný klíč šifrovacích hesel:", +"Old Recovery account password" => "Stávající heslo pro obnovu účtu", +"New Recovery account password" => "Nové heslo pro obnovu účtu", +"Change Password" => "Změnit heslo", +"Enable password recovery by sharing all files with your administrator:" => "Povolit obnovu hesla sdílením všech souborů s vaším správcem:", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Povolení vám umožní znovu získat přístup k vašim zašifrovaným souborům pokud ztratíte heslo", +"File recovery settings updated" => "Možnosti obnovy souborů aktualizovány", +"Could not update file recovery" => "Nelze aktualizovat obnovu souborů" ); diff --git a/apps/files_encryption/l10n/de.php b/apps/files_encryption/l10n/de.php index 2ab77f480cf..18fe7df6487 100644 --- a/apps/files_encryption/l10n/de.php +++ b/apps/files_encryption/l10n/de.php @@ -1,4 +1,17 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Wiederherstellungsschlüssel wurde erfolgreich aktiviert", +"Could not enable recovery key. Please check your recovery key password!" => "Der Wiederherstellungsschlüssel konnte nicht aktiviert werden. Überprüfen Sie Ihr Wiederherstellungspasswort!", +"Recovery key successfully disabled" => "Wiederherstellungsschlüssel deaktiviert.", +"Could not disable recovery key. Please check your recovery key password!" => "Der Wiederherstellungsschlüssel konnte nicht deaktiviert werden. Überprüfen Sie Ihr Wiederherstellungspasswort!", +"Password successfully changed." => "Dein Passwort wurde 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 falsch.", "Saving..." => "Speichern...", -"Encryption" => "Verschlüsselung" +"Encryption" => "Verschlüsselung", +"Recovery account password" => "Password zurücksetzen", +"Enabled" => "Aktiviert", +"Disabled" => "Deaktiviert", +"Change encryption passwords recovery key:" => "Wiederherstellungsschlüssel für Passwörter ändern:", +"Change Password" => "Passwort ändern", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Wenn Sie diese Einstellung aktivieren, können Sie auch im Falle des Verlustes Ihres Passworts auf verschlüsselte Dateien zugreifen", +"File recovery settings updated" => "Einstellungen zur Wiederherstellung von Dateien wurden aktualisiert" ); diff --git a/apps/files_encryption/l10n/de_DE.php b/apps/files_encryption/l10n/de_DE.php index 5ab283ccab3..48bf3a89a24 100644 --- a/apps/files_encryption/l10n/de_DE.php +++ b/apps/files_encryption/l10n/de_DE.php @@ -1,9 +1,20 @@ <?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.", "Saving..." => "Speichern...", "Encryption" => "Verschlüsselung", +"Recovery account password" => "Account-Passwort wiederherstellen", "Enabled" => "Aktiviert", "Disabled" => "Deaktiviert", -"Change Password" => "Passwort ändern" +"Old Recovery account password" => "Altes Passwort für die Account-Wiederherstellung", +"New Recovery account password" => "Neues Passwort für die Account-Wiederherstellung", +"Change Password" => "Passwort ändern", +"Enable password recovery by sharing all files with your administrator:" => "Aktiviere die Wiederherstellung deines Passwortes durch das Teilen aller Dateien mit dem Administrator:", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "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." ); diff --git a/apps/files_encryption/l10n/el.php b/apps/files_encryption/l10n/el.php index 7067799cd2e..c73fbf56462 100644 --- a/apps/files_encryption/l10n/el.php +++ b/apps/files_encryption/l10n/el.php @@ -1,4 +1,12 @@ <?php $TRANSLATIONS = array( +"Password successfully changed." => "Ο κωδικός αλλάχτηκε επιτυχώς.", +"Could not change the password. Maybe the old password was not correct." => "Αποτυχία αλλαγής κωδικού ίσως ο παλιός κωδικός να μην ήταν σωστός.", "Saving..." => "Γίνεται αποθήκευση...", -"Encryption" => "Κρυπτογράφηση" +"Encryption" => "Κρυπτογράφηση", +"Recovery account password" => "Επαναφορά κωδικού πρόσβασης λογαριασμού", +"Enabled" => "Ενεργοποιημένο", +"Disabled" => "Απενεργοποιημένο", +"Change Password" => "Αλλαγή Κωδικού Πρόσβασης", +"Enable password recovery by sharing all files with your administrator:" => "Ενεργοποιήστε την επαναφορά κωδικού πρόσβασης με το να μοιραστείτε όλα τα αρχεία με τον διαχειριστή σας:", +"File recovery settings updated" => "Οι ρυθμίσεις επαναφοράς αρχείων ανανεώθηκαν" ); diff --git a/apps/files_encryption/l10n/es.php b/apps/files_encryption/l10n/es.php index 7311a78f09b..58adbd716a8 100644 --- a/apps/files_encryption/l10n/es.php +++ b/apps/files_encryption/l10n/es.php @@ -1,4 +1,22 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Se ha habilitado la recuperación de archivos", +"Could not enable recovery key. Please check your recovery key password!" => "No se pudo habilitar la clave de recuperación. Por favor compruebe su contraseña.", +"Recovery key successfully disabled" => "Clave de recuperación deshabilitada", +"Could not disable recovery key. Please check your recovery key password!" => "No se pudo deshabilitar la clave de recuperación. Por favor compruebe su contraseña!", +"Password successfully changed." => "Su contraseña ha sido cambiada", +"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.", "Saving..." => "Guardando...", -"Encryption" => "Cifrado" +"Encryption" => "Cifrado", +"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Habilitar clave de recuperación de contraseñas ():", +"Recovery account password" => "Recuperar contraseña", +"Enabled" => "Habilitar", +"Disabled" => "Deshabilitado", +"Change encryption passwords recovery key:" => "Cambiar clave de cifrado de contraseñas:", +"Old Recovery account password" => "Contraseña de recuperación actual", +"New Recovery account password" => "Contraseña de recuperación nueva", +"Change Password" => "Cambiar contraseña", +"Enable password recovery by sharing all files with your administrator:" => "Habilitar recuperación de contraseña compartiendo todos los archivos con su administrador", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Habilitar esta opción para poder acceder a sus archivos cifrados si pierde su contraseña", +"File recovery settings updated" => "Opciones de recuperación de archivos actualizada", +"Could not update file recovery" => "No se pudo actualizar la recuperación de archivos" ); diff --git a/apps/files_encryption/l10n/fr.php b/apps/files_encryption/l10n/fr.php index 98fb70691df..af4fd1a893f 100644 --- a/apps/files_encryption/l10n/fr.php +++ b/apps/files_encryption/l10n/fr.php @@ -1,4 +1,22 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Clé de récupération activée avec succès", +"Could not enable recovery key. Please check your recovery key password!" => "Ne peut pas activer la clé de récupération. s'il vous plait vérifiez votre mot de passe de clé de récupération!", +"Recovery key successfully disabled" => "Clé de récupération désactivée avc succès", +"Could not disable recovery key. Please check your recovery key password!" => "Ne peut pas désactiver la clé de récupération. S'il vous plait vérifiez votre mot de passe de clé de récupération!", +"Password successfully changed." => "Mot de passe changé avec succès ", +"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.", "Saving..." => "Enregistrement...", -"Encryption" => "Chiffrement" +"Encryption" => "Chiffrement", +"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Activer la clé de récupération par mots de passe de cryptage (autoriser le partage de la clé de récupération) ", +"Recovery account password" => "Rétablissement du compte mot de passe ", +"Enabled" => "Activer", +"Disabled" => "Désactiver", +"Change encryption passwords recovery key:" => "Changer les mots de passe de cryptage par la clé de récupération", +"Old Recovery account password" => "Ancien compte de récupération de mots de passe", +"New Recovery account password" => "Nouveau compte de récupération de mots de passe", +"Change Password" => "Changer de mot de passe", +"Enable password recovery by sharing all files with your administrator:" => "Activer la récupération des mots de passe en partageant les fichiers avec votre administrateur:", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "En activant cette option cela vous autorisera à récupérer votre accès aux fichiers cryptés si votre mot de passe est perdu", +"File recovery settings updated" => "Mise à jour des paramètres de récupération de fichiers ", +"Could not update file recovery" => "Ne peut pas remettre à jour les fichiers de récupération" ); diff --git a/apps/files_encryption/l10n/ja_JP.php b/apps/files_encryption/l10n/ja_JP.php index 7f906ae5c03..6d2d3e249c0 100644 --- a/apps/files_encryption/l10n/ja_JP.php +++ b/apps/files_encryption/l10n/ja_JP.php @@ -1,4 +1,8 @@ <?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." => "パスワードを変更できませんでした。古いパスワードが間違っているかもしれません。", "Saving..." => "保存中...", diff --git a/apps/files_encryption/l10n/lt_LT.php b/apps/files_encryption/l10n/lt_LT.php index 6bc80ff44ab..8e9d02c3b13 100644 --- a/apps/files_encryption/l10n/lt_LT.php +++ b/apps/files_encryption/l10n/lt_LT.php @@ -1,4 +1,22 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Atkūrimo raktas sėkmingai įjungtas", +"Could not enable recovery key. Please check your recovery key password!" => "Neišėjo įjungti jūsų atkūrimo rakto. Prašome jį patikrinti!", +"Recovery key successfully disabled" => "Atkūrimo raktas sėkmingai išjungtas", +"Could not disable recovery key. Please check your recovery key password!" => "Neišėjo išjungti jūsų atkūrimo rakto. Prašome jį patikrinti!", +"Password successfully changed." => "Slaptažodis sėkmingai pakeistas", +"Could not change the password. Maybe the old password was not correct." => "Slaptažodis nebuvo pakeistas. Gali būti, kad buvo neteisingai suvestas senasis.", "Saving..." => "Saugoma...", -"Encryption" => "Šifravimas" +"Encryption" => "Šifravimas", +"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Įjungti šifravimo slaptažodžio atstatymo raktą (leidžia dalintis su atstatymo raktu):", +"Recovery account password" => "Atstatymo vartotojo slaptažodis", +"Enabled" => "Įjungta", +"Disabled" => "Išjungta", +"Change encryption passwords recovery key:" => "Pakeisti šifravimo slaptažodžio atstatymo raktą:", +"Old Recovery account password" => "Seno atstatymo vartotojo slaptažodis", +"New Recovery account password" => "naujo atstatymo vartotojo slaptažodis", +"Change Password" => "Pakeisti slaptažodį", +"Enable password recovery by sharing all files with your administrator:" => "Įjungti slaptažodžio atkūrimą dalinantis visais failas su administratoriumi:", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Įjungus šią funkciją jums bus suteiktas priėjimas prie šifruotos informacijos ir pamiršus slaptažodį.", +"File recovery settings updated" => "Failų atstatymo nustatymai pakeisti", +"Could not update file recovery" => "Neišėjo atnaujinti failų atkūrimo" ); diff --git a/apps/files_encryption/l10n/nl.php b/apps/files_encryption/l10n/nl.php index ebcbdfab15f..9c462917cf3 100644 --- a/apps/files_encryption/l10n/nl.php +++ b/apps/files_encryption/l10n/nl.php @@ -1,4 +1,8 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Herstelsleutel succesvol geactiveerd", +"Could not enable recovery key. Please check your recovery key password!" => "Kon herstelsleutel niet activeren. Controleer het wachtwoord van uw herstelsleutel!", +"Recovery key successfully disabled" => "Herstelsleutel succesvol gedeactiveerd", +"Could not disable recovery key. Please check your recovery key password!" => "Kon herstelsleutel niet deactiveren. Controleer het wachtwoord van uw herstelsleutel!", "Password successfully changed." => "Wachtwoord succesvol gewijzigd.", "Could not change the password. Maybe the old password was not correct." => "Kon wachtwoord niet wijzigen. Wellicht oude wachtwoord niet juist ingevoerd.", "Saving..." => "Opslaan", diff --git a/apps/files_encryption/l10n/pt_BR.php b/apps/files_encryption/l10n/pt_BR.php index ce8814c233e..e5fa0b55cad 100644 --- a/apps/files_encryption/l10n/pt_BR.php +++ b/apps/files_encryption/l10n/pt_BR.php @@ -1,4 +1,8 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Recuperação de chave habilitada com sucesso", +"Could not enable recovery key. Please check your recovery key password!" => "Impossível habilitar recuperação de chave. Por favor verifique sua senha para recuperação de chave!", +"Recovery key successfully disabled" => "Recuperação de chave desabilitada com sucesso", +"Could not disable recovery key. Please check your recovery key password!" => "Impossível desabilitar recuperação de chave. Por favor verifique sua senha para recuperação de chave!", "Password successfully changed." => "Senha alterada com sucesso.", "Could not change the password. Maybe the old password was not correct." => "Não foi possível alterar a senha. Talvez a senha antiga não estava correta.", "Saving..." => "Salvando...", diff --git a/apps/files_encryption/l10n/pt_PT.php b/apps/files_encryption/l10n/pt_PT.php index e1bb17ecaa7..eede4804cf6 100644 --- a/apps/files_encryption/l10n/pt_PT.php +++ b/apps/files_encryption/l10n/pt_PT.php @@ -1,9 +1,22 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Chave de recuperação activada com sucesso", +"Could not enable recovery key. Please check your recovery key password!" => "Não foi possível activar a chave de recuperação. Por favor verifique a password da chave de recuperação!", +"Recovery key successfully disabled" => "Chave de recuperação descativada com sucesso", +"Could not disable recovery key. Please check your recovery key password!" => "Não foi possível desactivar a chave de recuperação. Por favor verifique a password da chave de recuperação.", "Password successfully changed." => "Password alterada com sucesso.", "Could not change the password. Maybe the old password was not correct." => "Não foi possivel alterar a password. Possivelmente a password antiga não está correcta.", "Saving..." => "A guardar...", "Encryption" => "Encriptação", +"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Activar a chave de recuperação das passwords de encriptação (permitir partilha da chave de recuperação):", +"Recovery account password" => "Password de recuperação de conta", "Enabled" => "Activado", "Disabled" => "Desactivado", -"Change Password" => "Mudar a Password" +"Change encryption passwords recovery key:" => "Alterar a chave de recuperação da password de encriptação:", +"Old Recovery account password" => "Password de recuperação de conta antiga:", +"New Recovery account password" => "Nova password de recuperação de conta", +"Change Password" => "Mudar a Password", +"Enable password recovery by sharing all files with your administrator:" => "Activar a recuperação de password ao partilhar todos os ficheiros com o administrador:", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Activar esta opção, tornar-lhe-a possível a obtenção de acesso aos seus ficheiros encriptados caso perca a password.", +"File recovery settings updated" => "Actualizadas as definições de recuperação de ficheiros", +"Could not update file recovery" => "Não foi possível actualizar a recuperação de ficheiros" ); diff --git a/apps/files_encryption/l10n/sv.php b/apps/files_encryption/l10n/sv.php index 966963b5549..efcfc105073 100644 --- a/apps/files_encryption/l10n/sv.php +++ b/apps/files_encryption/l10n/sv.php @@ -1,4 +1,22 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Återställningsnyckeln har framgångsrikt aktiverats", +"Could not enable recovery key. Please check your recovery key password!" => "Kunde inte aktivera återställningsnyckeln. Vänligen kontrollera ditt lösenord för återställningsnyckeln!", +"Recovery key successfully disabled" => "Återställningsnyckeln har framgångsrikt inaktiverats", +"Could not disable recovery key. Please check your recovery key password!" => "Kunde inte inaktivera återställningsnyckeln. Vänligen kontrollera ditt lösenord för återställningsnyckeln!", +"Password successfully changed." => "Ändringen av lösenordet lyckades.", +"Could not change the password. Maybe the old password was not correct." => "Kunde inte ändra lösenordet. Kanske det gamla lösenordet inte var rätt.", "Saving..." => "Sparar...", -"Encryption" => "Kryptering" +"Encryption" => "Kryptering", +"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Aktivera återställningsnyckel för krypterade lösenord. (tillåt delning till återställningsnyckeln):", +"Recovery account password" => "Återställning av kontolösenord", +"Enabled" => "Aktiverad", +"Disabled" => "Inaktiverad", +"Change encryption passwords recovery key:" => "Ändra återställningsnyckeln för krypterade lösenord:", +"Old Recovery account password" => "Gamla lösenordet för återställningskontot", +"New Recovery account password" => "Nytt återställningslösenord för kontot", +"Change Password" => "Byt lösenord", +"Enable password recovery by sharing all files with your administrator:" => "Aktivera lösenordsåterställning genom att dela alla filer med din administratör:", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Aktivera det här alternativet för att kunna återfå tillgång till dina krypterade filer om du skulle förlora/glömma ditt lösenord", +"File recovery settings updated" => "Inställningarna för filåterställning har uppdaterats", +"Could not update file recovery" => "Kunde inte uppdatera filåterställning" ); diff --git a/apps/files_encryption/l10n/tr.php b/apps/files_encryption/l10n/tr.php index 917ff0a0eae..fc0847ed85d 100644 --- a/apps/files_encryption/l10n/tr.php +++ b/apps/files_encryption/l10n/tr.php @@ -1,4 +1,22 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Kurtarma anahtarı başarıyla etkinleştirildi", +"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", "Saving..." => "Kaydediliyor...", -"Encryption" => "Şifreleme" +"Encryption" => "Şifreleme", +"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Şifreli parola kurtarma anahtarını etkinleştir(kurtarma anahtarı paylaşımına izin ver)", +"Recovery account password" => "Kurtarma hesabı parolası", +"Enabled" => "Etkinleştirildi", +"Disabled" => "Devre dışı", +"Change encryption passwords recovery key:" => "Şifreli parolalar kurtarma anahtarını değiştir:", +"Old Recovery account password" => "Eski kurtarma hesabı parolası", +"New Recovery account password" => "Yeni kurtarma hesabı parolası", +"Change Password" => "Parola değiştir", +"Enable password recovery by sharing all files with your administrator:" => "Parola kurtarmasını tüm paylaşılan dosyaları sistem yöneticiniz ile paylaşarak kurtarmayı etkinleştir:", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Bu seçeneği etkinleştirmekle eğer parolanızı kaybederseniz şifreli dosyalara erişimi elde etmiş olursunuz", +"File recovery settings updated" => "Dosya kurtarma ayarları güncellendi", +"Could not update file recovery" => "Dosya kurtarma güncellenemedi" ); diff --git a/apps/files_encryption/l10n/vi.php b/apps/files_encryption/l10n/vi.php index 0af5bdc9a67..3e76060b1de 100644 --- a/apps/files_encryption/l10n/vi.php +++ b/apps/files_encryption/l10n/vi.php @@ -1,4 +1,10 @@ <?php $TRANSLATIONS = array( +"Password successfully changed." => "Đã đổi mật khẩu.", +"Could not change the password. Maybe the old password was not correct." => "Không thể đổi mật khẩu. Có lẽ do mật khẩu cũ không đúng.", "Saving..." => "Đang lưu...", -"Encryption" => "Mã hóa" +"Encryption" => "Mã hóa", +"Recovery account password" => "Mật khẩu cho tài khoản cứu hộ", +"Enabled" => "Bật", +"Disabled" => "Tắt", +"Change Password" => "Đổi Mật khẩu" ); diff --git a/apps/files_encryption/l10n/zh_CN.php b/apps/files_encryption/l10n/zh_CN.php index e565fce801c..59582e6fd52 100644 --- a/apps/files_encryption/l10n/zh_CN.php +++ b/apps/files_encryption/l10n/zh_CN.php @@ -1,4 +1,22 @@ <?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." => "不能修改密码。旧密码可能不正确。", "Saving..." => "保存中", -"Encryption" => "加密" +"Encryption" => "加密", +"Enable encryption passwords recovery key (allow sharing to recovery key):" => "启用加密密码恢复密钥(允许共享恢复密钥):", +"Recovery account password" => "恢复账户密码", +"Enabled" => "开启", +"Disabled" => "禁用", +"Change encryption passwords recovery key:" => "变更加密密码恢复密钥:", +"Old Recovery account password" => "旧恢复账号密码", +"New Recovery account password" => "新恢复账号密码", +"Change Password" => "修改密码", +"Enable password recovery by sharing all files with your administrator:" => "通过与系统管理员共享全部文件启用密码恢复:", +"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "启用该选项将允许你丢失密码时重新取得加密过的文件。", +"File recovery settings updated" => "文件恢复设置已更新", +"Could not update file recovery" => "不能更新文件恢复" ); diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php index e078ab35541..184e1782494 100755 --- a/apps/files_encryption/lib/helper.php +++ b/apps/files_encryption/lib/helper.php @@ -48,6 +48,7 @@ class Helper { \OCP\Util::connectHook('OC_User', 'post_login', 'OCA\Encryption\Hooks', 'login'); \OCP\Util::connectHook('OC_User', 'post_setPassword', 'OCA\Encryption\Hooks', 'setPassphrase'); + \OCP\Util::connectHook('OC_User', 'pre_setPassword', 'OCA\Encryption\Hooks', 'preSetPassphrase'); \OCP\Util::connectHook('OC_User', 'post_createUser', 'OCA\Encryption\Hooks', 'postCreateUser'); \OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OCA\Encryption\Hooks', 'postDeleteUser'); } diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 3d85edf9841..6d720a3ff49 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -289,7 +289,7 @@ class Util { */ public function recoveryEnabledForUser() { - $sql = 'SELECT `recovery_enabled` FROM `*PREFIX*encryption` WHERE uid = ?'; + $sql = 'SELECT `recovery_enabled` FROM `*PREFIX*encryption` WHERE `uid` = ?'; $args = array($this->userId); @@ -347,7 +347,7 @@ class Util { // Create a new record instead } else { - $sql = 'UPDATE `*PREFIX*encryption` SET recovery_enabled = ? WHERE uid = ?'; + $sql = 'UPDATE `*PREFIX*encryption` SET `recovery_enabled` = ? WHERE `uid` = ?'; $args = array( $enabled, @@ -1048,7 +1048,7 @@ class Util { */ public function setMigrationStatus($status) { - $sql = 'UPDATE `*PREFIX*encryption` SET migration_status = ? WHERE uid = ?'; + $sql = 'UPDATE `*PREFIX*encryption` SET `migration_status` = ? WHERE `uid` = ?'; $args = array( $status, @@ -1077,7 +1077,7 @@ class Util { */ public function getMigrationStatus() { - $sql = 'SELECT `migration_status` FROM `*PREFIX*encryption` WHERE uid = ?'; + $sql = 'SELECT `migration_status` FROM `*PREFIX*encryption` WHERE `uid` = ?'; $args = array($this->userId); diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php index e153a49a2c7..341904b1189 100755 --- a/apps/files_encryption/tests/crypt.php +++ b/apps/files_encryption/tests/crypt.php @@ -103,6 +103,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { \OC_User::deleteUser(\Test_Encryption_Crypt::TEST_ENCRYPTION_CRYPT_USER1); } + /** + * @medium + */ function testGenerateKey() { # TODO: use more accurate (larger) string length for test confirmation @@ -114,6 +117,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @large * @return String */ function testGenerateIv() { @@ -127,6 +131,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @large * @depends testGenerateIv */ function testConcatIv($iv) { @@ -159,6 +164,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @medium * @depends testConcatIv */ function testSplitIv($testConcatIv) { @@ -175,6 +181,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @medium * @return string padded */ function testAddPadding() { @@ -190,6 +197,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @medium * @depends testAddPadding */ function testRemovePadding($padded) { @@ -200,6 +208,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } + /** + * @medium + */ function testEncrypt() { $random = openssl_random_pseudo_bytes(13); @@ -212,6 +223,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } + /** + * @medium + */ function testDecrypt() { $random = openssl_random_pseudo_bytes(13); @@ -226,6 +240,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } + /** + * @medium + */ function testSymmetricEncryptFileContent() { # TODO: search in keyfile for actual content as IV will ensure this test always passes @@ -241,6 +258,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } + /** + * @medium + */ function testSymmetricStreamEncryptShortFileContent() { $filename = 'tmp-' . time() . '.test'; @@ -291,6 +311,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief Test that data that is written by the crypto stream wrapper * @note Encrypted data is manually prepared and decrypted here to avoid dependency on success of stream_read * @note If this test fails with truncate content, check that enough array slices are being rejoined to form $e, as the crypt.php file may have gotten longer and broken the manual @@ -377,6 +398,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief Test that data that is read by the crypto stream wrapper */ function testSymmetricStreamDecryptShortFileContent() { @@ -406,6 +428,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $this->view->unlink($this->userId . '/files/' . $filename); } + /** + * @medium + */ function testSymmetricStreamDecryptLongFileContent() { $filename = 'tmp-' . time(); @@ -425,6 +450,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $this->view->unlink($this->userId . '/files/' . $filename); } + /** + * @medium + */ function testSymmetricEncryptFileContentKeyfile() { # TODO: search in keyfile for actual content as IV will ensure this test always passes @@ -440,6 +468,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } + /** + * @medium + */ function testIsEncryptedContent() { $this->assertFalse(Encryption\Crypt::isCatfileContent($this->dataUrl)); @@ -452,6 +483,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } + /** + * @large + */ function testMultiKeyEncrypt() { # TODO: search in keyfile for actual content as IV will ensure this test always passes @@ -476,6 +510,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } + /** + * @medium + */ function testKeyEncrypt() { // Generate keypair @@ -494,6 +531,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test encryption using legacy blowfish method */ function testLegacyEncryptShort() { @@ -510,6 +548,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test decryption using legacy blowfish method * @depends testLegacyEncryptShort */ @@ -522,6 +561,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test encryption using legacy blowfish method */ function testLegacyEncryptLong() { @@ -538,6 +578,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test decryption using legacy blowfish method * @depends testLegacyEncryptLong */ @@ -551,6 +592,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test generation of legacy encryption key * @depends testLegacyDecryptShort */ @@ -569,6 +611,27 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { } + /** + * @medium + * @brief test decryption using legacy blowfish method + * @depends testLegacyEncryptLong + */ + function testLegacyKeyRecryptKeyfileEncrypt($crypted) { + + $recrypted = Encryption\Crypt::LegacyKeyRecryptKeyfile($crypted, $this->pass, array($this->genPublicKey)); + + $this->assertNotEquals($this->dataLong, $recrypted['data']); + + return $recrypted; + + # TODO: search inencrypted text for actual content to ensure it + # genuine transformation + + } + + /** + * @medium + */ function testRenameFile() { $filename = 'tmp-' . time(); @@ -597,6 +660,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->unlink($newFilename); } + /** + * @medium + */ function testMoveFileIntoFolder() { $filename = 'tmp-' . time(); @@ -627,6 +693,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->unlink($newFolder); } + /** + * @medium + */ function testMoveFolder() { $view = new \OC\Files\View('/' . $this->userId . '/files'); @@ -662,6 +731,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->unlink('/newfolder'); } + /** + * @medium + */ function testChangePassphrase() { $filename = 'tmp-' . time(); @@ -696,6 +768,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->unlink($filename); } + /** + * @medium + */ function testViewFilePutAndGetContents() { $filename = '/tmp-' . time(); @@ -727,6 +802,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->unlink($filename); } + /** + * @large + */ function testTouchExistingFile() { $filename = '/tmp-' . time(); $view = new \OC\Files\View('/' . $this->userId . '/files'); @@ -748,6 +826,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->unlink($filename); } + /** + * @medium + */ function testTouchFile() { $filename = '/tmp-' . time(); $view = new \OC\Files\View('/' . $this->userId . '/files'); @@ -769,6 +850,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->unlink($filename); } + /** + * @medium + */ function testFopenFile() { $filename = '/tmp-' . time(); $view = new \OC\Files\View('/' . $this->userId . '/files'); diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php index 40ae1659a55..19ba9a8117f 100644 --- a/apps/files_encryption/tests/keymanager.php +++ b/apps/files_encryption/tests/keymanager.php @@ -103,6 +103,9 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase { \OC_FileProxy::$enabled = true; } + /** + * @medium + */ function testGetPrivateKey() { $key = Encryption\Keymanager::getPrivateKey($this->view, $this->userId); @@ -119,6 +122,9 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase { } + /** + * @medium + */ function testGetPublicKey() { $publiceKey = Encryption\Keymanager::getPublicKey($this->view, $this->userId); @@ -132,6 +138,9 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase { $this->assertArrayHasKey('key', $sslInfo); } + /** + * @medium + */ function testSetFileKey() { # NOTE: This cannot be tested until we are able to break out @@ -165,6 +174,9 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase { } + /** + * @medium + */ function testGetUserKeys() { $keys = Encryption\Keymanager::getUserKeys($this->view, $this->userId); @@ -188,6 +200,9 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase { $this->assertArrayHasKey('key', $sslInfoPrivate); } + /** + * @medium + */ function testFixPartialFilePath() { $partFilename = 'testfile.txt.part'; @@ -202,6 +217,9 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase { $this->assertEquals('testfile.txt', Encryption\Keymanager::fixPartialFilePath($filename)); } + /** + * @medium + */ function testRecursiveDelShareKeys() { // generate filename diff --git a/apps/files_encryption/tests/share.php b/apps/files_encryption/tests/share.php index 6d92881ceb0..15dd5058ebb 100755 --- a/apps/files_encryption/tests/share.php +++ b/apps/files_encryption/tests/share.php @@ -129,6 +129,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { } /** + * @medium * @param bool $withTeardown */ function testShareFile($withTeardown = true) { @@ -205,6 +206,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { } /** + * @medium * @param bool $withTeardown */ function testReShareFile($withTeardown = true) { @@ -275,6 +277,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { } /** + * @medium * @param bool $withTeardown * @return array */ @@ -363,6 +366,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { } /** + * @medium * @param bool $withTeardown */ function testReShareFolder($withTeardown = true) { @@ -534,7 +538,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { // some hacking to simulate public link $GLOBALS['app'] = 'files_sharing'; $GLOBALS['fileOwner'] = \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1; - \OC_User::setUserId(''); + \OC_User::setUserId(false); // get file contents $retrievedCryptedFile = file_get_contents('crypt://' . $this->filename); @@ -564,6 +568,9 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); } + /** + * @medium + */ function testShareFileWithGroup() { // login as admin \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); @@ -639,6 +646,9 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { } + /** + * @large + */ function testRecoveryFile() { // login as admin \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); @@ -741,6 +751,9 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { $this->assertEquals(0, \OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled')); } + /** + * @large + */ function testRecoveryForUser() { // login as admin \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); @@ -837,6 +850,9 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { $this->assertEquals(0, \OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled')); } + /** + * @medium + */ function testFailShareFile() { // login as admin \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index 3d978767542..50ac41e4536 100644 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -140,6 +140,9 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase { $view->unlink($filename); } + /** + * @medium + */ function testStreamSetTimeout() { $filename = '/tmp-' . time(); $view = new \OC\Files\View('/' . $this->userId . '/files'); diff --git a/apps/files_encryption/tests/trashbin.php b/apps/files_encryption/tests/trashbin.php index 29f8fb5a396..ade968fbece 100755 --- a/apps/files_encryption/tests/trashbin.php +++ b/apps/files_encryption/tests/trashbin.php @@ -113,6 +113,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test delete file */ function testDeleteFile() { @@ -184,6 +185,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test restore file * * @depends testDeleteFile @@ -215,6 +217,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test delete file forever */ function testPermanentDeleteFile() { diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php index b36d7e41172..b945fb4c0f3 100755 --- a/apps/files_encryption/tests/util.php +++ b/apps/files_encryption/tests/util.php @@ -118,6 +118,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test that paths set during User construction are correct */ function testKeyPaths() { @@ -132,6 +133,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test setup of encryption directories */ function testSetupServerSide() { @@ -139,6 +141,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { } /** + * @medium * @brief test checking whether account is ready for encryption, */ function testUserIsReady() { @@ -159,6 +162,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { // } /** + * @medium * @brief test checking whether account is not ready for encryption, */ function testIsLegacyUser() { @@ -186,6 +190,9 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { $this->assertEquals($this->legacyKey, \OC::$session->get('legacyKey')); } + /** + * @medium + */ function testRecoveryEnabledForUser() { $util = new Encryption\Util($this->view, $this->userId); @@ -206,6 +213,9 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { } + /** + * @medium + */ function testGetUidAndFilename() { \OC_User::setUserId(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1); @@ -232,6 +242,9 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { $this->view->unlink($this->userId . '/files/' . $filename); } + /** + * @medium + */ function testIsSharedPath() { $sharedPath = '/user1/files/Shared/test'; $path = '/user1/files/test'; @@ -241,6 +254,9 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { $this->assertFalse($this->util->isSharedPath($path)); } + /** + * @large + */ function testEncryptLegacyFiles() { \Test_Encryption_Util::loginHelper(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER); |