aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-11-27 15:08:09 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-11-27 15:08:09 +0100
commit9fb71af98850ad6638c4238ae0938972a9f23b50 (patch)
tree52e081bc8577f78505ea80fc7158eb9235c7ed59 /apps/files_encryption
parent6443e570c2793954309f9541cd6a7a8c309644ac (diff)
parent5b7b0536346a4a6608e0b294b6784ac5ff3b142a (diff)
downloadnextcloud-server-9fb71af98850ad6638c4238ae0938972a9f23b50.tar.gz
nextcloud-server-9fb71af98850ad6638c4238ae0938972a9f23b50.zip
Merge branch 'master' into encryption_enable_public_upload
Conflicts: apps/files_encryption/lib/helper.php apps/files_encryption/lib/keymanager.php apps/files_encryption/lib/stream.php apps/files_encryption/lib/util.php apps/files_encryption/tests/keymanager.php
Diffstat (limited to 'apps/files_encryption')
-rw-r--r--apps/files_encryption/l10n/cs_CZ.php1
-rw-r--r--apps/files_encryption/l10n/el.php23
-rw-r--r--apps/files_encryption/l10n/pl.php1
-rw-r--r--apps/files_encryption/l10n/sl.php43
-rw-r--r--apps/files_encryption/l10n/sv.php1
-rwxr-xr-xapps/files_encryption/lib/helper.php20
-rwxr-xr-xapps/files_encryption/lib/keymanager.php12
-rw-r--r--apps/files_encryption/lib/proxy.php2
-rw-r--r--apps/files_encryption/lib/stream.php4
-rw-r--r--apps/files_encryption/lib/util.php2
-rwxr-xr-xapps/files_encryption/tests/crypt.php4
-rw-r--r--apps/files_encryption/tests/keymanager.php2
12 files changed, 71 insertions, 44 deletions
diff --git a/apps/files_encryption/l10n/cs_CZ.php b/apps/files_encryption/l10n/cs_CZ.php
index 8464ad2bb4a..a49530d94d9 100644
--- a/apps/files_encryption/l10n/cs_CZ.php
+++ b/apps/files_encryption/l10n/cs_CZ.php
@@ -9,6 +9,7 @@ $TRANSLATIONS = array(
"Private key password successfully updated." => "Heslo soukromého klíče úspěšně aktualizováno.",
"Could not update the private key password. Maybe the old password was not correct." => "Nelze aktualizovat heslo soukromého klíče. Možná nebylo staré heslo správně.",
"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Aplikace pro šifrování není inicializována! Je možné, že aplikace byla znovu aktivována během vašeho přihlášení. Zkuste se prosím odhlásit a znovu přihlásit pro provedení inicializace šifrovací aplikace.",
+"Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Váš soukromý klíč není platný! Pravděpodobně bylo heslo změněno vně systému %s (např. ve vašem firemním adresáři). Heslo vašeho soukromého klíče můžete změnit ve svém osobním nastavení pro obnovení přístupu k vašim zašifrovaným souborům.",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." => "Tento soubor se nepodařilo dešifrovat, pravděpodobně je sdílený. Požádejte prosím majitele souboru, aby jej s vámi znovu sdílel.",
"Unknown error please check your system settings or contact your administrator" => "Neznámá chyba, zkontrolujte vaše systémová nastavení nebo kontaktujte vašeho správce",
"Missing requirements." => "Nesplněné závislosti.",
diff --git a/apps/files_encryption/l10n/el.php b/apps/files_encryption/l10n/el.php
index 70f778f0a50..6b21122027a 100644
--- a/apps/files_encryption/l10n/el.php
+++ b/apps/files_encryption/l10n/el.php
@@ -1,13 +1,34 @@
<?php
$TRANSLATIONS = array(
+"Recovery key successfully enabled" => "Επιτυχής ενεργοποίηση κλειδιού ανάκτησης",
+"Could not enable recovery key. Please check your recovery key password!" => "Αποτυχία ενεργοποίησης κλειδιού ανάκτησης. Παρακαλώ ελέγξτε τον κωδικό του κλειδιού ανάκτησής σας!",
+"Recovery key successfully disabled" => "Επιτυχής απενεργοποίηση κλειδιού ανάκτησης",
+"Could not disable recovery key. Please check your recovery key password!" => "Αποτυχία απενεργοποίησης κλειδιού ανάκτησης. Παρακαλώ ελέγξτε τον κωδικό του κλειδιού ανάκτησής σας!",
"Password successfully changed." => "Ο κωδικός αλλάχτηκε επιτυχώς.",
"Could not change the password. Maybe the old password was not correct." => "Αποτυχία αλλαγής κωδικού ίσως ο παλιός κωδικός να μην ήταν σωστός.",
+"Private key password successfully updated." => "Το Προσωπικό κλειδί πρόσβασης ενημερώθηκε επιτυχώς",
+"Could not update the private key password. Maybe the old password was not correct." => "Αποτυχία ενημέρωσης του κωδικού για το προσωπικό κλειδί. Ενδεχομένως ο παλιός κωδικός δεν ήταν σωστός.",
+"Unknown error please check your system settings or contact your administrator" => "Άγνωστο σφάλμα, παρακαλώ ελέγξτε τις ρυθμίσεις συστήματος ή επικοινωνήστε με τον διαχειριστή σας ",
+"Missing requirements." => "Προαπαιτούμενα που απουσιάζουν.",
+"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Παρακαλώ επιβεβαιώστε ότι η PHP 5.3.3 ή νεότερη είναι εγκατεστημένη και ότι το OpenSSL μαζί με το PHP extension είναι ενεργοποιήμένο και έχει ρυθμιστεί σωστά. Προς το παρόν, η εφαρμογή κρυπτογράφησης είναι απενεργοποιημένη.",
+"Following users are not set up for encryption:" => "Οι κάτωθι χρήστες δεν έχουν ρυθμιστεί για κρυπογράφηση:",
"Saving..." => "Γίνεται αποθήκευση...",
+"Go directly to your " => "Πηγαίνε απευθείας στο ",
"personal settings" => "προσωπικές ρυθμίσεις",
"Encryption" => "Κρυπτογράφηση",
+"Recovery key password" => "Επαναφορά κωδικού κλειδιού",
"Enabled" => "Ενεργοποιημένο",
"Disabled" => "Απενεργοποιημένο",
+"New Recovery key password" => "Νέο κλειδί επαναφοράς κωδικού",
"Change Password" => "Αλλαγή Κωδικού Πρόσβασης",
-"File recovery settings updated" => "Οι ρυθμίσεις επαναφοράς αρχείων ανανεώθηκαν"
+"Your private key password no longer match your log-in password:" => "Ο κωδικός του προσωπικού κλειδιού δεν ταιριάζει πλέον με τον κωδικό σύνδεσής σας:",
+" If you don't remember your old password you can ask your administrator to recover your files." => "Εάν δεν θυμάστε τον παλιό σας κωδικό μπορείτε να ζητήσετε από τον διαχειριστή σας να επανακτήσει τα αρχεία σας.",
+"Old log-in password" => "Παλαιό συνθηματικό εισόδου",
+"Current log-in password" => "Τρέχον συνθηματικό πρόσβασης",
+"Update Private Key Password" => "Ενημέρωση Προσωπικού Κλειδού Πρόσβασης",
+"Enable password recovery:" => "Ενεργοποιήστε την ανάκτηση κωδικού πρόσβασης",
+"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" => "Η ενεργοποίηση αυτής της επιλογής θα σας επιτρέψει να επανακτήσετε πρόσβαση στα κρυπτογραφημένα σας αρχεία σε περίπτωση απώλειας του κωδικού σας",
+"File recovery settings updated" => "Οι ρυθμίσεις επαναφοράς αρχείων ανανεώθηκαν",
+"Could not update file recovery" => "Αποτυχία ενημέρωσης ανάκτησης αρχείων"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/apps/files_encryption/l10n/pl.php b/apps/files_encryption/l10n/pl.php
index 615951eecc8..5d1a48d1246 100644
--- a/apps/files_encryption/l10n/pl.php
+++ b/apps/files_encryption/l10n/pl.php
@@ -9,6 +9,7 @@ $TRANSLATIONS = array(
"Private key password successfully updated." => "Pomyślnie zaktualizowano hasło klucza prywatnego.",
"Could not update the private key password. Maybe the old password was not correct." => "Nie można zmienić prywatnego hasła. Może stare hasło nie było poprawne.",
"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Szyfrowanie aplikacja nie została zainicjowane! Może szyfrowanie aplikacji zostało ponownie włączone podczas tej sesji. Spróbuj się wylogować i zalogować ponownie aby zainicjować szyfrowanie aplikacji.",
+"Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Klucz prywatny nie jest poprawny! Prawdopodobnie Twoje hasło zostało zmienione poza %s (np. w katalogu firmy). Aby odzyskać dostęp do zaszyfrowanych plików można zaktualizować hasło klucza prywatnego w ustawieniach osobistych.",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." => "Nie można odszyfrować tego pliku, prawdopodobnie jest to plik udostępniony. Poproś właściciela pliku o ponowne udostępnianie pliku Tobie.",
"Unknown error please check your system settings or contact your administrator" => "Nieznany błąd proszę sprawdzić ustawienia systemu lub skontaktuj się z administratorem",
"Missing requirements." => "Brak wymagań.",
diff --git a/apps/files_encryption/l10n/sl.php b/apps/files_encryption/l10n/sl.php
index d4d881d3d0d..be814558f52 100644
--- a/apps/files_encryption/l10n/sl.php
+++ b/apps/files_encryption/l10n/sl.php
@@ -1,36 +1,43 @@
<?php
$TRANSLATIONS = array(
-"Recovery key successfully enabled" => "Ključ za obnovitev gesla je bil uspešno nastavljen",
-"Could not enable recovery key. Please check your recovery key password!" => "Ključa za obnovitev gesla ni bilo mogoče nastaviti. Preverite ključ!",
-"Recovery key successfully disabled" => "Ključ za obnovitev gesla je bil uspešno onemogočen",
-"Could not disable recovery key. Please check your recovery key password!" => "Ključa za obnovitev gesla ni bilo mogoče onemogočiti. Preverite ključ!",
-"Password successfully changed." => "Geslo je bilo uspešno spremenjeno.",
-"Could not change the password. Maybe the old password was not correct." => "Gesla ni bilo mogoče spremeniti. Morda vnos starega gesla ni bil pravilen.",
-"Private key password successfully updated." => "Zasebni ključ za geslo je bil uspešno posodobljen.",
-"Could not update the private key password. Maybe the old password was not correct." => "Zasebnega ključa za geslo ni bilo mogoče posodobiti. Morda vnos starega gesla ni bil pravilen.",
+"Recovery key successfully enabled" => "Ključ za obnovitev gesla je uspešno nastavljen",
+"Could not enable recovery key. Please check your recovery key password!" => "Ključa za obnovitev gesla ni mogoče nastaviti. Preverite ključ!",
+"Recovery key successfully disabled" => "Ključ za obnovitev gesla je uspešno onemogočen",
+"Could not disable recovery key. Please check your recovery key password!" => "Ključa za obnovitev gesla ni mogoče onemogočiti. Preverite ključ!",
+"Password successfully changed." => "Geslo je uspešno spremenjeno.",
+"Could not change the password. Maybe the old password was not correct." => "Gesla ni mogoče spremeniti. Morda vnos starega gesla ni pravilen.",
+"Private key password successfully updated." => "Zasebni ključ za geslo je uspešno posodobljen.",
+"Could not update the private key password. Maybe the old password was not correct." => "Zasebnega ključa za geslo ni mogoče posodobiti. Morda vnos starega gesla ni bil pravilen.",
+"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Program za šifriranje ni začet. Morda je bil program ponovno omogočen šele med zagonom trenutne seje. Odjavite se in se nato prijavite nazaj. S tem morda razrešite napako.",
+"Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Zasebni ključ ni veljaven. Najverjetneje je bilo geslo spremenjeno izven %s (najverjetneje je to poslovna mapa). Geslo lahko posodobite med osebnimi nastavitvami in s tem obnovite dostop do šifriranih datotek.",
+"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." => "Te datoteke ni mogoče šifrirati, ker je to najverjetneje datoteka v souporabi. Prosite lastnika datoteke, da jo da ponovno v souporabo.",
+"Unknown error please check your system settings or contact your administrator" => "Prišlo je do neznane napake. Preverite nastavitve sistema ali pa stopite v stik s skrbnikom sistema.",
"Missing requirements." => "Manjkajoče zahteve",
-"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Preverite, da imate na strežniku nameščen paket PHP 5.3.3 ali novejši in da je omogočen in pravilno nastavljen PHP OpenSSL . Zaenkrat je šifriranje onemogočeno.",
-"Following users are not set up for encryption:" => "Naslednji uporabniki še nimajo nastavljenega šifriranja:",
+"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Preverite, ali je na strežniku nameščen paket PHP 5.3.3 ali novejši, da je omogočen in pravilno nastavljen PHP OpenSSL. Z obstoječimi možnostmi šifriranje ni mogoče.",
+"Following users are not set up for encryption:" => "Navedeni uporabniki še nimajo nastavljenega šifriranja:",
"Saving..." => "Poteka shranjevanje ...",
+"Go directly to your " => "Skočite neposredno na",
"personal settings" => "osebne nastavitve",
"Encryption" => "Šifriranje",
-"Enable recovery key (allow to recover users files in case of password loss):" => "Omogoči ključ za obnovitev datotek (v primeru izgube gesla)",
+"Enable recovery key (allow to recover users files in case of password loss):" => "Omogoči ključ za obnovitev datotek (v primeru izgube gesla):",
"Recovery key password" => "Ključ za obnovitev gesla",
+"Repeat Recovery key password" => "Ponovi ključ za obnovitev gesla",
"Enabled" => "Omogočeno",
"Disabled" => "Onemogočeno",
"Change recovery key password:" => "Spremeni ključ za obnovitev gesla:",
"Old Recovery key password" => "Stari ključ za obnovitev gesla",
-"New Recovery key password" => "Nov ključ za obnovitev gesla",
+"New Recovery key password" => "Novi ključ za obnovitev gesla",
+"Repeat New Recovery key password" => "Ponovi novi ključ za obnovitev gesla",
"Change Password" => "Spremeni geslo",
-"Your private key password no longer match your log-in password:" => "Vaš zasebni ključ za geslo se ne ujema z vnešenim geslom ob prijavi:",
-"Set your old private key password to your current log-in password." => "Nastavite svoj star zasebni ključ v geslo, vnešeno ob prijavi.",
-" If you don't remember your old password you can ask your administrator to recover your files." => "Če ste svoje geslo pozabili, lahko vaše datoteke obnovi skrbnik sistema.",
+"Your private key password no longer match your log-in password:" => "Vaš zasebni ključ za geslo se ne ujema z geslom, vnesenim ob prijavi:",
+"Set your old private key password to your current log-in password." => "Nastavite svoj star zasebni ključ v geslo, vneseno ob prijavi.",
+" If you don't remember your old password you can ask your administrator to recover your files." => "Če ste pozabili svoje geslo, lahko vaše datoteke obnovi le skrbnik sistema.",
"Old log-in password" => "Staro geslo",
"Current log-in password" => "Trenutno geslo",
"Update Private Key Password" => "Posodobi zasebni ključ",
"Enable password recovery:" => "Omogoči obnovitev gesla:",
-"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" => "Nastavitev te možnosti omogoča ponovno pridobitev dostopa do šifriranih datotek, v primeru da boste geslo pozabili.",
-"File recovery settings updated" => "Nastavitve obnavljanja dokumentov so bile posodobljene",
-"Could not update file recovery" => "Nastavitev za obnavljanje dokumentov ni bilo mogoče posodobiti"
+"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" => "Nastavitev te možnosti omogoča ponovno pridobitev dostopa do šifriranih datotek, v primeru, da boste geslo pozabili.",
+"File recovery settings updated" => "Nastavitve obnavljanja dokumentov so posodobljene",
+"Could not update file recovery" => "Nastavitev za obnavljanje dokumentov ni mogoče posodobiti"
);
$PLURAL_FORMS = "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);";
diff --git a/apps/files_encryption/l10n/sv.php b/apps/files_encryption/l10n/sv.php
index 87f7aabc7ad..1e509ea08e7 100644
--- a/apps/files_encryption/l10n/sv.php
+++ b/apps/files_encryption/l10n/sv.php
@@ -9,6 +9,7 @@ $TRANSLATIONS = array(
"Private key password successfully updated." => "Den privata nyckelns lösenord uppdaterades utan problem.",
"Could not update the private key password. Maybe the old password was not correct." => "Kunde inte uppdatera lösenordet för den privata nyckeln. Kanske var det gamla lösenordet fel.",
"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Krypteringsprogrammet kunde inte initieras! Möjligen blev krypteringsprogrammet återaktiverad under din session. Försök med att logga ut och in igen för att initiera krypteringsprogrammet.",
+"Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Din privata lösenordsnyckel är inte giltig! Troligen har ditt lösenord ändrats utanför %s (t.ex. i företagets katalogtjänst). Du kan uppdatera den privata lösenordsnyckeln under dina personliga inställningar för att återfå tillgång till dina filer.",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." => "Kan ej dekryptera denna fil, förmodligen är det en delad fil. Be ägaren av filen att dela den med dig.",
"Unknown error please check your system settings or contact your administrator" => "Oväntat fel, kolla dina system inställningar eller kontakta din administratör",
"Missing requirements." => "Krav som saknas",
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index 897b5d46620..17bcac5c585 100755
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -225,7 +225,7 @@ class Helper {
* @return bool
*/
public static function isPublicAccess() {
- if (strpos($_SERVER['HTTP_REFERER'], 'public.php') !== false) {
+ if (\OCP\User::getUser() === false) {
return true;
} else {
return false;
@@ -253,21 +253,21 @@ class Helper {
}
/**
- * @brief get user from the path, because we can't assume that \OCP\User::getUser()
- * will always return the right result
- * @param type $path
- * @return boolean
+ * @brief try to get the user from the path if no user is logged in
+ * @param string $path
+ * @return mixed user or false if we couldn't determine a user
*/
public static function getUser($path) {
$user = \OCP\User::getUser();
- // if we are logged in and if we don't come from a public URL, then we return the userid
- if ($user && strpos($_SERVER['HTTP_REFERER'], 'public.php') === false) {
+
+ // if we are logged in, then we return the userid
+ if ($user) {
return $user;
}
- // ...otherwise we try to access a publically shared files.
+ // if no user is logged in we try to access a publicly shared files.
// In this case we need to try to get the user from the path
$trimmed = ltrim($path, '/');
@@ -288,10 +288,10 @@ class Helper {
}
/**
- * @brief get path to the correspondig file in data/user/files if path points
+ * @brief get path to the corresponding file in data/user/files if path points
* to a version or to a file in cache
* @param string $path path to a version or a file in the trash
- * @return string path to correspondig file relative to data/user/files
+ * @return string path to corresponding file relative to data/user/files
*/
public static function getPathToRealFile($path) {
$trimmed = ltrim($path, '/');
diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php
index b1832b667d6..b2c756894b4 100755
--- a/apps/files_encryption/lib/keymanager.php
+++ b/apps/files_encryption/lib/keymanager.php
@@ -114,14 +114,12 @@ class Keymanager {
* @param \OC_FilesystemView $view
* @param \OCA\Encryption\Util $util
* @param string $path relative path of the file, including filename
- * @param $userId
- * @param $catfile
- * @internal param string $key
+ * @param string $catfile keyfile content
* @return bool true/false
* @note The keyfile is not encrypted here. Client code must
* asymmetrically encrypt the keyfile before passing it to this method
*/
- public static function setFileKey(\OC_FilesystemView $view, $util, $path, $userId, $catfile) {
+ public static function setFileKey(\OC_FilesystemView $view, $util, $path, $catfile) {
$proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false;
@@ -178,7 +176,7 @@ class Keymanager {
* @note The keyfile returned is asymmetrically encrypted. Decryption
* of the keyfile must be performed by client code
*/
- public static function getFileKey(\OC_FilesystemView $view, $util, $filePath) {
+ public static function getFileKey($view, $util, $filePath) {
list($owner, $filename) = $util->getUidAndFilename($filePath);
@@ -215,13 +213,12 @@ class Keymanager {
* @brief Delete a keyfile
*
* @param \OC_FilesystemView $view
- * @param string $userId username
* @param string $path path of the file the key belongs to
* @return bool Outcome of unlink operation
* @note $path must be relative to data/user/files. e.g. mydoc.txt NOT
* /data/admin/files/mydoc.txt
*/
- public static function deleteFileKey(\OC_FilesystemView $view, $userId, $path) {
+ public static function deleteFileKey(\OC_FilesystemView $view, $path) {
$trimmed = ltrim($path, '/');
@@ -364,7 +361,6 @@ class Keymanager {
* @param string $userId
* @param \OCA\Encryption\Util $util
* @param string $filePath
- * @internal param \OCA\Encryption\file $string name
* @return string file key or false
* @note The sharekey returned is encrypted. Decryption
* of the keyfile must be performed by client code
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 426d92f41de..5ba3bfa784f 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -203,7 +203,7 @@ class Proxy extends \OC_FileProxy {
list($owner, $ownerPath) = $util->getUidAndFilename($relativePath);
// Delete keyfile & shareKey so it isn't orphaned
- if (!Keymanager::deleteFileKey($view, $owner, $ownerPath)) {
+ if (!Keymanager::deleteFileKey($view, $ownerPath)) {
\OCP\Util::writeLog('Encryption library',
'Keyfile or shareKey could not be deleted for file "' . $ownerPath . '"', \OCP\Util::ERROR);
}
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index b22bc726234..7a37d2200a4 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -103,7 +103,7 @@ class Stream {
$util = new Util($this->rootView, $this->userId);
- // get the key ID which we want to use, canm be the users key or the
+ // get the key ID which we want to use, can be the users key or the
// public share key
$this->keyId = $util->getKeyId();
@@ -528,7 +528,7 @@ class Stream {
$this->encKeyfiles = Crypt::multiKeyEncrypt($this->plainKey, $publicKeys);
// Save the new encrypted file key
- Keymanager::setFileKey($this->rootView, $util, $this->relPath, $this->keyId, $this->encKeyfiles['data']);
+ Keymanager::setFileKey($this->rootView, $util, $this->relPath, $this->encKeyfiles['data']);
// Save the sharekeys
Keymanager::setShareKeys($this->rootView, $util, $this->relPath, $this->encKeyfiles['keys']);
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index c84033802cf..33ab3f56965 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -1093,7 +1093,7 @@ class Util {
// Save the recrypted key to it's owner's keyfiles directory
// Save new sharekeys to all necessary user directory
if (
- !Keymanager::setFileKey($this->view, $this, $filePath, $fileOwner, $multiEncKey['data'])
+ !Keymanager::setFileKey($this->view, $this, $filePath, $multiEncKey['data'])
|| !Keymanager::setShareKeys($this->view, $this, $filePath, $multiEncKey['keys'])
) {
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 0086371d223..ca14e3e2ccb 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -201,7 +201,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
// Teardown
$this->view->unlink($this->userId . '/files/' . $filename);
- Encryption\Keymanager::deleteFileKey($this->view, $this->userId, $filename);
+ Encryption\Keymanager::deleteFileKey($this->view, $filename);
}
/**
@@ -287,7 +287,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
$this->view->unlink($this->userId . '/files/' . $filename);
- Encryption\Keymanager::deleteFileKey($this->view, $this->userId, $filename);
+ Encryption\Keymanager::deleteFileKey($this->view, $filename);
}
diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php
index 72ee270ee59..1467979f005 100644
--- a/apps/files_encryption/tests/keymanager.php
+++ b/apps/files_encryption/tests/keymanager.php
@@ -153,7 +153,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase {
$this->view->file_put_contents($this->userId . '/files/' . $file, $this->dataShort);
- Encryption\Keymanager::setFileKey($this->view, $util, $file, $this->userId, $key);
+ Encryption\Keymanager::setFileKey($this->view, $util, $file, $key);
$this->assertTrue($this->view->file_exists('/' . $this->userId . '/files_encryption/keyfiles/' . $file . '.key'));