diff --git a/apps/files/ajax/autocomplete.php b/apps/files/ajax/autocomplete.php deleted file mode 100644 index b32ba7c3d5..0000000000 --- a/apps/files/ajax/autocomplete.php +++ /dev/null @@ -1,54 +0,0 @@ -$item, 'label'=>$item, 'name'=>$item); - } - } - } - } - } -} -OCP\JSON::encodedPrint($files); diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php index 6532b76df2..293543c547 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -21,8 +21,20 @@ foreach($files as $file) { } } +// updated max file size after upload +$l=new OC_L10N('files'); +$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir); +$maxHumanFilesize=OCP\Util::humanFileSize($maxUploadFilesize); +$maxHumanFilesize=$l->t('Upload') . ' max. '.$maxHumanFilesize; + if($success) { - OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $files ))); + OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $files, + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize + ))); } else { - OCP\JSON::error(array("data" => array( "message" => "Could not delete:\n" . $filesWithError ))); + OCP\JSON::error(array("data" => array( "message" => "Could not delete:\n" . $filesWithError, + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize + ))); } diff --git a/apps/files/ajax/getstoragestats.php b/apps/files/ajax/getstoragestats.php new file mode 100644 index 0000000000..e55e346ed6 --- /dev/null +++ b/apps/files/ajax/getstoragestats.php @@ -0,0 +1,16 @@ +t('Upload') . ' max. ' . $maxHumanFilesize; + +// send back json +OCP\JSON::success(array('data' => array('uploadMaxFilesize' => $maxUploadFilesize, + 'maxHumanFilesize' => $maxHumanFilesize +))); diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 2a2d935da6..9339801960 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -10,8 +10,17 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); $l=OC_L10N::get('files'); +// current max upload size +$l=new OC_L10N('files'); +$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir); +$maxHumanFilesize=OCP\Util::humanFileSize($maxUploadFilesize); +$maxHumanFilesize=$l->t('Upload') . ' max. '.$maxHumanFilesize; + if (!isset($_FILES['files'])) { - OCP\JSON::error(array('data' => array( 'message' => $l->t( 'No file was uploaded. Unknown error' )))); + OCP\JSON::error(array('data' => array( 'message' => $l->t( 'No file was uploaded. Unknown error' ), + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize + ))); exit(); } @@ -28,7 +37,10 @@ foreach ($_FILES['files']['error'] as $error) { UPLOAD_ERR_NO_TMP_DIR=>$l->t('Missing a temporary folder'), UPLOAD_ERR_CANT_WRITE=>$l->t('Failed to write to disk'), ); - OCP\JSON::error(array('data' => array( 'message' => $errors[$error] ))); + OCP\JSON::error(array('data' => array( 'message' => $errors[$error], + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize + ))); exit(); } } @@ -42,7 +54,9 @@ foreach($files['size'] as $size) { $totalSize+=$size; } if($totalSize>OC_Filesystem::free_space($dir)) { - OCP\JSON::error(array('data' => array( 'message' => $l->t( 'Not enough space available' )))); + OCP\JSON::error(array('data' => array( 'message' => $l->t( 'Not enough space available' ), + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize))); exit(); } @@ -56,11 +70,19 @@ if(strpos($dir, '..') === false) { if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i], $target)) { $meta = OC_FileCache::get($target); $id = OC_FileCache::getId($target); + // updated max file size after upload + $maxUploadFilesize=OCP\Util::maxUploadFilesize($dir); + $maxHumanFilesize=OCP\Util::humanFileSize($maxUploadFilesize); + $maxHumanFilesize=$l->t('Upload') . ' max. '.$maxHumanFilesize; + $result[]=array( 'status' => 'success', 'mime'=>$meta['mimetype'], 'size'=>$meta['size'], 'id'=>$id, - 'name'=>basename($target)); + 'name'=>basename($target), + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize + ); } } OCP\JSON::encodedPrint($result); @@ -69,4 +91,7 @@ if(strpos($dir, '..') === false) { $error=$l->t( 'Invalid directory.' ); } -OCP\JSON::error(array('data' => array('message' => $error ))); +OCP\JSON::error(array('data' => array('message' => $error, + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize +))); diff --git a/apps/files/index.php b/apps/files/index.php index 08193eaee7..1c4b7fbd49 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -28,6 +28,7 @@ OCP\User::checkLoggedIn(); OCP\Util::addStyle('files', 'files'); OCP\Util::addscript('files', 'jquery.iframe-transport'); OCP\Util::addscript('files', 'jquery.fileupload'); +OCP\Util::addscript('files', 'jquery-visibility'); OCP\Util::addscript('files', 'files'); OCP\Util::addscript('files', 'filelist'); OCP\Util::addscript('files', 'fileactions'); @@ -79,13 +80,7 @@ $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', ''); $breadcrumbNav->assign('breadcrumb', $breadcrumb, false); $breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=', false); -$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')); -$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); -$maxUploadFilesize = min($upload_max_filesize, $post_max_size); - -$freeSpace = OC_Filesystem::free_space($dir); -$freeSpace = max($freeSpace, 0); -$maxUploadFilesize = min($maxUploadFilesize, $freeSpace); +$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir); $permissions = OCP\PERMISSION_READ; if (OC_Filesystem::isUpdatable($dir . '/')) { diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 3a4af6416e..c1abe20515 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -26,6 +26,23 @@ Files={ }); procesSelection(); }, + updateMaxUploadFilesize:function(response) { + if(response == undefined) { + return; + } + if(response.data !== undefined && response.data.uploadMaxFilesize !== undefined) { + $('#max_upload').val(response.data.uploadMaxFilesize); + $('#data-upload-form a').attr('original-title', response.data.maxHumanFilesize); + } + if(response[0] == undefined) { + return; + } + if(response[0].uploadMaxFilesize !== undefined) { + $('#max_upload').val(response[0].uploadMaxFilesize); + $('#data-upload-form a').attr('original-title', response[0].maxHumanFilesize); + } + + }, isFileNameValid:function (name) { if (name === '.') { $('#notification').text(t('files', '\'.\' is an invalid file name.')); @@ -184,7 +201,7 @@ $(document).ready(function() { $('.download').click('click',function(event) { var files=getSelectedFiles('name').join(';'); var dir=$('#dir').val()||'/'; - $('#notification').text(t('files','generating ZIP-file, it may take some time.')); + $('#notification').text(t('files','Your download is being prepared. This might take some time if the files are big.')); $('#notification').fadeIn(); // use special download URL if provided, e.g. for public shared files if ( (downloadURL = document.getElementById("downloadURL")) ) { @@ -317,6 +334,7 @@ $(document).ready(function() { $('#notification').text(t('files', response.data.message)); $('#notification').fadeIn(); } + Files.updateMaxUploadFilesize(response); var file=response[0]; // TODO: this doesn't work if the file name has been changed server side delete uploadingFiles[dirName][file.name]; @@ -369,6 +387,8 @@ $(document).ready(function() { .success(function(result, textStatus, jqXHR) { var response; response=jQuery.parseJSON(result); + Files.updateMaxUploadFilesize(response); + if(response[0] != undefined && response[0].status == 'success') { var file=response[0]; delete uploadingFiles[file.name]; @@ -402,6 +422,7 @@ $(document).ready(function() { data.submit().success(function(data, status) { // in safari data is a string response = jQuery.parseJSON(typeof data === 'string' ? data : data[0].body.innerText); + Files.updateMaxUploadFilesize(response); if(response[0] != undefined && response[0].status == 'success') { var file=response[0]; delete uploadingFiles[file.name]; @@ -712,6 +733,32 @@ $(document).ready(function() { }); resizeBreadcrumbs(true); + + // file space size sync + function update_storage_statistics() { + $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) { + Files.updateMaxUploadFilesize(response); + }); + } + + // start on load - we ask the server every 5 minutes + var update_storage_statistics_interval = 5*60*1000; + var update_storage_statistics_interval_id = setInterval(update_storage_statistics, update_storage_statistics_interval); + + // Use jquery-visibility to de-/re-activate file stats sync + if ($.support.pageVisibility) { + $(document).on({ + 'show.visibility': function() { + if (!update_storage_statistics_interval_id) { + update_storage_statistics_interval_id = setInterval(update_storage_statistics, update_storage_statistics_interval); + } + }, + 'hide.visibility': function() { + clearInterval(update_storage_statistics_interval_id); + update_storage_statistics_interval_id = 0; + } + }); + } }); function scanFiles(force,dir){ @@ -741,6 +788,7 @@ scanFiles.scanning=false; function boolOperationFinished(data, callback) { result = jQuery.parseJSON(data.responseText); + Files.updateMaxUploadFilesize(result); if(result.status == 'success'){ callback.call(); } else { diff --git a/apps/files/js/jquery-visibility.js b/apps/files/js/jquery-visibility.js new file mode 100644 index 0000000000..a824bf6873 --- /dev/null +++ b/apps/files/js/jquery-visibility.js @@ -0,0 +1,32 @@ +/*! http://mths.be/visibility v1.0.5 by @mathias */ +(function (window, document, $, undefined) { + + var prefix, + property, +// In Opera, `'onfocusin' in document == true`, hence the extra `hasFocus` check to detect IE-like behavior + eventName = 'onfocusin' in document && 'hasFocus' in document ? 'focusin focusout' : 'focus blur', + prefixes = ['', 'moz', 'ms', 'o', 'webkit'], + $support = $.support, + $event = $.event; + + while ((property = prefix = prefixes.pop()) != undefined) { + property = (prefix ? prefix + 'H' : 'h') + 'idden'; + if ($support.pageVisibility = typeof document[property] == 'boolean') { + eventName = prefix + 'visibilitychange'; + break; + } + } + + $(/blur$/.test(eventName) ? window : document).on(eventName, function (event) { + var type = event.type, + originalEvent = event.originalEvent, + toElement = originalEvent.toElement; +// If it’s a `{focusin,focusout}` event (IE), `fromElement` and `toElement` should both be `null` or `undefined`; +// else, the page visibility hasn’t changed, but the user just clicked somewhere in the doc. +// In IE9, we need to check the `relatedTarget` property instead. + if (!/^focus./.test(type) || (toElement == undefined && originalEvent.fromElement == undefined && originalEvent.relatedTarget == undefined)) { + $event.trigger((property && document[property] || /^(?:blur|focusout)$/.test(type) ? 'hide' : 'show') + '.visibility'); + } + }); + +}(this, document, jQuery)); diff --git a/apps/files/l10n/ar.php b/apps/files/l10n/ar.php index 5740d54f8b..d468b10287 100644 --- a/apps/files/l10n/ar.php +++ b/apps/files/l10n/ar.php @@ -1,4 +1,5 @@ "إرفع", "There is no error, the file uploaded with success" => "تم ترفيع الملفات بنجاح.", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "حجم الملف الذي تريد ترفيعه أعلى مما MAX_FILE_SIZE يسمح به في واجهة ال HTML.", "The uploaded file was only partially uploaded" => "تم ترفيع جزء من الملفات الذي تريد ترفيعها فقط", @@ -16,7 +17,6 @@ "New" => "جديد", "Text file" => "ملف", "Folder" => "مجلد", -"Upload" => "إرفع", "Nothing in here. Upload something!" => "لا يوجد شيء هنا. إرفع بعض الملفات!", "Download" => "تحميل", "Upload too large" => "حجم الترفيع أعلى من المسموح", diff --git a/apps/files/l10n/bg_BG.php b/apps/files/l10n/bg_BG.php index bc10979611..a8c2dc97e0 100644 --- a/apps/files/l10n/bg_BG.php +++ b/apps/files/l10n/bg_BG.php @@ -1,4 +1,5 @@ "Качване", "Missing a temporary folder" => "Липсва временна папка", "Files" => "Файлове", "Delete" => "Изтриване", @@ -15,7 +16,6 @@ "Save" => "Запис", "New" => "Ново", "Folder" => "Папка", -"Upload" => "Качване", "Nothing in here. Upload something!" => "Няма нищо тук. Качете нещо.", "Download" => "Изтегляне", "Upload too large" => "Файлът който сте избрали за качване е прекалено голям" diff --git a/apps/files/l10n/bn_BD.php b/apps/files/l10n/bn_BD.php index e55c881139..e8e19c6898 100644 --- a/apps/files/l10n/bn_BD.php +++ b/apps/files/l10n/bn_BD.php @@ -1,4 +1,5 @@ "আপলোড", "Could not move %s - File with this name already exists" => "%s কে স্থানান্তর করা সম্ভব হলো না - এই নামের ফাইল বিদ্যমান", "Could not move %s" => "%s কে স্থানান্তর করা সম্ভব হলো না", "Unable to rename file" => "ফাইলের নাম পরিবর্তন করা সম্ভব হলো না", @@ -28,7 +29,6 @@ "'.' is an invalid file name." => "টি একটি অননুমোদিত নাম।", "File name cannot be empty." => "ফাইলের নামটি ফাঁকা রাখা যাবে না।", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "নামটি সঠিক নয়, '\\', '/', '<', '>', ':', '\"', '|', '?' এবং '*' অনুমোদিত নয়।", -"generating ZIP-file, it may take some time." => "ZIP- ফাইল তৈরী করা হচ্ছে, এজন্য কিছু সময় আবশ্যক।", "Unable to upload your file as it is a directory or has 0 bytes" => "আপনার ফাইলটি আপলোড করা সম্ভব হলো না, কেননা এটি হয় একটি ফোল্ডার কিংবা এর আকার ০ বাইট", "Upload Error" => "আপলোড করতে সমস্যা ", "Close" => "বন্ধ", @@ -60,7 +60,6 @@ "Text file" => "টেক্সট ফাইল", "Folder" => "ফোল্ডার", "From link" => " লিংক থেকে", -"Upload" => "আপলোড", "Cancel upload" => "আপলোড বাতিল কর", "Nothing in here. Upload something!" => "এখানে কিছুই নেই। কিছু আপলোড করুন !", "Download" => "ডাউনলোড", diff --git a/apps/files/l10n/ca.php b/apps/files/l10n/ca.php index f6ddbcd8e1..b35a9299de 100644 --- a/apps/files/l10n/ca.php +++ b/apps/files/l10n/ca.php @@ -1,4 +1,5 @@ "Puja", "Could not move %s - File with this name already exists" => "No s'ha pogut moure %s - Ja hi ha un fitxer amb aquest nom", "Could not move %s" => " No s'ha pogut moure %s", "Unable to rename file" => "No es pot canviar el nom del fitxer", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' és un nom no vàlid per un fitxer.", "File name cannot be empty." => "El nom del fitxer no pot ser buit.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "El nóm no és vàlid, '\\', '/', '<', '>', ':', '\"', '|', '?' i '*' no estan permesos.", -"generating ZIP-file, it may take some time." => "s'estan generant fitxers ZIP, pot trigar una estona.", +"Your download is being prepared. This might take some time if the files are big." => "S'està preparant la baixada. Pot trigar una estona si els fitxers són grans.", "Unable to upload your file as it is a directory or has 0 bytes" => "No es pot pujar el fitxer perquè és una carpeta o té 0 bytes", "Upload Error" => "Error en la pujada", "Close" => "Tanca", @@ -60,7 +61,6 @@ "Text file" => "Fitxer de text", "Folder" => "Carpeta", "From link" => "Des d'enllaç", -"Upload" => "Puja", "Cancel upload" => "Cancel·la la pujada", "Nothing in here. Upload something!" => "Res per aquí. Pugeu alguna cosa!", "Download" => "Baixa", diff --git a/apps/files/l10n/cs_CZ.php b/apps/files/l10n/cs_CZ.php index 65ac4b0493..a8d82ba511 100644 --- a/apps/files/l10n/cs_CZ.php +++ b/apps/files/l10n/cs_CZ.php @@ -1,4 +1,5 @@ "Odeslat", "Could not move %s - File with this name already exists" => "Nelze přesunout %s - existuje soubor se stejným názvem", "Could not move %s" => "Nelze přesunout %s", "Unable to rename file" => "Nelze přejmenovat soubor", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' je neplatným názvem souboru.", "File name cannot be empty." => "Název souboru nemůže být prázdný řetězec.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Neplatný název, znaky '\\', '/', '<', '>', ':', '\"', '|', '?' a '*' nejsou povoleny.", -"generating ZIP-file, it may take some time." => "generuji ZIP soubor, může to nějakou dobu trvat.", +"Your download is being prepared. This might take some time if the files are big." => "Vaše soubory ke stažení se připravují. Pokud jsou velké může to chvíli trvat.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nelze odeslat Váš soubor, protože je to adresář nebo má velikost 0 bajtů", "Upload Error" => "Chyba odesílání", "Close" => "Zavřít", @@ -60,7 +61,6 @@ "Text file" => "Textový soubor", "Folder" => "Složka", "From link" => "Z odkazu", -"Upload" => "Odeslat", "Cancel upload" => "Zrušit odesílání", "Nothing in here. Upload something!" => "Žádný obsah. Nahrajte něco.", "Download" => "Stáhnout", diff --git a/apps/files/l10n/da.php b/apps/files/l10n/da.php index 02c177a2f1..010af12e96 100644 --- a/apps/files/l10n/da.php +++ b/apps/files/l10n/da.php @@ -1,4 +1,5 @@ "Upload", "No file was uploaded. Unknown error" => "Ingen fil blev uploadet. Ukendt fejl.", "There is no error, the file uploaded with success" => "Der er ingen fejl, filen blev uploadet med success", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Den uploadede fil overstiger upload_max_filesize direktivet i php.ini", @@ -21,7 +22,6 @@ "unshared {files}" => "ikke delte {files}", "deleted {files}" => "slettede {files}", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ugyldigt navn, '\\', '/', '<', '>', ':' | '?', '\"', '', og '*' er ikke tilladt.", -"generating ZIP-file, it may take some time." => "genererer ZIP-fil, det kan tage lidt tid.", "Unable to upload your file as it is a directory or has 0 bytes" => "Kunne ikke uploade din fil, da det enten er en mappe eller er tom", "Upload Error" => "Fejl ved upload", "Close" => "Luk", @@ -52,7 +52,6 @@ "Text file" => "Tekstfil", "Folder" => "Mappe", "From link" => "Fra link", -"Upload" => "Upload", "Cancel upload" => "Fortryd upload", "Nothing in here. Upload something!" => "Her er tomt. Upload noget!", "Download" => "Download", diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php index 089ce1c0a2..c851f7df2a 100644 --- a/apps/files/l10n/de.php +++ b/apps/files/l10n/de.php @@ -1,4 +1,5 @@ "Hochladen", "Could not move %s - File with this name already exists" => "Konnte %s nicht verschieben - Datei mit diesem Namen existiert bereits.", "Could not move %s" => "Konnte %s nicht verschieben", "Unable to rename file" => "Konnte Datei nicht umbenennen", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' ist kein gültiger Dateiname", "File name cannot be empty." => "Der Dateiname darf nicht leer sein", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ungültiger Name, '\\', '/', '<', '>', ':', '\"', '|', '?' und '*' sind nicht zulässig.", -"generating ZIP-file, it may take some time." => "Erstelle ZIP-Datei. Dies kann eine Weile dauern.", +"Your download is being prepared. This might take some time if the files are big." => "Dein Download wird vorbereitet. Dies kann bei größeren Dateien etwas dauern.", "Unable to upload your file as it is a directory or has 0 bytes" => "Deine Datei kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist.", "Upload Error" => "Fehler beim Upload", "Close" => "Schließen", @@ -60,7 +61,6 @@ "Text file" => "Textdatei", "Folder" => "Ordner", "From link" => "Von einem Link", -"Upload" => "Hochladen", "Cancel upload" => "Upload abbrechen", "Nothing in here. Upload something!" => "Alles leer. Lade etwas hoch!", "Download" => "Herunterladen", diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php index 5cd4ef7042..281685b78d 100644 --- a/apps/files/l10n/de_DE.php +++ b/apps/files/l10n/de_DE.php @@ -1,4 +1,5 @@ "Hochladen", "Could not move %s - File with this name already exists" => "Konnte %s nicht verschieben - Datei mit diesem Namen existiert bereits", "Could not move %s" => "Konnte %s nicht verschieben", "Unable to rename file" => "Konnte Datei nicht umbenennen", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' ist kein gültiger Dateiname.", "File name cannot be empty." => "Der Dateiname darf nicht leer sein.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ungültiger Name, '\\', '/', '<', '>', ':', '\"', '|', '?' und '*' sind nicht zulässig.", -"generating ZIP-file, it may take some time." => "Erstelle ZIP-Datei. Dies kann eine Weile dauern.", +"Your download is being prepared. This might take some time if the files are big." => "Ihr Download wird vorbereitet. Dies kann bei größeren Dateien einen Moment dauern.", "Unable to upload your file as it is a directory or has 0 bytes" => "Ihre Datei kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist.", "Upload Error" => "Fehler beim Upload", "Close" => "Schließen", @@ -60,7 +61,6 @@ "Text file" => "Textdatei", "Folder" => "Ordner", "From link" => "Von einem Link", -"Upload" => "Hochladen", "Cancel upload" => "Upload abbrechen", "Nothing in here. Upload something!" => "Alles leer. Bitte laden Sie etwas hoch!", "Download" => "Herunterladen", diff --git a/apps/files/l10n/el.php b/apps/files/l10n/el.php index 3c1ac53809..cc93943d28 100644 --- a/apps/files/l10n/el.php +++ b/apps/files/l10n/el.php @@ -1,4 +1,8 @@ "Αποστολή", +"Could not move %s - File with this name already exists" => "Αδυναμία μετακίνησης του %s - υπάρχει ήδη αρχείο με αυτό το όνομα", +"Could not move %s" => "Αδυναμία μετακίνησης του %s", +"Unable to rename file" => "Αδυναμία μετονομασίας αρχείου", "No file was uploaded. Unknown error" => "Δεν ανέβηκε κάποιο αρχείο. Άγνωστο σφάλμα", "There is no error, the file uploaded with success" => "Δεν υπάρχει σφάλμα, το αρχείο εστάλει επιτυχώς", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Το απεσταλμένο αρχείο ξεπερνά την οδηγία upload_max_filesize στο php.ini:", @@ -7,6 +11,8 @@ "No file was uploaded" => "Κανένα αρχείο δεν στάλθηκε", "Missing a temporary folder" => "Λείπει ο προσωρινός φάκελος", "Failed to write to disk" => "Αποτυχία εγγραφής στο δίσκο", +"Not enough space available" => "Δεν υπάρχει αρκετός διαθέσιμος χώρος", +"Invalid directory." => "Μη έγκυρος φάκελος.", "Files" => "Αρχεία", "Unshare" => "Διακοπή κοινής χρήσης", "Delete" => "Διαγραφή", @@ -20,8 +26,10 @@ "replaced {new_name} with {old_name}" => "αντικαταστάθηκε το {new_name} με {old_name}", "unshared {files}" => "μη διαμοιρασμένα {files}", "deleted {files}" => "διαγραμμένα {files}", +"'.' is an invalid file name." => "'.' είναι μη έγκυρο όνομα αρχείου.", +"File name cannot be empty." => "Το όνομα αρχείου δεν πρέπει να είναι κενό.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Μη έγκυρο όνομα, '\\', '/', '<', '>', ':', '\"', '|', '?' και '*' δεν επιτρέπονται.", -"generating ZIP-file, it may take some time." => "παραγωγή αρχείου ZIP, ίσως διαρκέσει αρκετά.", +"Your download is being prepared. This might take some time if the files are big." => "Η λήψη προετοιμάζεται. Αυτό μπορεί να πάρει ώρα εάν τα αρχεία έχουν μεγάλο μέγεθος.", "Unable to upload your file as it is a directory or has 0 bytes" => "Αδυναμία στην αποστολή του αρχείου σας αφού είναι φάκελος ή έχει 0 bytes", "Upload Error" => "Σφάλμα Αποστολής", "Close" => "Κλείσιμο", @@ -31,6 +39,7 @@ "Upload cancelled." => "Η αποστολή ακυρώθηκε.", "File upload is in progress. Leaving the page now will cancel the upload." => "Η αποστολή του αρχείου βρίσκεται σε εξέλιξη. Το κλείσιμο της σελίδας θα ακυρώσει την αποστολή.", "URL cannot be empty." => "Η URL δεν πρέπει να είναι κενή.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Μη έγκυρο όνομα φακέλου. Η χρήση του 'Κοινόχρηστος' χρησιμοποιείται από ο Owncloud", "{count} files scanned" => "{count} αρχεία ανιχνεύτηκαν", "error while scanning" => "σφάλμα κατά την ανίχνευση", "Name" => "Όνομα", @@ -52,7 +61,6 @@ "Text file" => "Αρχείο κειμένου", "Folder" => "Φάκελος", "From link" => "Από σύνδεσμο", -"Upload" => "Αποστολή", "Cancel upload" => "Ακύρωση αποστολής", "Nothing in here. Upload something!" => "Δεν υπάρχει τίποτα εδώ. Ανέβασε κάτι!", "Download" => "Λήψη", diff --git a/apps/files/l10n/eo.php b/apps/files/l10n/eo.php index 92c03ee882..0aebf9c034 100644 --- a/apps/files/l10n/eo.php +++ b/apps/files/l10n/eo.php @@ -1,4 +1,8 @@ "Alŝuti", +"Could not move %s - File with this name already exists" => "Ne eblis movi %s: dosiero kun ĉi tiu nomo jam ekzistas", +"Could not move %s" => "Ne eblis movi %s", +"Unable to rename file" => "Ne eblis alinomigi dosieron", "No file was uploaded. Unknown error" => "Neniu dosiero alŝutiĝis. Nekonata eraro.", "There is no error, the file uploaded with success" => "Ne estas eraro, la dosiero alŝutiĝis sukcese", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "La dosiero alŝutita superas la regulon upload_max_filesize el php.ini: ", @@ -7,6 +11,8 @@ "No file was uploaded" => "Neniu dosiero estas alŝutita", "Missing a temporary folder" => "Mankas tempa dosierujo", "Failed to write to disk" => "Malsukcesis skribo al disko", +"Not enough space available" => "Ne haveblas sufiĉa spaco", +"Invalid directory." => "Nevalida dosierujo.", "Files" => "Dosieroj", "Unshare" => "Malkunhavigi", "Delete" => "Forigi", @@ -20,8 +26,10 @@ "replaced {new_name} with {old_name}" => "anstataŭiĝis {new_name} per {old_name}", "unshared {files}" => "malkunhaviĝis {files}", "deleted {files}" => "foriĝis {files}", +"'.' is an invalid file name." => "'.' ne estas valida dosiernomo.", +"File name cannot be empty." => "Dosiernomo devas ne malpleni.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nevalida nomo: “\\”, “/”, “<”, “>”, “:”, “\"”, “|”, “?” kaj “*” ne permesatas.", -"generating ZIP-file, it may take some time." => "generanta ZIP-dosiero, ĝi povas daŭri iom da tempo", +"Your download is being prepared. This might take some time if the files are big." => "Via elŝuto pretiĝatas. Ĉi tio povas daŭri iom da tempo se la dosieroj grandas.", "Unable to upload your file as it is a directory or has 0 bytes" => "Ne eblis alŝuti vian dosieron ĉar ĝi estas dosierujo aŭ havas 0 duumokojn", "Upload Error" => "Alŝuta eraro", "Close" => "Fermi", @@ -31,6 +39,7 @@ "Upload cancelled." => "La alŝuto nuliĝis.", "File upload is in progress. Leaving the page now will cancel the upload." => "Dosieralŝuto plenumiĝas. Lasi la paĝon nun nuligus la alŝuton.", "URL cannot be empty." => "URL ne povas esti malplena.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nevalida dosierujnomo. Uzo de “Shared” rezervatas de Owncloud.", "{count} files scanned" => "{count} dosieroj skaniĝis", "error while scanning" => "eraro dum skano", "Name" => "Nomo", @@ -52,7 +61,6 @@ "Text file" => "Tekstodosiero", "Folder" => "Dosierujo", "From link" => "El ligilo", -"Upload" => "Alŝuti", "Cancel upload" => "Nuligi alŝuton", "Nothing in here. Upload something!" => "Nenio estas ĉi tie. Alŝutu ion!", "Download" => "Elŝuti", diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php index 885ed3770e..c76431ef38 100644 --- a/apps/files/l10n/es.php +++ b/apps/files/l10n/es.php @@ -1,4 +1,5 @@ "Subir", "Could not move %s - File with this name already exists" => "No se puede mover %s - Ya existe un archivo con ese nombre", "Could not move %s" => "No se puede mover %s", "Unable to rename file" => "No se puede renombrar el archivo", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' es un nombre de archivo inválido.", "File name cannot be empty." => "El nombre de archivo no puede estar vacío.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nombre Invalido, \"\\\", \"/\", \"<\", \">\", \":\", \"\", \"|\" \"?\" y \"*\" no están permitidos ", -"generating ZIP-file, it may take some time." => "generando un fichero ZIP, puede llevar un tiempo.", +"Your download is being prepared. This might take some time if the files are big." => "Tu descarga esta siendo preparada. Esto puede tardar algun tiempo si los archivos son muy grandes.", "Unable to upload your file as it is a directory or has 0 bytes" => "No ha sido posible subir tu archivo porque es un directorio o tiene 0 bytes", "Upload Error" => "Error al subir el archivo", "Close" => "cerrrar", @@ -38,6 +39,7 @@ "Upload cancelled." => "Subida cancelada.", "File upload is in progress. Leaving the page now will cancel the upload." => "La subida del archivo está en proceso. Salir de la página ahora cancelará la subida.", "URL cannot be empty." => "La URL no puede estar vacía.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nombre de carpeta invalido. El uso de \"Shared\" esta reservado para Owncloud", "{count} files scanned" => "{count} archivos escaneados", "error while scanning" => "error escaneando", "Name" => "Nombre", @@ -59,7 +61,6 @@ "Text file" => "Archivo de texto", "Folder" => "Carpeta", "From link" => "Desde el enlace", -"Upload" => "Subir", "Cancel upload" => "Cancelar subida", "Nothing in here. Upload something!" => "Aquí no hay nada. ¡Sube algo!", "Download" => "Descargar", diff --git a/apps/files/l10n/es_AR.php b/apps/files/l10n/es_AR.php index 650a3149e4..418844007b 100644 --- a/apps/files/l10n/es_AR.php +++ b/apps/files/l10n/es_AR.php @@ -1,4 +1,5 @@ "Subir", "Could not move %s - File with this name already exists" => "No se pudo mover %s - Un archivo con este nombre ya existe", "Could not move %s" => "No se pudo mover %s ", "Unable to rename file" => "No fue posible cambiar el nombre al archivo", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' es un nombre de archivo inválido.", "File name cannot be empty." => "El nombre del archivo no puede quedar vacío.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nombre invalido, '\\', '/', '<', '>', ':', '\"', '|', '?' y '*' no están permitidos.", -"generating ZIP-file, it may take some time." => "generando un archivo ZIP, puede llevar un tiempo.", +"Your download is being prepared. This might take some time if the files are big." => "Tu descarga esta siendo preparada. Esto puede tardar algun tiempo si los archivos son muy grandes.", "Unable to upload your file as it is a directory or has 0 bytes" => "No fue posible subir el archivo porque es un directorio o porque su tamaño es 0 bytes", "Upload Error" => "Error al subir el archivo", "Close" => "Cerrar", @@ -60,7 +61,6 @@ "Text file" => "Archivo de texto", "Folder" => "Carpeta", "From link" => "Desde enlace", -"Upload" => "Subir", "Cancel upload" => "Cancelar subida", "Nothing in here. Upload something!" => "No hay nada. ¡Subí contenido!", "Download" => "Descargar", diff --git a/apps/files/l10n/et_EE.php b/apps/files/l10n/et_EE.php index 6996b0a791..8305cf0ede 100644 --- a/apps/files/l10n/et_EE.php +++ b/apps/files/l10n/et_EE.php @@ -1,4 +1,5 @@ "Lae üles", "No file was uploaded. Unknown error" => "Ühtegi faili ei laetud üles. Tundmatu viga", "There is no error, the file uploaded with success" => "Ühtegi viga pole, fail on üles laetud", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Üles laetud faili suurus ületab HTML vormis määratud upload_max_filesize suuruse", @@ -20,7 +21,6 @@ "unshared {files}" => "jagamata {files}", "deleted {files}" => "kustutatud {files}", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Vigane nimi, '\\', '/', '<', '>', ':', '\"', '|', '?' ja '*' pole lubatud.", -"generating ZIP-file, it may take some time." => "ZIP-faili loomine, see võib veidi aega võtta.", "Unable to upload your file as it is a directory or has 0 bytes" => "Sinu faili üleslaadimine ebaõnnestus, kuna see on kaust või selle suurus on 0 baiti", "Upload Error" => "Üleslaadimise viga", "Close" => "Sulge", @@ -51,7 +51,6 @@ "Text file" => "Tekstifail", "Folder" => "Kaust", "From link" => "Allikast", -"Upload" => "Lae üles", "Cancel upload" => "Tühista üleslaadimine", "Nothing in here. Upload something!" => "Siin pole midagi. Lae midagi üles!", "Download" => "Lae alla", diff --git a/apps/files/l10n/eu.php b/apps/files/l10n/eu.php index 96f59a668e..a1cb563212 100644 --- a/apps/files/l10n/eu.php +++ b/apps/files/l10n/eu.php @@ -1,4 +1,8 @@ "Igo", +"Could not move %s - File with this name already exists" => "Ezin da %s mugitu - Izen hau duen fitxategia dagoeneko existitzen da", +"Could not move %s" => "Ezin dira fitxategiak mugitu %s", +"Unable to rename file" => "Ezin izan da fitxategia berrizendatu", "No file was uploaded. Unknown error" => "Ez da fitxategirik igo. Errore ezezaguna", "There is no error, the file uploaded with success" => "Ez da arazorik izan, fitxategia ongi igo da", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Igotako fitxategiak php.ini fitxategian ezarritako upload_max_filesize muga gainditu du:", @@ -7,6 +11,8 @@ "No file was uploaded" => "Ez da fitxategirik igo", "Missing a temporary folder" => "Aldi baterako karpeta falta da", "Failed to write to disk" => "Errore bat izan da diskoan idazterakoan", +"Not enough space available" => "Ez dago leku nahikorik.", +"Invalid directory." => "Baliogabeko karpeta.", "Files" => "Fitxategiak", "Unshare" => "Ez elkarbanatu", "Delete" => "Ezabatu", @@ -20,8 +26,9 @@ "replaced {new_name} with {old_name}" => " {new_name}-k {old_name} ordezkatu du", "unshared {files}" => "elkarbanaketa utzita {files}", "deleted {files}" => "ezabatuta {files}", +"'.' is an invalid file name." => "'.' ez da fitxategi izen baliogarria.", +"File name cannot be empty." => "Fitxategi izena ezin da hutsa izan.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "IZen aliogabea, '\\', '/', '<', '>', ':', '\"', '|', '?' eta '*' ez daude baimenduta.", -"generating ZIP-file, it may take some time." => "ZIP-fitxategia sortzen ari da, denbora har dezake", "Unable to upload your file as it is a directory or has 0 bytes" => "Ezin da zure fitxategia igo, karpeta bat da edo 0 byt ditu", "Upload Error" => "Igotzean errore bat suertatu da", "Close" => "Itxi", @@ -31,6 +38,7 @@ "Upload cancelled." => "Igoera ezeztatuta", "File upload is in progress. Leaving the page now will cancel the upload." => "Fitxategien igoera martxan da. Orria orain uzteak igoera ezeztatutko du.", "URL cannot be empty." => "URLa ezin da hutsik egon.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Baliogabeako karpeta izena. 'Shared' izena Owncloudek erreserbatzen du", "{count} files scanned" => "{count} fitxategi eskaneatuta", "error while scanning" => "errore bat egon da eskaneatzen zen bitartean", "Name" => "Izena", @@ -52,7 +60,6 @@ "Text file" => "Testu fitxategia", "Folder" => "Karpeta", "From link" => "Estekatik", -"Upload" => "Igo", "Cancel upload" => "Ezeztatu igoera", "Nothing in here. Upload something!" => "Ez dago ezer. Igo zerbait!", "Download" => "Deskargatu", diff --git a/apps/files/l10n/fa.php b/apps/files/l10n/fa.php index 062df6a56b..ec8b5cdec4 100644 --- a/apps/files/l10n/fa.php +++ b/apps/files/l10n/fa.php @@ -1,4 +1,5 @@ "بارگذاری", "No file was uploaded. Unknown error" => "هیچ فایلی آپلود نشد.خطای ناشناس", "There is no error, the file uploaded with success" => "هیچ خطایی وجود ندارد فایل با موفقیت بار گذاری شد", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "حداکثر حجم مجاز برای بارگذاری از طریق HTML \nMAX_FILE_SIZE", @@ -7,12 +8,12 @@ "Missing a temporary folder" => "یک پوشه موقت گم شده است", "Failed to write to disk" => "نوشتن بر روی دیسک سخت ناموفق بود", "Files" => "فایل ها", +"Unshare" => "لغو اشتراک", "Delete" => "پاک کردن", "Rename" => "تغییرنام", "replace" => "جایگزین", "cancel" => "لغو", "undo" => "بازگشت", -"generating ZIP-file, it may take some time." => "در حال ساخت فایل فشرده ممکن است زمان زیادی به طول بیانجامد", "Unable to upload your file as it is a directory or has 0 bytes" => "ناتوان در بارگذاری یا فایل یک پوشه است یا 0بایت دارد", "Upload Error" => "خطا در بار گذاری", "Close" => "بستن", @@ -32,7 +33,6 @@ "New" => "جدید", "Text file" => "فایل متنی", "Folder" => "پوشه", -"Upload" => "بارگذاری", "Cancel upload" => "متوقف کردن بار گذاری", "Nothing in here. Upload something!" => "اینجا هیچ چیز نیست.", "Download" => "بارگیری", diff --git a/apps/files/l10n/fi_FI.php b/apps/files/l10n/fi_FI.php index e7e4b04437..fac93b1246 100644 --- a/apps/files/l10n/fi_FI.php +++ b/apps/files/l10n/fi_FI.php @@ -1,4 +1,5 @@ "Lähetä", "Could not move %s - File with this name already exists" => "Kohteen %s siirto ei onnistunut - Tiedosto samalla nimellä on jo olemassa", "Could not move %s" => "Kohteen %s siirto ei onnistunut", "Unable to rename file" => "Tiedoston nimeäminen uudelleen ei onnistunut", @@ -23,7 +24,7 @@ "'.' is an invalid file name." => "'.' on virheellinen nimi tiedostolle.", "File name cannot be empty." => "Tiedoston nimi ei voi olla tyhjä.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Virheellinen nimi, merkit '\\', '/', '<', '>', ':', '\"', '|', '?' ja '*' eivät ole sallittuja.", -"generating ZIP-file, it may take some time." => "luodaan ZIP-tiedostoa, tämä saattaa kestää hetken.", +"Your download is being prepared. This might take some time if the files are big." => "Lataustasi valmistellaan. Tämä saattaa kestää hetken, jos tiedostot ovat suuria kooltaan.", "Unable to upload your file as it is a directory or has 0 bytes" => "Tiedoston lähetys epäonnistui, koska sen koko on 0 tavua tai kyseessä on kansio", "Upload Error" => "Lähetysvirhe.", "Close" => "Sulje", @@ -50,7 +51,6 @@ "Text file" => "Tekstitiedosto", "Folder" => "Kansio", "From link" => "Linkistä", -"Upload" => "Lähetä", "Cancel upload" => "Peru lähetys", "Nothing in here. Upload something!" => "Täällä ei ole mitään. Lähetä tänne jotakin!", "Download" => "Lataa", diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php index f14759ff8f..2e4ae63820 100644 --- a/apps/files/l10n/fr.php +++ b/apps/files/l10n/fr.php @@ -1,4 +1,5 @@ "Envoyer", "Could not move %s - File with this name already exists" => "Impossible de déplacer %s - Un fichier possédant ce nom existe déjà", "Could not move %s" => "Impossible de déplacer %s", "Unable to rename file" => "Impossible de renommer le fichier", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' n'est pas un nom de fichier valide.", "File name cannot be empty." => "Le nom de fichier ne peut être vide.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nom invalide, les caractères '\\', '/', '<', '>', ':', '\"', '|', '?' et '*' ne sont pas autorisés.", -"generating ZIP-file, it may take some time." => "Fichier ZIP en cours d'assemblage ; cela peut prendre du temps.", +"Your download is being prepared. This might take some time if the files are big." => "Votre téléchargement est cours de préparation. Ceci peut nécessiter un certain temps si les fichiers sont volumineux.", "Unable to upload your file as it is a directory or has 0 bytes" => "Impossible de charger vos fichiers car il s'agit d'un dossier ou le fichier fait 0 octet.", "Upload Error" => "Erreur de chargement", "Close" => "Fermer", @@ -60,7 +61,6 @@ "Text file" => "Fichier texte", "Folder" => "Dossier", "From link" => "Depuis le lien", -"Upload" => "Envoyer", "Cancel upload" => "Annuler l'envoi", "Nothing in here. Upload something!" => "Il n'y a rien ici ! Envoyez donc quelque chose :)", "Download" => "Télécharger", diff --git a/apps/files/l10n/gl.php b/apps/files/l10n/gl.php index c15066163c..d24680eaa8 100644 --- a/apps/files/l10n/gl.php +++ b/apps/files/l10n/gl.php @@ -1,4 +1,5 @@ "Enviar", "Could not move %s - File with this name already exists" => "Non se moveu %s - Xa existe un ficheiro con ese nome.", "Could not move %s" => "Non se puido mover %s", "Unable to rename file" => "Non se pode renomear o ficheiro", @@ -28,7 +29,6 @@ "'.' is an invalid file name." => "'.' é un nonme de ficheiro non válido", "File name cannot be empty." => "O nome de ficheiro non pode estar baldeiro", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome non válido, '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' non se permiten.", -"generating ZIP-file, it may take some time." => "xerando un ficheiro ZIP, o que pode levar un anaco.", "Unable to upload your file as it is a directory or has 0 bytes" => "Non se puido subir o ficheiro pois ou é un directorio ou ten 0 bytes", "Upload Error" => "Erro na subida", "Close" => "Pechar", @@ -60,7 +60,6 @@ "Text file" => "Ficheiro de texto", "Folder" => "Cartafol", "From link" => "Dende a ligazón", -"Upload" => "Enviar", "Cancel upload" => "Cancelar a subida", "Nothing in here. Upload something!" => "Nada por aquí. Envía algo.", "Download" => "Descargar", diff --git a/apps/files/l10n/he.php b/apps/files/l10n/he.php index bac9a8a6a5..8acc544cf5 100644 --- a/apps/files/l10n/he.php +++ b/apps/files/l10n/he.php @@ -1,4 +1,5 @@ "העלאה", "No file was uploaded. Unknown error" => "לא הועלה קובץ. טעות בלתי מזוהה.", "There is no error, the file uploaded with success" => "לא אירעה תקלה, הקבצים הועלו בהצלחה", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "הקבצים שנשלחו חורגים מהגודל שצוין בהגדרה upload_max_filesize שבקובץ php.ini:", @@ -21,7 +22,6 @@ "unshared {files}" => "בוטל שיתופם של {files}", "deleted {files}" => "{files} נמחקו", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "השם שגוי, אסור להשתמש בתווים '\\', '/', '<', '>', ':', '\"', '|', '?' ו־'*'.", -"generating ZIP-file, it may take some time." => "יוצר קובץ ZIP, אנא המתן.", "Unable to upload your file as it is a directory or has 0 bytes" => "לא יכול להעלות את הקובץ מכיוון שזו תקיה או שמשקל הקובץ 0 בתים", "Upload Error" => "שגיאת העלאה", "Close" => "סגירה", @@ -52,7 +52,6 @@ "Text file" => "קובץ טקסט", "Folder" => "תיקייה", "From link" => "מקישור", -"Upload" => "העלאה", "Cancel upload" => "ביטול ההעלאה", "Nothing in here. Upload something!" => "אין כאן שום דבר. אולי ברצונך להעלות משהו?", "Download" => "הורדה", diff --git a/apps/files/l10n/hr.php b/apps/files/l10n/hr.php index 4db4ac3f3e..a9a7354d1d 100644 --- a/apps/files/l10n/hr.php +++ b/apps/files/l10n/hr.php @@ -1,4 +1,5 @@ "Pošalji", "There is no error, the file uploaded with success" => "Datoteka je poslana uspješno i bez pogrešaka", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Poslana datoteka izlazi iz okvira MAX_FILE_SIZE direktive postavljene u HTML obrascu", "The uploaded file was only partially uploaded" => "Datoteka je poslana samo djelomično", @@ -13,7 +14,6 @@ "suggest name" => "predloži ime", "cancel" => "odustani", "undo" => "vrati", -"generating ZIP-file, it may take some time." => "generiranje ZIP datoteke, ovo može potrajati.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nemoguće poslati datoteku jer je prazna ili je direktorij", "Upload Error" => "Pogreška pri slanju", "Close" => "Zatvori", @@ -36,7 +36,6 @@ "New" => "novo", "Text file" => "tekstualna datoteka", "Folder" => "mapa", -"Upload" => "Pošalji", "Cancel upload" => "Prekini upload", "Nothing in here. Upload something!" => "Nema ničega u ovoj mapi. Pošalji nešto!", "Download" => "Preuzmi", diff --git a/apps/files/l10n/hu_HU.php b/apps/files/l10n/hu_HU.php index b0d46ee7a2..21797809b6 100644 --- a/apps/files/l10n/hu_HU.php +++ b/apps/files/l10n/hu_HU.php @@ -1,4 +1,8 @@ "Feltöltés", +"Could not move %s - File with this name already exists" => "%s áthelyezése nem sikerült - már létezik másik fájl ezzel a névvel", +"Could not move %s" => "Nem sikerült %s áthelyezése", +"Unable to rename file" => "Nem lehet átnevezni a fájlt", "No file was uploaded. Unknown error" => "Nem történt feltöltés. Ismeretlen hiba", "There is no error, the file uploaded with success" => "A fájlt sikerült feltölteni", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "A feltöltött fájl mérete meghaladja a php.ini állományban megadott upload_max_filesize paraméter értékét.", @@ -25,7 +29,7 @@ "'.' is an invalid file name." => "'.' fájlnév érvénytelen.", "File name cannot be empty." => "A fájlnév nem lehet semmi.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Érvénytelen elnevezés. Ezek a karakterek nem használhatók: '\\', '/', '<', '>', ':', '\"', '|', '?' és '*'", -"generating ZIP-file, it may take some time." => "ZIP-fájl generálása, ez eltarthat egy ideig.", +"Your download is being prepared. This might take some time if the files are big." => "Készül a letöltendő állomány. Ez eltarthat egy ideig, ha nagyok a fájlok.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nem tölthető fel, mert mappa volt, vagy 0 byte méretű", "Upload Error" => "Feltöltési hiba", "Close" => "Bezárás", @@ -35,6 +39,7 @@ "Upload cancelled." => "A feltöltést megszakítottuk.", "File upload is in progress. Leaving the page now will cancel the upload." => "Fájlfeltöltés van folyamatban. Az oldal elhagyása megszakítja a feltöltést.", "URL cannot be empty." => "Az URL nem lehet semmi.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Érvénytelen mappanév. A név használata csak a Owncloud számára lehetséges.", "{count} files scanned" => "{count} fájlt találtunk", "error while scanning" => "Hiba a fájllista-ellenőrzés során", "Name" => "Név", @@ -56,7 +61,6 @@ "Text file" => "Szövegfájl", "Folder" => "Mappa", "From link" => "Feltöltés linkről", -"Upload" => "Feltöltés", "Cancel upload" => "A feltöltés megszakítása", "Nothing in here. Upload something!" => "Itt nincs semmi. Töltsön fel valamit!", "Download" => "Letöltés", diff --git a/apps/files/l10n/ia.php b/apps/files/l10n/ia.php index ada64cd757..a7babb27d9 100644 --- a/apps/files/l10n/ia.php +++ b/apps/files/l10n/ia.php @@ -1,4 +1,5 @@ "Incargar", "The uploaded file was only partially uploaded" => "Le file incargate solmente esseva incargate partialmente", "No file was uploaded" => "Nulle file esseva incargate", "Missing a temporary folder" => "Manca un dossier temporari", @@ -13,7 +14,6 @@ "New" => "Nove", "Text file" => "File de texto", "Folder" => "Dossier", -"Upload" => "Incargar", "Nothing in here. Upload something!" => "Nihil hic. Incarga alcun cosa!", "Download" => "Discargar", "Upload too large" => "Incargamento troppo longe" diff --git a/apps/files/l10n/id.php b/apps/files/l10n/id.php index 5d934e97e7..46d9ad1a75 100644 --- a/apps/files/l10n/id.php +++ b/apps/files/l10n/id.php @@ -1,4 +1,5 @@ "Unggah", "There is no error, the file uploaded with success" => "Tidak ada galat, berkas sukses diunggah", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "File yang diunggah melampaui directive MAX_FILE_SIZE yang disebutan dalam form HTML.", "The uploaded file was only partially uploaded" => "Berkas hanya diunggah sebagian", @@ -11,7 +12,6 @@ "replace" => "mengganti", "cancel" => "batalkan", "undo" => "batal dikerjakan", -"generating ZIP-file, it may take some time." => "membuat berkas ZIP, ini mungkin memakan waktu.", "Unable to upload your file as it is a directory or has 0 bytes" => "Gagal mengunggah berkas anda karena berupa direktori atau mempunyai ukuran 0 byte", "Upload Error" => "Terjadi Galat Pengunggahan", "Close" => "tutup", @@ -32,7 +32,6 @@ "New" => "Baru", "Text file" => "Berkas teks", "Folder" => "Folder", -"Upload" => "Unggah", "Cancel upload" => "Batal mengunggah", "Nothing in here. Upload something!" => "Tidak ada apa-apa di sini. Unggah sesuatu!", "Download" => "Unduh", diff --git a/apps/files/l10n/is.php b/apps/files/l10n/is.php index 2eff686611..c3adf0984e 100644 --- a/apps/files/l10n/is.php +++ b/apps/files/l10n/is.php @@ -1,4 +1,5 @@ "Senda inn", "Could not move %s - File with this name already exists" => "Gat ekki fært %s - Skrá með þessu nafni er þegar til", "Could not move %s" => "Gat ekki fært %s", "Unable to rename file" => "Gat ekki endurskýrt skrá", @@ -28,7 +29,6 @@ "'.' is an invalid file name." => "'.' er ekki leyfilegt nafn.", "File name cannot be empty." => "Nafn skráar má ekki vera tómt", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ógilt nafn, táknin '\\', '/', '<', '>', ':', '\"', '|', '?' og '*' eru ekki leyfð.", -"generating ZIP-file, it may take some time." => "bý til ZIP skrá, það gæti tekið smá stund.", "Unable to upload your file as it is a directory or has 0 bytes" => "Innsending á skrá mistókst, hugsanlega sendir þú möppu eða skráin er 0 bæti.", "Upload Error" => "Villa við innsendingu", "Close" => "Loka", @@ -60,7 +60,6 @@ "Text file" => "Texta skrá", "Folder" => "Mappa", "From link" => "Af tengli", -"Upload" => "Senda inn", "Cancel upload" => "Hætta við innsendingu", "Nothing in here. Upload something!" => "Ekkert hér. Settu eitthvað inn!", "Download" => "Niðurhal", diff --git a/apps/files/l10n/it.php b/apps/files/l10n/it.php index a54e424694..9e211ae21a 100644 --- a/apps/files/l10n/it.php +++ b/apps/files/l10n/it.php @@ -1,4 +1,5 @@ "Carica", "Could not move %s - File with this name already exists" => "Impossibile spostare %s - un file con questo nome esiste già", "Could not move %s" => "Impossibile spostare %s", "Unable to rename file" => "Impossibile rinominare il file", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' non è un nome file valido.", "File name cannot be empty." => "Il nome del file non può essere vuoto.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome non valido, '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' non sono consentiti.", -"generating ZIP-file, it may take some time." => "creazione file ZIP, potrebbe richiedere del tempo.", +"Your download is being prepared. This might take some time if the files are big." => "Il tuo scaricamento è in fase di preparazione. Ciò potrebbe richiedere del tempo se i file sono grandi.", "Unable to upload your file as it is a directory or has 0 bytes" => "Impossibile inviare il file poiché è una cartella o ha dimensione 0 byte", "Upload Error" => "Errore di invio", "Close" => "Chiudi", @@ -60,7 +61,6 @@ "Text file" => "File di testo", "Folder" => "Cartella", "From link" => "Da collegamento", -"Upload" => "Carica", "Cancel upload" => "Annulla invio", "Nothing in here. Upload something!" => "Non c'è niente qui. Carica qualcosa!", "Download" => "Scarica", diff --git a/apps/files/l10n/ja_JP.php b/apps/files/l10n/ja_JP.php index 4621cc5d4e..548263f54a 100644 --- a/apps/files/l10n/ja_JP.php +++ b/apps/files/l10n/ja_JP.php @@ -1,4 +1,5 @@ "アップロード", "Could not move %s - File with this name already exists" => "%s を移動できませんでした ― この名前のファイルはすでに存在します", "Could not move %s" => "%s を移動できませんでした", "Unable to rename file" => "ファイル名の変更ができません", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' は無効なファイル名です。", "File name cannot be empty." => "ファイル名を空にすることはできません。", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "無効な名前、'\\', '/', '<', '>', ':', '\"', '|', '?', '*' は使用できません。", -"generating ZIP-file, it may take some time." => "ZIPファイルを生成中です、しばらくお待ちください。", +"Your download is being prepared. This might take some time if the files are big." => "ダウンロードの準備中です。ファイルサイズが大きい場合は少し時間がかかるかもしれません。", "Unable to upload your file as it is a directory or has 0 bytes" => "ディレクトリもしくは0バイトのファイルはアップロードできません", "Upload Error" => "アップロードエラー", "Close" => "閉じる", @@ -60,7 +61,6 @@ "Text file" => "テキストファイル", "Folder" => "フォルダ", "From link" => "リンク", -"Upload" => "アップロード", "Cancel upload" => "アップロードをキャンセル", "Nothing in here. Upload something!" => "ここには何もありません。何かアップロードしてください。", "Download" => "ダウンロード", diff --git a/apps/files/l10n/ka_GE.php b/apps/files/l10n/ka_GE.php index 9a73abfbe3..3f5a532f6b 100644 --- a/apps/files/l10n/ka_GE.php +++ b/apps/files/l10n/ka_GE.php @@ -1,4 +1,5 @@ "ატვირთვა", "There is no error, the file uploaded with success" => "ჭოცდომა არ დაფიქსირდა, ფაილი წარმატებით აიტვირთა", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "ატვირთული ფაილი აჭარბებს MAX_FILE_SIZE დირექტივას, რომელიც მითითებულია HTML ფორმაში", "The uploaded file was only partially uploaded" => "ატვირთული ფაილი მხოლოდ ნაწილობრივ აიტვირთა", @@ -18,7 +19,6 @@ "replaced {new_name} with {old_name}" => "{new_name} შეცვლილია {old_name}–ით", "unshared {files}" => "გაზიარება მოხსნილი {files}", "deleted {files}" => "წაშლილი {files}", -"generating ZIP-file, it may take some time." => "ZIP-ფაილის გენერირება, ამას ჭირდება გარკვეული დრო.", "Unable to upload your file as it is a directory or has 0 bytes" => "თქვენი ფაილის ატვირთვა ვერ მოხერხდა. ის არის საქაღალდე და შეიცავს 0 ბაიტს", "Upload Error" => "შეცდომა ატვირთვისას", "Close" => "დახურვა", @@ -47,7 +47,6 @@ "New" => "ახალი", "Text file" => "ტექსტური ფაილი", "Folder" => "საქაღალდე", -"Upload" => "ატვირთვა", "Cancel upload" => "ატვირთვის გაუქმება", "Nothing in here. Upload something!" => "აქ არაფერი არ არის. ატვირთე რამე!", "Download" => "ჩამოტვირთვა", diff --git a/apps/files/l10n/ko.php b/apps/files/l10n/ko.php index 928b7cbb7e..891b036761 100644 --- a/apps/files/l10n/ko.php +++ b/apps/files/l10n/ko.php @@ -1,4 +1,5 @@ "업로드", "Could not move %s - File with this name already exists" => "%s 항목을 이동시키지 못하였음 - 파일 이름이 이미 존재함", "Could not move %s" => "%s 항목을 이딩시키지 못하였음", "Unable to rename file" => "파일 이름바꾸기 할 수 없음", @@ -28,7 +29,6 @@ "'.' is an invalid file name." => "'.' 는 올바르지 않은 파일 이름 입니다.", "File name cannot be empty." => "파일이름은 공란이 될 수 없습니다.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "폴더 이름이 올바르지 않습니다. 이름에 문자 '\\', '/', '<', '>', ':', '\"', '|', '? ', '*'는 사용할 수 없습니다.", -"generating ZIP-file, it may take some time." => "ZIP 파일을 생성하고 있습니다. 시간이 걸릴 수도 있습니다.", "Unable to upload your file as it is a directory or has 0 bytes" => "이 파일은 디렉터리이거나 비어 있기 때문에 업로드할 수 없습니다", "Upload Error" => "업로드 오류", "Close" => "닫기", @@ -60,7 +60,6 @@ "Text file" => "텍스트 파일", "Folder" => "폴더", "From link" => "링크에서", -"Upload" => "업로드", "Cancel upload" => "업로드 취소", "Nothing in here. Upload something!" => "내용이 없습니다. 업로드할 수 있습니다!", "Download" => "다운로드", diff --git a/apps/files/l10n/ku_IQ.php b/apps/files/l10n/ku_IQ.php index d6cf645079..ddd2c14278 100644 --- a/apps/files/l10n/ku_IQ.php +++ b/apps/files/l10n/ku_IQ.php @@ -1,9 +1,9 @@ "بارکردن", "Close" => "داخستن", "URL cannot be empty." => "ناونیشانی به‌سته‌ر نابێت به‌تاڵ بێت.", "Name" => "ناو", "Save" => "پاشکه‌وتکردن", "Folder" => "بوخچه", -"Upload" => "بارکردن", "Download" => "داگرتن" ); diff --git a/apps/files/l10n/lb.php b/apps/files/l10n/lb.php index 229ec3f202..b041079f0d 100644 --- a/apps/files/l10n/lb.php +++ b/apps/files/l10n/lb.php @@ -1,4 +1,5 @@ "Eroplueden", "There is no error, the file uploaded with success" => "Keen Feeler, Datei ass komplett ropgelueden ginn", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Déi ropgelueden Datei ass méi grouss wei d'MAX_FILE_SIZE Eegenschaft déi an der HTML form uginn ass", "The uploaded file was only partially uploaded" => "Déi ropgelueden Datei ass nëmmen hallef ropgelueden ginn", @@ -10,7 +11,6 @@ "replace" => "ersetzen", "cancel" => "ofbriechen", "undo" => "réckgängeg man", -"generating ZIP-file, it may take some time." => "Et gëtt eng ZIP-File generéiert, dëst ka bëssen daueren.", "Unable to upload your file as it is a directory or has 0 bytes" => "Kann deng Datei net eroplueden well et en Dossier ass oder 0 byte grouss ass.", "Upload Error" => "Fehler beim eroplueden", "Close" => "Zoumaachen", @@ -30,7 +30,6 @@ "New" => "Nei", "Text file" => "Text Fichier", "Folder" => "Dossier", -"Upload" => "Eroplueden", "Cancel upload" => "Upload ofbriechen", "Nothing in here. Upload something!" => "Hei ass näischt. Lued eppes rop!", "Download" => "Eroflueden", diff --git a/apps/files/l10n/lt_LT.php b/apps/files/l10n/lt_LT.php index fd9824e0c1..22490f8e9f 100644 --- a/apps/files/l10n/lt_LT.php +++ b/apps/files/l10n/lt_LT.php @@ -1,4 +1,5 @@ "Įkelti", "There is no error, the file uploaded with success" => "Klaidų nėra, failas įkeltas sėkmingai", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Įkeliamo failo dydis viršija MAX_FILE_SIZE parametrą, kuris yra nustatytas HTML formoje", "The uploaded file was only partially uploaded" => "Failas buvo įkeltas tik dalinai", @@ -18,7 +19,6 @@ "replaced {new_name} with {old_name}" => "pakeiskite {new_name} į {old_name}", "unshared {files}" => "nebesidalinti {files}", "deleted {files}" => "ištrinti {files}", -"generating ZIP-file, it may take some time." => "kuriamas ZIP archyvas, tai gali užtrukti šiek tiek laiko.", "Unable to upload your file as it is a directory or has 0 bytes" => "Neįmanoma įkelti failo - jo dydis gali būti 0 bitų arba tai katalogas", "Upload Error" => "Įkėlimo klaida", "Close" => "Užverti", @@ -47,7 +47,6 @@ "New" => "Naujas", "Text file" => "Teksto failas", "Folder" => "Katalogas", -"Upload" => "Įkelti", "Cancel upload" => "Atšaukti siuntimą", "Nothing in here. Upload something!" => "Čia tuščia. Įkelkite ką nors!", "Download" => "Atsisiųsti", diff --git a/apps/files/l10n/lv.php b/apps/files/l10n/lv.php index 3336798491..589b7020c4 100644 --- a/apps/files/l10n/lv.php +++ b/apps/files/l10n/lv.php @@ -1,4 +1,5 @@ "Augšuplādet", "There is no error, the file uploaded with success" => "Viss kārtībā, augšupielāde veiksmīga", "No file was uploaded" => "Neviens fails netika augšuplādēts", "Missing a temporary folder" => "Trūkst pagaidu mapes", @@ -11,7 +12,6 @@ "suggest name" => "Ieteiktais nosaukums", "cancel" => "atcelt", "undo" => "vienu soli atpakaļ", -"generating ZIP-file, it may take some time." => "lai uzģenerētu ZIP failu, kāds brīdis ir jāpagaida", "Unable to upload your file as it is a directory or has 0 bytes" => "Nav iespējams augšuplādēt jūsu failu, jo tāds jau eksistē vai arī failam nav izmēra (0 baiti)", "Upload Error" => "Augšuplādēšanas laikā radās kļūda", "Pending" => "Gaida savu kārtu", @@ -30,7 +30,6 @@ "New" => "Jauns", "Text file" => "Teksta fails", "Folder" => "Mape", -"Upload" => "Augšuplādet", "Cancel upload" => "Atcelt augšuplādi", "Nothing in here. Upload something!" => "Te vēl nekas nav. Rīkojies, sāc augšuplādēt", "Download" => "Lejuplādēt", diff --git a/apps/files/l10n/mk.php b/apps/files/l10n/mk.php index 3f48a69874..2916e86a94 100644 --- a/apps/files/l10n/mk.php +++ b/apps/files/l10n/mk.php @@ -1,4 +1,5 @@ "Подигни", "No file was uploaded. Unknown error" => "Ниту еден фајл не се вчита. Непозната грешка", "There is no error, the file uploaded with success" => "Нема грешка, датотеката беше подигната успешно", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Подигнатата датотека ја надминува upload_max_filesize директивата во php.ini:", @@ -21,7 +22,6 @@ "unshared {files}" => "без споделување {files}", "deleted {files}" => "избришани {files}", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Неправилно име. , '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' не се дозволени.", -"generating ZIP-file, it may take some time." => "Се генерира ZIP фајлот, ќе треба извесно време.", "Unable to upload your file as it is a directory or has 0 bytes" => "Не може да се преземе вашата датотека бидејќи фолдерот во кој се наоѓа фајлот има големина од 0 бајти", "Upload Error" => "Грешка при преземање", "Close" => "Затвои", @@ -52,7 +52,6 @@ "Text file" => "Текстуална датотека", "Folder" => "Папка", "From link" => "Од врска", -"Upload" => "Подигни", "Cancel upload" => "Откажи прикачување", "Nothing in here. Upload something!" => "Тука нема ништо. Снимете нешто!", "Download" => "Преземи", diff --git a/apps/files/l10n/ms_MY.php b/apps/files/l10n/ms_MY.php index 7fa8784084..23a2783cd9 100644 --- a/apps/files/l10n/ms_MY.php +++ b/apps/files/l10n/ms_MY.php @@ -1,4 +1,5 @@ "Muat naik", "No file was uploaded. Unknown error" => "Tiada fail dimuatnaik. Ralat tidak diketahui.", "There is no error, the file uploaded with success" => "Tiada ralat, fail berjaya dimuat naik.", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Fail yang dimuat naik melebihi MAX_FILE_SIZE yang dinyatakan dalam form HTML ", @@ -10,7 +11,6 @@ "Delete" => "Padam", "replace" => "ganti", "cancel" => "Batal", -"generating ZIP-file, it may take some time." => "sedang menghasilkan fail ZIP, mungkin mengambil sedikit masa.", "Unable to upload your file as it is a directory or has 0 bytes" => "Tidak boleh memuatnaik fail anda kerana mungkin ianya direktori atau saiz fail 0 bytes", "Upload Error" => "Muat naik ralat", "Close" => "Tutup", @@ -30,7 +30,6 @@ "New" => "Baru", "Text file" => "Fail teks", "Folder" => "Folder", -"Upload" => "Muat naik", "Cancel upload" => "Batal muat naik", "Nothing in here. Upload something!" => "Tiada apa-apa di sini. Muat naik sesuatu!", "Download" => "Muat turun", diff --git a/apps/files/l10n/nb_NO.php b/apps/files/l10n/nb_NO.php index 9be868164b..48b873e1ef 100644 --- a/apps/files/l10n/nb_NO.php +++ b/apps/files/l10n/nb_NO.php @@ -1,4 +1,5 @@ "Last opp", "No file was uploaded. Unknown error" => "Ingen filer ble lastet opp. Ukjent feil.", "There is no error, the file uploaded with success" => "Det er ingen feil. Filen ble lastet opp.", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Filstørrelsen overskrider maksgrensen på MAX_FILE_SIZE som ble oppgitt i HTML-skjemaet", @@ -19,7 +20,6 @@ "replaced {new_name} with {old_name}" => "erstatt {new_name} med {old_name}", "deleted {files}" => "slettet {files}", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ugyldig navn, '\\', '/', '<', '>', ':', '\"', '|', '?' og '*' er ikke tillatt.", -"generating ZIP-file, it may take some time." => "opprettet ZIP-fil, dette kan ta litt tid", "Unable to upload your file as it is a directory or has 0 bytes" => "Kan ikke laste opp filen din siden det er en mappe eller den har 0 bytes", "Upload Error" => "Opplasting feilet", "Close" => "Lukk", @@ -50,7 +50,6 @@ "Text file" => "Tekstfil", "Folder" => "Mappe", "From link" => "Fra link", -"Upload" => "Last opp", "Cancel upload" => "Avbryt opplasting", "Nothing in here. Upload something!" => "Ingenting her. Last opp noe!", "Download" => "Last ned", diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php index 48c4ac74c2..4a9685e06c 100644 --- a/apps/files/l10n/nl.php +++ b/apps/files/l10n/nl.php @@ -1,4 +1,5 @@ "Upload", "Could not move %s - File with this name already exists" => "Kon %s niet verplaatsen - Er bestaat al een bestand met deze naam", "Could not move %s" => "Kon %s niet verplaatsen", "Unable to rename file" => "Kan bestand niet hernoemen", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' is een ongeldige bestandsnaam.", "File name cannot be empty." => "Bestandsnaam kan niet leeg zijn.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Onjuiste naam; '\\', '/', '<', '>', ':', '\"', '|', '?' en '*' zijn niet toegestaan.", -"generating ZIP-file, it may take some time." => "aanmaken ZIP-file, dit kan enige tijd duren.", +"Your download is being prepared. This might take some time if the files are big." => "Uw download wordt voorbereid. Dit kan enige tijd duren bij grote bestanden.", "Unable to upload your file as it is a directory or has 0 bytes" => "uploaden van de file mislukt, het is of een directory of de bestandsgrootte is 0 bytes", "Upload Error" => "Upload Fout", "Close" => "Sluit", @@ -60,7 +61,6 @@ "Text file" => "Tekstbestand", "Folder" => "Map", "From link" => "Vanaf link", -"Upload" => "Upload", "Cancel upload" => "Upload afbreken", "Nothing in here. Upload something!" => "Er bevindt zich hier niets. Upload een bestand!", "Download" => "Download", diff --git a/apps/files/l10n/nn_NO.php b/apps/files/l10n/nn_NO.php index 04e01a39cf..8abbe1b6cd 100644 --- a/apps/files/l10n/nn_NO.php +++ b/apps/files/l10n/nn_NO.php @@ -1,4 +1,5 @@ "Last opp", "There is no error, the file uploaded with success" => "Ingen feil, fila vart lasta opp", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Den opplasta fila er større enn variabelen MAX_FILE_SIZE i HTML-skjemaet", "The uploaded file was only partially uploaded" => "Fila vart berre delvis lasta opp", @@ -15,7 +16,6 @@ "New" => "Ny", "Text file" => "Tekst fil", "Folder" => "Mappe", -"Upload" => "Last opp", "Nothing in here. Upload something!" => "Ingenting her. Last noko opp!", "Download" => "Last ned", "Upload too large" => "For stor opplasting", diff --git a/apps/files/l10n/oc.php b/apps/files/l10n/oc.php index 36bbb43339..87ec98e4cf 100644 --- a/apps/files/l10n/oc.php +++ b/apps/files/l10n/oc.php @@ -1,4 +1,5 @@ "Amontcarga", "There is no error, the file uploaded with success" => "Amontcargament capitat, pas d'errors", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Lo fichièr amontcargat es mai gròs que la directiva «MAX_FILE_SIZE» especifiada dins lo formulari HTML", "The uploaded file was only partially uploaded" => "Lo fichièr foguèt pas completament amontcargat", @@ -13,7 +14,6 @@ "suggest name" => "nom prepausat", "cancel" => "anulla", "undo" => "defar", -"generating ZIP-file, it may take some time." => "Fichièr ZIP a se far, aquò pòt trigar un briu.", "Unable to upload your file as it is a directory or has 0 bytes" => "Impossible d'amontcargar lo teu fichièr qu'es un repertòri o que ten pas que 0 octet.", "Upload Error" => "Error d'amontcargar", "Pending" => "Al esperar", @@ -35,7 +35,6 @@ "New" => "Nòu", "Text file" => "Fichièr de tèxte", "Folder" => "Dorsièr", -"Upload" => "Amontcarga", "Cancel upload" => " Anulla l'amontcargar", "Nothing in here. Upload something!" => "Pas res dedins. Amontcarga qualquaren", "Download" => "Avalcarga", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index 226dae896c..4166bac545 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -1,4 +1,5 @@ "Prześlij", "Could not move %s - File with this name already exists" => "Nie można było przenieść %s - Plik o takiej nazwie już istnieje", "Could not move %s" => "Nie można było przenieść %s", "Unable to rename file" => "Nie można zmienić nazwy pliku", @@ -28,7 +29,6 @@ "'.' is an invalid file name." => "'.' jest nieprawidłową nazwą pliku.", "File name cannot be empty." => "Nazwa pliku nie może być pusta.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Niepoprawna nazwa, Znaki '\\', '/', '<', '>', ':', '\"', '|', '?' oraz '*'są niedozwolone.", -"generating ZIP-file, it may take some time." => "Generowanie pliku ZIP, może potrwać pewien czas.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nie można wczytać pliku jeśli jest katalogiem lub ma 0 bajtów", "Upload Error" => "Błąd wczytywania", "Close" => "Zamknij", @@ -60,7 +60,6 @@ "Text file" => "Plik tekstowy", "Folder" => "Katalog", "From link" => "Z linku", -"Upload" => "Prześlij", "Cancel upload" => "Przestań wysyłać", "Nothing in here. Upload something!" => "Brak zawartości. Proszę wysłać pliki!", "Download" => "Pobiera element", diff --git a/apps/files/l10n/pt_BR.php b/apps/files/l10n/pt_BR.php index ece24c7a2f..b199ded9fe 100644 --- a/apps/files/l10n/pt_BR.php +++ b/apps/files/l10n/pt_BR.php @@ -1,4 +1,5 @@ "Carregar", "No file was uploaded. Unknown error" => "Nenhum arquivo foi transferido. Erro desconhecido", "There is no error, the file uploaded with success" => "Não houve nenhum erro, o arquivo foi transferido com sucesso", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "O arquivo enviado excede a diretiva upload_max_filesize no php.ini: ", @@ -21,7 +22,6 @@ "unshared {files}" => "{files} não compartilhados", "deleted {files}" => "{files} apagados", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome inválido, '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' não são permitidos.", -"generating ZIP-file, it may take some time." => "gerando arquivo ZIP, isso pode levar um tempo.", "Unable to upload your file as it is a directory or has 0 bytes" => "Impossível enviar seus arquivo como diretório ou ele tem 0 bytes.", "Upload Error" => "Erro de envio", "Close" => "Fechar", @@ -52,7 +52,6 @@ "Text file" => "Arquivo texto", "Folder" => "Pasta", "From link" => "Do link", -"Upload" => "Carregar", "Cancel upload" => "Cancelar upload", "Nothing in here. Upload something!" => "Nada aqui.Carrege alguma coisa!", "Download" => "Baixar", diff --git a/apps/files/l10n/pt_PT.php b/apps/files/l10n/pt_PT.php index fb22894b34..0ed13fa998 100644 --- a/apps/files/l10n/pt_PT.php +++ b/apps/files/l10n/pt_PT.php @@ -1,4 +1,5 @@ "Enviar", "Could not move %s - File with this name already exists" => "Não foi possível mover o ficheiro %s - Já existe um ficheiro com esse nome", "Could not move %s" => "Não foi possível move o ficheiro %s", "Unable to rename file" => "Não foi possível renomear o ficheiro", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' não é um nome de ficheiro válido!", "File name cannot be empty." => "O nome do ficheiro não pode estar vazio.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome Inválido, os caracteres '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' não são permitidos.", -"generating ZIP-file, it may take some time." => "a gerar o ficheiro ZIP, poderá demorar algum tempo.", +"Your download is being prepared. This might take some time if the files are big." => "O seu download está a ser preparado. Este processo pode demorar algum tempo se os ficheiros forem grandes.", "Unable to upload your file as it is a directory or has 0 bytes" => "Não é possível fazer o envio do ficheiro devido a ser uma pasta ou ter 0 bytes", "Upload Error" => "Erro no envio", "Close" => "Fechar", @@ -60,7 +61,6 @@ "Text file" => "Ficheiro de texto", "Folder" => "Pasta", "From link" => "Da ligação", -"Upload" => "Enviar", "Cancel upload" => "Cancelar envio", "Nothing in here. Upload something!" => "Vazio. Envie alguma coisa!", "Download" => "Transferir", diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php index c34a341e53..fdba003bf3 100644 --- a/apps/files/l10n/ro.php +++ b/apps/files/l10n/ro.php @@ -1,4 +1,5 @@ "Încarcă", "Could not move %s" => "Nu s-a putut muta %s", "Unable to rename file" => "Nu s-a putut redenumi fișierul", "No file was uploaded. Unknown error" => "Nici un fișier nu a fost încărcat. Eroare necunoscută", @@ -27,7 +28,6 @@ "'.' is an invalid file name." => "'.' este un nume invalid de fișier.", "File name cannot be empty." => "Numele fișierului nu poate rămâne gol.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nume invalid, '\\', '/', '<', '>', ':', '\"', '|', '?' si '*' nu sunt permise.", -"generating ZIP-file, it may take some time." => "se generază fișierul ZIP, va dura ceva timp.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nu s-a putut încărca fișierul tău deoarece pare să fie un director sau are 0 bytes.", "Upload Error" => "Eroare la încărcare", "Close" => "Închide", @@ -37,6 +37,7 @@ "Upload cancelled." => "Încărcare anulată.", "File upload is in progress. Leaving the page now will cancel the upload." => "Fișierul este în curs de încărcare. Părăsirea paginii va întrerupe încărcarea.", "URL cannot be empty." => "Adresa URL nu poate fi goală.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Invalid folder name. Usage of 'Shared' is reserved by Ownclou", "{count} files scanned" => "{count} fisiere scanate", "error while scanning" => "eroare la scanarea", "Name" => "Nume", @@ -58,7 +59,6 @@ "Text file" => "Fișier text", "Folder" => "Dosar", "From link" => "de la adresa", -"Upload" => "Încarcă", "Cancel upload" => "Anulează încărcarea", "Nothing in here. Upload something!" => "Nimic aici. Încarcă ceva!", "Download" => "Descarcă", diff --git a/apps/files/l10n/ru.php b/apps/files/l10n/ru.php index 49ead61f67..cb17476b9f 100644 --- a/apps/files/l10n/ru.php +++ b/apps/files/l10n/ru.php @@ -1,4 +1,5 @@ "Загрузить", "Could not move %s - File with this name already exists" => "Невозможно переместить %s - файл с таким именем уже существует", "Could not move %s" => "Невозможно переместить %s", "Unable to rename file" => "Невозможно переименовать файл", @@ -28,7 +29,6 @@ "'.' is an invalid file name." => "'.' - неправильное имя файла.", "File name cannot be empty." => "Имя файла не может быть пустым.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Неправильное имя, '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' недопустимы.", -"generating ZIP-file, it may take some time." => "создание ZIP-файла, это может занять некоторое время.", "Unable to upload your file as it is a directory or has 0 bytes" => "Не удается загрузить файл размером 0 байт в каталог", "Upload Error" => "Ошибка загрузки", "Close" => "Закрыть", @@ -60,7 +60,6 @@ "Text file" => "Текстовый файл", "Folder" => "Папка", "From link" => "Из ссылки", -"Upload" => "Загрузить", "Cancel upload" => "Отмена загрузки", "Nothing in here. Upload something!" => "Здесь ничего нет. Загрузите что-нибудь!", "Download" => "Скачать", diff --git a/apps/files/l10n/ru_RU.php b/apps/files/l10n/ru_RU.php index 16bcc54e59..4f8bd1d5b9 100644 --- a/apps/files/l10n/ru_RU.php +++ b/apps/files/l10n/ru_RU.php @@ -1,4 +1,5 @@ "Загрузить ", "No file was uploaded. Unknown error" => "Файл не был загружен. Неизвестная ошибка", "There is no error, the file uploaded with success" => "Ошибка отсутствует, файл загружен успешно.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Размер загружаемого файла превышает upload_max_filesize директиву в php.ini:", @@ -21,7 +22,6 @@ "unshared {files}" => "Cовместное использование прекращено {файлы}", "deleted {files}" => "удалено {файлы}", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Некорректное имя, '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' не допустимы.", -"generating ZIP-file, it may take some time." => "Создание ZIP-файла, это может занять некоторое время.", "Unable to upload your file as it is a directory or has 0 bytes" => "Невозможно загрузить файл,\n так как он имеет нулевой размер или является директорией", "Upload Error" => "Ошибка загрузки", "Close" => "Закрыть", @@ -52,7 +52,6 @@ "Text file" => "Текстовый файл", "Folder" => "Папка", "From link" => "По ссылке", -"Upload" => "Загрузить ", "Cancel upload" => "Отмена загрузки", "Nothing in here. Upload something!" => "Здесь ничего нет. Загрузите что-нибудь!", "Download" => "Загрузить", diff --git a/apps/files/l10n/si_LK.php b/apps/files/l10n/si_LK.php index e1e06c4f81..8b276bdaa8 100644 --- a/apps/files/l10n/si_LK.php +++ b/apps/files/l10n/si_LK.php @@ -1,4 +1,5 @@ "උඩුගත කිරීම", "No file was uploaded. Unknown error" => "ගොනුවක් උඩුගත නොවුනි. නොහැඳිනු දෝෂයක්", "There is no error, the file uploaded with success" => "නිවැරදි ව ගොනුව උඩුගත කෙරිනි", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "උඩුගත කළ ගොනුවේ විශාලත්වය HTML පෝරමයේ නියම කළ ඇති MAX_FILE_SIZE විශාලත්වයට වඩා වැඩිය", @@ -14,7 +15,6 @@ "suggest name" => "නමක් යෝජනා කරන්න", "cancel" => "අත් හරින්න", "undo" => "නිෂ්ප්‍රභ කරන්න", -"generating ZIP-file, it may take some time." => "ගොනුවක් සෑදෙමින් පවතී. කෙටි වේලාවක් ගත විය හැක", "Upload Error" => "උඩුගත කිරීමේ දෝශයක්", "Close" => "වසන්න", "1 file uploading" => "1 ගොනුවක් උඩගත කෙරේ", @@ -39,7 +39,6 @@ "Text file" => "පෙළ ගොනුව", "Folder" => "ෆෝල්ඩරය", "From link" => "යොමුවෙන්", -"Upload" => "උඩුගත කිරීම", "Cancel upload" => "උඩුගත කිරීම අත් හරින්න", "Nothing in here. Upload something!" => "මෙහි කිසිවක් නොමැත. යමක් උඩුගත කරන්න", "Download" => "බාගත කිරීම", diff --git a/apps/files/l10n/sk_SK.php b/apps/files/l10n/sk_SK.php index 003b1aff22..66163b1e53 100644 --- a/apps/files/l10n/sk_SK.php +++ b/apps/files/l10n/sk_SK.php @@ -1,4 +1,8 @@ "Odoslať", +"Could not move %s - File with this name already exists" => "Nie je možné presunúť %s - súbor s týmto menom už existuje", +"Could not move %s" => "Nie je možné presunúť %s", +"Unable to rename file" => "Nemožno premenovať súbor", "No file was uploaded. Unknown error" => "Žiaden súbor nebol odoslaný. Neznáma chyba", "There is no error, the file uploaded with success" => "Nenastala žiadna chyba, súbor bol úspešne nahraný", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Nahraný súbor predčil konfiguračnú direktívu upload_max_filesize v súbore php.ini:", @@ -7,6 +11,8 @@ "No file was uploaded" => "Žiaden súbor nebol nahraný", "Missing a temporary folder" => "Chýbajúci dočasný priečinok", "Failed to write to disk" => "Zápis na disk sa nepodaril", +"Not enough space available" => "Nie je k dispozícii dostatok miesta", +"Invalid directory." => "Neplatný adresár", "Files" => "Súbory", "Unshare" => "Nezdielať", "Delete" => "Odstrániť", @@ -20,8 +26,10 @@ "replaced {new_name} with {old_name}" => "prepísaný {new_name} súborom {old_name}", "unshared {files}" => "zdieľanie zrušené pre {files}", "deleted {files}" => "zmazané {files}", +"'.' is an invalid file name." => "'.' je neplatné meno súboru.", +"File name cannot be empty." => "Meno súboru nemôže byť prázdne", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nesprávne meno, '\\', '/', '<', '>', ':', '\"', '|', '?' a '*' nie sú povolené hodnoty.", -"generating ZIP-file, it may take some time." => "generujem ZIP-súbor, môže to chvíľu trvať.", +"Your download is being prepared. This might take some time if the files are big." => "Vaše sťahovanie sa pripravuje. Ak sú sťahované súbory veľké, môže to chvíľu trvať.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nemôžem nahrať súbor lebo je to priečinok alebo má 0 bajtov.", "Upload Error" => "Chyba odosielania", "Close" => "Zavrieť", @@ -31,6 +39,7 @@ "Upload cancelled." => "Odosielanie zrušené", "File upload is in progress. Leaving the page now will cancel the upload." => "Opustenie stránky zruší práve prebiehajúce odosielanie súboru.", "URL cannot be empty." => "URL nemôže byť prázdne", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Neplatné meno adresára. Používanie mena 'Shared' je vyhradené len pre Owncloud", "{count} files scanned" => "{count} súborov prehľadaných", "error while scanning" => "chyba počas kontroly", "Name" => "Meno", @@ -52,7 +61,6 @@ "Text file" => "Textový súbor", "Folder" => "Priečinok", "From link" => "Z odkazu", -"Upload" => "Odoslať", "Cancel upload" => "Zrušiť odosielanie", "Nothing in here. Upload something!" => "Žiadny súbor. Nahrajte niečo!", "Download" => "Stiahnuť", diff --git a/apps/files/l10n/sl.php b/apps/files/l10n/sl.php index 2a0f450638..34544e3401 100644 --- a/apps/files/l10n/sl.php +++ b/apps/files/l10n/sl.php @@ -1,4 +1,5 @@ "Pošlji", "No file was uploaded. Unknown error" => "Nobena datoteka ni naložena. Neznana napaka.", "There is no error, the file uploaded with success" => "Datoteka je uspešno naložena brez napak.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Naložena datoteka presega dovoljeno velikost. Le-ta je določena z vrstico upload_max_filesize v datoteki php.ini:", @@ -21,7 +22,6 @@ "unshared {files}" => "odstranjeno iz souporabe {files}", "deleted {files}" => "izbrisano {files}", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Neveljavno ime, znaki '\\', '/', '<', '>', ':', '\"', '|', '?' in '*' niso dovoljeni.", -"generating ZIP-file, it may take some time." => "Ustvarjanje datoteke ZIP. To lahko traja nekaj časa.", "Unable to upload your file as it is a directory or has 0 bytes" => "Pošiljanje ni mogoče, saj gre za mapo, ali pa je datoteka velikosti 0 bajtov.", "Upload Error" => "Napaka med nalaganjem", "Close" => "Zapri", @@ -52,7 +52,6 @@ "Text file" => "Besedilna datoteka", "Folder" => "Mapa", "From link" => "Iz povezave", -"Upload" => "Pošlji", "Cancel upload" => "Prekliči pošiljanje", "Nothing in here. Upload something!" => "Tukaj ni ničesar. Naložite kaj!", "Download" => "Prejmi", diff --git a/apps/files/l10n/sr.php b/apps/files/l10n/sr.php index ecde8be4cc..3da6e27373 100644 --- a/apps/files/l10n/sr.php +++ b/apps/files/l10n/sr.php @@ -1,4 +1,5 @@ "Отпреми", "There is no error, the file uploaded with success" => "Није дошло до грешке. Датотека је успешно отпремљена.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Отпремљена датотека прелази смерницу upload_max_filesize у датотеци php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Отпремљена датотека прелази смерницу MAX_FILE_SIZE која је наведена у HTML обрасцу", @@ -20,7 +21,6 @@ "unshared {files}" => "укинуто дељење {files}", "deleted {files}" => "обрисано {files}", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Неисправан назив. Следећи знакови нису дозвољени: \\, /, <, >, :, \", |, ? и *.", -"generating ZIP-file, it may take some time." => "правим ZIP датотеку…", "Unable to upload your file as it is a directory or has 0 bytes" => "Не могу да отпремим датотеку као фасциклу или она има 0 бајтова", "Upload Error" => "Грешка при отпремању", "Close" => "Затвори", @@ -50,7 +50,6 @@ "Text file" => "текстуална датотека", "Folder" => "фасцикла", "From link" => "Са везе", -"Upload" => "Отпреми", "Cancel upload" => "Прекини отпремање", "Nothing in here. Upload something!" => "Овде нема ничег. Отпремите нешто!", "Download" => "Преузми", diff --git a/apps/files/l10n/sr@latin.php b/apps/files/l10n/sr@latin.php index fddaf5840c..117d437f0b 100644 --- a/apps/files/l10n/sr@latin.php +++ b/apps/files/l10n/sr@latin.php @@ -1,4 +1,5 @@ "Pošalji", "There is no error, the file uploaded with success" => "Nema greške, fajl je uspešno poslat", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Poslati fajl prevazilazi direktivu MAX_FILE_SIZE koja je navedena u HTML formi", "The uploaded file was only partially uploaded" => "Poslati fajl je samo delimično otpremljen!", @@ -12,7 +13,6 @@ "Modified" => "Zadnja izmena", "Maximum upload size" => "Maksimalna veličina pošiljke", "Save" => "Snimi", -"Upload" => "Pošalji", "Nothing in here. Upload something!" => "Ovde nema ničeg. Pošaljite nešto!", "Download" => "Preuzmi", "Upload too large" => "Pošiljka je prevelika", diff --git a/apps/files/l10n/sv.php b/apps/files/l10n/sv.php index 7277ec1785..7597f6908e 100644 --- a/apps/files/l10n/sv.php +++ b/apps/files/l10n/sv.php @@ -1,4 +1,8 @@ "Ladda upp", +"Could not move %s - File with this name already exists" => "Kunde inte flytta %s - Det finns redan en fil med detta namn", +"Could not move %s" => "Kan inte flytta %s", +"Unable to rename file" => "Kan inte byta namn på filen", "No file was uploaded. Unknown error" => "Ingen fil uppladdad. Okänt fel", "There is no error, the file uploaded with success" => "Inga fel uppstod. Filen laddades upp utan problem", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Den uppladdade filen överskrider upload_max_filesize direktivet php.ini:", @@ -25,7 +29,7 @@ "'.' is an invalid file name." => "'.' är ett ogiltigt filnamn.", "File name cannot be empty." => "Filnamn kan inte vara tomt.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ogiltigt namn, '\\', '/', '<', '>', ':', '\"', '|', '?' och '*' är inte tillåtet.", -"generating ZIP-file, it may take some time." => "genererar ZIP-fil, det kan ta lite tid.", +"Your download is being prepared. This might take some time if the files are big." => "Din nedladdning förbereds. Det kan ta tid om det är stora filer.", "Unable to upload your file as it is a directory or has 0 bytes" => "Kunde inte ladda upp dina filer eftersom det antingen är en mapp eller har 0 bytes.", "Upload Error" => "Uppladdningsfel", "Close" => "Stäng", @@ -57,7 +61,6 @@ "Text file" => "Textfil", "Folder" => "Mapp", "From link" => "Från länk", -"Upload" => "Ladda upp", "Cancel upload" => "Avbryt uppladdning", "Nothing in here. Upload something!" => "Ingenting här. Ladda upp något!", "Download" => "Ladda ner", diff --git a/apps/files/l10n/ta_LK.php b/apps/files/l10n/ta_LK.php index 16cab5cf96..d7a9313d97 100644 --- a/apps/files/l10n/ta_LK.php +++ b/apps/files/l10n/ta_LK.php @@ -1,4 +1,5 @@ "பதிவேற்றுக", "No file was uploaded. Unknown error" => "ஒரு கோப்பும் பதிவேற்றப்படவில்லை. அறியப்படாத வழு", "There is no error, the file uploaded with success" => "இங்கு வழு இல்லை, கோப்பு வெற்றிகரமாக பதிவேற்றப்பட்டது", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "பதிவேற்றப்பட்ட கோப்பானது HTML படிவத்தில் குறிப்பிடப்பட்டுள்ள MAX_FILE_SIZE directive ஐ விட கூடியது", @@ -20,7 +21,6 @@ "unshared {files}" => "பகிரப்படாதது {கோப்புகள்}", "deleted {files}" => "நீக்கப்பட்டது {கோப்புகள்}", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "செல்லுபடியற்ற பெயர்,'\\', '/', '<', '>', ':', '\"', '|', '?' மற்றும் '*' ஆகியன அனுமதிக்கப்படமாட்டாது.", -"generating ZIP-file, it may take some time." => " ZIP கோப்பு உருவாக்கப்படுகின்றது, இது சில நேரம் ஆகலாம்.", "Unable to upload your file as it is a directory or has 0 bytes" => "அடைவு அல்லது 0 bytes ஐ கொண்டுள்ளதால் உங்களுடைய கோப்பை பதிவேற்ற முடியவில்லை", "Upload Error" => "பதிவேற்றல் வழு", "Close" => "மூடுக", @@ -51,7 +51,6 @@ "Text file" => "கோப்பு உரை", "Folder" => "கோப்புறை", "From link" => "இணைப்பிலிருந்து", -"Upload" => "பதிவேற்றுக", "Cancel upload" => "பதிவேற்றலை இரத்து செய்க", "Nothing in here. Upload something!" => "இங்கு ஒன்றும் இல்லை. ஏதாவது பதிவேற்றுக!", "Download" => "பதிவிறக்குக", diff --git a/apps/files/l10n/th_TH.php b/apps/files/l10n/th_TH.php index 3fda142a4e..43a905ea3b 100644 --- a/apps/files/l10n/th_TH.php +++ b/apps/files/l10n/th_TH.php @@ -1,4 +1,8 @@ "อัพโหลด", +"Could not move %s - File with this name already exists" => "ไม่สามารถย้าย %s ได้ - ไฟล์ที่ใช้ชื่อนี้มีอยู่แล้ว", +"Could not move %s" => "ไม่สามารถย้าย %s ได้", +"Unable to rename file" => "ไม่สามารถเปลี่ยนชื่อไฟล์ได้", "No file was uploaded. Unknown error" => "ยังไม่มีไฟล์ใดที่ถูกอัพโหลด เกิดข้อผิดพลาดที่ไม่ทราบสาเหตุ", "There is no error, the file uploaded with success" => "ไม่มีข้อผิดพลาดใดๆ ไฟล์ถูกอัพโหลดเรียบร้อยแล้ว", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "ขนาดไฟล์ที่อัพโหลดมีขนาดเกิน upload_max_filesize ที่ระบุไว้ใน php.ini", @@ -7,6 +11,8 @@ "No file was uploaded" => "ยังไม่มีไฟล์ที่ถูกอัพโหลด", "Missing a temporary folder" => "แฟ้มเอกสารชั่วคราวเกิดการสูญหาย", "Failed to write to disk" => "เขียนข้อมูลลงแผ่นดิสก์ล้มเหลว", +"Not enough space available" => "มีพื้นที่เหลือไม่เพียงพอ", +"Invalid directory." => "ไดเร็กทอรี่ไม่ถูกต้อง", "Files" => "ไฟล์", "Unshare" => "ยกเลิกการแชร์ข้อมูล", "Delete" => "ลบ", @@ -20,8 +26,10 @@ "replaced {new_name} with {old_name}" => "แทนที่ {new_name} ด้วย {old_name} แล้ว", "unshared {files}" => "ยกเลิกการแชร์แล้ว {files} ไฟล์", "deleted {files}" => "ลบไฟล์แล้ว {files} ไฟล์", +"'.' is an invalid file name." => "'.' เป็นชื่อไฟล์ที่ไม่ถูกต้อง", +"File name cannot be empty." => "ชื่อไฟล์ไม่สามารถเว้นว่างได้", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "ชื่อที่ใช้ไม่ถูกต้อง, '\\', '/', '<', '>', ':', '\"', '|', '?' และ '*' ไม่ได้รับอนุญาตให้ใช้งานได้", -"generating ZIP-file, it may take some time." => "กำลังสร้างไฟล์บีบอัด ZIP อาจใช้เวลาสักครู่", +"Your download is being prepared. This might take some time if the files are big." => "กำลังเตรียมดาวน์โหลดข้อมูล หากไฟล์มีขนาดใหญ่ อาจใช้เวลาสักครู่", "Unable to upload your file as it is a directory or has 0 bytes" => "ไม่สามารถอัพโหลดไฟล์ของคุณได้ เนื่องจากไฟล์ดังกล่าวเป็นไดเร็กทอรี่หรือมีขนาด 0 ไบต์", "Upload Error" => "เกิดข้อผิดพลาดในการอัพโหลด", "Close" => "ปิด", @@ -31,6 +39,7 @@ "Upload cancelled." => "การอัพโหลดถูกยกเลิก", "File upload is in progress. Leaving the page now will cancel the upload." => "การอัพโหลดไฟล์กำลังอยู่ในระหว่างดำเนินการ การออกจากหน้าเว็บนี้จะทำให้การอัพโหลดถูกยกเลิก", "URL cannot be empty." => "URL ไม่สามารถเว้นว่างได้", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "ชื่อโฟลเดอร์ไม่ถูกต้อง การใช้งาน 'แชร์' สงวนไว้สำหรับ Owncloud เท่านั้น", "{count} files scanned" => "สแกนไฟล์แล้ว {count} ไฟล์", "error while scanning" => "พบข้อผิดพลาดในระหว่างการสแกนไฟล์", "Name" => "ชื่อ", @@ -52,7 +61,6 @@ "Text file" => "ไฟล์ข้อความ", "Folder" => "แฟ้มเอกสาร", "From link" => "จากลิงก์", -"Upload" => "อัพโหลด", "Cancel upload" => "ยกเลิกการอัพโหลด", "Nothing in here. Upload something!" => "ยังไม่มีไฟล์ใดๆอยู่ที่นี่ กรุณาอัพโหลดไฟล์!", "Download" => "ดาวน์โหลด", diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php index b32da7de25..6b390570f3 100644 --- a/apps/files/l10n/tr.php +++ b/apps/files/l10n/tr.php @@ -1,4 +1,8 @@ "Yükle", +"Could not move %s - File with this name already exists" => "%s taşınamadı. Bu isimde dosya zaten var.", +"Could not move %s" => "%s taşınamadı", +"Unable to rename file" => "Dosya adı değiştirilemedi", "No file was uploaded. Unknown error" => "Dosya yüklenmedi. Bilinmeyen hata", "There is no error, the file uploaded with success" => "Bir hata yok, dosya başarıyla yüklendi", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "php.ini dosyasında upload_max_filesize ile belirtilen dosya yükleme sınırı aşıldı.", @@ -7,6 +11,8 @@ "No file was uploaded" => "Hiç dosya yüklenmedi", "Missing a temporary folder" => "Geçici bir klasör eksik", "Failed to write to disk" => "Diske yazılamadı", +"Not enough space available" => "Yeterli disk alanı yok", +"Invalid directory." => "Geçersiz dizin.", "Files" => "Dosyalar", "Unshare" => "Paylaşılmayan", "Delete" => "Sil", @@ -20,8 +26,10 @@ "replaced {new_name} with {old_name}" => "{new_name} ismi {old_name} ile değiştirildi", "unshared {files}" => "paylaşılmamış {files}", "deleted {files}" => "silinen {files}", +"'.' is an invalid file name." => "'.' geçersiz dosya adı.", +"File name cannot be empty." => "Dosya adı boş olamaz.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Geçersiz isim, '\\', '/', '<', '>', ':', '\"', '|', '?' ve '*' karakterlerine izin verilmemektedir.", -"generating ZIP-file, it may take some time." => "ZIP dosyası oluşturuluyor, biraz sürebilir.", +"Your download is being prepared. This might take some time if the files are big." => "İndirmeniz hazırlanıyor. Dosya büyük ise biraz zaman alabilir.", "Unable to upload your file as it is a directory or has 0 bytes" => "Dosyanızın boyutu 0 byte olduğundan veya bir dizin olduğundan yüklenemedi", "Upload Error" => "Yükleme hatası", "Close" => "Kapat", @@ -31,6 +39,7 @@ "Upload cancelled." => "Yükleme iptal edildi.", "File upload is in progress. Leaving the page now will cancel the upload." => "Dosya yükleme işlemi sürüyor. Şimdi sayfadan ayrılırsanız işleminiz iptal olur.", "URL cannot be empty." => "URL boş olamaz.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Geçersiz dizin adı. Shared isminin kullanımı Owncloud tarafından rezerver edilmiştir.", "{count} files scanned" => "{count} dosya tarandı", "error while scanning" => "tararamada hata oluşdu", "Name" => "Ad", @@ -52,7 +61,6 @@ "Text file" => "Metin dosyası", "Folder" => "Klasör", "From link" => "Bağlantıdan", -"Upload" => "Yükle", "Cancel upload" => "Yüklemeyi iptal et", "Nothing in here. Upload something!" => "Burada hiçbir şey yok. Birşeyler yükleyin!", "Download" => "İndir", diff --git a/apps/files/l10n/uk.php b/apps/files/l10n/uk.php index eba48a41cb..f1279bc77c 100644 --- a/apps/files/l10n/uk.php +++ b/apps/files/l10n/uk.php @@ -1,4 +1,5 @@ "Відвантажити", "No file was uploaded. Unknown error" => "Не завантажено жодного файлу. Невідома помилка", "There is no error, the file uploaded with success" => "Файл успішно вивантажено без помилок.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Розмір звантаження перевищує upload_max_filesize параметра в php.ini: ", @@ -21,7 +22,6 @@ "unshared {files}" => "неопубліковано {files}", "deleted {files}" => "видалено {files}", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Невірне ім'я, '\\', '/', '<', '>', ':', '\"', '|', '?' та '*' не дозволені.", -"generating ZIP-file, it may take some time." => "Створення ZIP-файлу, це може зайняти певний час.", "Unable to upload your file as it is a directory or has 0 bytes" => "Неможливо завантажити ваш файл тому, що він тека або файл розміром 0 байт", "Upload Error" => "Помилка завантаження", "Close" => "Закрити", @@ -52,7 +52,6 @@ "Text file" => "Текстовий файл", "Folder" => "Папка", "From link" => "З посилання", -"Upload" => "Відвантажити", "Cancel upload" => "Перервати завантаження", "Nothing in here. Upload something!" => "Тут нічого немає. Відвантажте що-небудь!", "Download" => "Завантажити", diff --git a/apps/files/l10n/vi.php b/apps/files/l10n/vi.php index 7d5c529050..dcaf890001 100644 --- a/apps/files/l10n/vi.php +++ b/apps/files/l10n/vi.php @@ -1,4 +1,5 @@ "Tải lên", "No file was uploaded. Unknown error" => "Không có tập tin nào được tải lên. Lỗi không xác định", "There is no error, the file uploaded with success" => "Không có lỗi, các tập tin đã được tải lên thành công", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Kích thước những tập tin tải lên vượt quá MAX_FILE_SIZE đã được quy định", @@ -20,7 +21,6 @@ "unshared {files}" => "hủy chia sẽ {files}", "deleted {files}" => "đã xóa {files}", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Tên không hợp lệ, '\\', '/', '<', '>', ':', '\"', '|', '?' và '*' thì không được phép dùng.", -"generating ZIP-file, it may take some time." => "Tạo tập tin ZIP, điều này có thể làm mất một chút thời gian", "Unable to upload your file as it is a directory or has 0 bytes" => "Không thể tải lên tập tin này do nó là một thư mục hoặc kích thước tập tin bằng 0 byte", "Upload Error" => "Tải lên lỗi", "Close" => "Đóng", @@ -51,7 +51,6 @@ "Text file" => "Tập tin văn bản", "Folder" => "Thư mục", "From link" => "Từ liên kết", -"Upload" => "Tải lên", "Cancel upload" => "Hủy upload", "Nothing in here. Upload something!" => "Không có gì ở đây .Hãy tải lên một cái gì đó !", "Download" => "Tải xuống", diff --git a/apps/files/l10n/zh_CN.GB2312.php b/apps/files/l10n/zh_CN.GB2312.php index e60df8291a..4416ce9a4a 100644 --- a/apps/files/l10n/zh_CN.GB2312.php +++ b/apps/files/l10n/zh_CN.GB2312.php @@ -1,4 +1,5 @@ "上传", "No file was uploaded. Unknown error" => "没有上传文件。未知错误", "There is no error, the file uploaded with success" => "没有任何错误,文件上传成功了", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "上传的文件超过了HTML表单指定的MAX_FILE_SIZE", @@ -19,7 +20,6 @@ "replaced {new_name} with {old_name}" => "已用 {old_name} 替换 {new_name}", "unshared {files}" => "未分享的 {files}", "deleted {files}" => "已删除的 {files}", -"generating ZIP-file, it may take some time." => "正在生成ZIP文件,这可能需要点时间", "Unable to upload your file as it is a directory or has 0 bytes" => "不能上传你指定的文件,可能因为它是个文件夹或者大小为0", "Upload Error" => "上传错误", "Close" => "关闭", @@ -50,7 +50,6 @@ "Text file" => "文本文档", "Folder" => "文件夹", "From link" => "来自链接", -"Upload" => "上传", "Cancel upload" => "取消上传", "Nothing in here. Upload something!" => "这里没有东西.上传点什么!", "Download" => "下载", diff --git a/apps/files/l10n/zh_CN.php b/apps/files/l10n/zh_CN.php index 124bb2c3b6..f8dedc118e 100644 --- a/apps/files/l10n/zh_CN.php +++ b/apps/files/l10n/zh_CN.php @@ -1,4 +1,5 @@ "上传", "Could not move %s - File with this name already exists" => "无法移动 %s - 同名文件已存在", "Could not move %s" => "无法移动 %s", "Unable to rename file" => "无法重命名文件", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' 是一个无效的文件名。", "File name cannot be empty." => "文件名不能为空。", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "无效名称,'\\', '/', '<', '>', ':', '\"', '|', '?' 和 '*' 不被允许使用。", -"generating ZIP-file, it may take some time." => "正在生成 ZIP 文件,可能需要一些时间", +"Your download is being prepared. This might take some time if the files are big." => "下载正在准备中。如果文件较大可能会花费一些时间。", "Unable to upload your file as it is a directory or has 0 bytes" => "无法上传文件,因为它是一个目录或者大小为 0 字节", "Upload Error" => "上传错误", "Close" => "关闭", @@ -60,7 +61,6 @@ "Text file" => "文本文件", "Folder" => "文件夹", "From link" => "来自链接", -"Upload" => "上传", "Cancel upload" => "取消上传", "Nothing in here. Upload something!" => "这里还什么都没有。上传些东西吧!", "Download" => "下载", diff --git a/apps/files/l10n/zh_TW.php b/apps/files/l10n/zh_TW.php index 7f0f44baca..2bf15af1c4 100644 --- a/apps/files/l10n/zh_TW.php +++ b/apps/files/l10n/zh_TW.php @@ -1,4 +1,5 @@ "上傳", "Could not move %s - File with this name already exists" => "無法移動 %s - 同名的檔案已經存在", "Could not move %s" => "無法移動 %s", "Unable to rename file" => "無法重新命名檔案", @@ -28,7 +29,7 @@ "'.' is an invalid file name." => "'.' 是不合法的檔名。", "File name cannot be empty." => "檔名不能為空。", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "檔名不合法,不允許 '\\', '/', '<', '>', ':', '\"', '|', '?' 和 '*' 。", -"generating ZIP-file, it may take some time." => "產生 ZIP 壓縮檔,這可能需要一段時間。", +"Your download is being prepared. This might take some time if the files are big." => "正在準備您的下載,若您的檔案較大,將會需要更多時間。", "Unable to upload your file as it is a directory or has 0 bytes" => "無法上傳您的檔案因為它可能是一個目錄或檔案大小為0", "Upload Error" => "上傳發生錯誤", "Close" => "關閉", @@ -60,7 +61,6 @@ "Text file" => "文字檔", "Folder" => "資料夾", "From link" => "從連結", -"Upload" => "上傳", "Cancel upload" => "取消上傳", "Nothing in here. Upload something!" => "沒有任何東西。請上傳內容!", "Download" => "下載", diff --git a/apps/files_encryption/ajax/mode.php b/apps/files_encryption/ajax/mode.php new file mode 100644 index 0000000000..64c5be9440 --- /dev/null +++ b/apps/files_encryption/ajax/mode.php @@ -0,0 +1,38 @@ + + * This file is licensed under the Affero General Public License version 3 or later. + * See the COPYING-README file. + */ + +use OCA\Encryption\Keymanager; + +OCP\JSON::checkAppEnabled('files_encryption'); +OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); + +$mode = $_POST['mode']; +$changePasswd = false; +$passwdChanged = false; + +if ( isset($_POST['newpasswd']) && isset($_POST['oldpasswd']) ) { + $oldpasswd = $_POST['oldpasswd']; + $newpasswd = $_POST['newpasswd']; + $changePasswd = true; + $passwdChanged = Keymanager::changePasswd($oldpasswd, $newpasswd); +} + +$query = \OC_DB::prepare( "SELECT mode FROM *PREFIX*encryption WHERE uid = ?" ); +$result = $query->execute(array(\OCP\User::getUser())); + +if ($result->fetchRow()){ + $query = OC_DB::prepare( 'UPDATE *PREFIX*encryption SET mode = ? WHERE uid = ?' ); +} else { + $query = OC_DB::prepare( 'INSERT INTO *PREFIX*encryption ( mode, uid ) VALUES( ?, ? )' ); +} + +if ( (!$changePasswd || $passwdChanged) && $query->execute(array($mode, \OCP\User::getUser())) ) { + OCP\JSON::success(); +} else { + OCP\JSON::error(); +} \ No newline at end of file diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index 2a30d0beb6..31b430d37a 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -1,21 +1,37 @@ getPrivateKey( \OCP\USER::getUser() ) +&& OCP\User::isLoggedIn() +&& OCA\Encryption\Crypt::mode() == 'server' +) { + + // Force the user to re-log in if the encryption key isn't unlocked (happens when a user is logged in before the encryption app is enabled) OCP\User::logout(); - header("Location: ".OC::$WEBROOT.'/'); + + header( "Location: " . OC::$WEBROOT.'/' ); + exit(); + } -OCP\App::registerAdmin('files_encryption', 'settings'); \ No newline at end of file +OCP\App::registerAdmin( 'files_encryption', 'settings'); +OCP\App::registerPersonal( 'files_encryption', 'settings-personal' ); \ No newline at end of file diff --git a/apps/files_encryption/appinfo/database.xml b/apps/files_encryption/appinfo/database.xml new file mode 100644 index 0000000000..d294c35d63 --- /dev/null +++ b/apps/files_encryption/appinfo/database.xml @@ -0,0 +1,24 @@ + + + *dbname* + true + false + utf8 + + *dbprefix*encryption + + + uid + text + true + 64 + + + mode + text + true + 64 + + +
+
\ No newline at end of file diff --git a/apps/files_encryption/appinfo/info.xml b/apps/files_encryption/appinfo/info.xml index 48a28fde78..39ea155488 100644 --- a/apps/files_encryption/appinfo/info.xml +++ b/apps/files_encryption/appinfo/info.xml @@ -2,10 +2,10 @@ files_encryption Encryption - Server side encryption of files. DEPRECATED. This app is no longer supported and will be replaced with an improved version in ownCloud 5. Only enable this features if you want to read old encrypted data. Warning: You will lose your data if you enable this App and forget your password. Encryption is not yet compatible with LDAP. + Server side encryption of files. Warning: You will lose your data if you enable this App and forget your password. Encryption is not yet compatible with LDAP. AGPL - Robin Appelman - 4.9 + Sam Tuke + 4 true diff --git a/apps/files_encryption/appinfo/version b/apps/files_encryption/appinfo/version index 2f4536184b..7dff5b8921 100644 --- a/apps/files_encryption/appinfo/version +++ b/apps/files_encryption/appinfo/version @@ -1 +1 @@ -0.2 \ No newline at end of file +0.2.1 \ No newline at end of file diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php new file mode 100644 index 0000000000..c2f9724783 --- /dev/null +++ b/apps/files_encryption/hooks/hooks.php @@ -0,0 +1,143 @@ +. + * + */ + +namespace OCA\Encryption; + +/** + * Class for hook specific logic + */ + +class Hooks { + + # TODO: use passphrase for encrypting private key that is separate to the login password + + /** + * @brief Startup encryption backend upon user login + * @note This method should never be called for users using client side encryption + */ + public static function login( $params ) { + +// if ( Crypt::mode( $params['uid'] ) == 'server' ) { + + # TODO: use lots of dependency injection here + + $view = new \OC_FilesystemView( '/' ); + + $util = new Util( $view, $params['uid'] ); + + if ( ! $util->ready() ) { + + \OC_Log::write( 'Encryption library', 'User account "' . $params['uid'] . '" is not ready for encryption; configuration started' , \OC_Log::DEBUG ); + + return $util->setupServerSide( $params['password'] ); + + } + + \OC_FileProxy::$enabled = false; + + $encryptedKey = Keymanager::getPrivateKey( $view, $params['uid'] ); + + \OC_FileProxy::$enabled = true; + + # TODO: dont manually encrypt the private keyfile - use the config options of openssl_pkey_export instead for better mobile compatibility + + $privateKey = Crypt::symmetricDecryptFileContent( $encryptedKey, $params['password'] ); + + $session = new Session(); + + $session->setPrivateKey( $privateKey, $params['uid'] ); + + $view1 = new \OC_FilesystemView( '/' . $params['uid'] ); + + // Set legacy encryption key if it exists, to support + // depreciated encryption system + if ( + $view1->file_exists( 'encryption.key' ) + && $legacyKey = $view1->file_get_contents( 'encryption.key' ) + ) { + + $_SESSION['legacyenckey'] = Crypt::legacyDecrypt( $legacyKey, $params['password'] ); + + } +// } + + return true; + + } + + /** + * @brief Change a user's encryption passphrase + * @param array $params keys: uid, password + */ + public static function setPassphrase( $params ) { + + // Only attempt to change passphrase if server-side encryption + // is in use (client-side encryption does not have access to + // the necessary keys) + if ( Crypt::mode() == 'server' ) { + + // Get existing decrypted private key + $privateKey = $_SESSION['privateKey']; + + // Encrypt private key with new user pwd as passphrase + $encryptedPrivateKey = Crypt::symmetricEncryptFileContent( $privateKey, $params['password'] ); + + // Save private key + Keymanager::setPrivateKey( $encryptedPrivateKey ); + + # NOTE: Session does not need to be updated as the + # private key has not changed, only the passphrase + # used to decrypt it has changed + + } + + } + + /** + * @brief update the encryption key of the file uploaded by the client + */ + public static function updateKeyfile( $params ) { + + if ( Crypt::mode() == 'client' ) { + + if ( isset( $params['properties']['key'] ) ) { + + Keymanager::setFileKey( $params['path'], $params['properties']['key'] ); + + } else { + + \OC_Log::write( + 'Encryption library', "Client side encryption is enabled but the client doesn't provide a encryption key for the file!" + , \OC_Log::ERROR + ); + + error_log( "Client side encryption is enabled but the client doesn't provide an encryption key for the file!" ); + + } + + } + + } + +} + +?> \ No newline at end of file diff --git a/apps/files_encryption/js/settings-personal.js b/apps/files_encryption/js/settings-personal.js new file mode 100644 index 0000000000..1a53e99d2b --- /dev/null +++ b/apps/files_encryption/js/settings-personal.js @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2012, Bjoern Schiessle + * This file is licensed under the Affero General Public License version 3 or later. + * See the COPYING-README file. + */ + +$(document).ready(function(){ + $('input[name=encryption_mode]').change(function(){ + var prevmode = document.getElementById('prev_encryption_mode').value + var client=$('input[value="client"]:checked').val() + ,server=$('input[value="server"]:checked').val() + ,user=$('input[value="user"]:checked').val() + ,none=$('input[value="none"]:checked').val() + if (client) { + $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'client' }); + if (prevmode == 'server') { + OC.dialogs.info(t('encryption', 'Please switch to your ownCloud client and change your encryption password to complete the conversion.'), t('encryption', 'switched to client side encryption')); + } + } else if (server) { + if (prevmode == 'client') { + OC.dialogs.form([{text:'Login password', name:'newpasswd', type:'password'},{text:'Encryption password used on the client', name:'oldpasswd', type:'password'}],t('encryption', 'Change encryption password to login password'), function(data) { + $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'server', newpasswd: data[0].value, oldpasswd: data[1].value }, function(result) { + if (result.status != 'success') { + document.getElementById(prevmode+'_encryption').checked = true; + OC.dialogs.alert(t('encryption', 'Please check your passwords and try again.'), t('encryption', 'Could not change your file encryption password to your login password')) + } else { + console.log("alles super"); + } + }, true); + }); + } else { + $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'server' }); + } + } else { + $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'none' }); + } + }) +}) \ No newline at end of file diff --git a/apps/files_encryption/js/settings.js b/apps/files_encryption/js/settings.js index 6fc70eba7f..60563bde85 100644 --- a/apps/files_encryption/js/settings.js +++ b/apps/files_encryption/js/settings.js @@ -11,14 +11,36 @@ $(document).ready(function(){ onuncheck:blackListChange, createText:'...', }); - + function blackListChange(){ var blackList=$('#encryption_blacklist').val().join(','); OC.AppConfig.setValue('files_encryption','type_blacklist',blackList); } - $('#enable_encryption').change(function(){ - var checked=$('#enable_encryption').is(':checked'); - OC.AppConfig.setValue('files_encryption','enable_encryption',(checked)?'true':'false'); - }); -}); + //TODO: Handle switch between client and server side encryption + $('input[name=encryption_mode]').change(function(){ + var client=$('input[value="client"]:checked').val() + ,server=$('input[value="server"]:checked').val() + ,user=$('input[value="user"]:checked').val() + ,none=$('input[value="none"]:checked').val() + ,disable=false + if (client) { + OC.AppConfig.setValue('files_encryption','mode','client'); + disable = true; + } else if (server) { + OC.AppConfig.setValue('files_encryption','mode','server'); + disable = true; + } else if (user) { + OC.AppConfig.setValue('files_encryption','mode','user'); + disable = true; + } else { + OC.AppConfig.setValue('files_encryption','mode','none'); + } + if (disable) { + document.getElementById('server_encryption').disabled = true; + document.getElementById('client_encryption').disabled = true; + document.getElementById('user_encryption').disabled = true; + document.getElementById('none_encryption').disabled = true; + } + }) +}) \ No newline at end of file diff --git a/apps/files_encryption/l10n/ar.php b/apps/files_encryption/l10n/ar.php index 756a9d7279..f08585e485 100644 --- a/apps/files_encryption/l10n/ar.php +++ b/apps/files_encryption/l10n/ar.php @@ -1,6 +1,5 @@ "التشفير", "Exclude the following file types from encryption" => "استبعد أنواع الملفات التالية من التشفير", -"None" => "لا شيء", -"Enable Encryption" => "تفعيل التشفير" +"None" => "لا شيء" ); diff --git a/apps/files_encryption/l10n/bg_BG.php b/apps/files_encryption/l10n/bg_BG.php index cb1613ef37..4ceee127af 100644 --- a/apps/files_encryption/l10n/bg_BG.php +++ b/apps/files_encryption/l10n/bg_BG.php @@ -1,6 +1,5 @@ "Криптиране", -"Enable Encryption" => "Включване на криптирането", -"None" => "Няма", -"Exclude the following file types from encryption" => "Изключване на следните файлови типове от криптирането" +"Exclude the following file types from encryption" => "Изключване на следните файлови типове от криптирането", +"None" => "Няма" ); diff --git a/apps/files_encryption/l10n/bn_BD.php b/apps/files_encryption/l10n/bn_BD.php index c8f041d762..29c486b8ca 100644 --- a/apps/files_encryption/l10n/bn_BD.php +++ b/apps/files_encryption/l10n/bn_BD.php @@ -1,6 +1,5 @@ "সংকেতায়ন", -"Enable Encryption" => "সংকেতায়ন সক্রিয় কর", -"None" => "কোনটিই নয়", -"Exclude the following file types from encryption" => "সংকেতায়ন থেকে নিম্নোক্ত ধরণসমূহ বাদ দাও" +"Exclude the following file types from encryption" => "সংকেতায়ন থেকে নিম্নোক্ত ধরণসমূহ বাদ দাও", +"None" => "কোনটিই নয়" ); diff --git a/apps/files_encryption/l10n/ca.php b/apps/files_encryption/l10n/ca.php index 8e087b3462..d97a8666df 100644 --- a/apps/files_encryption/l10n/ca.php +++ b/apps/files_encryption/l10n/ca.php @@ -1,6 +1,5 @@ "Encriptatge", "Exclude the following file types from encryption" => "Exclou els tipus de fitxers següents de l'encriptatge", -"None" => "Cap", -"Enable Encryption" => "Activa l'encriptatge" +"None" => "Cap" ); diff --git a/apps/files_encryption/l10n/cs_CZ.php b/apps/files_encryption/l10n/cs_CZ.php index 9be2be9809..5948a9b82e 100644 --- a/apps/files_encryption/l10n/cs_CZ.php +++ b/apps/files_encryption/l10n/cs_CZ.php @@ -1,6 +1,16 @@ "Prosím přejděte na svého klienta ownCloud a nastavte šifrovací heslo pro dokončení konverze.", +"switched to client side encryption" => "přepnuto na šifrování na straně klienta", +"Change encryption password to login password" => "Změnit šifrovací heslo na přihlašovací", +"Please check your passwords and try again." => "Zkontrolujte, prosím, své heslo a zkuste to znovu.", +"Could not change your file encryption password to your login password" => "Nelze změnit šifrovací heslo na přihlašovací.", +"Choose encryption mode:" => "Vyberte režim šifrování:", +"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Šifrování na straně klienta (nejbezpečnější ale neumožňuje vám přistupovat k souborům z webového rozhraní)", +"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Šifrování na straně serveru (umožňuje vám přistupovat k souborům pomocí webového rozhraní i aplikací)", +"None (no encryption at all)" => "Žádný (vůbec žádné šifrování)", +"Important: Once you selected an encryption mode there is no way to change it back" => "Důležité: jak si jednou vyberete režim šifrování nelze jej opětovně změnit", +"User specific (let the user decide)" => "Definován uživatelem (umožní uživateli si vybrat)", "Encryption" => "Šifrování", "Exclude the following file types from encryption" => "Při šifrování vynechat následující typy souborů", -"None" => "Žádné", -"Enable Encryption" => "Povolit šifrování" +"None" => "Žádné" ); diff --git a/apps/files_encryption/l10n/da.php b/apps/files_encryption/l10n/da.php index 144c9f9708..1b4664ce1c 100644 --- a/apps/files_encryption/l10n/da.php +++ b/apps/files_encryption/l10n/da.php @@ -1,6 +1,5 @@ "Kryptering", "Exclude the following file types from encryption" => "Ekskluder følgende filtyper fra kryptering", -"None" => "Ingen", -"Enable Encryption" => "Aktivér kryptering" +"None" => "Ingen" ); diff --git a/apps/files_encryption/l10n/de.php b/apps/files_encryption/l10n/de.php index d486a82322..34c596dc4b 100644 --- a/apps/files_encryption/l10n/de.php +++ b/apps/files_encryption/l10n/de.php @@ -1,6 +1,5 @@ "Verschlüsselung", "Exclude the following file types from encryption" => "Die folgenden Dateitypen von der Verschlüsselung ausnehmen", -"None" => "Keine", -"Enable Encryption" => "Verschlüsselung aktivieren" +"None" => "Keine" ); diff --git a/apps/files_encryption/l10n/de_DE.php b/apps/files_encryption/l10n/de_DE.php index d486a82322..34c596dc4b 100644 --- a/apps/files_encryption/l10n/de_DE.php +++ b/apps/files_encryption/l10n/de_DE.php @@ -1,6 +1,5 @@ "Verschlüsselung", "Exclude the following file types from encryption" => "Die folgenden Dateitypen von der Verschlüsselung ausnehmen", -"None" => "Keine", -"Enable Encryption" => "Verschlüsselung aktivieren" +"None" => "Keine" ); diff --git a/apps/files_encryption/l10n/el.php b/apps/files_encryption/l10n/el.php index 40a7c6a367..50b812c82d 100644 --- a/apps/files_encryption/l10n/el.php +++ b/apps/files_encryption/l10n/el.php @@ -1,6 +1,9 @@ "Αλλαγή συνθηματικού κρυπτογράφησης στο συνθηματικό εισόδου ", +"Please check your passwords and try again." => "Παρακαλώ ελέγξτε το συνθηματικό σας και προσπαθήστε ξανά.", +"Could not change your file encryption password to your login password" => "Αδυναμία αλλαγής συνθηματικού κρυπτογράφησης αρχείων στο συνθηματικό εισόδου σας", +"Choose encryption mode:" => "Επιλογή κατάστασης κρυπτογράφησης:", "Encryption" => "Κρυπτογράφηση", "Exclude the following file types from encryption" => "Εξαίρεση των παρακάτω τύπων αρχείων από την κρυπτογράφηση", -"None" => "Καμία", -"Enable Encryption" => "Ενεργοποίηση Κρυπτογράφησης" +"None" => "Καμία" ); diff --git a/apps/files_encryption/l10n/eo.php b/apps/files_encryption/l10n/eo.php index af3c9ae98e..c6f82dcb8a 100644 --- a/apps/files_encryption/l10n/eo.php +++ b/apps/files_encryption/l10n/eo.php @@ -1,6 +1,5 @@ "Ĉifrado", "Exclude the following file types from encryption" => "Malinkluzivigi la jenajn dosiertipojn el ĉifrado", -"None" => "Nenio", -"Enable Encryption" => "Kapabligi ĉifradon" +"None" => "Nenio" ); diff --git a/apps/files_encryption/l10n/es.php b/apps/files_encryption/l10n/es.php index b7e7601b35..1fea54ff35 100644 --- a/apps/files_encryption/l10n/es.php +++ b/apps/files_encryption/l10n/es.php @@ -1,6 +1,5 @@ "Cifrado", "Exclude the following file types from encryption" => "Excluir del cifrado los siguientes tipos de archivo", -"None" => "Ninguno", -"Enable Encryption" => "Habilitar cifrado" +"None" => "Ninguno" ); diff --git a/apps/files_encryption/l10n/es_AR.php b/apps/files_encryption/l10n/es_AR.php index a15c37e730..31898f50fd 100644 --- a/apps/files_encryption/l10n/es_AR.php +++ b/apps/files_encryption/l10n/es_AR.php @@ -1,6 +1,5 @@ "Encriptación", "Exclude the following file types from encryption" => "Exceptuar de la encriptación los siguientes tipos de archivo", -"None" => "Ninguno", -"Enable Encryption" => "Habilitar encriptación" +"None" => "Ninguno" ); diff --git a/apps/files_encryption/l10n/et_EE.php b/apps/files_encryption/l10n/et_EE.php index a7cd9395bf..0c0ef23114 100644 --- a/apps/files_encryption/l10n/et_EE.php +++ b/apps/files_encryption/l10n/et_EE.php @@ -1,6 +1,5 @@ "Krüpteerimine", "Exclude the following file types from encryption" => "Järgnevaid failitüüpe ära krüpteeri", -"None" => "Pole", -"Enable Encryption" => "Luba krüpteerimine" +"None" => "Pole" ); diff --git a/apps/files_encryption/l10n/eu.php b/apps/files_encryption/l10n/eu.php index 57b6a4927b..2bb1a46954 100644 --- a/apps/files_encryption/l10n/eu.php +++ b/apps/files_encryption/l10n/eu.php @@ -1,6 +1,5 @@ "Enkriptazioa", "Exclude the following file types from encryption" => "Ez enkriptatu hurrengo fitxategi motak", -"None" => "Bat ere ez", -"Enable Encryption" => "Gaitu enkriptazioa" +"None" => "Bat ere ez" ); diff --git a/apps/files_encryption/l10n/fa.php b/apps/files_encryption/l10n/fa.php index 01582e48e6..0cdee74f5a 100644 --- a/apps/files_encryption/l10n/fa.php +++ b/apps/files_encryption/l10n/fa.php @@ -1,6 +1,5 @@ "رمزگذاری", "Exclude the following file types from encryption" => "نادیده گرفتن فایل های زیر برای رمز گذاری", -"None" => "هیچ‌کدام", -"Enable Encryption" => "فعال کردن رمزگذاری" +"None" => "هیچ‌کدام" ); diff --git a/apps/files_encryption/l10n/fi_FI.php b/apps/files_encryption/l10n/fi_FI.php index 5796499a26..433ae890ef 100644 --- a/apps/files_encryption/l10n/fi_FI.php +++ b/apps/files_encryption/l10n/fi_FI.php @@ -1,6 +1,5 @@ "Salaus", "Exclude the following file types from encryption" => "Jätä seuraavat tiedostotyypit salaamatta", -"None" => "Ei mitään", -"Enable Encryption" => "Käytä salausta" +"None" => "Ei mitään" ); diff --git a/apps/files_encryption/l10n/fr.php b/apps/files_encryption/l10n/fr.php index c9367d1a31..41e37134d4 100644 --- a/apps/files_encryption/l10n/fr.php +++ b/apps/files_encryption/l10n/fr.php @@ -1,6 +1,16 @@ "Veuillez vous connecter depuis votre client de synchronisation ownCloud et changer votre mot de passe de chiffrement pour finaliser la conversion.", +"switched to client side encryption" => "Mode de chiffrement changé en chiffrement côté client", +"Change encryption password to login password" => "Convertir le mot de passe de chiffrement en mot de passe de connexion", +"Please check your passwords and try again." => "Veuillez vérifier vos mots de passe et réessayer.", +"Could not change your file encryption password to your login password" => "Impossible de convertir votre mot de passe de chiffrement en mot de passe de connexion", +"Choose encryption mode:" => "Choix du type de chiffrement :", +"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Chiffrement côté client (plus sécurisé, mais ne permet pas l'accès à vos données depuis l'interface web)", +"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Chiffrement côté serveur (vous permet d'accéder à vos fichiers depuis l'interface web et depuis le client de synchronisation)", +"None (no encryption at all)" => "Aucun (pas de chiffrement)", +"Important: Once you selected an encryption mode there is no way to change it back" => "Important : Une fois le mode de chiffrement choisi, il est impossible de revenir en arrière", +"User specific (let the user decide)" => "Propre à l'utilisateur (laisse le choix à l'utilisateur)", "Encryption" => "Chiffrement", "Exclude the following file types from encryption" => "Ne pas chiffrer les fichiers dont les types sont les suivants", -"None" => "Aucun", -"Enable Encryption" => "Activer le chiffrement" +"None" => "Aucun" ); diff --git a/apps/files_encryption/l10n/gl.php b/apps/files_encryption/l10n/gl.php index 91d155ccad..42fcfce1cc 100644 --- a/apps/files_encryption/l10n/gl.php +++ b/apps/files_encryption/l10n/gl.php @@ -1,6 +1,5 @@ "Cifrado", "Exclude the following file types from encryption" => "Excluír os seguintes tipos de ficheiro do cifrado", -"None" => "Nada", -"Enable Encryption" => "Activar o cifrado" +"None" => "Nada" ); diff --git a/apps/files_encryption/l10n/he.php b/apps/files_encryption/l10n/he.php index 0332d59520..9adb6d2b92 100644 --- a/apps/files_encryption/l10n/he.php +++ b/apps/files_encryption/l10n/he.php @@ -1,6 +1,5 @@ "הצפנה", -"Enable Encryption" => "הפעל הצפנה", -"None" => "כלום", -"Exclude the following file types from encryption" => "הוצא את סוגי הקבצים הבאים מהצפנה" +"Exclude the following file types from encryption" => "הוצא את סוגי הקבצים הבאים מהצפנה", +"None" => "כלום" ); diff --git a/apps/files_encryption/l10n/hu_HU.php b/apps/files_encryption/l10n/hu_HU.php index 8ea0f73173..1ef1effd41 100644 --- a/apps/files_encryption/l10n/hu_HU.php +++ b/apps/files_encryption/l10n/hu_HU.php @@ -1,6 +1,5 @@ "Titkosítás", -"Enable Encryption" => "A titkosítás engedélyezése", -"None" => "Egyik sem", -"Exclude the following file types from encryption" => "A következő fájltípusok kizárása a titkosításból" +"Exclude the following file types from encryption" => "A következő fájltípusok kizárása a titkosításból", +"None" => "Egyik sem" ); diff --git a/apps/files_encryption/l10n/id.php b/apps/files_encryption/l10n/id.php index 824ae88304..20f33b8782 100644 --- a/apps/files_encryption/l10n/id.php +++ b/apps/files_encryption/l10n/id.php @@ -1,6 +1,5 @@ "enkripsi", "Exclude the following file types from encryption" => "pengecualian untuk tipe file berikut dari enkripsi", -"None" => "tidak ada", -"Enable Encryption" => "aktifkan enkripsi" +"None" => "tidak ada" ); diff --git a/apps/files_encryption/l10n/is.php b/apps/files_encryption/l10n/is.php index 3210ecb4f8..a2559cf2b7 100644 --- a/apps/files_encryption/l10n/is.php +++ b/apps/files_encryption/l10n/is.php @@ -1,6 +1,5 @@ "Dulkóðun", -"Enable Encryption" => "Virkja dulkóðun", -"None" => "Ekkert", -"Exclude the following file types from encryption" => "Undanskilja eftirfarandi skráartegundir frá dulkóðun" +"Exclude the following file types from encryption" => "Undanskilja eftirfarandi skráartegundir frá dulkóðun", +"None" => "Ekkert" ); diff --git a/apps/files_encryption/l10n/it.php b/apps/files_encryption/l10n/it.php index 5136b06179..de62f0508f 100644 --- a/apps/files_encryption/l10n/it.php +++ b/apps/files_encryption/l10n/it.php @@ -1,6 +1,14 @@ "Passa al tuo client ownCloud e cambia la password di cifratura per completare la conversione.", +"switched to client side encryption" => "passato alla cifratura lato client", +"Please check your passwords and try again." => "Controlla la password e prova ancora.", +"Choose encryption mode:" => "Scegli la modalità di cifratura.", +"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Cifratura lato client (più sicura ma rende impossibile accedere ai propri dati dall'interfaccia web)", +"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Cifratura lato server (ti consente di accedere ai tuoi file dall'interfaccia web e dal client desktop)", +"None (no encryption at all)" => "Nessuna (senza alcuna cifratura)", +"Important: Once you selected an encryption mode there is no way to change it back" => "Importante: una volta selezionata la modalità di cifratura non sarà possibile tornare indietro", +"User specific (let the user decide)" => "Specificato dall'utente (lascia decidere all'utente)", "Encryption" => "Cifratura", "Exclude the following file types from encryption" => "Escludi i seguenti tipi di file dalla cifratura", -"None" => "Nessuna", -"Enable Encryption" => "Abilita cifratura" +"None" => "Nessuna" ); diff --git a/apps/files_encryption/l10n/ja_JP.php b/apps/files_encryption/l10n/ja_JP.php index 2c3e5410de..4100908e00 100644 --- a/apps/files_encryption/l10n/ja_JP.php +++ b/apps/files_encryption/l10n/ja_JP.php @@ -1,6 +1,16 @@ "変換を完了するために、ownCloud クライアントに切り替えて、暗号化パスワードを変更してください。", +"switched to client side encryption" => "クライアントサイドの暗号化に切り替えました", +"Change encryption password to login password" => "暗号化パスワードをログインパスワードに変更", +"Please check your passwords and try again." => "パスワードを確認してもう一度行なってください。", +"Could not change your file encryption password to your login password" => "ファイル暗号化パスワードをログインパスワードに変更できませんでした。", +"Choose encryption mode:" => "暗号化モードを選択:", +"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "クライアントサイドの暗号化(最もセキュアですが、WEBインターフェースからデータにアクセスできなくなります)", +"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "サーバサイド暗号化(WEBインターフェースおよびデスクトップクライアントからファイルにアクセスすることができます)", +"None (no encryption at all)" => "暗号化無し(何も暗号化しません)", +"Important: Once you selected an encryption mode there is no way to change it back" => "重要: 一度暗号化を選択してしまうと、もとに戻す方法はありません", +"User specific (let the user decide)" => "ユーザ指定(ユーザが選べるようにする)", "Encryption" => "暗号化", "Exclude the following file types from encryption" => "暗号化から除外するファイルタイプ", -"None" => "なし", -"Enable Encryption" => "暗号化を有効にする" +"None" => "なし" ); diff --git a/apps/files_encryption/l10n/ko.php b/apps/files_encryption/l10n/ko.php index 4702753435..68d60c1ae3 100644 --- a/apps/files_encryption/l10n/ko.php +++ b/apps/files_encryption/l10n/ko.php @@ -1,6 +1,5 @@ "암호화", "Exclude the following file types from encryption" => "다음 파일 형식은 암호화하지 않음", -"None" => "없음", -"Enable Encryption" => "암호화 사용" +"None" => "없음" ); diff --git a/apps/files_encryption/l10n/ku_IQ.php b/apps/files_encryption/l10n/ku_IQ.php index bd8977ac51..06bb9b9325 100644 --- a/apps/files_encryption/l10n/ku_IQ.php +++ b/apps/files_encryption/l10n/ku_IQ.php @@ -1,6 +1,5 @@ "نهێنیکردن", "Exclude the following file types from encryption" => "به‌ربه‌ست کردنی ئه‌م جۆره‌ په‌ڕگانه له‌ نهێنیکردن", -"None" => "هیچ", -"Enable Encryption" => "چالاکردنی نهێنیکردن" +"None" => "هیچ" ); diff --git a/apps/files_encryption/l10n/lt_LT.php b/apps/files_encryption/l10n/lt_LT.php index b939df164c..22cbe7a4ff 100644 --- a/apps/files_encryption/l10n/lt_LT.php +++ b/apps/files_encryption/l10n/lt_LT.php @@ -1,6 +1,5 @@ "Šifravimas", "Exclude the following file types from encryption" => "Nešifruoti pasirinkto tipo failų", -"None" => "Nieko", -"Enable Encryption" => "Įjungti šifravimą" +"None" => "Nieko" ); diff --git a/apps/files_encryption/l10n/mk.php b/apps/files_encryption/l10n/mk.php index dfcaed9f37..7ccf8ac2d5 100644 --- a/apps/files_encryption/l10n/mk.php +++ b/apps/files_encryption/l10n/mk.php @@ -1,6 +1,5 @@ "Енкрипција", "Exclude the following file types from encryption" => "Исклучи ги следните типови на датотеки од енкрипција", -"None" => "Ништо", -"Enable Encryption" => "Овозможи енкрипција" +"None" => "Ништо" ); diff --git a/apps/files_encryption/l10n/nb_NO.php b/apps/files_encryption/l10n/nb_NO.php index e65df7b6ce..2ec6670e92 100644 --- a/apps/files_encryption/l10n/nb_NO.php +++ b/apps/files_encryption/l10n/nb_NO.php @@ -1,6 +1,5 @@ "Kryptering", "Exclude the following file types from encryption" => "Ekskluder følgende filer fra kryptering", -"None" => "Ingen", -"Enable Encryption" => "Slå på kryptering" +"None" => "Ingen" ); diff --git a/apps/files_encryption/l10n/nl.php b/apps/files_encryption/l10n/nl.php index 1ea56006fc..7c09009cba 100644 --- a/apps/files_encryption/l10n/nl.php +++ b/apps/files_encryption/l10n/nl.php @@ -1,6 +1,5 @@ "Versleuteling", "Exclude the following file types from encryption" => "Versleutel de volgende bestand types niet", -"None" => "Geen", -"Enable Encryption" => "Zet versleuteling aan" +"None" => "Geen" ); diff --git a/apps/files_encryption/l10n/pl.php b/apps/files_encryption/l10n/pl.php index 5cfc707450..896086108e 100644 --- a/apps/files_encryption/l10n/pl.php +++ b/apps/files_encryption/l10n/pl.php @@ -1,6 +1,5 @@ "Szyfrowanie", "Exclude the following file types from encryption" => "Wyłącz następujące typy plików z szyfrowania", -"None" => "Brak", -"Enable Encryption" => "Włącz szyfrowanie" +"None" => "Brak" ); diff --git a/apps/files_encryption/l10n/pt_BR.php b/apps/files_encryption/l10n/pt_BR.php index 5c02f52217..086d073cf5 100644 --- a/apps/files_encryption/l10n/pt_BR.php +++ b/apps/files_encryption/l10n/pt_BR.php @@ -1,6 +1,5 @@ "Criptografia", "Exclude the following file types from encryption" => "Excluir os seguintes tipos de arquivo da criptografia", -"None" => "Nenhuma", -"Enable Encryption" => "Habilitar Criptografia" +"None" => "Nenhuma" ); diff --git a/apps/files_encryption/l10n/pt_PT.php b/apps/files_encryption/l10n/pt_PT.php index 570462b414..b6eedcdc50 100644 --- a/apps/files_encryption/l10n/pt_PT.php +++ b/apps/files_encryption/l10n/pt_PT.php @@ -1,6 +1,16 @@ "Por favor, use o seu cliente de sincronização do ownCloud e altere a sua password de encriptação para concluír a conversão.", +"switched to client side encryption" => "Alterado para encriptação do lado do cliente", +"Change encryption password to login password" => "Alterar a password de encriptação para a password de login", +"Please check your passwords and try again." => "Por favor verifique as suas paswords e tente de novo.", +"Could not change your file encryption password to your login password" => "Não foi possível alterar a password de encriptação de ficheiros para a sua password de login", +"Choose encryption mode:" => "Escolha o método de encriptação", +"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Encriptação do lado do cliente (mais seguro mas torna possível o acesso aos dados através do interface web)", +"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Encriptação do lado do servidor (permite o acesso aos seus ficheiros através do interface web e do cliente de sincronização)", +"None (no encryption at all)" => "Nenhuma (sem encriptação)", +"Important: Once you selected an encryption mode there is no way to change it back" => "Importante: Uma vez escolhido o modo de encriptação, não existe maneira de o alterar!", +"User specific (let the user decide)" => "Escolhido pelo utilizador", "Encryption" => "Encriptação", "Exclude the following file types from encryption" => "Excluir da encriptação os seguintes tipo de ficheiros", -"None" => "Nenhum", -"Enable Encryption" => "Activar Encriptação" +"None" => "Nenhum" ); diff --git a/apps/files_encryption/l10n/ro.php b/apps/files_encryption/l10n/ro.php index 97f3f262d7..fc0f24f483 100644 --- a/apps/files_encryption/l10n/ro.php +++ b/apps/files_encryption/l10n/ro.php @@ -1,6 +1,5 @@ "Încriptare", "Exclude the following file types from encryption" => "Exclude următoarele tipuri de fișiere de la încriptare", -"None" => "Niciuna", -"Enable Encryption" => "Activare încriptare" +"None" => "Niciuna" ); diff --git a/apps/files_encryption/l10n/ru.php b/apps/files_encryption/l10n/ru.php index 3a7e84b6d0..14115c1268 100644 --- a/apps/files_encryption/l10n/ru.php +++ b/apps/files_encryption/l10n/ru.php @@ -1,6 +1,5 @@ "Шифрование", "Exclude the following file types from encryption" => "Исключить шифрование следующих типов файлов", -"None" => "Ничего", -"Enable Encryption" => "Включить шифрование" +"None" => "Ничего" ); diff --git a/apps/files_encryption/l10n/ru_RU.php b/apps/files_encryption/l10n/ru_RU.php index 1328b0d035..4321fb8a8a 100644 --- a/apps/files_encryption/l10n/ru_RU.php +++ b/apps/files_encryption/l10n/ru_RU.php @@ -1,6 +1,5 @@ "Шифрование", "Exclude the following file types from encryption" => "Исключите следующие типы файлов из шифрования", -"None" => "Ни один", -"Enable Encryption" => "Включить шифрование" +"None" => "Ни один" ); diff --git a/apps/files_encryption/l10n/si_LK.php b/apps/files_encryption/l10n/si_LK.php index a29884afff..2d61bec45b 100644 --- a/apps/files_encryption/l10n/si_LK.php +++ b/apps/files_encryption/l10n/si_LK.php @@ -1,6 +1,5 @@ "ගුප්ත කේතනය", "Exclude the following file types from encryption" => "මෙම ගොනු වර්ග ගුප්ත කේතනය කිරීමෙන් බැහැරව තබන්න", -"None" => "කිසිවක් නැත", -"Enable Encryption" => "ගුප්ත කේතනය සක්‍රිය කරන්න" +"None" => "කිසිවක් නැත" ); diff --git a/apps/files_encryption/l10n/sk_SK.php b/apps/files_encryption/l10n/sk_SK.php index 598f1294f6..5aebb6e35b 100644 --- a/apps/files_encryption/l10n/sk_SK.php +++ b/apps/files_encryption/l10n/sk_SK.php @@ -1,6 +1,5 @@ "Šifrovanie", "Exclude the following file types from encryption" => "Vynechať nasledujúce súbory pri šifrovaní", -"None" => "Žiadne", -"Enable Encryption" => "Zapnúť šifrovanie" +"None" => "Žiadne" ); diff --git a/apps/files_encryption/l10n/sl.php b/apps/files_encryption/l10n/sl.php index f62fe781c6..db963ef2f8 100644 --- a/apps/files_encryption/l10n/sl.php +++ b/apps/files_encryption/l10n/sl.php @@ -1,6 +1,5 @@ "Šifriranje", "Exclude the following file types from encryption" => "Navedene vrste datotek naj ne bodo šifrirane", -"None" => "Brez", -"Enable Encryption" => "Omogoči šifriranje" +"None" => "Brez" ); diff --git a/apps/files_encryption/l10n/sr.php b/apps/files_encryption/l10n/sr.php index 4718780ee5..198bcc94ef 100644 --- a/apps/files_encryption/l10n/sr.php +++ b/apps/files_encryption/l10n/sr.php @@ -1,6 +1,5 @@ "Шифровање", "Exclude the following file types from encryption" => "Не шифруј следеће типове датотека", -"None" => "Ништа", -"Enable Encryption" => "Омогући шифровање" +"None" => "Ништа" ); diff --git a/apps/files_encryption/l10n/sv.php b/apps/files_encryption/l10n/sv.php index 0a477f8346..9b6ce14178 100644 --- a/apps/files_encryption/l10n/sv.php +++ b/apps/files_encryption/l10n/sv.php @@ -1,6 +1,16 @@ "Vänligen växla till ownCloud klienten och ändra ditt krypteringslösenord för att slutföra omvandlingen.", +"switched to client side encryption" => "Bytte till kryptering på klientsidan", +"Change encryption password to login password" => "Ändra krypteringslösenord till loginlösenord", +"Please check your passwords and try again." => "Kontrollera dina lösenord och försök igen.", +"Could not change your file encryption password to your login password" => "Kunde inte ändra ditt filkrypteringslösenord till ditt loginlösenord", +"Choose encryption mode:" => "Välj krypteringsläge:", +"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Kryptering på klientsidan (säkraste men gör det omöjligt att komma åt dina filer med en webbläsare)", +"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Kryptering på serversidan (kan komma åt dina filer från webbläsare och datorklient)", +"None (no encryption at all)" => "Ingen (ingen kryptering alls)", +"Important: Once you selected an encryption mode there is no way to change it back" => "Viktigt: När du har valt ett krypteringsläge finns det inget sätt att ändra tillbaka", +"User specific (let the user decide)" => "Användarspecifik (låter användaren bestämma)", "Encryption" => "Kryptering", "Exclude the following file types from encryption" => "Exkludera följande filtyper från kryptering", -"None" => "Ingen", -"Enable Encryption" => "Aktivera kryptering" +"None" => "Ingen" ); diff --git a/apps/files_encryption/l10n/ta_LK.php b/apps/files_encryption/l10n/ta_LK.php index 1d1ef74007..aab628b551 100644 --- a/apps/files_encryption/l10n/ta_LK.php +++ b/apps/files_encryption/l10n/ta_LK.php @@ -1,6 +1,5 @@ "மறைக்குறியீடு", "Exclude the following file types from encryption" => "மறைக்குறியாக்கலில் பின்வரும் கோப்பு வகைகளை நீக்கவும்", -"None" => "ஒன்றுமில்லை", -"Enable Encryption" => "மறைக்குறியாக்கலை இயலுமைப்படுத்துக" +"None" => "ஒன்றுமில்லை" ); diff --git a/apps/files_encryption/l10n/th_TH.php b/apps/files_encryption/l10n/th_TH.php index c2685de6e3..f8c19456ab 100644 --- a/apps/files_encryption/l10n/th_TH.php +++ b/apps/files_encryption/l10n/th_TH.php @@ -1,6 +1,16 @@ "กรุณาสลับไปที่โปรแกรมไคลเอนต์ ownCloud ของคุณ แล้วเปลี่ยนรหัสผ่านสำหรับการเข้ารหัสเพื่อแปลงข้อมูลให้เสร็จสมบูรณ์", +"switched to client side encryption" => "สลับไปใช้การเข้ารหัสจากโปรแกรมไคลเอนต์", +"Change encryption password to login password" => "เปลี่ยนรหัสผ่านสำหรับเข้ารหัสไปเป็นรหัสผ่านสำหรับการเข้าสู่ระบบ", +"Please check your passwords and try again." => "กรุณาตรวจสอบรหัสผ่านของคุณแล้วลองใหม่อีกครั้ง", +"Could not change your file encryption password to your login password" => "ไม่สามารถเปลี่ยนรหัสผ่านสำหรับการเข้ารหัสไฟล์ของคุณไปเป็นรหัสผ่านสำหรับการเข้าสู่ระบบของคุณได้", +"Choose encryption mode:" => "เลือกรูปแบบการเข้ารหัส:", +"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "การเข้ารหัสด้วยโปรแกรมไคลเอนต์ (ปลอดภัยที่สุด แต่จะทำให้คุณไม่สามารถเข้าถึงข้อมูลต่างๆจากหน้าจอเว็บไซต์ได้)", +"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "การเข้ารหัสจากทางฝั่งเซิร์ฟเวอร์ (อนุญาตให้คุณเข้าถึงไฟล์ของคุณจากหน้าจอเว็บไซต์ และโปรแกรมไคลเอนต์จากเครื่องเดสก์ท็อปได้)", +"None (no encryption at all)" => "ไม่ต้อง (ไม่มีการเข้ารหัสเลย)", +"Important: Once you selected an encryption mode there is no way to change it back" => "ข้อความสำคัญ: หลังจากที่คุณได้เลือกรูปแบบการเข้ารหัสแล้ว จะไม่สามารถเปลี่ยนกลับมาใหม่ได้อีก", +"User specific (let the user decide)" => "ให้ผู้ใช้งานเลือกเอง (ปล่อยให้ผู้ใช้งานตัดสินใจเอง)", "Encryption" => "การเข้ารหัส", "Exclude the following file types from encryption" => "ไม่ต้องรวมชนิดของไฟล์ดังต่อไปนี้จากการเข้ารหัส", -"None" => "ไม่ต้อง", -"Enable Encryption" => "เปิดใช้งานการเข้ารหัส" +"None" => "ไม่ต้อง" ); diff --git a/apps/files_encryption/l10n/tr.php b/apps/files_encryption/l10n/tr.php index 474ee42b84..07f78d148c 100644 --- a/apps/files_encryption/l10n/tr.php +++ b/apps/files_encryption/l10n/tr.php @@ -1,6 +1,5 @@ "Şifreleme", -"Enable Encryption" => "Şifrelemeyi Etkinleştir", -"None" => "Hiçbiri", -"Exclude the following file types from encryption" => "Aşağıdaki dosya tiplerini şifrelemeye dahil etme" +"Exclude the following file types from encryption" => "Aşağıdaki dosya tiplerini şifrelemeye dahil etme", +"None" => "Hiçbiri" ); diff --git a/apps/files_encryption/l10n/uk.php b/apps/files_encryption/l10n/uk.php index 3c15bb2843..e358921565 100644 --- a/apps/files_encryption/l10n/uk.php +++ b/apps/files_encryption/l10n/uk.php @@ -1,6 +1,5 @@ "Шифрування", "Exclude the following file types from encryption" => "Не шифрувати файли наступних типів", -"None" => "Жоден", -"Enable Encryption" => "Включити шифрування" +"None" => "Жоден" ); diff --git a/apps/files_encryption/l10n/vi.php b/apps/files_encryption/l10n/vi.php index 6365084fdc..218285b675 100644 --- a/apps/files_encryption/l10n/vi.php +++ b/apps/files_encryption/l10n/vi.php @@ -1,6 +1,5 @@ "Mã hóa", "Exclude the following file types from encryption" => "Loại trừ các loại tập tin sau đây từ mã hóa", -"None" => "Không có gì hết", -"Enable Encryption" => "BẬT mã hóa" +"None" => "Không có gì hết" ); diff --git a/apps/files_encryption/l10n/zh_CN.GB2312.php b/apps/files_encryption/l10n/zh_CN.GB2312.php index 297444fcf5..31a3d3b49b 100644 --- a/apps/files_encryption/l10n/zh_CN.GB2312.php +++ b/apps/files_encryption/l10n/zh_CN.GB2312.php @@ -1,6 +1,5 @@ "加密", "Exclude the following file types from encryption" => "从加密中排除如下文件类型", -"None" => "无", -"Enable Encryption" => "启用加密" +"None" => "无" ); diff --git a/apps/files_encryption/l10n/zh_CN.php b/apps/files_encryption/l10n/zh_CN.php index 1e1247d15f..aa4817b590 100644 --- a/apps/files_encryption/l10n/zh_CN.php +++ b/apps/files_encryption/l10n/zh_CN.php @@ -1,6 +1,5 @@ "加密", "Exclude the following file types from encryption" => "从加密中排除列出的文件类型", -"None" => "None", -"Enable Encryption" => "开启加密" +"None" => "None" ); diff --git a/apps/files_encryption/l10n/zh_TW.php b/apps/files_encryption/l10n/zh_TW.php index 4c62130cf4..fecebbe250 100644 --- a/apps/files_encryption/l10n/zh_TW.php +++ b/apps/files_encryption/l10n/zh_TW.php @@ -1,6 +1,5 @@ "加密", "Exclude the following file types from encryption" => "下列的檔案類型不加密", -"None" => "無", -"Enable Encryption" => "啟用加密" +"None" => "無" ); diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php old mode 100644 new mode 100755 index 666fedb4e1..fddc89dae5 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -1,220 +1,732 @@ -. - * - */ - - - -// Todo: -// - Crypt/decrypt button in the userinterface -// - Setting if crypto should be on by default -// - Add a setting "Don´t encrypt files larger than xx because of performance reasons" -// - Transparent decrypt/encrypt in filesystem.php. Autodetect if a file is encrypted (.encrypted extension) -// - Don't use a password directly as encryption key, but a key which is stored on the server and encrypted with the -// user password. -> password change faster -// - IMPORTANT! Check if the block lenght of the encrypted data stays the same - - -require_once 'Crypt_Blowfish/Blowfish.php'; - -/** - * This class is for crypting and decrypting - */ -class OC_Crypt { - static private $bf = null; - - public static function loginListener($params) { - self::init($params['uid'], $params['password']); - } - - public static function init($login, $password) { - $view=new OC_FilesystemView('/'); - if ( ! $view->file_exists('/'.$login)) { - $view->mkdir('/'.$login); - } - - OC_FileProxy::$enabled=false; - if ( ! $view->file_exists('/'.$login.'/encryption.key')) {// does key exist? - OC_Crypt::createkey($login, $password); - } - $key=$view->file_get_contents('/'.$login.'/encryption.key'); - OC_FileProxy::$enabled=true; - $_SESSION['enckey']=OC_Crypt::decrypt($key, $password); - } - - - /** - * get the blowfish encryption handeler for a key - * @param string $key (optional) - * @return Crypt_Blowfish - * - * if the key is left out, the default handeler will be used - */ - public static function getBlowfish($key='') { - if ($key) { - return new Crypt_Blowfish($key); - } else { - if ( ! isset($_SESSION['enckey'])) { - return false; - } - if ( ! self::$bf) { - self::$bf=new Crypt_Blowfish($_SESSION['enckey']); - } - return self::$bf; - } - } - - public static function createkey($username, $passcode) { - // generate a random key - $key=mt_rand(10000, 99999).mt_rand(10000, 99999).mt_rand(10000, 99999).mt_rand(10000, 99999); - - // encrypt the key with the passcode of the user - $enckey=OC_Crypt::encrypt($key, $passcode); - - // Write the file - $proxyEnabled=OC_FileProxy::$enabled; - OC_FileProxy::$enabled=false; - $view=new OC_FilesystemView('/'.$username); - $view->file_put_contents('/encryption.key', $enckey); - OC_FileProxy::$enabled=$proxyEnabled; - } - - public static function changekeypasscode($oldPassword, $newPassword) { - if (OCP\User::isLoggedIn()) { - $username=OCP\USER::getUser(); - $view=new OC_FilesystemView('/'.$username); - - // read old key - $key=$view->file_get_contents('/encryption.key'); - - // decrypt key with old passcode - $key=OC_Crypt::decrypt($key, $oldPassword); - - // encrypt again with new passcode - $key=OC_Crypt::encrypt($key, $newPassword); - - // store the new key - $view->file_put_contents('/encryption.key', $key ); - } - } - - /** - * @brief encrypts an content - * @param $content the cleartext message you want to encrypt - * @param $key the encryption key (optional) - * @returns encrypted content - * - * This function encrypts an content - */ - public static function encrypt( $content, $key='') { - $bf = self::getBlowfish($key); - return $bf->encrypt($content); - } - - /** - * @brief decryption of an content - * @param $content the cleartext message you want to decrypt - * @param $key the encryption key (optional) - * @returns cleartext content - * - * This function decrypts an content - */ - public static function decrypt( $content, $key='') { - $bf = self::getBlowfish($key); - $data=$bf->decrypt($content); - return $data; - } - - /** - * @brief encryption of a file - * @param string $source - * @param string $target - * @param string $key the decryption key - * - * This function encrypts a file - */ - public static function encryptFile( $source, $target, $key='') { - $handleread = fopen($source, "rb"); - if ($handleread!=false) { - $handlewrite = fopen($target, "wb"); - while (!feof($handleread)) { - $content = fread($handleread, 8192); - $enccontent=OC_CRYPT::encrypt( $content, $key); - fwrite($handlewrite, $enccontent); - } - fclose($handlewrite); - fclose($handleread); - } - } - - - /** - * @brief decryption of a file - * @param string $source - * @param string $target - * @param string $key the decryption key - * - * This function decrypts a file - */ - public static function decryptFile( $source, $target, $key='') { - $handleread = fopen($source, "rb"); - if ($handleread!=false) { - $handlewrite = fopen($target, "wb"); - while (!feof($handleread)) { - $content = fread($handleread, 8192); - $enccontent=OC_CRYPT::decrypt( $content, $key); - if (feof($handleread)) { - $enccontent=rtrim($enccontent, "\0"); - } - fwrite($handlewrite, $enccontent); - } - fclose($handlewrite); - fclose($handleread); - } - } - - /** - * encrypt data in 8192b sized blocks - */ - public static function blockEncrypt($data, $key='') { - $result=''; - while (strlen($data)) { - $result.=self::encrypt(substr($data, 0, 8192), $key); - $data=substr($data, 8192); - } - return $result; - } - - /** - * decrypt data in 8192b sized blocks - */ - public static function blockDecrypt($data, $key='', $maxLength=0) { - $result=''; - while (strlen($data)) { - $result.=self::decrypt(substr($data, 0, 8192), $key); - $data=substr($data, 8192); - } - if ($maxLength>0) { - return substr($result, 0, $maxLength); - } else { - return rtrim($result, "\0"); - } - } -} +. + * + */ + +namespace OCA\Encryption; + +require_once 'Crypt_Blowfish/Blowfish.php'; + +// Todo: +// - Crypt/decrypt button in the userinterface +// - Setting if crypto should be on by default +// - Add a setting "Don´t encrypt files larger than xx because of performance reasons" +// - Transparent decrypt/encrypt in filesystem.php. Autodetect if a file is encrypted (.encrypted extension) +// - Don't use a password directly as encryption key. but a key which is stored on the server and encrypted with the user password. -> password change faster +// - IMPORTANT! Check if the block lenght of the encrypted data stays the same + +/** + * Class for common cryptography functionality + */ + +class Crypt { + + /** + * @brief return encryption mode client or server side encryption + * @param string user name (use system wide setting if name=null) + * @return string 'client' or 'server' + */ + public static function mode( $user = null ) { + +// $mode = \OC_Appconfig::getValue( 'files_encryption', 'mode', 'none' ); +// +// if ( $mode == 'user') { +// if ( !$user ) { +// $user = \OCP\User::getUser(); +// } +// $mode = 'none'; +// if ( $user ) { +// $query = \OC_DB::prepare( "SELECT mode FROM *PREFIX*encryption WHERE uid = ?" ); +// $result = $query->execute(array($user)); +// if ($row = $result->fetchRow()){ +// $mode = $row['mode']; +// } +// } +// } +// +// return $mode; + + return 'server'; + + } + + /** + * @brief Create a new encryption keypair + * @return array publicKey, privatekey + */ + public static function createKeypair() { + + $res = openssl_pkey_new(); + + // Get private key + openssl_pkey_export( $res, $privateKey ); + + // Get public key + $publicKey = openssl_pkey_get_details( $res ); + + $publicKey = $publicKey['key']; + + return( array( 'publicKey' => $publicKey, 'privateKey' => $privateKey ) ); + + } + + /** + * @brief Add arbitrary padding to encrypted data + * @param string $data data to be padded + * @return padded data + * @note In order to end up with data exactly 8192 bytes long we must add two letters. It is impossible to achieve exactly 8192 length blocks with encryption alone, hence padding is added to achieve the required length. + */ + public static function addPadding( $data ) { + + $padded = $data . 'xx'; + + return $padded; + + } + + /** + * @brief Remove arbitrary padding to encrypted data + * @param string $padded padded data to remove padding from + * @return unpadded data on success, false on error + */ + public static function removePadding( $padded ) { + + if ( substr( $padded, -2 ) == 'xx' ) { + + $data = substr( $padded, 0, -2 ); + + return $data; + + } else { + + # TODO: log the fact that unpadded data was submitted for removal of padding + return false; + + } + + } + + /** + * @brief Check if a file's contents contains an IV and is symmetrically encrypted + * @return true / false + * @note see also OCA\Encryption\Util->isEncryptedPath() + */ + public static function isEncryptedContent( $content ) { + + if ( !$content ) { + + return false; + + } + + $noPadding = self::removePadding( $content ); + + // Fetch encryption metadata from end of file + $meta = substr( $noPadding, -22 ); + + // Fetch IV from end of file + $iv = substr( $meta, -16 ); + + // Fetch identifier from start of metadata + $identifier = substr( $meta, 0, 6 ); + + if ( $identifier == '00iv00') { + + return true; + + } else { + + return false; + + } + + } + + /** + * Check if a file is encrypted according to database file cache + * @param string $path + * @return bool + */ + public static function isEncryptedMeta( $path ) { + + # TODO: Use DI to get OC_FileCache_Cached out of here + + // Fetch all file metadata from DB + $metadata = \OC_FileCache_Cached::get( $path, '' ); + + // Return encryption status + return isset( $metadata['encrypted'] ) and ( bool )$metadata['encrypted']; + + } + + /** + * @brief Check if a file is encrypted via legacy system + * @return true / false + */ + public static function isLegacyEncryptedContent( $content ) { + + // Fetch all file metadata from DB + $metadata = \OC_FileCache_Cached::get( $content, '' ); + + // If a file is flagged with encryption in DB, but isn't a valid content + IV combination, it's probably using the legacy encryption system + if ( + $content + and isset( $metadata['encrypted'] ) + and $metadata['encrypted'] === true + and !self::isEncryptedContent( $content ) + ) { + + return true; + + } else { + + return false; + + } + + } + + /** + * @brief Symmetrically encrypt a string + * @returns encrypted file + */ + public static function encrypt( $plainContent, $iv, $passphrase = '' ) { + + if ( $encryptedContent = openssl_encrypt( $plainContent, 'AES-128-CFB', $passphrase, false, $iv ) ) { + + return $encryptedContent; + + } else { + + \OC_Log::write( 'Encryption library', 'Encryption (symmetric) of content failed' , \OC_Log::ERROR ); + + return false; + + } + + } + + /** + * @brief Symmetrically decrypt a string + * @returns decrypted file + */ + public static function decrypt( $encryptedContent, $iv, $passphrase ) { + + if ( $plainContent = openssl_decrypt( $encryptedContent, 'AES-128-CFB', $passphrase, false, $iv ) ) { + + return $plainContent; + + + } else { + + throw new \Exception( 'Encryption library: Decryption (symmetric) of content failed' ); + + return false; + + } + + } + + /** + * @brief Concatenate encrypted data with its IV and padding + * @param string $content content to be concatenated + * @param string $iv IV to be concatenated + * @returns string concatenated content + */ + public static function concatIv ( $content, $iv ) { + + $combined = $content . '00iv00' . $iv; + + return $combined; + + } + + /** + * @brief Split concatenated data and IV into respective parts + * @param string $catFile concatenated data to be split + * @returns array keys: encrypted, iv + */ + public static function splitIv ( $catFile ) { + + // Fetch encryption metadata from end of file + $meta = substr( $catFile, -22 ); + + // Fetch IV from end of file + $iv = substr( $meta, -16 ); + + // Remove IV and IV identifier text to expose encrypted content + $encrypted = substr( $catFile, 0, -22 ); + + $split = array( + 'encrypted' => $encrypted + , 'iv' => $iv + ); + + return $split; + + } + + /** + * @brief Symmetrically encrypts a string and returns keyfile content + * @param $plainContent content to be encrypted in keyfile + * @returns encrypted content combined with IV + * @note IV need not be specified, as it will be stored in the returned keyfile + * and remain accessible therein. + */ + public static function symmetricEncryptFileContent( $plainContent, $passphrase = '' ) { + + if ( !$plainContent ) { + + return false; + + } + + $iv = self::generateIv(); + + if ( $encryptedContent = self::encrypt( $plainContent, $iv, $passphrase ) ) { + + // Combine content to encrypt with IV identifier and actual IV + $catfile = self::concatIv( $encryptedContent, $iv ); + + $padded = self::addPadding( $catfile ); + + return $padded; + + } else { + + \OC_Log::write( 'Encryption library', 'Encryption (symmetric) of keyfile content failed' , \OC_Log::ERROR ); + + return false; + + } + + } + + + /** + * @brief Symmetrically decrypts keyfile content + * @param string $source + * @param string $target + * @param string $key the decryption key + * @returns decrypted content + * + * This function decrypts a file + */ + public static function symmetricDecryptFileContent( $keyfileContent, $passphrase = '' ) { + + if ( !$keyfileContent ) { + + throw new \Exception( 'Encryption library: no data provided for decryption' ); + + } + + // Remove padding + $noPadding = self::removePadding( $keyfileContent ); + + // Split into enc data and catfile + $catfile = self::splitIv( $noPadding ); + + if ( $plainContent = self::decrypt( $catfile['encrypted'], $catfile['iv'], $passphrase ) ) { + + return $plainContent; + + } + + } + + /** + * @brief Creates symmetric keyfile content using a generated key + * @param string $plainContent content to be encrypted + * @returns array keys: key, encrypted + * @note symmetricDecryptFileContent() can be used to decrypt files created using this method + * + * This function decrypts a file + */ + public static function symmetricEncryptFileContentKeyfile( $plainContent ) { + + $key = self::generateKey(); + + if( $encryptedContent = self::symmetricEncryptFileContent( $plainContent, $key ) ) { + + return array( + 'key' => $key + , 'encrypted' => $encryptedContent + ); + + } else { + + return false; + + } + + } + + /** + * @brief Create asymmetrically encrypted keyfile content using a generated key + * @param string $plainContent content to be encrypted + * @returns array keys: key, encrypted + * @note symmetricDecryptFileContent() can be used to decrypt files created using this method + * + * This function decrypts a file + */ + public static function multiKeyEncrypt( $plainContent, array $publicKeys ) { + + $envKeys = array(); + + if( openssl_seal( $plainContent, $sealed, $envKeys, $publicKeys ) ) { + + return array( + 'keys' => $envKeys + , 'encrypted' => $sealed + ); + + } else { + + return false; + + } + + } + + /** + * @brief Asymmetrically encrypt a file using multiple public keys + * @param string $plainContent content to be encrypted + * @returns string $plainContent decrypted string + * @note symmetricDecryptFileContent() can be used to decrypt files created using this method + * + * This function decrypts a file + */ + public static function multiKeyDecrypt( $encryptedContent, $envKey, $privateKey ) { + + if ( !$encryptedContent ) { + + return false; + + } + + if ( openssl_open( $encryptedContent, $plainContent, $envKey, $privateKey ) ) { + + return $plainContent; + + } else { + + \OC_Log::write( 'Encryption library', 'Decryption (asymmetric) of sealed content failed' , \OC_Log::ERROR ); + + return false; + + } + + } + + /** + * @brief Asymetrically encrypt a string using a public key + * @returns encrypted file + */ + public static function keyEncrypt( $plainContent, $publicKey ) { + + openssl_public_encrypt( $plainContent, $encryptedContent, $publicKey ); + + return $encryptedContent; + + } + + /** + * @brief Asymetrically decrypt a file using a private key + * @returns decrypted file + */ + public static function keyDecrypt( $encryptedContent, $privatekey ) { + + openssl_private_decrypt( $encryptedContent, $plainContent, $privatekey ); + + return $plainContent; + + } + + /** + * @brief Encrypts content symmetrically and generates keyfile asymmetrically + * @returns array containing catfile and new keyfile. + * keys: data, key + * @note this method is a wrapper for combining other crypt class methods + */ + public static function keyEncryptKeyfile( $plainContent, $publicKey ) { + + // Encrypt plain data, generate keyfile & encrypted file + $cryptedData = self::symmetricEncryptFileContentKeyfile( $plainContent ); + + // Encrypt keyfile + $cryptedKey = self::keyEncrypt( $cryptedData['key'], $publicKey ); + + return array( 'data' => $cryptedData['encrypted'], 'key' => $cryptedKey ); + + } + + /** + * @brief Takes catfile, keyfile, and private key, and + * performs decryption + * @returns decrypted content + * @note this method is a wrapper for combining other crypt class methods + */ + public static function keyDecryptKeyfile( $catfile, $keyfile, $privateKey ) { + + // Decrypt the keyfile with the user's private key + $decryptedKeyfile = self::keyDecrypt( $keyfile, $privateKey ); + + // Decrypt the catfile symmetrically using the decrypted keyfile + $decryptedData = self::symmetricDecryptFileContent( $catfile, $decryptedKeyfile ); + + return $decryptedData; + + } + + /** + * @brief Symmetrically encrypt a file by combining encrypted component data blocks + */ + public static function symmetricBlockEncryptFileContent( $plainContent, $key ) { + + $crypted = ''; + + $remaining = $plainContent; + + $testarray = array(); + + while( strlen( $remaining ) ) { + + //echo "\n\n\$block = ".substr( $remaining, 0, 6126 ); + + // Encrypt a chunk of unencrypted data and add it to the rest + $block = self::symmetricEncryptFileContent( substr( $remaining, 0, 6126 ), $key ); + + $padded = self::addPadding( $block ); + + $crypted .= $block; + + $testarray[] = $block; + + // Remove the data already encrypted from remaining unencrypted data + $remaining = substr( $remaining, 6126 ); + + } + + //echo "hags "; + + //echo "\n\n\n\$crypted = $crypted\n\n\n"; + + //print_r($testarray); + + return $crypted; + + } + + + /** + * @brief Symmetrically decrypt a file by combining encrypted component data blocks + */ + public static function symmetricBlockDecryptFileContent( $crypted, $key ) { + + $decrypted = ''; + + $remaining = $crypted; + + $testarray = array(); + + while( strlen( $remaining ) ) { + + $testarray[] = substr( $remaining, 0, 8192 ); + + // Decrypt a chunk of unencrypted data and add it to the rest + $decrypted .= self::symmetricDecryptFileContent( $remaining, $key ); + + // Remove the data already encrypted from remaining unencrypted data + $remaining = substr( $remaining, 8192 ); + + } + + //echo "\n\n\$testarray = "; print_r($testarray); + + return $decrypted; + + } + + /** + * @brief Generates a pseudo random initialisation vector + * @return String $iv generated IV + */ + public static function generateIv() { + + if ( $random = openssl_random_pseudo_bytes( 12, $strong ) ) { + + if ( !$strong ) { + + // If OpenSSL indicates randomness is insecure, log error + \OC_Log::write( 'Encryption library', 'Insecure symmetric key was generated using openssl_random_pseudo_bytes()' , \OC_Log::WARN ); + + } + + // We encode the iv purely for string manipulation + // purposes - it gets decoded before use + $iv = base64_encode( $random ); + + return $iv; + + } else { + + throw new Exception( 'Generating IV failed' ); + + } + + } + + /** + * @brief Generate a pseudo random 1024kb ASCII key + * @returns $key Generated key + */ + public static function generateKey() { + + // Generate key + if ( $key = base64_encode( openssl_random_pseudo_bytes( 183, $strong ) ) ) { + + if ( !$strong ) { + + // If OpenSSL indicates randomness is insecure, log error + throw new Exception ( 'Encryption library, Insecure symmetric key was generated using openssl_random_pseudo_bytes()' ); + + } + + return $key; + + } else { + + return false; + + } + + } + + public static function changekeypasscode($oldPassword, $newPassword) { + + if(\OCP\User::isLoggedIn()){ + $key = Keymanager::getPrivateKey( $user, $view ); + if ( ($key = Crypt::symmetricDecryptFileContent($key,$oldpasswd)) ) { + if ( ($key = Crypt::symmetricEncryptFileContent($key, $newpasswd)) ) { + Keymanager::setPrivateKey($key); + return true; + } + } + } + return false; + } + + /** + * @brief Get the blowfish encryption handeler for a key + * @param $key string (optional) + * @return Crypt_Blowfish blowfish object + * + * if the key is left out, the default handeler will be used + */ + public static function getBlowfish( $key = '' ) { + + if ( $key ) { + + return new \Crypt_Blowfish( $key ); + + } else { + + return false; + + } + + } + + public static function legacyCreateKey( $passphrase ) { + + // Generate a random integer + $key = mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ); + + // Encrypt the key with the passphrase + $legacyEncKey = self::legacyEncrypt( $key, $passphrase ); + + return $legacyEncKey; + + } + + /** + * @brief encrypts content using legacy blowfish system + * @param $content the cleartext message you want to encrypt + * @param $key the encryption key (optional) + * @returns encrypted content + * + * This function encrypts an content + */ + public static function legacyEncrypt( $content, $passphrase = '' ) { + + $bf = self::getBlowfish( $passphrase ); + + return $bf->encrypt( $content ); + + } + + /** + * @brief decrypts content using legacy blowfish system + * @param $content the cleartext message you want to decrypt + * @param $key the encryption key (optional) + * @returns cleartext content + * + * This function decrypts an content + */ + public static function legacyDecrypt( $content, $passphrase = '' ) { + + $bf = self::getBlowfish( $passphrase ); + + $decrypted = $bf->decrypt( $content ); + + $trimmed = rtrim( $decrypted, "\0" ); + + return $trimmed; + + } + + public static function legacyKeyRecryptKeyfile( $legacyEncryptedContent, $legacyPassphrase, $publicKey, $newPassphrase ) { + + $decrypted = self::legacyDecrypt( $legacyEncryptedContent, $legacyPassphrase ); + + $recrypted = self::keyEncryptKeyfile( $decrypted, $publicKey ); + + return $recrypted; + + } + + /** + * @brief Re-encryptes a legacy blowfish encrypted file using AES with integrated IV + * @param $legacyContent the legacy encrypted content to re-encrypt + * @returns cleartext content + * + * This function decrypts an content + */ + public static function legacyRecrypt( $legacyContent, $legacyPassphrase, $newPassphrase ) { + + # TODO: write me + + } + +} + +?> \ No newline at end of file diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php deleted file mode 100644 index d516c0c21b..0000000000 --- a/apps/files_encryption/lib/cryptstream.php +++ /dev/null @@ -1,177 +0,0 @@ -. - * - */ - -/** - * transparently encrypted filestream - * - * you can use it as wrapper around an existing stream by setting - * OC_CryptStream::$sourceStreams['foo']=array('path'=>$path, 'stream'=>$stream) - * and then fopen('crypt://streams/foo'); - */ - -class OC_CryptStream{ - public static $sourceStreams=array(); - private $source; - private $path; - private $meta=array();//header/meta for source stream - private $writeCache; - private $size; - private static $rootView; - - public function stream_open($path, $mode, $options, &$opened_path) { - if ( ! self::$rootView) { - self::$rootView=new OC_FilesystemView(''); - } - $path=str_replace('crypt://', '', $path); - if (dirname($path)=='streams' and isset(self::$sourceStreams[basename($path)])) { - $this->source=self::$sourceStreams[basename($path)]['stream']; - $this->path=self::$sourceStreams[basename($path)]['path']; - $this->size=self::$sourceStreams[basename($path)]['size']; - } else { - $this->path=$path; - if ($mode=='w' or $mode=='w+' or $mode=='wb' or $mode=='wb+') { - $this->size=0; - } else { - $this->size=self::$rootView->filesize($path, $mode); - } - OC_FileProxy::$enabled=false;//disable fileproxies so we can open the source file - $this->source=self::$rootView->fopen($path, $mode); - OC_FileProxy::$enabled=true; - if ( ! is_resource($this->source)) { - OCP\Util::writeLog('files_encryption', 'failed to open '.$path, OCP\Util::ERROR); - } - } - if (is_resource($this->source)) { - $this->meta=stream_get_meta_data($this->source); - } - return is_resource($this->source); - } - - public function stream_seek($offset, $whence=SEEK_SET) { - $this->flush(); - fseek($this->source, $offset, $whence); - } - - public function stream_tell() { - return ftell($this->source); - } - - public function stream_read($count) { - //$count will always be 8192 https://bugs.php.net/bug.php?id=21641 - //This makes this function a lot simpler but will breake everything the moment it's fixed - $this->writeCache=''; - if ($count!=8192) { - OCP\Util::writeLog('files_encryption', - 'php bug 21641 no longer holds, decryption will not work', - OCP\Util::FATAL); - die(); - } - $pos=ftell($this->source); - $data=fread($this->source, 8192); - if (strlen($data)) { - $result=OC_Crypt::decrypt($data); - } else { - $result=''; - } - $length=$this->size-$pos; - if ($length<8192) { - $result=substr($result, 0, $length); - } - return $result; - } - - public function stream_write($data) { - $length=strlen($data); - $currentPos=ftell($this->source); - if ($this->writeCache) { - $data=$this->writeCache.$data; - $this->writeCache=''; - } - if ($currentPos%8192!=0) { - //make sure we always start on a block start - fseek($this->source, -($currentPos%8192), SEEK_CUR); - $encryptedBlock=fread($this->source, 8192); - fseek($this->source, -($currentPos%8192), SEEK_CUR); - $block=OC_Crypt::decrypt($encryptedBlock); - $data=substr($block, 0, $currentPos%8192).$data; - fseek($this->source, -($currentPos%8192), SEEK_CUR); - } - $currentPos=ftell($this->source); - while ($remainingLength=strlen($data)>0) { - if ($remainingLength<8192) { - $this->writeCache=$data; - $data=''; - } else { - $encrypted=OC_Crypt::encrypt(substr($data, 0, 8192)); - fwrite($this->source, $encrypted); - $data=substr($data, 8192); - } - } - $this->size=max($this->size, $currentPos+$length); - return $length; - } - - public function stream_set_option($option, $arg1, $arg2) { - switch($option) { - case STREAM_OPTION_BLOCKING: - stream_set_blocking($this->source, $arg1); - break; - case STREAM_OPTION_READ_TIMEOUT: - stream_set_timeout($this->source, $arg1, $arg2); - break; - case STREAM_OPTION_WRITE_BUFFER: - stream_set_write_buffer($this->source, $arg1, $arg2); - } - } - - public function stream_stat() { - return fstat($this->source); - } - - public function stream_lock($mode) { - flock($this->source, $mode); - } - - public function stream_flush() { - return fflush($this->source); - } - - public function stream_eof() { - return feof($this->source); - } - - private function flush() { - if ($this->writeCache) { - $encrypted=OC_Crypt::encrypt($this->writeCache); - fwrite($this->source, $encrypted); - $this->writeCache=''; - } - } - - public function stream_close() { - $this->flush(); - if ($this->meta['mode']!='r' and $this->meta['mode']!='rb') { - OC_FileCache::put($this->path, array('encrypted'=>true, 'size'=>$this->size), ''); - } - return fclose($this->source); - } -} diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php new file mode 100755 index 0000000000..706e1c2661 --- /dev/null +++ b/apps/files_encryption/lib/keymanager.php @@ -0,0 +1,365 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see . + * + */ + +namespace OCA\Encryption; + +/** + * @brief Class to manage storage and retrieval of encryption keys + * @note Where a method requires a view object, it's root must be '/' + */ +class Keymanager { + + # TODO: make all dependencies (including static classes) explicit, such as ocfsview objects, by adding them as method arguments (dependency injection) + + /** + * @brief retrieve the ENCRYPTED private key from a user + * + * @return string private key or false + * @note the key returned by this method must be decrypted before use + */ + public static function getPrivateKey( \OC_FilesystemView $view, $user ) { + + $path = '/' . $user . '/' . 'files_encryption' . '/' . $user.'.private.key'; + + $key = $view->file_get_contents( $path ); + + return $key; + } + + /** + * @brief retrieve public key for a specified user + * @return string public key or false + */ + public static function getPublicKey( \OC_FilesystemView $view, $userId ) { + + return $view->file_get_contents( '/public-keys/' . '/' . $userId . '.public.key' ); + + } + + /** + * @brief retrieve both keys from a user (private and public) + * @return array keys: privateKey, publicKey + */ + public static function getUserKeys( \OC_FilesystemView $view, $userId ) { + + return array( + 'publicKey' => self::getPublicKey( $view, $userId ) + , 'privateKey' => self::getPrivateKey( $view, $userId ) + ); + + } + + /** + * @brief Retrieve public keys of all users with access to a file + * @param string $path Path to file + * @return array of public keys for the given file + * @note Checks that the sharing app is enabled should be performed + * by client code, that isn't checked here + */ + public static function getPublicKeys( \OC_FilesystemView $view, $userId, $filePath ) { + + $path = ltrim( $path, '/' ); + + $filepath = '/' . $userId . '/files/' . $filePath; + + // Check if sharing is enabled + if ( OC_App::isEnabled( 'files_sharing' ) ) { + +// // Check if file was shared with other users +// $query = \OC_DB::prepare( " +// SELECT +// uid_owner +// , source +// , target +// , uid_shared_with +// FROM +// `*PREFIX*sharing` +// WHERE +// ( target = ? AND uid_shared_with = ? ) +// OR source = ? +// " ); +// +// $result = $query->execute( array ( $filepath, $userId, $filepath ) ); +// +// $users = array(); +// +// if ( $row = $result->fetchRow() ) +// { +// $source = $row['source']; +// $owner = $row['uid_owner']; +// $users[] = $owner; +// // get the uids of all user with access to the file +// $query = \OC_DB::prepare( "SELECT source, uid_shared_with FROM `*PREFIX*sharing` WHERE source = ?" ); +// $result = $query->execute( array ($source)); +// while ( ($row = $result->fetchRow()) ) { +// $users[] = $row['uid_shared_with']; +// +// } +// +// } + + } else { + + // check if it is a file owned by the user and not shared at all + $userview = new \OC_FilesystemView( '/'.$userId.'/files/' ); + + if ( $userview->file_exists( $path ) ) { + + $users[] = $userId; + + } + + } + + $view = new \OC_FilesystemView( '/public-keys/' ); + + $keylist = array(); + + $count = 0; + + foreach ( $users as $user ) { + + $keylist['key'.++$count] = $view->file_get_contents( $user.'.public.key' ); + + } + + return $keylist; + + } + + /** + * @brief retrieve keyfile for an encrypted file + * @param string file name + * @return string file key or false + * @note The keyfile returned is asymmetrically encrypted. Decryption + * of the keyfile must be performed by client code + */ + public static function getFileKey( \OC_FilesystemView $view, $userId, $filePath ) { + + $filePath_f = ltrim( $filePath, '/' ); + +// // update $keypath and $userId if path point to a file shared by someone else +// $query = \OC_DB::prepare( "SELECT uid_owner, source, target FROM `*PREFIX*sharing` WHERE target = ? AND uid_shared_with = ?" ); +// +// $result = $query->execute( array ('/'.$userId.'/files/'.$keypath, $userId)); +// +// if ($row = $result->fetchRow()) { +// +// $keypath = $row['source']; +// $keypath_parts = explode( '/', $keypath ); +// $userId = $keypath_parts[1]; +// $keypath = str_replace( '/' . $userId . '/files/', '', $keypath ); +// +// } + + return $view->file_get_contents( '/' . $userId . '/files_encryption/keyfiles/' . $filePath_f . '.key' ); + + } + + /** + * @brief retrieve file encryption key + * + * @param string file name + * @return string file key or false + */ + public static function deleteFileKey( $path, $staticUserClass = 'OCP\User' ) { + + $keypath = ltrim( $path, '/' ); + $user = $staticUserClass::getUser(); + + // update $keypath and $user if path point to a file shared by someone else +// $query = \OC_DB::prepare( "SELECT uid_owner, source, target FROM `*PREFIX*sharing` WHERE target = ? AND uid_shared_with = ?" ); +// +// $result = $query->execute( array ('/'.$user.'/files/'.$keypath, $user)); +// +// if ($row = $result->fetchRow()) { +// +// $keypath = $row['source']; +// $keypath_parts = explode( '/', $keypath ); +// $user = $keypath_parts[1]; +// $keypath = str_replace( '/' . $user . '/files/', '', $keypath ); +// +// } + + $view = new \OC_FilesystemView('/'.$user.'/files_encryption/keyfiles/'); + + return $view->unlink( $keypath . '.key' ); + + } + + /** + * @brief store private key from the user + * @param string key + * @return bool + * @note Encryption of the private key must be performed by client code + * as no encryption takes place here + */ + public static function setPrivateKey( $key ) { + + $user = \OCP\User::getUser(); + + $view = new \OC_FilesystemView( '/' . $user . '/files_encryption' ); + + \OC_FileProxy::$enabled = false; + + if ( !$view->file_exists( '' ) ) $view->mkdir( '' ); + + return $view->file_put_contents( $user . '.private.key', $key ); + + \OC_FileProxy::$enabled = true; + + } + + /** + * @brief store private keys from the user + * + * @param string privatekey + * @param string publickey + * @return bool true/false + */ + public static function setUserKeys($privatekey, $publickey) { + + return (self::setPrivateKey($privatekey) && self::setPublicKey($publickey)); + + } + + /** + * @brief store public key of the user + * + * @param string key + * @return bool true/false + */ + public static function setPublicKey( $key ) { + + $view = new \OC_FilesystemView( '/public-keys' ); + + \OC_FileProxy::$enabled = false; + + if ( !$view->file_exists( '' ) ) $view->mkdir( '' ); + + return $view->file_put_contents( \OCP\User::getUser() . '.public.key', $key ); + + \OC_FileProxy::$enabled = true; + + } + + /** + * @brief store file encryption key + * + * @param string $path relative path of the file, including filename + * @param string $key + * @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( $path, $key, $view = Null, $dbClassName = '\OC_DB') { + + $targetPath = ltrim( $path, '/' ); + $user = \OCP\User::getUser(); + +// // update $keytarget and $user if key belongs to a file shared by someone else +// $query = $dbClassName::prepare( "SELECT uid_owner, source, target FROM `*PREFIX*sharing` WHERE target = ? AND uid_shared_with = ?" ); +// +// $result = $query->execute( array ( '/'.$user.'/files/'.$targetPath, $user ) ); +// +// if ( $row = $result->fetchRow( ) ) { +// +// $targetPath = $row['source']; +// +// $targetPath_parts = explode( '/', $targetPath ); +// +// $user = $targetPath_parts[1]; +// +// $rootview = new \OC_FilesystemView( '/' ); +// +// if ( ! $rootview->is_writable( $targetPath ) ) { +// +// \OC_Log::write( 'Encryption library', "File Key not updated because you don't have write access for the corresponding file", \OC_Log::ERROR ); +// +// return false; +// +// } +// +// $targetPath = str_replace( '/'.$user.'/files/', '', $targetPath ); +// +// //TODO: check for write permission on shared file once the new sharing API is in place +// +// } + + $path_parts = pathinfo( $targetPath ); + + if ( !$view ) { + + $view = new \OC_FilesystemView( '/' ); + + } + + $view->chroot( '/' . $user . '/files_encryption/keyfiles' ); + + // If the file resides within a subdirectory, create it + if ( + isset( $path_parts['dirname'] ) + && ! $view->file_exists( $path_parts['dirname'] ) + ) { + + $view->mkdir( $path_parts['dirname'] ); + + } + + // Save the keyfile in parallel directory + return $view->file_put_contents( '/' . $targetPath . '.key', $key ); + + } + + /** + * @brief change password of private encryption key + * + * @param string $oldpasswd old password + * @param string $newpasswd new password + * @return bool true/false + */ + public static function changePasswd($oldpasswd, $newpasswd) { + + if ( \OCP\User::checkPassword(\OCP\User::getUser(), $newpasswd) ) { + return Crypt::changekeypasscode($oldpasswd, $newpasswd); + } + return false; + + } + + /** + * @brief Fetch the legacy encryption key from user files + * @param string $login used to locate the legacy key + * @param string $passphrase used to decrypt the legacy key + * @return true / false + * + * if the key is left out, the default handeler will be used + */ + public function getLegacyKey() { + + $user = \OCP\User::getUser(); + $view = new \OC_FilesystemView( '/' . $user ); + return $view->file_get_contents( 'encryption.key' ); + + } + +} \ No newline at end of file diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index e8dbd95c29..52f47dba29 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -3,8 +3,9 @@ /** * ownCloud * -* @author Robin Appelman -* @copyright 2011 Robin Appelman icewind1991@gmail.com +* @author Sam Tuke, Robin Appelman +* @copyright 2012 Sam Tuke samtuke@owncloud.com, Robin Appelman +* icewind1991@gmail.com * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -21,111 +22,267 @@ * */ -/** - * transparent encryption - */ +namespace OCA\Encryption; -class OC_FileProxy_Encryption extends OC_FileProxy{ - private static $blackList=null; //mimetypes blacklisted from encryption - private static $enableEncryption=null; +class Proxy extends \OC_FileProxy { + private static $blackList = null; //mimetypes blacklisted from encryption + + private static $enableEncryption = null; + /** - * check if a file should be encrypted during write + * Check if a file requires encryption * @param string $path * @return bool + * + * Tests if server side encryption is enabled, and file is allowed by blacklists */ - private static function shouldEncrypt($path) { - if (is_null(self::$enableEncryption)) { - self::$enableEncryption=(OCP\Config::getAppValue('files_encryption', 'enable_encryption', 'true')=='true'); + private static function shouldEncrypt( $path ) { + + if ( is_null( self::$enableEncryption ) ) { + + if ( + \OCP\Config::getAppValue( 'files_encryption', 'enable_encryption', 'true' ) == 'true' + && Crypt::mode() == 'server' + ) { + + self::$enableEncryption = true; + + } else { + + self::$enableEncryption = false; + + } + } - if ( ! self::$enableEncryption) { + + if ( !self::$enableEncryption ) { + return false; + } - if (is_null(self::$blackList)) { - self::$blackList=explode(',', OCP\Config::getAppValue('files_encryption', - 'type_blacklist', - 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg')); + + if ( is_null(self::$blackList ) ) { + + self::$blackList = explode(',', \OCP\Config::getAppValue( 'files_encryption','type_blacklist','jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg' ) ); + } - if (self::isEncrypted($path)) { + + if ( Crypt::isEncryptedContent( $path ) ) { + return true; + } - $extension=substr($path, strrpos($path, '.')+1); - if (array_search($extension, self::$blackList)===false) { + + $extension = substr( $path, strrpos( $path,'.' ) +1 ); + + if ( array_search( $extension, self::$blackList ) === false ){ + return true; + } + + return false; } - + + public function preFile_put_contents( $path, &$data ) { + + if ( self::shouldEncrypt( $path ) ) { + + if ( !is_resource( $data ) ) { //stream put contents should have been converted to fopen + + $userId = \OCP\USER::getUser(); + + $rootView = new \OC_FilesystemView( '/' ); + + // Set the filesize for userland, before encrypting + $size = strlen( $data ); + + // Disable encryption proxy to prevent recursive calls + \OC_FileProxy::$enabled = false; + + // Encrypt plain data and fetch key + $encrypted = Crypt::keyEncryptKeyfile( $data, Keymanager::getPublicKey( $rootView, $userId ) ); + + // Replace plain content with encrypted content by reference + $data = $encrypted['data']; + + $filePath = explode( '/', $path ); + + $filePath = array_slice( $filePath, 3 ); + + $filePath = '/' . implode( '/', $filePath ); + + # TODO: make keyfile dir dynamic from app config + $view = new \OC_FilesystemView( '/' . $userId . '/files_encryption/keyfiles' ); + + // Save keyfile for newly encrypted file in parallel directory tree + Keymanager::setFileKey( $filePath, $encrypted['key'], $view, '\OC_DB' ); + + // Update the file cache with file info + \OC_FileCache::put( $path, array( 'encrypted'=>true, 'size' => $size ), '' ); + + // Re-enable proxy - our work is done + \OC_FileProxy::$enabled = true; + + } + } + + } + /** - * check if a file is encrypted - * @param string $path - * @return bool + * @param string $path Path of file from which has been read + * @param string $data Data that has been read from file */ - private static function isEncrypted($path) { - $metadata=OC_FileCache_Cached::get($path, ''); - return isset($metadata['encrypted']) and (bool)$metadata['encrypted']; - } + public function postFile_get_contents( $path, $data ) { + + # TODO: Use dependency injection to add required args for view and user etc. to this method - public function preFile_put_contents($path,&$data) { - if (self::shouldEncrypt($path)) { - if ( ! is_resource($data)) {//stream put contents should have been converter to fopen - $size=strlen($data); - $data=OC_Crypt::blockEncrypt($data); - OC_FileCache::put($path, array('encrypted'=>true,'size'=>$size), ''); - } + // Disable encryption proxy to prevent recursive calls + \OC_FileProxy::$enabled = false; + + // If data is a catfile + if ( + Crypt::mode() == 'server' + && Crypt::isEncryptedContent( $data ) + ) { + + $split = explode( '/', $path ); + + $filePath = array_slice( $split, 3 ); + + $filePath = '/' . implode( '/', $filePath ); + + //$cached = \OC_FileCache_Cached::get( $path, '' ); + + $view = new \OC_FilesystemView( '' ); + + $userId = \OCP\USER::getUser(); + + $encryptedKeyfile = Keymanager::getFileKey( $view, $userId, $filePath ); + + $session = new Session(); + + $decrypted = Crypt::keyDecryptKeyfile( $data, $encryptedKeyfile, $session->getPrivateKey( $split[1] ) ); + + } elseif ( + Crypt::mode() == 'server' + && isset( $_SESSION['legacyenckey'] ) + && Crypt::isEncryptedMeta( $path ) + ) { + + $decrypted = Crypt::legacyDecrypt( $data, $_SESSION['legacyenckey'] ); + } - } - - public function postFile_get_contents($path, $data) { - if (self::isEncrypted($path)) { - $cached=OC_FileCache_Cached::get($path, ''); - $data=OC_Crypt::blockDecrypt($data, '', $cached['size']); + + \OC_FileProxy::$enabled = true; + + if ( ! isset( $decrypted ) ) { + + $decrypted = $data; + } - return $data; + + return $decrypted; + } - - public function postFopen($path,&$result) { - if ( ! $result) { + + public function postFopen( $path, &$result ){ + + if ( !$result ) { + return $result; + } - $meta=stream_get_meta_data($result); - if (self::isEncrypted($path)) { - fclose($result); - $result=fopen('crypt://'.$path, $meta['mode']); - } elseif (self::shouldEncrypt($path) and $meta['mode']!='r' and $meta['mode']!='rb') { - if (OC_Filesystem::file_exists($path) and OC_Filesystem::filesize($path)>0) { - //first encrypt the target file so we don't end up with a half encrypted file - OCP\Util::writeLog('files_encryption', 'Decrypting '.$path.' before writing', OCP\Util::DEBUG); - $tmp=fopen('php://temp'); - OCP\Files::streamCopy($result, $tmp); - fclose($result); - OC_Filesystem::file_put_contents($path, $tmp); - fclose($tmp); + + // Reformat path for use with OC_FSV + $path_split = explode( '/', $path ); + $path_f = implode( array_slice( $path_split, 3 ) ); + + // Disable encryption proxy to prevent recursive calls + \OC_FileProxy::$enabled = false; + + $meta = stream_get_meta_data( $result ); + + $view = new \OC_FilesystemView( '' ); + + $util = new Util( $view, \OCP\USER::getUser()); + + // If file is already encrypted, decrypt using crypto protocol + if ( + Crypt::mode() == 'server' + && $util->isEncryptedPath( $path ) + ) { + + // Close the original encrypted file + fclose( $result ); + + // Open the file using the crypto stream wrapper + // protocol and let it do the decryption work instead + $result = fopen( 'crypt://' . $path_f, $meta['mode'] ); + + + } elseif ( + self::shouldEncrypt( $path ) + and $meta ['mode'] != 'r' + and $meta['mode'] != 'rb' + ) { + // If the file is not yet encrypted, but should be + // encrypted when it's saved (it's not read only) + + // NOTE: this is the case for new files saved via WebDAV + + if ( + $view->file_exists( $path ) + and $view->filesize( $path ) > 0 + ) { + $x = $view->file_get_contents( $path ); + + $tmp = tmpfile(); + +// // Make a temporary copy of the original file +// \OCP\Files::streamCopy( $result, $tmp ); +// +// // Close the original stream, we'll return another one +// fclose( $result ); +// +// $view->file_put_contents( $path_f, $tmp ); +// +// fclose( $tmp ); + } - $result=fopen('crypt://'.$path, $meta['mode']); + + $result = fopen( 'crypt://'.$path_f, $meta['mode'] ); + } + + // Re-enable the proxy + \OC_FileProxy::$enabled = true; + return $result; + } - public function postGetMimeType($path, $mime) { - if (self::isEncrypted($path)) { - $mime=OCP\Files::getMimeType('crypt://'.$path, 'w'); + public function postGetMimeType($path,$mime){ + if( Crypt::isEncryptedContent($path)){ + $mime = \OCP\Files::getMimeType('crypt://'.$path,'w'); } return $mime; } - public function postStat($path, $data) { - if (self::isEncrypted($path)) { - $cached=OC_FileCache_Cached::get($path, ''); + public function postStat($path,$data){ + if( Crypt::isEncryptedContent($path)){ + $cached= \OC_FileCache_Cached::get($path,''); $data['size']=$cached['size']; } return $data; } - public function postFileSize($path, $size) { - if (self::isEncrypted($path)) { - $cached=OC_FileCache_Cached::get($path, ''); + public function postFileSize($path,$size){ + if( Crypt::isEncryptedContent($path)){ + $cached = \OC_FileCache_Cached::get($path,''); return $cached['size']; - } else { + }else{ return $size; } } diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php new file mode 100644 index 0000000000..85d533fde7 --- /dev/null +++ b/apps/files_encryption/lib/session.php @@ -0,0 +1,66 @@ +. + * + */ + +namespace OCA\Encryption; + +/** + * Class for handling encryption related session data + */ + +class Session { + + /** + * @brief Sets user id for session and triggers emit + * @return bool + * + */ + public function setPrivateKey( $privateKey, $userId ) { + + $_SESSION['privateKey'] = $privateKey; + + return true; + + } + + /** + * @brief Gets user id for session and triggers emit + * @returns string $privateKey The user's plaintext private key + * + */ + public function getPrivateKey( $userId ) { + + if ( + isset( $_SESSION['privateKey'] ) + && !empty( $_SESSION['privateKey'] ) + ) { + + return $_SESSION['privateKey']; + + } else { + + return false; + + } + + } + +} \ No newline at end of file diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php new file mode 100644 index 0000000000..f482e2d75a --- /dev/null +++ b/apps/files_encryption/lib/stream.php @@ -0,0 +1,464 @@ +, 2011 Robin Appelman + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see . + * + */ + +/** + * transparently encrypted filestream + * + * you can use it as wrapper around an existing stream by setting CryptStream::$sourceStreams['foo']=array('path'=>$path,'stream'=>$stream) + * and then fopen('crypt://streams/foo'); + */ + +namespace OCA\Encryption; + +/** + * @brief Provides 'crypt://' stream wrapper protocol. + * @note We use a stream wrapper because it is the most secure way to handle + * decrypted content transfers. There is no safe way to decrypt the entire file + * somewhere on the server, so we have to encrypt and decrypt blocks on the fly. + * @note Paths used with this protocol MUST BE RELATIVE. Use URLs like: + * crypt://filename, or crypt://subdirectory/filename, NOT + * crypt:///home/user/owncloud/data. Otherwise keyfiles will be put in + * [owncloud]/data/user/files_encryption/keyfiles/home/user/owncloud/data and + * will not be accessible to other methods. + * @note Data read and written must always be 8192 bytes long, as this is the + * buffer size used internally by PHP. The encryption process makes the input + * data longer, and input is chunked into smaller pieces in order to result in + * a 8192 encrypted block size. + */ +class Stream { + + public static $sourceStreams = array(); + + # TODO: make all below properties private again once unit testing is configured correctly + public $rawPath; // The raw path received by stream_open + public $path_f; // The raw path formatted to include username and data directory + private $userId; + private $handle; // Resource returned by fopen + private $path; + private $readBuffer; // For streams that dont support seeking + private $meta = array(); // Header / meta for source stream + private $count; + private $writeCache; + public $size; + private $publicKey; + private $keyfile; + private $encKeyfile; + private static $view; // a fsview object set to user dir + private $rootView; // a fsview object set to '/' + + public function stream_open( $path, $mode, $options, &$opened_path ) { + + // Get access to filesystem via filesystemview object + if ( !self::$view ) { + + self::$view = new \OC_FilesystemView( $this->userId . '/' ); + + } + + // Set rootview object if necessary + if ( ! $this->rootView ) { + + $this->rootView = new \OC_FilesystemView( $this->userId . '/' ); + + } + + $this->userId = \OCP\User::getUser(); + + // Get the bare file path + $path = str_replace( 'crypt://', '', $path ); + + $this->rawPath = $path; + + $this->path_f = $this->userId . '/files/' . $path; + + if ( + dirname( $path ) == 'streams' + and isset( self::$sourceStreams[basename( $path )] ) + ) { + + // Is this just for unit testing purposes? + + $this->handle = self::$sourceStreams[basename( $path )]['stream']; + + $this->path = self::$sourceStreams[basename( $path )]['path']; + + $this->size = self::$sourceStreams[basename( $path )]['size']; + + } else { + + if ( + $mode == 'w' + or $mode == 'w+' + or $mode == 'wb' + or $mode == 'wb+' + ) { + + $this->size = 0; + + } else { + + + + $this->size = self::$view->filesize( $this->path_f, $mode ); + + //$this->size = filesize( $path ); + + } + + // Disable fileproxies so we can open the source file without recursive encryption + \OC_FileProxy::$enabled = false; + + //$this->handle = fopen( $path, $mode ); + + $this->handle = self::$view->fopen( $this->path_f, $mode ); + + \OC_FileProxy::$enabled = true; + + if ( !is_resource( $this->handle ) ) { + + \OCP\Util::writeLog( 'files_encryption', 'failed to open '.$path, \OCP\Util::ERROR ); + + } + + } + + if ( is_resource( $this->handle ) ) { + + $this->meta = stream_get_meta_data( $this->handle ); + + } + + return is_resource( $this->handle ); + + } + + public function stream_seek( $offset, $whence = SEEK_SET ) { + + $this->flush(); + + fseek( $this->handle, $offset, $whence ); + + } + + public function stream_tell() { + return ftell($this->handle); + } + + public function stream_read( $count ) { + + $this->writeCache = ''; + + if ( $count != 8192 ) { + + // $count will always be 8192 https://bugs.php.net/bug.php?id=21641 + // This makes this function a lot simpler, but will break this class if the above 'bug' gets 'fixed' + \OCP\Util::writeLog( 'files_encryption', 'PHP "bug" 21641 no longer holds, decryption system requires refactoring', OCP\Util::FATAL ); + + die(); + + } + +// $pos = ftell( $this->handle ); +// + // Get the data from the file handle + $data = fread( $this->handle, 8192 ); + + if ( strlen( $data ) ) { + + $this->getKey(); + + $result = Crypt::symmetricDecryptFileContent( $data, $this->keyfile ); + + } else { + + $result = ''; + + } + +// $length = $this->size - $pos; +// +// if ( $length < 8192 ) { +// +// $result = substr( $result, 0, $length ); +// +// } + + return $result; + + } + + /** + * @brief Encrypt and pad data ready for writting to disk + * @param string $plainData data to be encrypted + * @param string $key key to use for encryption + * @return encrypted data on success, false on failure + */ + public function preWriteEncrypt( $plainData, $key ) { + + // Encrypt data to 'catfile', which includes IV + if ( $encrypted = Crypt::symmetricEncryptFileContent( $plainData, $key ) ) { + + return $encrypted; + + } else { + + return false; + + } + + } + + /** + * @brief Get the keyfile for the current file, generate one if necessary + * @param bool $generate if true, a new key will be generated if none can be found + * @return bool true on key found and set, false on key not found and new key generated and set + */ + public function getKey() { + + // If a keyfile already exists for a file named identically to file to be written + if ( self::$view->file_exists( $this->userId . '/'. 'files_encryption' . '/' . 'keyfiles' . '/' . $this->rawPath . '.key' ) ) { + + # TODO: add error handling for when file exists but no keyfile + + // Fetch existing keyfile + $this->encKeyfile = Keymanager::getFileKey( $this->rootView, $this->userId, $this->rawPath ); + + $this->getUser(); + + $session = new Session(); + + $privateKey = $session->getPrivateKey( $this->userId ); + + $this->keyfile = Crypt::keyDecrypt( $this->encKeyfile, $privateKey ); + + return true; + + } else { + + return false; + + } + + } + + public function getuser() { + + // Only get the user again if it isn't already set + if ( empty( $this->userId ) ) { + + # TODO: Move this user call out of here - it belongs elsewhere + $this->userId = \OCP\User::getUser(); + + } + + # TODO: Add a method for getting the user in case OCP\User:: + # getUser() doesn't work (can that scenario ever occur?) + + } + + /** + * @brief Handle plain data from the stream, and write it in 8192 byte blocks + * @param string $data data to be written to disk + * @note the data will be written to the path stored in the stream handle, set in stream_open() + * @note $data is only ever be a maximum of 8192 bytes long. This is set by PHP internally. stream_write() is called multiple times in a loop on data larger than 8192 bytes + * @note Because the encryption process used increases the length of $data, a writeCache is used to carry over data which would not fit in the required block size + * @note Padding is added to each encrypted block to ensure that the resulting block is exactly 8192 bytes. This is removed during stream_read + * @note PHP automatically updates the file pointer after writing data to reflect it's length. There is generally no need to update the poitner manually using fseek + */ + public function stream_write( $data ) { + + // Disable the file proxies so that encryption is not automatically attempted when the file is written to disk - we are handling that separately here and we don't want to get into an infinite loop + \OC_FileProxy::$enabled = false; + + // Get the length of the unencrypted data that we are handling + $length = strlen( $data ); + + // So far this round, no data has been written + $written = 0; + + // Find out where we are up to in the writing of data to the file + $pointer = ftell( $this->handle ); + + // Make sure the userId is set + $this->getuser(); + + // Get / generate the keyfile for the file we're handling + // If we're writing a new file (not overwriting an existing one), save the newly generated keyfile + if ( ! $this->getKey() ) { + + $this->keyfile = Crypt::generateKey(); + + $this->publicKey = Keymanager::getPublicKey( $this->rootView, $this->userId ); + + $this->encKeyfile = Crypt::keyEncrypt( $this->keyfile, $this->publicKey ); + + // Save the new encrypted file key + Keymanager::setFileKey( $this->rawPath, $this->encKeyfile, new \OC_FilesystemView( '/' ) ); + + # TODO: move this new OCFSV out of here some how, use DI + + } + + // If extra data is left over from the last round, make sure it is integrated into the next 6126 / 8192 block + if ( $this->writeCache ) { + + // Concat writeCache to start of $data + $data = $this->writeCache . $data; + + // Clear the write cache, ready for resuse - it has been flushed and its old contents processed + $this->writeCache = ''; + + } +// +// // Make sure we always start on a block start + if ( 0 != ( $pointer % 8192 ) ) { // if the current positoin of file indicator is not aligned to a 8192 byte block, fix it so that it is + +// fseek( $this->handle, - ( $pointer % 8192 ), SEEK_CUR ); +// +// $pointer = ftell( $this->handle ); +// +// $unencryptedNewBlock = fread( $this->handle, 8192 ); +// +// fseek( $this->handle, - ( $currentPos % 8192 ), SEEK_CUR ); +// +// $block = Crypt::symmetricDecryptFileContent( $unencryptedNewBlock, $this->keyfile ); +// +// $x = substr( $block, 0, $currentPos % 8192 ); +// +// $data = $x . $data; +// +// fseek( $this->handle, - ( $currentPos % 8192 ), SEEK_CUR ); +// + } + +// $currentPos = ftell( $this->handle ); + +// // While there still remains somed data to be processed & written + while( strlen( $data ) > 0 ) { +// +// // Remaining length for this iteration, not of the entire file (may be greater than 8192 bytes) +// $remainingLength = strlen( $data ); +// +// // If data remaining to be written is less than the size of 1 6126 byte block + if ( strlen( $data ) < 6126 ) { + + // Set writeCache to contents of $data + // The writeCache will be carried over to the next write round, and added to the start of $data to ensure that written blocks are always the correct length. If there is still data in writeCache after the writing round has finished, then the data will be written to disk by $this->flush(). + $this->writeCache = $data; + + // Clear $data ready for next round + $data = ''; +// + } else { + + // Read the chunk from the start of $data + $chunk = substr( $data, 0, 6126 ); + + $encrypted = $this->preWriteEncrypt( $chunk, $this->keyfile ); + + // Write the data chunk to disk. This will be addended to the last data chunk if the file being handled totals more than 6126 bytes + fwrite( $this->handle, $encrypted ); + + $writtenLen = strlen( $encrypted ); + //fseek( $this->handle, $writtenLen, SEEK_CUR ); + + // Remove the chunk we just processed from $data, leaving only unprocessed data in $data var, for handling on the next round + $data = substr( $data, 6126 ); + + } + + } + + $this->size = max( $this->size, $pointer + $length ); + + return $length; + + } + + + public function stream_set_option($option,$arg1,$arg2) { + switch($option) { + case STREAM_OPTION_BLOCKING: + stream_set_blocking($this->handle,$arg1); + break; + case STREAM_OPTION_READ_TIMEOUT: + stream_set_timeout($this->handle,$arg1,$arg2); + break; + case STREAM_OPTION_WRITE_BUFFER: + stream_set_write_buffer($this->handle,$arg1,$arg2); + } + } + + public function stream_stat() { + return fstat($this->handle); + } + + public function stream_lock($mode) { + flock($this->handle,$mode); + } + + public function stream_flush() { + + return fflush($this->handle); // Not a typo: http://php.net/manual/en/function.fflush.php + + } + + public function stream_eof() { + return feof($this->handle); + } + + private function flush() { + + if ( $this->writeCache ) { + + // Set keyfile property for file in question + $this->getKey(); + + $encrypted = $this->preWriteEncrypt( $this->writeCache, $this->keyfile ); + + fwrite( $this->handle, $encrypted ); + + $this->writeCache = ''; + + } + + } + + public function stream_close() { + + $this->flush(); + + if ( + $this->meta['mode']!='r' + and $this->meta['mode']!='rb' + ) { + + \OC_FileCache::put( $this->path, array( 'encrypted' => true, 'size' => $this->size ), '' ); + + } + + return fclose( $this->handle ); + + } + +} diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php new file mode 100644 index 0000000000..cd46d23108 --- /dev/null +++ b/apps/files_encryption/lib/util.php @@ -0,0 +1,330 @@ +. + * + */ + +// Todo: +// - Crypt/decrypt button in the userinterface +// - Setting if crypto should be on by default +// - Add a setting "Don´t encrypt files larger than xx because of performance reasons" +// - Transparent decrypt/encrypt in filesystem.php. Autodetect if a file is encrypted (.encrypted extension) +// - Don't use a password directly as encryption key. but a key which is stored on the server and encrypted with the user password. -> password change faster +// - IMPORTANT! Check if the block lenght of the encrypted data stays the same + +namespace OCA\Encryption; + +/** + * @brief Class for utilities relating to encrypted file storage system + * @param $view OC_FilesystemView object, expected to have OC '/' as root path + * @param $client flag indicating status of client side encryption. Currently + * unused, likely to become obsolete shortly + */ + +class Util { + + + # Web UI: + + ## DONE: files created via web ui are encrypted + ## DONE: file created & encrypted via web ui are readable in web ui + ## DONE: file created & encrypted via web ui are readable via webdav + + + # WebDAV: + + ## DONE: new data filled files added via webdav get encrypted + ## DONE: new data filled files added via webdav are readable via webdav + ## DONE: reading unencrypted files when encryption is enabled works via webdav + ## DONE: files created & encrypted via web ui are readable via webdav + + + # Legacy support: + + ## DONE: add method to check if file is encrypted using new system + ## DONE: add method to check if file is encrypted using old system + ## DONE: add method to fetch legacy key + ## DONE: add method to decrypt legacy encrypted data + + ## TODO: add method to encrypt all user files using new system + ## TODO: add method to decrypt all user files using new system + ## TODO: add method to encrypt all user files using old system + ## TODO: add method to decrypt all user files using old system + + + # Admin UI: + + ## DONE: changing user password also changes encryption passphrase + + ## TODO: add support for optional recovery in case of lost passphrase / keys + ## TODO: add admin optional required long passphrase for users + ## TODO: add UI buttons for encrypt / decrypt everything + ## TODO: implement flag system to allow user to specify encryption by folder, subfolder, etc. + + + # Sharing: + + ## TODO: add support for encrypting to multiple public keys + ## TODO: add support for decrypting to multiple private keys + + + # Integration testing: + + ## TODO: test new encryption with webdav + ## TODO: test new encryption with versioning + ## TODO: test new encryption with sharing + ## TODO: test new encryption with proxies + + + private $view; // OC_FilesystemView object for filesystem operations + private $pwd; // User Password + private $client; // Client side encryption mode flag + private $publicKeyDir; // Directory containing all public user keys + private $encryptionDir; // Directory containing user's files_encryption + private $keyfilesPath; // Directory containing user's keyfiles + private $publicKeyPath; // Path to user's public key + private $privateKeyPath; // Path to user's private key + + public function __construct( \OC_FilesystemView $view, $userId, $client = false ) { + + $this->view = $view; + $this->userId = $userId; + $this->client = $client; + $this->publicKeyDir = '/' . 'public-keys'; + $this->encryptionDir = '/' . $this->userId . '/' . 'files_encryption'; + $this->keyfilesPath = $this->encryptionDir . '/' . 'keyfiles'; + $this->publicKeyPath = $this->publicKeyDir . '/' . $this->userId . '.public.key'; // e.g. data/public-keys/admin.public.key + $this->privateKeyPath = $this->encryptionDir . '/' . $this->userId . '.private.key'; // e.g. data/admin/admin.private.key + + } + + public function ready() { + + if( + !$this->view->file_exists( $this->keyfilesPath ) + or !$this->view->file_exists( $this->publicKeyPath ) + or !$this->view->file_exists( $this->privateKeyPath ) + ) { + + return false; + + } else { + + return true; + + } + + } + + /** + * @brief Sets up user folders and keys for serverside encryption + * @param $passphrase passphrase to encrypt server-stored private key with + */ + public function setupServerSide( $passphrase = null ) { + + // Create shared public key directory + if( !$this->view->file_exists( $this->publicKeyDir ) ) { + + $this->view->mkdir( $this->publicKeyDir ); + + } + + // Create encryption app directory + if( !$this->view->file_exists( $this->encryptionDir ) ) { + + $this->view->mkdir( $this->encryptionDir ); + + } + + // Create mirrored keyfile directory + if( !$this->view->file_exists( $this->keyfilesPath ) ) { + + $this->view->mkdir( $this->keyfilesPath ); + + } + + // Create user keypair + if ( + !$this->view->file_exists( $this->publicKeyPath ) + or !$this->view->file_exists( $this->privateKeyPath ) + ) { + + // Generate keypair + $keypair = Crypt::createKeypair(); + + \OC_FileProxy::$enabled = false; + + // Save public key + $this->view->file_put_contents( $this->publicKeyPath, $keypair['publicKey'] ); + + // Encrypt private key with user pwd as passphrase + $encryptedPrivateKey = Crypt::symmetricEncryptFileContent( $keypair['privateKey'], $passphrase ); + + // Save private key + $this->view->file_put_contents( $this->privateKeyPath, $encryptedPrivateKey ); + + \OC_FileProxy::$enabled = true; + + } + + return true; + + } + + public function findFiles( $directory, $type = 'plain' ) { + + # TODO: test finding non plain content + + if ( $handle = $this->view->opendir( $directory ) ) { + + while ( false !== ( $file = readdir( $handle ) ) ) { + + if ( + $file != "." + && $file != ".." + ) { + + $filePath = $directory . '/' . $this->view->getRelativePath( '/' . $file ); + + var_dump($filePath); + + if ( $this->view->is_dir( $filePath ) ) { + + $this->findFiles( $filePath ); + + } elseif ( $this->view->is_file( $filePath ) ) { + + if ( $type == 'plain' ) { + + $this->files[] = array( 'name' => $file, 'path' => $filePath ); + + } elseif ( $type == 'encrypted' ) { + + if ( Crypt::isEncryptedContent( $this->view->file_get_contents( $filePath ) ) ) { + + $this->files[] = array( 'name' => $file, 'path' => $filePath ); + + } + + } elseif ( $type == 'legacy' ) { + + if ( Crypt::isLegacyEncryptedContent( $this->view->file_get_contents( $filePath ) ) ) { + + $this->files[] = array( 'name' => $file, 'path' => $filePath ); + + } + + } + + } + + } + + } + + if ( !empty( $this->files ) ) { + + return $this->files; + + } else { + + return false; + + } + + } + + return false; + + } + + /** + * @brief Check if a given path identifies an encrypted file + * @return true / false + */ + public function isEncryptedPath( $path ) { + + // Disable encryption proxy so data retreived is in its + // original form + \OC_FileProxy::$enabled = false; + + $data = $this->view->file_get_contents( $path ); + + \OC_FileProxy::$enabled = true; + + return Crypt::isEncryptedContent( $data ); + + } + + public function encryptAll( $directory ) { + + $plainFiles = $this->findFiles( $this->view, 'plain' ); + + if ( $this->encryptFiles( $plainFiles ) ) { + + return true; + + } else { + + return false; + + } + + } + + public function getPath( $pathName ) { + + switch ( $pathName ) { + + case 'publicKeyDir': + + return $this->publicKeyDir; + + break; + + case 'encryptionDir': + + return $this->encryptionDir; + + break; + + case 'keyfilesPath': + + return $this->keyfilesPath; + + break; + + case 'publicKeyPath': + + return $this->publicKeyPath; + + break; + + case 'privateKeyPath': + + return $this->privateKeyPath; + + break; + + } + + } + +} diff --git a/apps/files_encryption/settings-personal.php b/apps/files_encryption/settings-personal.php new file mode 100644 index 0000000000..014288f2ef --- /dev/null +++ b/apps/files_encryption/settings-personal.php @@ -0,0 +1,29 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +$sysEncMode = \OC_Appconfig::getValue('files_encryption', 'mode', 'none'); + +if ($sysEncMode == 'user') { + + $tmpl = new OCP\Template( 'files_encryption', 'settings-personal'); + + $query = \OC_DB::prepare( "SELECT mode FROM *PREFIX*encryption WHERE uid = ?" ); + $result = $query->execute(array(\OCP\User::getUser())); + + if ($row = $result->fetchRow()){ + $mode = $row['mode']; + } else { + $mode = 'none'; + } + + OCP\Util::addscript('files_encryption','settings-personal'); + $tmpl->assign('encryption_mode', $mode); + return $tmpl->fetchPage(); +} + +return null; diff --git a/apps/files_encryption/settings.php b/apps/files_encryption/settings.php index 94ff5ab94b..d1260f44e9 100644 --- a/apps/files_encryption/settings.php +++ b/apps/files_encryption/settings.php @@ -6,17 +6,16 @@ * See the COPYING-README file. */ -OC_Util::checkAdminUser(); +\OC_Util::checkAdminUser(); -$tmpl = new OCP\Template( 'files_encryption', 'settings'); -$blackList=explode(',', OCP\Config::getAppValue('files_encryption', - 'type_blacklist', - 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg')); -$enabled=(OCP\Config::getAppValue('files_encryption', 'enable_encryption', 'true')=='true'); -$tmpl->assign('blacklist', $blackList); -$tmpl->assign('encryption_enabled', $enabled); +$tmpl = new OCP\Template( 'files_encryption', 'settings' ); -OCP\Util::addscript('files_encryption', 'settings'); -OCP\Util::addscript('core', 'multiselect'); +$blackList = explode( ',', \OCP\Config::getAppValue( 'files_encryption', 'type_blacklist', 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg' ) ); + +$tmpl->assign( 'blacklist', $blackList ); +$tmpl->assign( 'encryption_mode', \OC_Appconfig::getValue( 'files_encryption', 'mode', 'none' ) ); + +\OCP\Util::addscript( 'files_encryption', 'settings' ); +\OCP\Util::addscript( 'core', 'multiselect' ); return $tmpl->fetchPage(); diff --git a/apps/files_encryption/templates/settings-personal.php b/apps/files_encryption/templates/settings-personal.php new file mode 100644 index 0000000000..1274bd3bb5 --- /dev/null +++ b/apps/files_encryption/templates/settings-personal.php @@ -0,0 +1,45 @@ +
+
+ t('Choose encryption mode:'); ?> +

+ + + + /> + t('Client side encryption (most secure but makes it impossible to access your data from the web interface)'); ?> +
+ + + /> + t('Server side encryption (allows you to access your files from the web interface and the desktop client)'); ?> +
+ + + /> + t('None (no encryption at all)'); ?> +
+

+
+
diff --git a/apps/files_encryption/templates/settings.php b/apps/files_encryption/templates/settings.php index 61bfe849c7..544ec793f3 100644 --- a/apps/files_encryption/templates/settings.php +++ b/apps/files_encryption/templates/settings.php @@ -1,14 +1,79 @@ -
+
- t('Encryption');?> - checked="checked" - id='enable_encryption' /> -
- + /> + + t("Client side encryption (most secure but makes it impossible to access your data from the web interface)"); ?> +
+ + + /> + + t('Server side encryption (allows you to access your files from the web interface and the desktop client)'); ?> +
+ + + /> + + t('User specific (let the user decide)'); ?> +
+ + + /> + + t('None (no encryption at all)'); ?> +
+ +

+

+ t('Encryption'); ?> + + t("Exclude the following file types from encryption"); ?> + +
- t('Exclude the following file types from encryption'); ?> + +

diff --git a/apps/files_encryption/tests/binary b/apps/files_encryption/test/binary similarity index 100% rename from apps/files_encryption/tests/binary rename to apps/files_encryption/test/binary diff --git a/apps/files_encryption/test/crypt.php b/apps/files_encryption/test/crypt.php new file mode 100755 index 0000000000..19c10ab0ab --- /dev/null +++ b/apps/files_encryption/test/crypt.php @@ -0,0 +1,667 @@ +, and + * Robin Appelman + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +//require_once "PHPUnit/Framework/TestCase.php"; +require_once realpath( dirname(__FILE__).'/../../../3rdparty/Crypt_Blowfish/Blowfish.php' ); +require_once realpath( dirname(__FILE__).'/../../../lib/base.php' ); +require_once realpath( dirname(__FILE__).'/../lib/crypt.php' ); +require_once realpath( dirname(__FILE__).'/../lib/keymanager.php' ); +require_once realpath( dirname(__FILE__).'/../lib/proxy.php' ); +require_once realpath( dirname(__FILE__).'/../lib/stream.php' ); +require_once realpath( dirname(__FILE__).'/../lib/util.php' ); +require_once realpath( dirname(__FILE__).'/../appinfo/app.php' ); + +use OCA\Encryption; + +// This has to go here because otherwise session errors arise, and the private +// encryption key needs to be saved in the session +\OC_User::login( 'admin', 'admin' ); + +/** + * @note It would be better to use Mockery here for mocking out the session + * handling process, and isolate calls to session class and data from the unit + * tests relating to them (stream etc.). However getting mockery to work and + * overload classes whilst also using the OC autoloader is difficult due to + * load order Pear errors. + */ + +class Test_Crypt extends \PHPUnit_Framework_TestCase { + + function setUp() { + + // set content for encrypting / decrypting in tests + $this->dataLong = file_get_contents( realpath( dirname(__FILE__).'/../lib/crypt.php' ) ); + $this->dataShort = 'hats'; + $this->dataUrl = realpath( dirname(__FILE__).'/../lib/crypt.php' ); + $this->legacyData = realpath( dirname(__FILE__).'/legacy-text.txt' ); + $this->legacyEncryptedData = realpath( dirname(__FILE__).'/legacy-encrypted-text.txt' ); + $this->randomKey = Encryption\Crypt::generateKey(); + + $keypair = Encryption\Crypt::createKeypair(); + $this->genPublicKey = $keypair['publicKey']; + $this->genPrivateKey = $keypair['privateKey']; + + $this->view = new \OC_FilesystemView( '/' ); + + \OC_User::setUserId( 'admin' ); + $this->userId = 'admin'; + $this->pass = 'admin'; + + \OC_Filesystem::init( '/' ); + \OC_Filesystem::mount( 'OC_Filestorage_Local', array('datadir' => \OC_User::getHome($this->userId)), '/' ); + + } + + function tearDown() { + + } + + function testGenerateKey() { + + # TODO: use more accurate (larger) string length for test confirmation + + $key = Encryption\Crypt::generateKey(); + + $this->assertTrue( strlen( $key ) > 16 ); + + } + + function testGenerateIv() { + + $iv = Encryption\Crypt::generateIv(); + + $this->assertEquals( 16, strlen( $iv ) ); + + return $iv; + + } + + /** + * @depends testGenerateIv + */ + function testConcatIv( $iv ) { + + $catFile = Encryption\Crypt::concatIv( $this->dataLong, $iv ); + + // Fetch encryption metadata from end of file + $meta = substr( $catFile, -22 ); + + $identifier = substr( $meta, 0, 6); + + // Fetch IV from end of file + $foundIv = substr( $meta, 6 ); + + $this->assertEquals( '00iv00', $identifier ); + + $this->assertEquals( $iv, $foundIv ); + + // Remove IV and IV identifier text to expose encrypted content + $data = substr( $catFile, 0, -22 ); + + $this->assertEquals( $this->dataLong, $data ); + + return array( + 'iv' => $iv + , 'catfile' => $catFile + ); + + } + + /** + * @depends testConcatIv + */ + function testSplitIv( $testConcatIv ) { + + // Split catfile into components + $splitCatfile = Encryption\Crypt::splitIv( $testConcatIv['catfile'] ); + + // Check that original IV and split IV match + $this->assertEquals( $testConcatIv['iv'], $splitCatfile['iv'] ); + + // Check that original data and split data match + $this->assertEquals( $this->dataLong, $splitCatfile['encrypted'] ); + + } + + function testAddPadding() { + + $padded = Encryption\Crypt::addPadding( $this->dataLong ); + + $padding = substr( $padded, -2 ); + + $this->assertEquals( 'xx' , $padding ); + + return $padded; + + } + + /** + * @depends testAddPadding + */ + function testRemovePadding( $padded ) { + + $noPadding = Encryption\Crypt::RemovePadding( $padded ); + + $this->assertEquals( $this->dataLong, $noPadding ); + + } + + function testEncrypt() { + + $random = openssl_random_pseudo_bytes( 13 ); + + $iv = substr( base64_encode( $random ), 0, -4 ); // i.e. E5IG033j+mRNKrht + + $crypted = Encryption\Crypt::encrypt( $this->dataUrl, $iv, 'hat' ); + + $this->assertNotEquals( $this->dataUrl, $crypted ); + + } + + function testDecrypt() { + + $random = openssl_random_pseudo_bytes( 13 ); + + $iv = substr( base64_encode( $random ), 0, -4 ); // i.e. E5IG033j+mRNKrht + + $crypted = Encryption\Crypt::encrypt( $this->dataUrl, $iv, 'hat' ); + + $decrypt = Encryption\Crypt::decrypt( $crypted, $iv, 'hat' ); + + $this->assertEquals( $this->dataUrl, $decrypt ); + + } + + function testSymmetricEncryptFileContent() { + + # TODO: search in keyfile for actual content as IV will ensure this test always passes + + $crypted = Encryption\Crypt::symmetricEncryptFileContent( $this->dataShort, 'hat' ); + + $this->assertNotEquals( $this->dataShort, $crypted ); + + + $decrypt = Encryption\Crypt::symmetricDecryptFileContent( $crypted, 'hat' ); + + $this->assertEquals( $this->dataShort, $decrypt ); + + } + + // These aren't used for now +// function testSymmetricBlockEncryptShortFileContent() { +// +// $crypted = Encryption\Crypt::symmetricBlockEncryptFileContent( $this->dataShort, $this->randomKey ); +// +// $this->assertNotEquals( $this->dataShort, $crypted ); +// +// +// $decrypt = Encryption\Crypt::symmetricBlockDecryptFileContent( $crypted, $this->randomKey ); +// +// $this->assertEquals( $this->dataShort, $decrypt ); +// +// } +// +// function testSymmetricBlockEncryptLongFileContent() { +// +// $crypted = Encryption\Crypt::symmetricBlockEncryptFileContent( $this->dataLong, $this->randomKey ); +// +// $this->assertNotEquals( $this->dataLong, $crypted ); +// +// +// $decrypt = Encryption\Crypt::symmetricBlockDecryptFileContent( $crypted, $this->randomKey ); +// +// $this->assertEquals( $this->dataLong, $decrypt ); +// +// } + + function testSymmetricStreamEncryptShortFileContent() { + + $filename = 'tmp-'.time(); + + $cryptedFile = file_put_contents( 'crypt://' . $filename, $this->dataShort ); + + // Test that data was successfully written + $this->assertTrue( is_int( $cryptedFile ) ); + + + // Get file contents without using any wrapper to get it's actual contents on disk + $retreivedCryptedFile = $this->view->file_get_contents( $this->userId . '/files/' . $filename ); + + // Check that the file was encrypted before being written to disk + $this->assertNotEquals( $this->dataShort, $retreivedCryptedFile ); + + // Get private key + $encryptedPrivateKey = Encryption\Keymanager::getPrivateKey( $this->view, $this->userId ); + + $decryptedPrivateKey = Encryption\Crypt::symmetricDecryptFileContent( $encryptedPrivateKey, $this->pass ); + + + // Get keyfile + $encryptedKeyfile = Encryption\Keymanager::getFileKey( $this->view, $this->userId, $filename ); + + $decryptedKeyfile = Encryption\Crypt::keyDecrypt( $encryptedKeyfile, $decryptedPrivateKey ); + + + // Manually decrypt + $manualDecrypt = Encryption\Crypt::symmetricBlockDecryptFileContent( $retreivedCryptedFile, $decryptedKeyfile ); + + // Check that decrypted data matches + $this->assertEquals( $this->dataShort, $manualDecrypt ); + + } + + /** + * @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 + * reassembly of its data + */ + function testSymmetricStreamEncryptLongFileContent() { + + // Generate a a random filename + $filename = 'tmp-'.time(); + + // Save long data as encrypted file using stream wrapper + $cryptedFile = file_put_contents( 'crypt://' . $filename, $this->dataLong.$this->dataLong ); + + // Test that data was successfully written + $this->assertTrue( is_int( $cryptedFile ) ); + + // Get file contents without using any wrapper to get it's actual contents on disk + $retreivedCryptedFile = $this->view->file_get_contents( $this->userId . '/files/' . $filename ); + +// echo "\n\n\$retreivedCryptedFile = $retreivedCryptedFile\n\n"; + + // Check that the file was encrypted before being written to disk + $this->assertNotEquals( $this->dataLong.$this->dataLong, $retreivedCryptedFile ); + + // Manuallly split saved file into separate IVs and encrypted chunks + $r = preg_split('/(00iv00.{16,18})/', $retreivedCryptedFile, NULL, PREG_SPLIT_DELIM_CAPTURE); + + //print_r($r); + + // Join IVs and their respective data chunks + $e = array( $r[0].$r[1], $r[2].$r[3], $r[4].$r[5], $r[6].$r[7], $r[8].$r[9], $r[10].$r[11], $r[12].$r[13] );//.$r[11], $r[12].$r[13], $r[14] ); + + //print_r($e); + + + // Get private key + $encryptedPrivateKey = Encryption\Keymanager::getPrivateKey( $this->view, $this->userId ); + + $decryptedPrivateKey = Encryption\Crypt::symmetricDecryptFileContent( $encryptedPrivateKey, $this->pass ); + + + // Get keyfile + $encryptedKeyfile = Encryption\Keymanager::getFileKey( $this->view, $this->userId, $filename ); + + $decryptedKeyfile = Encryption\Crypt::keyDecrypt( $encryptedKeyfile, $decryptedPrivateKey ); + + + // Set var for reassembling decrypted content + $decrypt = ''; + + // Manually decrypt chunk + foreach ($e as $e) { + +// echo "\n\$e = $e"; + + $chunkDecrypt = Encryption\Crypt::symmetricDecryptFileContent( $e, $decryptedKeyfile ); + + // Assemble decrypted chunks + $decrypt .= $chunkDecrypt; + +// echo "\n\$chunkDecrypt = $chunkDecrypt"; + + } + +// echo "\n\$decrypt = $decrypt"; + + $this->assertEquals( $this->dataLong.$this->dataLong, $decrypt ); + + // Teardown + + $this->view->unlink( $filename ); + + Encryption\Keymanager::deleteFileKey( $filename ); + + } + + /** + * @brief Test that data that is read by the crypto stream wrapper + */ + function testSymmetricStreamDecryptShortFileContent() { + + $filename = 'tmp-'.time(); + + // Save long data as encrypted file using stream wrapper + $cryptedFile = file_put_contents( 'crypt://' . $filename, $this->dataShort ); + + // Test that data was successfully written + $this->assertTrue( is_int( $cryptedFile ) ); + + + // Get file contents without using any wrapper to get it's actual contents on disk + $retreivedCryptedFile = $this->view->file_get_contents( $this->userId . '/files/' . $filename ); + + $decrypt = file_get_contents( 'crypt://' . $filename ); + + $this->assertEquals( $this->dataShort, $decrypt ); + + } + + function testSymmetricStreamDecryptLongFileContent() { + + $filename = 'tmp-'.time(); + + // Save long data as encrypted file using stream wrapper + $cryptedFile = file_put_contents( 'crypt://' . $filename, $this->dataLong ); + + // Test that data was successfully written + $this->assertTrue( is_int( $cryptedFile ) ); + + + // Get file contents without using any wrapper to get it's actual contents on disk + $retreivedCryptedFile = $this->view->file_get_contents( $this->userId . '/files/' . $filename ); + + $decrypt = file_get_contents( 'crypt://' . $filename ); + + $this->assertEquals( $this->dataLong, $decrypt ); + + } + + // Is this test still necessary? +// function testSymmetricBlockStreamDecryptFileContent() { +// +// \OC_User::setUserId( 'admin' ); +// +// // Disable encryption proxy to prevent unwanted en/decryption +// \OC_FileProxy::$enabled = false; +// +// $cryptedFile = file_put_contents( 'crypt://' . '/blockEncrypt', $this->dataUrl ); +// +// // Disable encryption proxy to prevent unwanted en/decryption +// \OC_FileProxy::$enabled = false; +// +// echo "\n\n\$cryptedFile = " . $this->view->file_get_contents( '/blockEncrypt' ); +// +// $retreivedCryptedFile = file_get_contents( 'crypt://' . '/blockEncrypt' ); +// +// $this->assertEquals( $this->dataUrl, $retreivedCryptedFile ); +// +// \OC_FileProxy::$enabled = false; +// +// } + + function testSymmetricEncryptFileContentKeyfile() { + + # TODO: search in keyfile for actual content as IV will ensure this test always passes + + $crypted = Encryption\Crypt::symmetricEncryptFileContentKeyfile( $this->dataUrl ); + + $this->assertNotEquals( $this->dataUrl, $crypted['encrypted'] ); + + + $decrypt = Encryption\Crypt::symmetricDecryptFileContent( $crypted['encrypted'], $crypted['key'] ); + + $this->assertEquals( $this->dataUrl, $decrypt ); + + } + + function testIsEncryptedContent() { + + $this->assertFalse( Encryption\Crypt::isEncryptedContent( $this->dataUrl ) ); + + $this->assertFalse( Encryption\Crypt::isEncryptedContent( $this->legacyEncryptedData ) ); + + $keyfileContent = Encryption\Crypt::symmetricEncryptFileContent( $this->dataUrl, 'hat' ); + + $this->assertTrue( Encryption\Crypt::isEncryptedContent( $keyfileContent ) ); + + } + + function testMultiKeyEncrypt() { + + # TODO: search in keyfile for actual content as IV will ensure this test always passes + + $pair1 = Encryption\Crypt::createKeypair(); + + $this->assertEquals( 2, count( $pair1 ) ); + + $this->assertTrue( strlen( $pair1['publicKey'] ) > 1 ); + + $this->assertTrue( strlen( $pair1['privateKey'] ) > 1 ); + + + $crypted = Encryption\Crypt::multiKeyEncrypt( $this->dataUrl, array( $pair1['publicKey'] ) ); + + $this->assertNotEquals( $this->dataUrl, $crypted['encrypted'] ); + + + $decrypt = Encryption\Crypt::multiKeyDecrypt( $crypted['encrypted'], $crypted['keys'][0], $pair1['privateKey'] ); + + $this->assertEquals( $this->dataUrl, $decrypt ); + + } + + function testKeyEncrypt() { + + // Generate keypair + $pair1 = Encryption\Crypt::createKeypair(); + + // Encrypt data + $crypted = Encryption\Crypt::keyEncrypt( $this->dataUrl, $pair1['publicKey'] ); + + $this->assertNotEquals( $this->dataUrl, $crypted ); + + // Decrypt data + $decrypt = Encryption\Crypt::keyDecrypt( $crypted, $pair1['privateKey'] ); + + $this->assertEquals( $this->dataUrl, $decrypt ); + + } + + // What is the point of this test? It doesn't use keyEncryptKeyfile() + function testKeyEncryptKeyfile() { + + # TODO: Don't repeat encryption from previous tests, use PHPUnit test interdependency instead + + // Generate keypair + $pair1 = Encryption\Crypt::createKeypair(); + + // Encrypt plain data, generate keyfile & encrypted file + $cryptedData = Encryption\Crypt::symmetricEncryptFileContentKeyfile( $this->dataUrl ); + + // Encrypt keyfile + $cryptedKey = Encryption\Crypt::keyEncrypt( $cryptedData['key'], $pair1['publicKey'] ); + + // Decrypt keyfile + $decryptKey = Encryption\Crypt::keyDecrypt( $cryptedKey, $pair1['privateKey'] ); + + // Decrypt encrypted file + $decryptData = Encryption\Crypt::symmetricDecryptFileContent( $cryptedData['encrypted'], $decryptKey ); + + $this->assertEquals( $this->dataUrl, $decryptData ); + + } + + /** + * @brief test functionality of keyEncryptKeyfile() and + * keyDecryptKeyfile() + */ + function testKeyDecryptKeyfile() { + + $encrypted = Encryption\Crypt::keyEncryptKeyfile( $this->dataShort, $this->genPublicKey ); + + $this->assertNotEquals( $encrypted['data'], $this->dataShort ); + + $decrypted = Encryption\Crypt::keyDecryptKeyfile( $encrypted['data'], $encrypted['key'], $this->genPrivateKey ); + + $this->assertEquals( $decrypted, $this->dataShort ); + + } + + + /** + * @brief test encryption using legacy blowfish method + */ + function testLegacyEncryptShort() { + + $crypted = Encryption\Crypt::legacyEncrypt( $this->dataShort, $this->pass ); + + $this->assertNotEquals( $this->dataShort, $crypted ); + + # TODO: search inencrypted text for actual content to ensure it + # genuine transformation + + return $crypted; + + } + + /** + * @brief test decryption using legacy blowfish method + * @depends testLegacyEncryptShort + */ + function testLegacyDecryptShort( $crypted ) { + + $decrypted = Encryption\Crypt::legacyDecrypt( $crypted, $this->pass ); + + $this->assertEquals( $this->dataShort, $decrypted ); + + } + + /** + * @brief test encryption using legacy blowfish method + */ + function testLegacyEncryptLong() { + + $crypted = Encryption\Crypt::legacyEncrypt( $this->dataLong, $this->pass ); + + $this->assertNotEquals( $this->dataLong, $crypted ); + + # TODO: search inencrypted text for actual content to ensure it + # genuine transformation + + return $crypted; + + } + + /** + * @brief test decryption using legacy blowfish method + * @depends testLegacyEncryptLong + */ + function testLegacyDecryptLong( $crypted ) { + + $decrypted = Encryption\Crypt::legacyDecrypt( $crypted, $this->pass ); + + $this->assertEquals( $this->dataLong, $decrypted ); + + } + + /** + * @brief test generation of legacy encryption key + * @depends testLegacyDecryptShort + */ + function testLegacyCreateKey() { + + // Create encrypted key + $encKey = Encryption\Crypt::legacyCreateKey( $this->pass ); + + // Decrypt key + $key = Encryption\Crypt::legacyDecrypt( $encKey, $this->pass ); + + $this->assertTrue( is_numeric( $key ) ); + + // Check that key is correct length + $this->assertEquals( 20, strlen( $key ) ); + + } + + /** + * @brief test decryption using legacy blowfish method + * @depends testLegacyEncryptLong + */ + function testLegacyKeyRecryptKeyfileEncrypt( $crypted ) { + + $recrypted = Encryption\Crypt::LegacyKeyRecryptKeyfile( $crypted, $this->pass, $this->genPublicKey, $this->pass ); + + $this->assertNotEquals( $this->dataLong, $recrypted['data'] ); + + return $recrypted; + + # TODO: search inencrypted text for actual content to ensure it + # genuine transformation + + } + +// function testEncryption(){ +// +// $key=uniqid(); +// $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; +// $source=file_get_contents($file); //nice large text file +// $encrypted=OC_Encryption\Crypt::encrypt($source,$key); +// $decrypted=OC_Encryption\Crypt::decrypt($encrypted,$key); +// $decrypted=rtrim($decrypted, "\0"); +// $this->assertNotEquals($encrypted,$source); +// $this->assertEquals($decrypted,$source); +// +// $chunk=substr($source,0,8192); +// $encrypted=OC_Encryption\Crypt::encrypt($chunk,$key); +// $this->assertEquals(strlen($chunk),strlen($encrypted)); +// $decrypted=OC_Encryption\Crypt::decrypt($encrypted,$key); +// $decrypted=rtrim($decrypted, "\0"); +// $this->assertEquals($decrypted,$chunk); +// +// $encrypted=OC_Encryption\Crypt::blockEncrypt($source,$key); +// $decrypted=OC_Encryption\Crypt::blockDecrypt($encrypted,$key); +// $this->assertNotEquals($encrypted,$source); +// $this->assertEquals($decrypted,$source); +// +// $tmpFileEncrypted=OCP\Files::tmpFile(); +// OC_Encryption\Crypt::encryptfile($file,$tmpFileEncrypted,$key); +// $encrypted=file_get_contents($tmpFileEncrypted); +// $decrypted=OC_Encryption\Crypt::blockDecrypt($encrypted,$key); +// $this->assertNotEquals($encrypted,$source); +// $this->assertEquals($decrypted,$source); +// +// $tmpFileDecrypted=OCP\Files::tmpFile(); +// OC_Encryption\Crypt::decryptfile($tmpFileEncrypted,$tmpFileDecrypted,$key); +// $decrypted=file_get_contents($tmpFileDecrypted); +// $this->assertEquals($decrypted,$source); +// +// $file=OC::$SERVERROOT.'/core/img/weather-clear.png'; +// $source=file_get_contents($file); //binary file +// $encrypted=OC_Encryption\Crypt::encrypt($source,$key); +// $decrypted=OC_Encryption\Crypt::decrypt($encrypted,$key); +// $decrypted=rtrim($decrypted, "\0"); +// $this->assertEquals($decrypted,$source); +// +// $encrypted=OC_Encryption\Crypt::blockEncrypt($source,$key); +// $decrypted=OC_Encryption\Crypt::blockDecrypt($encrypted,$key); +// $this->assertEquals($decrypted,$source); +// +// } +// +// function testBinary(){ +// $key=uniqid(); +// +// $file=__DIR__.'/binary'; +// $source=file_get_contents($file); //binary file +// $encrypted=OC_Encryption\Crypt::encrypt($source,$key); +// $decrypted=OC_Encryption\Crypt::decrypt($encrypted,$key); +// +// $decrypted=rtrim($decrypted, "\0"); +// $this->assertEquals($decrypted,$source); +// +// $encrypted=OC_Encryption\Crypt::blockEncrypt($source,$key); +// $decrypted=OC_Encryption\Crypt::blockDecrypt($encrypted,$key,strlen($source)); +// $this->assertEquals($decrypted,$source); +// } + +} diff --git a/apps/files_encryption/test/keymanager.php b/apps/files_encryption/test/keymanager.php new file mode 100644 index 0000000000..f02d6eb5f7 --- /dev/null +++ b/apps/files_encryption/test/keymanager.php @@ -0,0 +1,132 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +//require_once "PHPUnit/Framework/TestCase.php"; +require_once realpath( dirname(__FILE__).'/../../../lib/base.php' ); +require_once realpath( dirname(__FILE__).'/../lib/crypt.php' ); +require_once realpath( dirname(__FILE__).'/../lib/keymanager.php' ); +require_once realpath( dirname(__FILE__).'/../lib/proxy.php' ); +require_once realpath( dirname(__FILE__).'/../lib/stream.php' ); +require_once realpath( dirname(__FILE__).'/../lib/util.php' ); +require_once realpath( dirname(__FILE__).'/../appinfo/app.php' ); + +use OCA\Encryption; + +// This has to go here because otherwise session errors arise, and the private +// encryption key needs to be saved in the session +\OC_User::login( 'admin', 'admin' ); + +class Test_Keymanager extends \PHPUnit_Framework_TestCase { + + function setUp() { + + \OC_FileProxy::$enabled = false; + + // set content for encrypting / decrypting in tests + $this->dataLong = file_get_contents( realpath( dirname(__FILE__).'/../lib/crypt.php' ) ); + $this->dataShort = 'hats'; + $this->dataUrl = realpath( dirname(__FILE__).'/../lib/crypt.php' ); + $this->legacyData = realpath( dirname(__FILE__).'/legacy-text.txt' ); + $this->legacyEncryptedData = realpath( dirname(__FILE__).'/legacy-encrypted-text.txt' ); + $this->randomKey = Encryption\Crypt::generateKey(); + + $keypair = Encryption\Crypt::createKeypair(); + $this->genPublicKey = $keypair['publicKey']; + $this->genPrivateKey = $keypair['privateKey']; + + $this->view = new \OC_FilesystemView( '/' ); + + \OC_User::setUserId( 'admin' ); + $this->userId = 'admin'; + $this->pass = 'admin'; + + \OC_Filesystem::init( '/' ); + \OC_Filesystem::mount( 'OC_Filestorage_Local', array('datadir' => \OC_User::getHome($this->userId)), '/' ); + + } + + function tearDown(){ + + \OC_FileProxy::$enabled = true; + + } + + function testGetPrivateKey() { + + $key = Encryption\Keymanager::getPrivateKey( $this->view, $this->userId ); + + // Will this length vary? Perhaps we should use a range instead + $this->assertEquals( 2296, strlen( $key ) ); + + } + + function testGetPublicKey() { + + $key = Encryption\Keymanager::getPublicKey( $this->view, $this->userId ); + + $this->assertEquals( 451, strlen( $key ) ); + + $this->assertEquals( '-----BEGIN PUBLIC KEY-----', substr( $key, 0, 26 ) ); + } + + function testSetFileKey() { + + # NOTE: This cannot be tested until we are able to break out + # of the FileSystemView data directory root + +// $key = Crypt::symmetricEncryptFileContentKeyfile( $this->data, 'hat' ); +// +// $tmpPath = sys_get_temp_dir(). '/' . 'testSetFileKey'; +// +// $view = new \OC_FilesystemView( '/tmp/' ); +// +// //$view = new \OC_FilesystemView( '/' . $this->userId . '/files_encryption/keyfiles' ); +// +// Encryption\Keymanager::setFileKey( $tmpPath, $key['key'], $view ); + + } + +// /** +// * @depends testGetPrivateKey +// */ +// function testGetPrivateKey_decrypt() { +// +// $key = Encryption\Keymanager::getPrivateKey( $this->view, $this->userId ); +// +// # TODO: replace call to Crypt with a mock object? +// $decrypted = Encryption\Crypt::symmetricDecryptFileContent( $key, $this->passphrase ); +// +// $this->assertEquals( 1704, strlen( $decrypted ) ); +// +// $this->assertEquals( '-----BEGIN PRIVATE KEY-----', substr( $decrypted, 0, 27 ) ); +// +// } + + function testGetUserKeys() { + + $keys = Encryption\Keymanager::getUserKeys( $this->view, $this->userId ); + + $this->assertEquals( 451, strlen( $keys['publicKey'] ) ); + $this->assertEquals( '-----BEGIN PUBLIC KEY-----', substr( $keys['publicKey'], 0, 26 ) ); + $this->assertEquals( 2296, strlen( $keys['privateKey'] ) ); + + } + + function testGetPublicKeys() { + + # TODO: write me + + } + + function testGetFileKey() { + +// Encryption\Keymanager::getFileKey( $this->view, $this->userId, $this->filePath ); + + } + +} diff --git a/apps/files_encryption/test/legacy-encrypted-text.txt b/apps/files_encryption/test/legacy-encrypted-text.txt new file mode 100644 index 0000000000..cb5bf50550 Binary files /dev/null and b/apps/files_encryption/test/legacy-encrypted-text.txt differ diff --git a/apps/files_encryption/test/proxy.php b/apps/files_encryption/test/proxy.php new file mode 100644 index 0000000000..709730f760 --- /dev/null +++ b/apps/files_encryption/test/proxy.php @@ -0,0 +1,220 @@ +, + * and Robin Appelman + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +// require_once "PHPUnit/Framework/TestCase.php"; +// require_once realpath( dirname(__FILE__).'/../../../lib/base.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/Generator.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/MockInterface.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/Mock.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/Container.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/Configuration.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/CompositeExpectation.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/ExpectationDirector.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/Expectation.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/Exception.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/CountValidator/CountValidatorAbstract.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/CountValidator/Exception.php' ); +// require_once realpath( dirname(__FILE__).'/../../../3rdparty/mockery/Mockery/CountValidator/Exact.php' ); +// +// use \Mockery as m; +// use OCA\Encryption; + +// class Test_Util extends \PHPUnit_Framework_TestCase { +// +// public function setUp() { +// +// $this->proxy = new Encryption\Proxy(); +// +// $this->tmpFileName = "tmpFile-".time(); +// +// $this->privateKey = file_get_contents( realpath( dirname(__FILE__).'/data/admin.public.key' ) ); +// $this->publicKey = file_get_contents( realpath( dirname(__FILE__).'/data/admin.private.key' ) ); +// $this->encDataShort = file_get_contents( realpath( dirname(__FILE__).'/data/yoga-manchester-enc' ) ); +// $this->encDataShortKey = file_get_contents( realpath( dirname(__FILE__).'/data/yoga-manchester.key' ) ); +// +// $this->dataShort = file_get_contents( realpath( dirname(__FILE__).'/data/yoga-manchester' ) ); +// $this->dataLong = file_get_contents( realpath( dirname(__FILE__).'/../lib/crypt.php' ) ); +// $this->longDataPath = realpath( dirname(__FILE__).'/../lib/crypt.php' ); +// +// $this->data1 = file_get_contents( realpath( dirname(__FILE__).'/../../../data/admin/files/enc-test.txt' ) ); +// +// \OC_FileProxy::$enabled = false; +// $this->Encdata1 = file_get_contents( realpath( dirname(__FILE__).'/../../../data/admin/files/enc-test.txt' ) ); +// \OC_FileProxy::$enabled = true; +// +// $this->userId = 'admin'; +// $this->pass = 'admin'; +// +// $this->session = new Encryption\Session(); +// +// $this->session->setPrivateKey( +// '-----BEGIN PRIVATE KEY----- +// MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDiH3EA4EpFA7Fx +// s2dyyfL5jwXeYXrTqQJ6DqKgGn8VsbT3eu8R9KzM2XitVwZe8c8L52DvJ06o5vg0 +// GqPYxilFdOFJe/ggac5Tq8UmJiZS4EqYEMwxBIfIyWTxeGV06/0HOwnVAkqHMcBz +// 64qldtgi5O8kZMEM2/gKBgU0kMLJzM+8oEWhL1+gsUWQhxd8cKLXypS6iWgqFJrz +// f/X0hJsJR+gyYxNpahtnjzd/LxLAETrOMsl2tue+BAxmjbAM0aG0NEM0div+b59s +// 2uz/iWbxImp5pOdYVKcVW89D4XBMyGegR40trV2VwiuX1blKCfdjMsJhiaL9pymp +// ug1wzyQFAgMBAAECggEAK6c+PZkPPXuVCgpEcliiW6NM0r2m5K3AGKgypQ34csu3 +// z/8foCvIIFPrhCtEw5eTDQ1CHWlNOjY8vHJYJ0U6Onpx86nHIRrMBkMm8FJ1G5LJ +// U8oKYXwqaozWu/cuPwA//OFc6I5krOzh5n8WaRMkbrgbor8AtebRX74By0AXGrXe +// cswJI7zR96oFn4Dm7Pgvpg5Zhk1vFJ+w6QtH+4DDJ6PBvlZsRkGxYBLGVd/3qhAI +// sBAyjFlSzuP4eCRhHOhHC/e4gmAH9evFVXB88jFyRZm3K+jQ5W5CwrVRBCV2lph6 +// 2B6P7CBJN+IjGKMhy+75y13UvvKPv9IwH8Fzl2x1gQKBgQD8qQOr7a6KhSj16wQE +// jim2xqt9gQ2jH5No405NrKs/PFQQZnzD4YseQsiK//NUjOJiUhaT+L5jhIpzINHt +// RJpt3bGkEZmLyjdjgTpB3GwZdXa28DNK9VdXZ19qIl/ZH0qAjKmJCRahUDASMnVi +// M4Pkk9yx9ZIKkri4TcuMWqc0DQKBgQDlHKBTITZq/arYPD6Nl3NsoOdqVRqJrGay +// 0TjXAVbBXe46+z5lnMsqwXb79nx14hdmSEsZULrw/3f+MnQbdjMTYLFP24visZg9 +// MN8vAiALiiiR1a+Crz+DTA1Q8sGOMVCMqMDmD7QBys3ZuWxuapm0txAiIYUtsjJZ +// XN76T4nZ2QKBgQCHaT3igzwsWTmesxowJtEMeGWomeXpKx8h89EfqA8PkRGsyIDN +// qq+YxEoe1RZgljEuaLhZDdNcGsjo8woPk9kAUPTH7fbRCMuutK+4ZJ469s1tNkcH +// QX5SBcEJbOrZvv967ehe3VQXmJZq6kgnHVzuwKBjcC2ZJRGDFY6l5l/+cQKBgCqh +// +Adf/8NK7paMJ0urqfPFwSodKfICXZ3apswDWMRkmSbqh4La+Uc8dsqN5Dz/VEFZ +// JHhSeGbN8uMfOlG93eU2MehdPxtw1pZUWMNjjtj23XO9ooob2CKzbSrp8TBnZsi1 +// widNNr66oTFpeo7VUUK6acsgF6sYJJxSVr+XO1yJAoGAEhvitq8shNKcEY0xCipS +// k1kbgyS7KKB7opVxI5+ChEqyUDijS3Y9FZixrRIWE6i2uGu86UG+v2lbKvSbM4Qm +// xvbOcX9OVMnlRb7n8woOP10UMY+ZE2x+YEUXQTLtPYq7F66e1OfxltstMxLQA+3d +// Y1d5piFV8PXK3Fg2F+Cj5qg= +// -----END PRIVATE KEY----- +// ' +// , $this->userId +// ); +// +// \OC_User::setUserId( $this->userId ); +// +// } +// +// public function testpreFile_get_contents() { +// +// // This won't work for now because mocking of the static keymanager class isn't working :( +// +// // $mock = m::mock( 'alias:OCA\Encryption\Keymanager' ); +// // +// // $mock->shouldReceive( 'getFileKey' )->times(2)->andReturn( $this->encDataShort ); +// // +// // $encrypted = $this->proxy->postFile_get_contents( 'data/'.$this->tmpFileName, $this->encDataShortKey ); +// // +// // $this->assertNotEquals( $this->dataShort, $encrypted ); +// +// $decrypted = $this->proxy->postFile_get_contents( 'data/admin/files/enc-test.txt', $this->data1 ); +// +// } +// +// } + +// class Test_CryptProxy extends PHPUnit_Framework_TestCase { +// private $oldConfig; +// private $oldKey; +// +// public function setUp(){ +// $user=OC_User::getUser(); +// +// $this->oldConfig=OCP\Config::getAppValue('files_encryption','enable_encryption','true'); +// OCP\Config::setAppValue('files_encryption','enable_encryption','true'); +// $this->oldKey=isset($_SESSION['privateKey'])?$_SESSION['privateKey']:null; +// +// +// //set testing key +// $_SESSION['privateKey']=md5(time()); +// +// //clear all proxies and hooks so we can do clean testing +// OC_FileProxy::clearProxies(); +// OC_Hook::clear('OC_Filesystem'); +// +// //enable only the encryption hook +// OC_FileProxy::register(new OC_FileProxy_Encryption()); +// +// //set up temporary storage +// OC_Filesystem::clearMounts(); +// OC_Filesystem::mount('OC_Filestorage_Temporary',array(),'/'); +// +// OC_Filesystem::init('/'.$user.'/files'); +// +// //set up the users home folder in the temp storage +// $rootView=new OC_FilesystemView(''); +// $rootView->mkdir('/'.$user); +// $rootView->mkdir('/'.$user.'/files'); +// } +// +// public function tearDown(){ +// OCP\Config::setAppValue('files_encryption','enable_encryption',$this->oldConfig); +// if(!is_null($this->oldKey)){ +// $_SESSION['privateKey']=$this->oldKey; +// } +// } +// +// public function testSimple(){ +// $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; +// $original=file_get_contents($file); +// +// OC_Filesystem::file_put_contents('/file',$original); +// +// OC_FileProxy::$enabled=false; +// $stored=OC_Filesystem::file_get_contents('/file'); +// OC_FileProxy::$enabled=true; +// +// $fromFile=OC_Filesystem::file_get_contents('/file'); +// $this->assertNotEquals($original,$stored); +// $this->assertEquals(strlen($original),strlen($fromFile)); +// $this->assertEquals($original,$fromFile); +// +// } +// +// public function testView(){ +// $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; +// $original=file_get_contents($file); +// +// $rootView=new OC_FilesystemView(''); +// $view=new OC_FilesystemView('/'.OC_User::getUser()); +// $userDir='/'.OC_User::getUser().'/files'; +// +// $rootView->file_put_contents($userDir.'/file',$original); +// +// OC_FileProxy::$enabled=false; +// $stored=$rootView->file_get_contents($userDir.'/file'); +// OC_FileProxy::$enabled=true; +// +// $this->assertNotEquals($original,$stored); +// $fromFile=$rootView->file_get_contents($userDir.'/file'); +// $this->assertEquals($original,$fromFile); +// +// $fromFile=$view->file_get_contents('files/file'); +// $this->assertEquals($original,$fromFile); +// } +// +// public function testBinary(){ +// $file=__DIR__.'/binary'; +// $original=file_get_contents($file); +// +// OC_Filesystem::file_put_contents('/file',$original); +// +// OC_FileProxy::$enabled=false; +// $stored=OC_Filesystem::file_get_contents('/file'); +// OC_FileProxy::$enabled=true; +// +// $fromFile=OC_Filesystem::file_get_contents('/file'); +// $this->assertNotEquals($original,$stored); +// $this->assertEquals(strlen($original),strlen($fromFile)); +// $this->assertEquals($original,$fromFile); +// +// $file=__DIR__.'/zeros'; +// $original=file_get_contents($file); +// +// OC_Filesystem::file_put_contents('/file',$original); +// +// OC_FileProxy::$enabled=false; +// $stored=OC_Filesystem::file_get_contents('/file'); +// OC_FileProxy::$enabled=true; +// +// $fromFile=OC_Filesystem::file_get_contents('/file'); +// $this->assertNotEquals($original,$stored); +// $this->assertEquals(strlen($original),strlen($fromFile)); +// } +// } diff --git a/apps/files_encryption/test/stream.php b/apps/files_encryption/test/stream.php new file mode 100644 index 0000000000..ba82ac80ea --- /dev/null +++ b/apps/files_encryption/test/stream.php @@ -0,0 +1,226 @@ +// +// * This file is licensed under the Affero General Public License version 3 or +// * later. +// * See the COPYING-README file. +// */ +// +// namespace OCA\Encryption; +// +// class Test_Stream extends \PHPUnit_Framework_TestCase { +// +// function setUp() { +// +// \OC_Filesystem::mount( 'OC_Filestorage_Local', array(), '/' ); +// +// $this->empty = ''; +// +// $this->stream = new Stream(); +// +// $this->dataLong = file_get_contents( realpath( dirname(__FILE__).'/../lib/crypt.php' ) ); +// $this->dataShort = 'hats'; +// +// $this->emptyTmpFilePath = \OCP\Files::tmpFile(); +// +// $this->dataTmpFilePath = \OCP\Files::tmpFile(); +// +// file_put_contents( $this->dataTmpFilePath, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est." ); +// +// } +// +// function testStreamOpen() { +// +// $stream1 = new Stream(); +// +// $handle1 = $stream1->stream_open( $this->emptyTmpFilePath, 'wb', array(), $this->empty ); +// +// // Test that resource was returned successfully +// $this->assertTrue( $handle1 ); +// +// // Test that file has correct size +// $this->assertEquals( 0, $stream1->size ); +// +// // Test that path is correct +// $this->assertEquals( $this->emptyTmpFilePath, $stream1->rawPath ); +// +// $stream2 = new Stream(); +// +// $handle2 = $stream2->stream_open( 'crypt://' . $this->emptyTmpFilePath, 'wb', array(), $this->empty ); +// +// // Test that protocol identifier is removed from path +// $this->assertEquals( $this->emptyTmpFilePath, $stream2->rawPath ); +// +// // "Stat failed error" prevents this test from executing +// // $stream3 = new Stream(); +// // +// // $handle3 = $stream3->stream_open( $this->dataTmpFilePath, 'r', array(), $this->empty ); +// // +// // $this->assertEquals( 0, $stream3->size ); +// +// } +// +// function testStreamWrite() { +// +// $stream1 = new Stream(); +// +// $handle1 = $stream1->stream_open( $this->emptyTmpFilePath, 'r+b', array(), $this->empty ); +// +// # what about the keymanager? there is no key for the newly created temporary file! +// +// $stream1->stream_write( $this->dataShort ); +// +// } +// +// // function getStream( $id, $mode, $size ) { +// // +// // if ( $id === '' ) { +// // +// // $id = uniqid(); +// // } +// // +// // +// // if ( !isset( $this->tmpFiles[$id] ) ) { +// // +// // // If tempfile with given name does not already exist, create it +// // +// // $file = OCP\Files::tmpFile(); +// // +// // $this->tmpFiles[$id] = $file; +// // +// // } else { +// // +// // $file = $this->tmpFiles[$id]; +// // +// // } +// // +// // $stream = fopen( $file, $mode ); +// // +// // Stream::$sourceStreams[$id] = array( 'path' => 'dummy' . $id, 'stream' => $stream, 'size' => $size ); +// // +// // return fopen( 'crypt://streams/'.$id, $mode ); +// // +// // } +// // +// // function testStream( ){ +// // +// // $stream = $this->getStream( 'test1', 'w', strlen( 'foobar' ) ); +// // +// // fwrite( $stream, 'foobar' ); +// // +// // fclose( $stream ); +// // +// // +// // $stream = $this->getStream( 'test1', 'r', strlen( 'foobar' ) ); +// // +// // $data = fread( $stream, 6 ); +// // +// // fclose( $stream ); +// // +// // $this->assertEquals( 'foobar', $data ); +// // +// // +// // $file = OC::$SERVERROOT.'/3rdparty/MDB2.php'; +// // +// // $source = fopen( $file, 'r' ); +// // +// // $target = $this->getStream( 'test2', 'w', 0 ); +// // +// // OCP\Files::streamCopy( $source, $target ); +// // +// // fclose( $target ); +// // +// // fclose( $source ); +// // +// // +// // $stream = $this->getStream( 'test2', 'r', filesize( $file ) ); +// // +// // $data = stream_get_contents( $stream ); +// // +// // $original = file_get_contents( $file ); +// // +// // $this->assertEquals( strlen( $original ), strlen( $data ) ); +// // +// // $this->assertEquals( $original, $data ); +// // +// // } +// +// } +// +// // class Test_CryptStream extends PHPUnit_Framework_TestCase { +// // private $tmpFiles=array(); +// // +// // function testStream(){ +// // $stream=$this->getStream('test1','w',strlen('foobar')); +// // fwrite($stream,'foobar'); +// // fclose($stream); +// // +// // $stream=$this->getStream('test1','r',strlen('foobar')); +// // $data=fread($stream,6); +// // fclose($stream); +// // $this->assertEquals('foobar',$data); +// // +// // $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; +// // $source=fopen($file,'r'); +// // $target=$this->getStream('test2','w',0); +// // OCP\Files::streamCopy($source,$target); +// // fclose($target); +// // fclose($source); +// // +// // $stream=$this->getStream('test2','r',filesize($file)); +// // $data=stream_get_contents($stream); +// // $original=file_get_contents($file); +// // $this->assertEquals(strlen($original),strlen($data)); +// // $this->assertEquals($original,$data); +// // } +// // +// // /** +// // * get a cryptstream to a temporary file +// // * @param string $id +// // * @param string $mode +// // * @param int size +// // * @return resource +// // */ +// // function getStream($id,$mode,$size){ +// // if($id===''){ +// // $id=uniqid(); +// // } +// // if(!isset($this->tmpFiles[$id])){ +// // $file=OCP\Files::tmpFile(); +// // $this->tmpFiles[$id]=$file; +// // }else{ +// // $file=$this->tmpFiles[$id]; +// // } +// // $stream=fopen($file,$mode); +// // OC_CryptStream::$sourceStreams[$id]=array('path'=>'dummy'.$id,'stream'=>$stream,'size'=>$size); +// // return fopen('crypt://streams/'.$id,$mode); +// // } +// // +// // function testBinary(){ +// // $file=__DIR__.'/binary'; +// // $source=file_get_contents($file); +// // +// // $stream=$this->getStream('test','w',strlen($source)); +// // fwrite($stream,$source); +// // fclose($stream); +// // +// // $stream=$this->getStream('test','r',strlen($source)); +// // $data=stream_get_contents($stream); +// // fclose($stream); +// // $this->assertEquals(strlen($data),strlen($source)); +// // $this->assertEquals($source,$data); +// // +// // $file=__DIR__.'/zeros'; +// // $source=file_get_contents($file); +// // +// // $stream=$this->getStream('test2','w',strlen($source)); +// // fwrite($stream,$source); +// // fclose($stream); +// // +// // $stream=$this->getStream('test2','r',strlen($source)); +// // $data=stream_get_contents($stream); +// // fclose($stream); +// // $this->assertEquals(strlen($data),strlen($source)); +// // $this->assertEquals($source,$data); +// // } +// // } diff --git a/apps/files_encryption/test/util.php b/apps/files_encryption/test/util.php new file mode 100755 index 0000000000..a299ec67f5 --- /dev/null +++ b/apps/files_encryption/test/util.php @@ -0,0 +1,210 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +//require_once "PHPUnit/Framework/TestCase.php"; +require_once realpath( dirname(__FILE__).'/../../../lib/base.php' ); +require_once realpath( dirname(__FILE__).'/../lib/crypt.php' ); +require_once realpath( dirname(__FILE__).'/../lib/keymanager.php' ); +require_once realpath( dirname(__FILE__).'/../lib/proxy.php' ); +require_once realpath( dirname(__FILE__).'/../lib/stream.php' ); +require_once realpath( dirname(__FILE__).'/../lib/util.php' ); +require_once realpath( dirname(__FILE__).'/../appinfo/app.php' ); + +// Load mockery files +require_once 'Mockery/Loader.php'; +require_once 'Hamcrest/Hamcrest.php'; +$loader = new \Mockery\Loader; +$loader->register(); + +use \Mockery as m; +use OCA\Encryption; + +class Test_Enc_Util extends \PHPUnit_Framework_TestCase { + + function setUp() { + + \OC_Filesystem::mount( 'OC_Filestorage_Local', array(), '/' ); + + // set content for encrypting / decrypting in tests + $this->dataUrl = realpath( dirname(__FILE__).'/../lib/crypt.php' ); + $this->dataShort = 'hats'; + $this->dataLong = file_get_contents( realpath( dirname(__FILE__).'/../lib/crypt.php' ) ); + $this->legacyData = realpath( dirname(__FILE__).'/legacy-text.txt' ); + $this->legacyEncryptedData = realpath( dirname(__FILE__).'/legacy-encrypted-text.txt' ); + + $this->userId = 'admin'; + $this->pass = 'admin'; + + $keypair = Encryption\Crypt::createKeypair(); + + $this->genPublicKey = $keypair['publicKey']; + $this->genPrivateKey = $keypair['privateKey']; + + $this->publicKeyDir = '/' . 'public-keys'; + $this->encryptionDir = '/' . $this->userId . '/' . 'files_encryption'; + $this->keyfilesPath = $this->encryptionDir . '/' . 'keyfiles'; + $this->publicKeyPath = $this->publicKeyDir . '/' . $this->userId . '.public.key'; // e.g. data/public-keys/admin.public.key + $this->privateKeyPath = $this->encryptionDir . '/' . $this->userId . '.private.key'; // e.g. data/admin/admin.private.key + + $this->view = new OC_FilesystemView( '/admin' ); + + $this->mockView = m::mock('OC_FilesystemView'); + $this->util = new Encryption\Util( $this->mockView, $this->userId ); + + } + + function tearDown(){ + + m::close(); + + } + + /** + * @brief test that paths set during User construction are correct + */ + function testKeyPaths() { + + $mockView = m::mock('OC_FilesystemView'); + + $util = new Encryption\Util( $mockView, $this->userId ); + + $this->assertEquals( $this->publicKeyDir, $util->getPath( 'publicKeyDir' ) ); + $this->assertEquals( $this->encryptionDir, $util->getPath( 'encryptionDir' ) ); + $this->assertEquals( $this->keyfilesPath, $util->getPath( 'keyfilesPath' ) ); + $this->assertEquals( $this->publicKeyPath, $util->getPath( 'publicKeyPath' ) ); + $this->assertEquals( $this->privateKeyPath, $util->getPath( 'privateKeyPath' ) ); + + } + + /** + * @brief test setup of encryption directories when they don't yet exist + */ + function testSetupServerSideNotSetup() { + + $mockView = m::mock('OC_FilesystemView'); + + $mockView->shouldReceive( 'file_exists' )->times(4)->andReturn( false ); + $mockView->shouldReceive( 'mkdir' )->times(3)->andReturn( true ); + $mockView->shouldReceive( 'file_put_contents' )->withAnyArgs(); + + $util = new Encryption\Util( $mockView, $this->userId ); + + $this->assertEquals( true, $util->setupServerSide( $this->pass ) ); + + } + + /** + * @brief test setup of encryption directories when they already exist + */ + function testSetupServerSideIsSetup() { + + $mockView = m::mock('OC_FilesystemView'); + + $mockView->shouldReceive( 'file_exists' )->times(5)->andReturn( true ); + $mockView->shouldReceive( 'file_put_contents' )->withAnyArgs(); + + $util = new Encryption\Util( $mockView, $this->userId ); + + $this->assertEquals( true, $util->setupServerSide( $this->pass ) ); + + } + + /** + * @brief test checking whether account is ready for encryption, when it isn't ready + */ + function testReadyNotReady() { + + $mockView = m::mock('OC_FilesystemView'); + + $mockView->shouldReceive( 'file_exists' )->times(1)->andReturn( false ); + + $util = new Encryption\Util( $mockView, $this->userId ); + + $this->assertEquals( false, $util->ready() ); + + # TODO: Add more tests here to check that if any of the dirs are + # then false will be returned. Use strict ordering? + + } + + /** + * @brief test checking whether account is ready for encryption, when it is ready + */ + function testReadyIsReady() { + + $mockView = m::mock('OC_FilesystemView'); + + $mockView->shouldReceive( 'file_exists' )->times(3)->andReturn( true ); + + $util = new Encryption\Util( $mockView, $this->userId ); + + $this->assertEquals( true, $util->ready() ); + + # TODO: Add more tests here to check that if any of the dirs are + # then false will be returned. Use strict ordering? + + } + +// /** +// * @brief test decryption using legacy blowfish method +// * @depends testLegacyEncryptLong +// */ +// function testLegacyKeyRecryptKeyfileDecrypt( $recrypted ) { +// +// $decrypted = Encryption\Crypt::keyDecryptKeyfile( $recrypted['data'], $recrypted['key'], $this->genPrivateKey ); +// +// $this->assertEquals( $this->dataLong, $decrypted ); +// +// } + +// // Cannot use this test for now due to hidden dependencies in OC_FileCache +// function testIsLegacyEncryptedContent() { +// +// $keyfileContent = OCA\Encryption\Crypt::symmetricEncryptFileContent( $this->legacyEncryptedData, 'hat' ); +// +// $this->assertFalse( OCA\Encryption\Crypt::isLegacyEncryptedContent( $keyfileContent, '/files/admin/test.txt' ) ); +// +// OC_FileCache::put( '/admin/files/legacy-encrypted-test.txt', $this->legacyEncryptedData ); +// +// $this->assertTrue( OCA\Encryption\Crypt::isLegacyEncryptedContent( $this->legacyEncryptedData, '/files/admin/test.txt' ) ); +// +// } + +// // Cannot use this test for now due to need for different root in OC_Filesystem_view class +// function testGetLegacyKey() { +// +// $c = new \OCA\Encryption\Util( $view, false ); +// +// $bool = $c->getLegacyKey( 'admin' ); +// +// $this->assertTrue( $bool ); +// +// $this->assertTrue( $c->legacyKey ); +// +// $this->assertTrue( is_int( $c->legacyKey ) ); +// +// $this->assertTrue( strlen( $c->legacyKey ) == 20 ); +// +// } + +// // Cannot use this test for now due to need for different root in OC_Filesystem_view class +// function testLegacyDecrypt() { +// +// $c = new OCA\Encryption\Util( $this->view, false ); +// +// $bool = $c->getLegacyKey( 'admin' ); +// +// $encrypted = $c->legacyEncrypt( $this->data, $c->legacyKey ); +// +// $decrypted = $c->legacyDecrypt( $encrypted, $c->legacyKey ); +// +// $this->assertEquals( $decrypted, $this->data ); +// +// } + +} \ No newline at end of file diff --git a/apps/files_encryption/tests/zeros b/apps/files_encryption/test/zeros similarity index 100% rename from apps/files_encryption/tests/zeros rename to apps/files_encryption/test/zeros diff --git a/apps/files_encryption/tests/encryption.php b/apps/files_encryption/tests/encryption.php deleted file mode 100644 index 0e119f55be..0000000000 --- a/apps/files_encryption/tests/encryption.php +++ /dev/null @@ -1,72 +0,0 @@ - - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -class Test_Encryption extends UnitTestCase { - function testEncryption() { - $key=uniqid(); - $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; - $source=file_get_contents($file); //nice large text file - $encrypted=OC_Crypt::encrypt($source, $key); - $decrypted=OC_Crypt::decrypt($encrypted, $key); - $decrypted=rtrim($decrypted, "\0"); - $this->assertNotEqual($encrypted, $source); - $this->assertEqual($decrypted, $source); - - $chunk=substr($source, 0, 8192); - $encrypted=OC_Crypt::encrypt($chunk, $key); - $this->assertEqual(strlen($chunk), strlen($encrypted)); - $decrypted=OC_Crypt::decrypt($encrypted, $key); - $decrypted=rtrim($decrypted, "\0"); - $this->assertEqual($decrypted, $chunk); - - $encrypted=OC_Crypt::blockEncrypt($source, $key); - $decrypted=OC_Crypt::blockDecrypt($encrypted, $key); - $this->assertNotEqual($encrypted, $source); - $this->assertEqual($decrypted, $source); - - $tmpFileEncrypted=OCP\Files::tmpFile(); - OC_Crypt::encryptfile($file, $tmpFileEncrypted, $key); - $encrypted=file_get_contents($tmpFileEncrypted); - $decrypted=OC_Crypt::blockDecrypt($encrypted, $key); - $this->assertNotEqual($encrypted, $source); - $this->assertEqual($decrypted, $source); - - $tmpFileDecrypted=OCP\Files::tmpFile(); - OC_Crypt::decryptfile($tmpFileEncrypted, $tmpFileDecrypted, $key); - $decrypted=file_get_contents($tmpFileDecrypted); - $this->assertEqual($decrypted, $source); - - $file=OC::$SERVERROOT.'/core/img/weather-clear.png'; - $source=file_get_contents($file); //binary file - $encrypted=OC_Crypt::encrypt($source, $key); - $decrypted=OC_Crypt::decrypt($encrypted, $key); - $decrypted=rtrim($decrypted, "\0"); - $this->assertEqual($decrypted, $source); - - $encrypted=OC_Crypt::blockEncrypt($source, $key); - $decrypted=OC_Crypt::blockDecrypt($encrypted, $key); - $this->assertEqual($decrypted, $source); - - } - - function testBinary() { - $key=uniqid(); - - $file=__DIR__.'/binary'; - $source=file_get_contents($file); //binary file - $encrypted=OC_Crypt::encrypt($source, $key); - $decrypted=OC_Crypt::decrypt($encrypted, $key); - - $decrypted=rtrim($decrypted, "\0"); - $this->assertEqual($decrypted, $source); - - $encrypted=OC_Crypt::blockEncrypt($source, $key); - $decrypted=OC_Crypt::blockDecrypt($encrypted, $key, strlen($source)); - $this->assertEqual($decrypted, $source); - } -} diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php deleted file mode 100644 index 5aa617e747..0000000000 --- a/apps/files_encryption/tests/proxy.php +++ /dev/null @@ -1,117 +0,0 @@ - - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -class Test_CryptProxy extends UnitTestCase { - private $oldConfig; - private $oldKey; - - public function setUp() { - $user=OC_User::getUser(); - - $this->oldConfig=OCP\Config::getAppValue('files_encryption','enable_encryption', 'true'); - OCP\Config::setAppValue('files_encryption', 'enable_encryption', 'true'); - $this->oldKey=isset($_SESSION['enckey'])?$_SESSION['enckey']:null; - - - //set testing key - $_SESSION['enckey']=md5(time()); - - //clear all proxies and hooks so we can do clean testing - OC_FileProxy::clearProxies(); - OC_Hook::clear('OC_Filesystem'); - - //enable only the encryption hook - OC_FileProxy::register(new OC_FileProxy_Encryption()); - - //set up temporary storage - OC_Filesystem::clearMounts(); - OC_Filesystem::mount('OC_Filestorage_Temporary', array(), '/'); - - OC_Filesystem::init('/'.$user.'/files'); - - //set up the users home folder in the temp storage - $rootView=new OC_FilesystemView(''); - $rootView->mkdir('/'.$user); - $rootView->mkdir('/'.$user.'/files'); - } - - public function tearDown() { - OCP\Config::setAppValue('files_encryption', 'enable_encryption', $this->oldConfig); - if ( ! is_null($this->oldKey)) { - $_SESSION['enckey']=$this->oldKey; - } - } - - public function testSimple() { - $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; - $original=file_get_contents($file); - - OC_Filesystem::file_put_contents('/file', $original); - - OC_FileProxy::$enabled=false; - $stored=OC_Filesystem::file_get_contents('/file'); - OC_FileProxy::$enabled=true; - - $fromFile=OC_Filesystem::file_get_contents('/file'); - $this->assertNotEqual($original, $stored); - $this->assertEqual(strlen($original), strlen($fromFile)); - $this->assertEqual($original, $fromFile); - - } - - public function testView() { - $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; - $original=file_get_contents($file); - - $rootView=new OC_FilesystemView(''); - $view=new OC_FilesystemView('/'.OC_User::getUser()); - $userDir='/'.OC_User::getUser().'/files'; - - $rootView->file_put_contents($userDir.'/file', $original); - - OC_FileProxy::$enabled=false; - $stored=$rootView->file_get_contents($userDir.'/file'); - OC_FileProxy::$enabled=true; - - $this->assertNotEqual($original, $stored); - $fromFile=$rootView->file_get_contents($userDir.'/file'); - $this->assertEqual($original, $fromFile); - - $fromFile=$view->file_get_contents('files/file'); - $this->assertEqual($original, $fromFile); - } - - public function testBinary() { - $file=__DIR__.'/binary'; - $original=file_get_contents($file); - - OC_Filesystem::file_put_contents('/file', $original); - - OC_FileProxy::$enabled=false; - $stored=OC_Filesystem::file_get_contents('/file'); - OC_FileProxy::$enabled=true; - - $fromFile=OC_Filesystem::file_get_contents('/file'); - $this->assertNotEqual($original, $stored); - $this->assertEqual(strlen($original), strlen($fromFile)); - $this->assertEqual($original, $fromFile); - - $file=__DIR__.'/zeros'; - $original=file_get_contents($file); - - OC_Filesystem::file_put_contents('/file', $original); - - OC_FileProxy::$enabled=false; - $stored=OC_Filesystem::file_get_contents('/file'); - OC_FileProxy::$enabled=true; - - $fromFile=OC_Filesystem::file_get_contents('/file'); - $this->assertNotEqual($original, $stored); - $this->assertEqual(strlen($original), strlen($fromFile)); - } -} diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php deleted file mode 100644 index e4af17d47b..0000000000 --- a/apps/files_encryption/tests/stream.php +++ /dev/null @@ -1,85 +0,0 @@ - - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -class Test_CryptStream extends UnitTestCase { - private $tmpFiles=array(); - - function testStream() { - $stream=$this->getStream('test1', 'w', strlen('foobar')); - fwrite($stream, 'foobar'); - fclose($stream); - - $stream=$this->getStream('test1', 'r', strlen('foobar')); - $data=fread($stream, 6); - fclose($stream); - $this->assertEqual('foobar', $data); - - $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; - $source=fopen($file, 'r'); - $target=$this->getStream('test2', 'w', 0); - OCP\Files::streamCopy($source, $target); - fclose($target); - fclose($source); - - $stream=$this->getStream('test2', 'r', filesize($file)); - $data=stream_get_contents($stream); - $original=file_get_contents($file); - $this->assertEqual(strlen($original), strlen($data)); - $this->assertEqual($original, $data); - } - - /** - * get a cryptstream to a temporary file - * @param string $id - * @param string $mode - * @param int size - * @return resource - */ - function getStream($id, $mode, $size) { - if ($id==='') { - $id=uniqid(); - } - if ( ! isset($this->tmpFiles[$id])) { - $file=OCP\Files::tmpFile(); - $this->tmpFiles[$id]=$file; - } else { - $file=$this->tmpFiles[$id]; - } - $stream=fopen($file, $mode); - OC_CryptStream::$sourceStreams[$id]=array('path'=>'dummy'.$id, 'stream'=>$stream, 'size'=>$size); - return fopen('crypt://streams/'.$id, $mode); - } - - function testBinary() { - $file=__DIR__.'/binary'; - $source=file_get_contents($file); - - $stream=$this->getStream('test', 'w', strlen($source)); - fwrite($stream, $source); - fclose($stream); - - $stream=$this->getStream('test', 'r', strlen($source)); - $data=stream_get_contents($stream); - fclose($stream); - $this->assertEqual(strlen($data), strlen($source)); - $this->assertEqual($source, $data); - - $file=__DIR__.'/zeros'; - $source=file_get_contents($file); - - $stream=$this->getStream('test2', 'w', strlen($source)); - fwrite($stream, $source); - fclose($stream); - - $stream=$this->getStream('test2', 'r', strlen($source)); - $data=stream_get_contents($stream); - fclose($stream); - $this->assertEqual(strlen($data), strlen($source)); - $this->assertEqual($source, $data); - } -} diff --git a/apps/files_external/l10n/th_TH.php b/apps/files_external/l10n/th_TH.php index 70ab8d3348..870995c8e7 100644 --- a/apps/files_external/l10n/th_TH.php +++ b/apps/files_external/l10n/th_TH.php @@ -5,6 +5,8 @@ "Fill out all required fields" => "กรอกข้อมูลในช่องข้อมูลที่จำเป็นต้องกรอกทั้งหมด", "Please provide a valid Dropbox app key and secret." => "กรุณากรอกรหัส app key ของ Dropbox และรหัสลับ", "Error configuring Google Drive storage" => "เกิดข้อผิดพลาดในการกำหนดค่าการจัดเก็บข้อมูลในพื้นที่ของ Google Drive", +"Warning: \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "คำเตือน: \"smbclient\" ยังไม่ได้ถูกติดตั้ง. การชี้ CIFS/SMB เพื่อแชร์ข้อมูลไม่สามารถกระทำได้ กรุณาสอบถามข้อมูลเพิ่มเติมจากผู้ดูแลระบบเพื่อติดตั้ง.", +"Warning: The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "คำเตือน: การสนับสนุนการใช้งาน FTP ในภาษา PHP ยังไม่ได้ถูกเปิดใช้งานหรือถูกติดตั้ง. การชี้ FTP เพื่อแชร์ข้อมูลไม่สามารถดำเนินการได้ กรุณาสอบถามข้อมูลเพิ่มเติมจากผู้ดูแลระบบเพื่อติดตั้ง", "External Storage" => "พื้นทีจัดเก็บข้อมูลจากภายนอก", "Mount point" => "จุดชี้ตำแหน่ง", "Backend" => "ด้านหลังระบบ", diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php index d0404b5f34..91e4589ed1 100644 --- a/apps/files_external/tests/ftp.php +++ b/apps/files_external/tests/ftp.php @@ -32,18 +32,18 @@ class Test_Filestorage_FTP extends Test_FileStorage { 'root' => '/', 'secure' => false ); $instance = new OC_Filestorage_FTP($config); - $this->assertEqual('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); + $this->assertEquals('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); $config['secure'] = true; $instance = new OC_Filestorage_FTP($config); - $this->assertEqual('ftps://ftp:ftp@localhost/', $instance->constructUrl('')); + $this->assertEquals('ftps://ftp:ftp@localhost/', $instance->constructUrl('')); $config['secure'] = 'false'; $instance = new OC_Filestorage_FTP($config); - $this->assertEqual('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); + $this->assertEquals('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); $config['secure'] = 'true'; $instance = new OC_Filestorage_FTP($config); - $this->assertEqual('ftps://ftp:ftp@localhost/', $instance->constructUrl('')); + $this->assertEquals('ftps://ftp:ftp@localhost/', $instance->constructUrl('')); } } diff --git a/apps/files_sharing/l10n/sr.php b/apps/files_sharing/l10n/sr.php new file mode 100644 index 0000000000..7a922b8900 --- /dev/null +++ b/apps/files_sharing/l10n/sr.php @@ -0,0 +1,3 @@ + "Пошаљи" +); diff --git a/apps/files_sharing/l10n/zh_TW.php b/apps/files_sharing/l10n/zh_TW.php index fa4f8075c6..f1d28731a7 100644 --- a/apps/files_sharing/l10n/zh_TW.php +++ b/apps/files_sharing/l10n/zh_TW.php @@ -4,5 +4,6 @@ "%s shared the folder %s with you" => "%s 分享了資料夾 %s 給您", "%s shared the file %s with you" => "%s 分享了檔案 %s 給您", "Download" => "下載", -"No preview available for" => "無法預覽" +"No preview available for" => "無法預覽", +"web services under your control" => "在您掌控之下的網路服務" ); diff --git a/apps/user_ldap/l10n/ar.php b/apps/user_ldap/l10n/ar.php index ced0b4293b..da1710a0a3 100644 --- a/apps/user_ldap/l10n/ar.php +++ b/apps/user_ldap/l10n/ar.php @@ -1,3 +1,4 @@ "كلمة المرور" +"Password" => "كلمة المرور", +"Help" => "المساعدة" ); diff --git a/apps/user_ldap/l10n/ca.php b/apps/user_ldap/l10n/ca.php index c11eb5bdc5..06255c1249 100644 --- a/apps/user_ldap/l10n/ca.php +++ b/apps/user_ldap/l10n/ca.php @@ -1,8 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Avís: Les aplicacions user_ldap i user_webdavauth són incompatibles. Podeu experimentar comportaments no desitjats. Demaneu a l'administrador del sistema que en desactivi una.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Avís: El mòdul PHP LDAP no està instal·lat, el dorsal no funcionarà. Demaneu a l'administrador del sistema que l'instal·li.", "Host" => "Màquina", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Podeu ometre el protocol, excepte si requeriu SSL. Llavors comenceu amb ldaps://", "Base DN" => "DN Base", +"One Base DN per line" => "Una DN Base per línia", "You can specify Base DN for users and groups in the Advanced tab" => "Podeu especificar DN Base per usuaris i grups a la pestanya Avançat", "User DN" => "DN Usuari", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "La DN de l'usuari client amb la que s'haurà de fer, per exemple uid=agent,dc=exemple,dc=com. Per un accés anònim, deixeu la DN i la contrasenya en blanc.", @@ -19,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "sense cap paràmetre de substitució, per exemple \"objectClass=grupPosix\".", "Port" => "Port", "Base User Tree" => "Arbre base d'usuaris", +"One User Base DN per line" => "Una DN Base d'Usuari per línia", "Base Group Tree" => "Arbre base de grups", +"One Group Base DN per line" => "Una DN Base de Grup per línia", "Group-Member association" => "Associació membres-grup", "Use TLS" => "Usa TLS", "Do not use it for SSL connections, it will fail." => "No ho useu en connexions SSL, fallarà.", diff --git a/apps/user_ldap/l10n/cs_CZ.php b/apps/user_ldap/l10n/cs_CZ.php index 9b307e54dd..80e27f1e62 100644 --- a/apps/user_ldap/l10n/cs_CZ.php +++ b/apps/user_ldap/l10n/cs_CZ.php @@ -1,8 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Varování: Aplikace user_ldap a user_webdavauth nejsou kompatibilní. Může nastávat neočekávané chování. Požádejte, prosím, správce systému aby jednu z nich zakázal.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Varování: není nainstalován LDAP modul pro PHP, podpůrná vrstva nebude fungovat. Požádejte, prosím, správce systému aby jej nainstaloval.", "Host" => "Počítač", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Můžete vynechat protokol, vyjma pokud požadujete SSL. Tehdy začněte s ldaps://", "Base DN" => "Základní DN", +"One Base DN per line" => "Jedna základní DN na řádku", "You can specify Base DN for users and groups in the Advanced tab" => "V rozšířeném nastavení můžete určit základní DN pro uživatele a skupiny", "User DN" => "Uživatelské DN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "DN klentského uživatele ke kterému tvoříte vazbu, např. uid=agent,dc=example,dc=com. Pro anonymní přístup ponechte údaje DN and Heslo prázdné.", @@ -19,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "bez zástupných znaků, např. \"objectClass=posixGroup\".", "Port" => "Port", "Base User Tree" => "Základní uživatelský strom", +"One User Base DN per line" => "Jedna uživatelská základní DN na řádku", "Base Group Tree" => "Základní skupinový strom", +"One Group Base DN per line" => "Jedna skupinová základní DN na řádku", "Group-Member association" => "Asociace člena skupiny", "Use TLS" => "Použít TLS", "Do not use it for SSL connections, it will fail." => "Nepoužívejte pro připojení pomocí SSL, připojení selže.", diff --git a/apps/user_ldap/l10n/de_DE.php b/apps/user_ldap/l10n/de_DE.php index 82877b5ca1..1e81601838 100644 --- a/apps/user_ldap/l10n/de_DE.php +++ b/apps/user_ldap/l10n/de_DE.php @@ -1,8 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Warnung: Die Anwendungen user_ldap und user_webdavauth sind inkompatibel. Es kann demzufolge zu unerwarteten Verhalten kommen. Bitten Sie Ihren Systemadministator eine der beiden Anwendungen zu deaktivieren.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Warnung: Da das PHP-Modul für LDAP nicht installiert ist, wird das Backend nicht funktionieren. Bitten Sie Ihren Systemadministrator das Modul zu installieren.", "Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Sie können das Protokoll auslassen, außer wenn Sie SSL benötigen. Beginnen Sie dann mit ldaps://", "Base DN" => "Basis-DN", +"One Base DN per line" => "Ein Base DN pro Zeile", "You can specify Base DN for users and groups in the Advanced tab" => "Sie können Basis-DN für Benutzer und Gruppen in dem \"Erweitert\"-Reiter konfigurieren", "User DN" => "Benutzer-DN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "Der DN des Benutzers für LDAP-Bind, z.B.: uid=agent,dc=example,dc=com. Für anonymen Zugriff lassen Sie DN und Passwort leer.", @@ -19,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "ohne Platzhalter, z.B.: \"objectClass=posixGroup\"", "Port" => "Port", "Base User Tree" => "Basis-Benutzerbaum", +"One User Base DN per line" => "Ein Benutzer Base DN pro Zeile", "Base Group Tree" => "Basis-Gruppenbaum", +"One Group Base DN per line" => "Ein Gruppen Base DN pro Zeile", "Group-Member association" => "Assoziation zwischen Gruppe und Benutzer", "Use TLS" => "Nutze TLS", "Do not use it for SSL connections, it will fail." => "Verwenden Sie dies nicht für SSL-Verbindungen, es wird fehlschlagen.", diff --git a/apps/user_ldap/l10n/eo.php b/apps/user_ldap/l10n/eo.php index ef8aff8a39..35f436a0b0 100644 --- a/apps/user_ldap/l10n/eo.php +++ b/apps/user_ldap/l10n/eo.php @@ -1,7 +1,7 @@ "Gastigo", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Vi povas neglekti la protokolon, escepte se vi bezonas SSL-on. Tiuokaze, komencu per ldaps://", -"Base DN" => "Baz-DN", +"Base DN" => "Bazo-DN", "User DN" => "Uzanto-DN", "Password" => "Pasvorto", "For anonymous access, leave DN and Password empty." => "Por sennoman aliron, lasu DN-on kaj Pasvorton malplenaj.", diff --git a/apps/user_ldap/l10n/eu.php b/apps/user_ldap/l10n/eu.php index 7290dabbef..e2b50f28ee 100644 --- a/apps/user_ldap/l10n/eu.php +++ b/apps/user_ldap/l10n/eu.php @@ -1,8 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Abisua: user_ldap eta user_webdavauth aplikazioak bateraezinak dira. Portaera berezia izan dezakezu. Mesedez eskatu zure sistema kudeatzaileari bietako bat desgaitzeko.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Abisua: PHPk behar duen LDAP modulua ez dago instalaturik, motorrak ez du funtzionatuko. Mesedez eskatu zure sistema kudeatzaileari instala dezan.", "Host" => "Hostalaria", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Protokoloa ez da beharrezkoa, SSL behar baldin ez baduzu. Honela bada hasi ldaps://", "Base DN" => "Oinarrizko DN", +"One Base DN per line" => "DN Oinarri bat lerroko", "You can specify Base DN for users and groups in the Advanced tab" => "Erabiltzaile eta taldeentzako Oinarrizko DN zehaztu dezakezu Aurreratu fitxan", "User DN" => "Erabiltzaile DN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "Lotura egingo den bezero erabiltzailearen DNa, adb. uid=agent,dc=example,dc=com. Sarrera anonimoak gaitzeko utzi DN eta Pasahitza hutsik.", @@ -19,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "txantiloirik gabe, adb. \"objectClass=posixGroup\".", "Port" => "Portua", "Base User Tree" => "Oinarrizko Erabiltzaile Zuhaitza", +"One User Base DN per line" => "Erabiltzaile DN Oinarri bat lerroko", "Base Group Tree" => "Oinarrizko Talde Zuhaitza", +"One Group Base DN per line" => "Talde DN Oinarri bat lerroko", "Group-Member association" => "Talde-Kide elkarketak", "Use TLS" => "Erabili TLS", "Do not use it for SSL connections, it will fail." => "Ez erabili SSL konexioetan, huts egingo du.", diff --git a/apps/user_ldap/l10n/fr.php b/apps/user_ldap/l10n/fr.php index dd2fb08091..28ee6346ef 100644 --- a/apps/user_ldap/l10n/fr.php +++ b/apps/user_ldap/l10n/fr.php @@ -1,11 +1,13 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Avertissement: Les applications user_ldap et user_webdavauth sont incompatibles. Des disfonctionnements peuvent survenir. Contactez votre administrateur système pour qu'il désactive l'une d'elles.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Attention : Le module php LDAP n'est pas installé, par conséquent cette extension ne pourra fonctionner. Veuillez contacter votre administrateur système afin qu'il l'installe.", "Host" => "Hôte", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Vous pouvez omettre le protocole, sauf si vous avez besoin de SSL. Dans ce cas préfixez avec ldaps://", "Base DN" => "DN Racine", -"You can specify Base DN for users and groups in the Advanced tab" => "Vous pouvez détailler les DN Racines de vos utilisateurs et groupes dans l'onglet Avancé", +"One Base DN per line" => "Un DN racine par ligne", +"You can specify Base DN for users and groups in the Advanced tab" => "Vous pouvez spécifier les DN Racines de vos utilisateurs et groupes via l'onglet Avancé", "User DN" => "DN Utilisateur (Autorisé à consulter l'annuaire)", -"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "Le DN de l'utilisateur client avec lequel la liaison doit se faire, par exemple uid=agent,dc=example,dc=com. Pour l'accès anonyme, laisser le DN et le mot de passe vides.", +"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "DN de l'utilisateur client pour lequel la liaison doit se faire, par exemple uid=agent,dc=example,dc=com. Pour un accès anonyme, laisser le DN et le mot de passe vides.", "Password" => "Mot de passe", "For anonymous access, leave DN and Password empty." => "Pour un accès anonyme, laisser le DN Utilisateur et le mot de passe vides.", "User Login Filter" => "Modèle d'authentification utilisateurs", @@ -19,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "sans élément de substitution, par exemple \"objectClass=posixGroup\".", "Port" => "Port", "Base User Tree" => "DN racine de l'arbre utilisateurs", +"One User Base DN per line" => "Un DN racine utilisateur par ligne", "Base Group Tree" => "DN racine de l'arbre groupes", +"One Group Base DN per line" => "Un DN racine groupe par ligne", "Group-Member association" => "Association groupe-membre", "Use TLS" => "Utiliser TLS", "Do not use it for SSL connections, it will fail." => "Ne pas utiliser pour les connexions SSL, car cela échouera.", diff --git a/apps/user_ldap/l10n/hr.php b/apps/user_ldap/l10n/hr.php new file mode 100644 index 0000000000..9150331506 --- /dev/null +++ b/apps/user_ldap/l10n/hr.php @@ -0,0 +1,3 @@ + "Pomoć" +); diff --git a/apps/user_ldap/l10n/hu_HU.php b/apps/user_ldap/l10n/hu_HU.php index aae29d057e..25ee47786e 100644 --- a/apps/user_ldap/l10n/hu_HU.php +++ b/apps/user_ldap/l10n/hu_HU.php @@ -1,10 +1,13 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Figyelem: a user_ldap és user_webdavauth alkalmazások nem kompatibilisek. Együttes használatuk váratlan eredményekhez vezethet. Kérje meg a rendszergazdát, hogy a kettő közül kapcsolja ki az egyiket.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Figyelmeztetés: Az LDAP PHP modul nincs telepítve, ezért ez az alrendszer nem fog működni. Kérje meg a rendszergazdát, hogy telepítse!", "Host" => "Kiszolgáló", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "A protokoll előtag elhagyható, kivéve, ha SSL-t kíván használni. Ebben az esetben kezdje így: ldaps://", "Base DN" => "DN-gyökér", +"One Base DN per line" => "Soronként egy DN-gyökér", "You can specify Base DN for users and groups in the Advanced tab" => "A Haladó fülre kattintva külön DN-gyökér állítható be a felhasználók és a csoportok számára", "User DN" => "A kapcsolódó felhasználó DN-je", +"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "Annak a felhasználónak a DN-je, akinek a nevében bejelentkezve kapcsolódunk a kiszolgálóhoz, pl. uid=agent,dc=example,dc=com. Bejelentkezés nélküli eléréshez ne töltse ki a DN és Jelszó mezőket!", "Password" => "Jelszó", "For anonymous access, leave DN and Password empty." => "Bejelentkezés nélküli eléréshez ne töltse ki a DN és Jelszó mezőket!", "User Login Filter" => "Szűrő a bejelentkezéshez", @@ -18,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "itt ne használjunk változót, pl. \"objectClass=posixGroup\".", "Port" => "Port", "Base User Tree" => "A felhasználói fa gyökere", +"One User Base DN per line" => "Soronként egy felhasználói fa gyökerét adhatjuk meg", "Base Group Tree" => "A csoportfa gyökere", +"One Group Base DN per line" => "Soronként egy csoportfa gyökerét adhatjuk meg", "Group-Member association" => "A csoporttagság attribútuma", "Use TLS" => "Használjunk TLS-t", "Do not use it for SSL connections, it will fail." => "Ne használjuk SSL-kapcsolat esetén, mert nem fog működni!", diff --git a/apps/user_ldap/l10n/ia.php b/apps/user_ldap/l10n/ia.php new file mode 100644 index 0000000000..3586bf5a2e --- /dev/null +++ b/apps/user_ldap/l10n/ia.php @@ -0,0 +1,3 @@ + "Adjuta" +); diff --git a/apps/user_ldap/l10n/it.php b/apps/user_ldap/l10n/it.php index b09819d79e..bee30cfe6e 100644 --- a/apps/user_ldap/l10n/it.php +++ b/apps/user_ldap/l10n/it.php @@ -1,8 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Avviso: le applicazioni user_ldap e user_webdavauth sono incompatibili. Potresti riscontrare un comportamento inatteso. Chiedi al tuo amministratore di sistema di disabilitarne uno.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Avviso: il modulo PHP LDAP non è installato, il motore non funzionerà. Chiedi al tuo amministratore di sistema di installarlo.", "Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "È possibile omettere il protocollo, ad eccezione se è necessario SSL. Quindi inizia con ldaps://", "Base DN" => "DN base", +"One Base DN per line" => "Un DN base per riga", "You can specify Base DN for users and groups in the Advanced tab" => "Puoi specificare una DN base per gli utenti ed i gruppi nella scheda Avanzate", "User DN" => "DN utente", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "Il DN per il client dell'utente con cui deve essere associato, ad esempio uid=agent,dc=example,dc=com. Per l'accesso anonimo, lasciare vuoti i campi DN e Password", @@ -19,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "senza nessun segnaposto, per esempio \"objectClass=posixGroup\".", "Port" => "Porta", "Base User Tree" => "Struttura base dell'utente", +"One User Base DN per line" => "Un DN base utente per riga", "Base Group Tree" => "Struttura base del gruppo", +"One Group Base DN per line" => "Un DN base gruppo per riga", "Group-Member association" => "Associazione gruppo-utente ", "Use TLS" => "Usa TLS", "Do not use it for SSL connections, it will fail." => "Non utilizzare per le connessioni SSL, fallirà.", diff --git a/apps/user_ldap/l10n/ja_JP.php b/apps/user_ldap/l10n/ja_JP.php index 9dff8e7bd6..1c93db7ba0 100644 --- a/apps/user_ldap/l10n/ja_JP.php +++ b/apps/user_ldap/l10n/ja_JP.php @@ -1,8 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "警告: user_ldap と user_webdavauth のアプリには互換性がありません。予期せぬ動作をする可能姓があります。システム管理者にどちらかを無効にするよう問い合わせてください。", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "警告: PHP LDAP モジュールがインストールされていません。バックエンドが正しく動作しません。システム管理者にインストールするよう問い合わせてください。", "Host" => "ホスト", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "SSL通信しない場合には、プロトコル名を省略することができます。そうでない場合には、ldaps:// から始めてください。", "Base DN" => "ベースDN", +"One Base DN per line" => "1行に1つのベースDN", "You can specify Base DN for users and groups in the Advanced tab" => "拡張タブでユーザとグループのベースDNを指定することができます。", "User DN" => "ユーザDN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "クライアントユーザーのDNは、特定のものに結びつけることはしません。 例えば uid=agent,dc=example,dc=com. だと匿名アクセスの場合、DNとパスワードは空のままです。", @@ -19,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "プレースホルダーを利用しないでください。例 \"objectClass=posixGroup\"", "Port" => "ポート", "Base User Tree" => "ベースユーザツリー", +"One User Base DN per line" => "1行に1つのユーザベースDN", "Base Group Tree" => "ベースグループツリー", +"One Group Base DN per line" => "1行に1つのグループベースDN", "Group-Member association" => "グループとメンバーの関連付け", "Use TLS" => "TLSを利用", "Do not use it for SSL connections, it will fail." => "SSL接続に利用しないでください、失敗します。", diff --git a/apps/user_ldap/l10n/ka_GE.php b/apps/user_ldap/l10n/ka_GE.php new file mode 100644 index 0000000000..630d92b73a --- /dev/null +++ b/apps/user_ldap/l10n/ka_GE.php @@ -0,0 +1,3 @@ + "დახმარება" +); diff --git a/apps/user_ldap/l10n/ku_IQ.php b/apps/user_ldap/l10n/ku_IQ.php new file mode 100644 index 0000000000..1ae808ddd9 --- /dev/null +++ b/apps/user_ldap/l10n/ku_IQ.php @@ -0,0 +1,3 @@ + "یارمەتی" +); diff --git a/apps/user_ldap/l10n/lb.php b/apps/user_ldap/l10n/lb.php new file mode 100644 index 0000000000..2926538b5b --- /dev/null +++ b/apps/user_ldap/l10n/lb.php @@ -0,0 +1,3 @@ + "Hëllef" +); diff --git a/apps/user_ldap/l10n/lv.php b/apps/user_ldap/l10n/lv.php new file mode 100644 index 0000000000..52353472e4 --- /dev/null +++ b/apps/user_ldap/l10n/lv.php @@ -0,0 +1,3 @@ + "Palīdzība" +); diff --git a/apps/user_ldap/l10n/mk.php b/apps/user_ldap/l10n/mk.php index 70a62e7176..4c231b516d 100644 --- a/apps/user_ldap/l10n/mk.php +++ b/apps/user_ldap/l10n/mk.php @@ -1,5 +1,6 @@ "Домаќин", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Може да го скокнете протколот освен ако не ви треба SSL. Тогаш ставете ldaps://", -"Password" => "Лозинка" +"Password" => "Лозинка", +"Help" => "Помош" ); diff --git a/apps/user_ldap/l10n/ms_MY.php b/apps/user_ldap/l10n/ms_MY.php new file mode 100644 index 0000000000..077a5390cf --- /dev/null +++ b/apps/user_ldap/l10n/ms_MY.php @@ -0,0 +1,3 @@ + "Bantuan" +); diff --git a/apps/user_ldap/l10n/nl.php b/apps/user_ldap/l10n/nl.php index 5e2ddf8959..27c4407360 100644 --- a/apps/user_ldap/l10n/nl.php +++ b/apps/user_ldap/l10n/nl.php @@ -1,10 +1,12 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Waarschuwing: De Apps user_ldap en user_webdavauth zijn incompatible. U kunt onverwacht gedrag ervaren. Vraag uw beheerder om een van beide apps de deactiveren.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Waarschuwing: De PHP LDAP module is niet geïnstalleerd, het backend zal niet werken. Vraag uw systeembeheerder om de module te installeren.", "Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Je kunt het protocol weglaten, tenzij je SSL vereist. Start in dat geval met ldaps://", -"Base DN" => "Basis DN", -"You can specify Base DN for users and groups in the Advanced tab" => "Je kunt het standaard DN voor gebruikers en groepen specificeren in het tab Geavanceerd.", -"User DN" => "Gebruikers DN", +"Base DN" => "Base DN", +"One Base DN per line" => "Een Base DN per regel", +"You can specify Base DN for users and groups in the Advanced tab" => "Je kunt het Base DN voor gebruikers en groepen specificeren in het tab Geavanceerd.", +"User DN" => "User DN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "De DN van de client gebruiker waarmee de verbinding zal worden gemaakt, bijv. uid=agent,dc=example,dc=com. Voor anonieme toegang laat je het DN en het wachtwoord leeg.", "Password" => "Wachtwoord", "For anonymous access, leave DN and Password empty." => "Voor anonieme toegang, laat de DN en het wachtwoord leeg.", @@ -19,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "zonder een placeholder, bijv. \"objectClass=posixGroup\"", "Port" => "Poort", "Base User Tree" => "Basis Gebruikers Structuur", +"One User Base DN per line" => "Een User Base DN per regel", "Base Group Tree" => "Basis Groupen Structuur", +"One Group Base DN per line" => "Een Group Base DN per regel", "Group-Member association" => "Groepslid associatie", "Use TLS" => "Gebruik TLS", "Do not use it for SSL connections, it will fail." => "Gebruik niet voor SSL connecties, deze mislukken.", diff --git a/apps/user_ldap/l10n/nn_NO.php b/apps/user_ldap/l10n/nn_NO.php new file mode 100644 index 0000000000..54d1f158f6 --- /dev/null +++ b/apps/user_ldap/l10n/nn_NO.php @@ -0,0 +1,3 @@ + "Hjelp" +); diff --git a/apps/user_ldap/l10n/oc.php b/apps/user_ldap/l10n/oc.php new file mode 100644 index 0000000000..0bf27d74f2 --- /dev/null +++ b/apps/user_ldap/l10n/oc.php @@ -0,0 +1,3 @@ + "Ajuda" +); diff --git a/apps/user_ldap/l10n/pt_PT.php b/apps/user_ldap/l10n/pt_PT.php index 1640f03749..9059f17876 100644 --- a/apps/user_ldap/l10n/pt_PT.php +++ b/apps/user_ldap/l10n/pt_PT.php @@ -1,8 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Aviso: A aplicação user_ldap e user_webdavauth são incompativeis. A aplicação pode tornar-se instável. Por favor, peça ao seu administrador para desactivar uma das aplicações.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Aviso: O módulo PHP LDAP não está instalado, logo não irá funcionar. Por favor peça ao administrador para o instalar.", "Host" => "Anfitrião", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Pode omitir o protocolo, excepto se necessitar de SSL. Neste caso, comece com ldaps://", "Base DN" => "DN base", +"One Base DN per line" => "Uma base DN por linho", "You can specify Base DN for users and groups in the Advanced tab" => "Pode especificar o ND Base para utilizadores e grupos no separador Avançado", "User DN" => "DN do utilizador", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "O DN to cliente ", @@ -19,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "Sem nenhuma variável. Exemplo: \"objectClass=posixGroup\".", "Port" => "Porto", "Base User Tree" => "Base da árvore de utilizadores.", +"One User Base DN per line" => "Uma base de utilizador DN por linha", "Base Group Tree" => "Base da árvore de grupos.", +"One Group Base DN per line" => "Uma base de grupo DN por linha", "Group-Member association" => "Associar utilizador ao grupo.", "Use TLS" => "Usar TLS", "Do not use it for SSL connections, it will fail." => "Não use para ligações SSL, irá falhar.", diff --git a/apps/user_ldap/l10n/sr.php b/apps/user_ldap/l10n/sr.php new file mode 100644 index 0000000000..fff39aadc2 --- /dev/null +++ b/apps/user_ldap/l10n/sr.php @@ -0,0 +1,3 @@ + "Помоћ" +); diff --git a/apps/user_ldap/l10n/sr@latin.php b/apps/user_ldap/l10n/sr@latin.php new file mode 100644 index 0000000000..9150331506 --- /dev/null +++ b/apps/user_ldap/l10n/sr@latin.php @@ -0,0 +1,3 @@ + "Pomoć" +); diff --git a/apps/user_ldap/l10n/sv.php b/apps/user_ldap/l10n/sv.php index 1e36ff91ba..25abfdd7dd 100644 --- a/apps/user_ldap/l10n/sv.php +++ b/apps/user_ldap/l10n/sv.php @@ -1,8 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Varning: Apps user_ldap och user_webdavauth är inkompatibla. Oväntade problem kan uppstå. Be din systemadministratör att inaktivera en av dom.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Varning: PHP LDAP - modulen är inte installerad, serversidan kommer inte att fungera. Kontakta din systemadministratör för installation.", "Host" => "Server", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Du behöver inte ange protokoll förutom om du använder SSL. Starta då med ldaps://", "Base DN" => "Start DN", +"One Base DN per line" => "Ett Start DN per rad", "You can specify Base DN for users and groups in the Advanced tab" => "Du kan ange start DN för användare och grupper under fliken Avancerat", "User DN" => "Användare DN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "DN för användaren som skall användas, t.ex. uid=agent, dc=example, dc=com. För anonym åtkomst, lämna DN och lösenord tomt.", @@ -19,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "utan platshållare, t.ex. \"objectClass=posixGroup\".", "Port" => "Port", "Base User Tree" => "Bas för användare i katalogtjänst", +"One User Base DN per line" => "En Användare start DN per rad", "Base Group Tree" => "Bas för grupper i katalogtjänst", +"One Group Base DN per line" => "En Grupp start DN per rad", "Group-Member association" => "Attribut för gruppmedlemmar", "Use TLS" => "Använd TLS", "Do not use it for SSL connections, it will fail." => "Använd inte för SSL-anslutningar, det kommer inte att fungera.", diff --git a/apps/user_ldap/l10n/th_TH.php b/apps/user_ldap/l10n/th_TH.php index acc7a4936b..e3a941c424 100644 --- a/apps/user_ldap/l10n/th_TH.php +++ b/apps/user_ldap/l10n/th_TH.php @@ -1,7 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "คำเตือน: แอปฯ user_ldap และ user_webdavauth ไม่สามารถใช้งานร่วมกันได้. คุณอาจประสพปัญหาที่ไม่คาดคิดจากเหตุการณ์ดังกล่าว กรุณาติดต่อผู้ดูแลระบบของคุณเพื่อระงับการใช้งานแอปฯ ตัวใดตัวหนึ่งข้างต้น", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "คำเตือน: โมดูล PHP LDAP ยังไม่ได้ถูกติดตั้ง, ระบบด้านหลังจะไม่สามารถทำงานได้ กรุณาติดต่อผู้ดูแลระบบของคุณเพื่อทำการติดตั้งโมดูลดังกล่าว", "Host" => "โฮสต์", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "คุณสามารถปล่อยช่องโปรโตคอลเว้นไว้ได้, ยกเว้นกรณีที่คุณต้องการใช้ SSL จากนั้นเริ่มต้นด้วย ldaps://", "Base DN" => "DN ฐาน", +"One Base DN per line" => "หนึ่ง Base DN ต่อบรรทัด", "You can specify Base DN for users and groups in the Advanced tab" => "คุณสามารถระบุ DN หลักสำหรับผู้ใช้งานและกลุ่มต่างๆในแท็บขั้นสูงได้", "User DN" => "DN ของผู้ใช้งาน", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "DN ของผู้ใช้งานที่เป็นลูกค้าอะไรก็ตามที่ผูกอยู่ด้วย เช่น uid=agent, dc=example, dc=com, สำหรับการเข้าถึงโดยบุคคลนิรนาม, ให้เว้นว่าง DN และ รหัสผ่านเอาไว้", @@ -18,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "โดยไม่ต้องมีตัวยึดใดๆ, เช่น \"objectClass=posixGroup\",", "Port" => "พอร์ต", "Base User Tree" => "รายการผู้ใช้งานหลักแบบ Tree", +"One User Base DN per line" => "หนึ่ง User Base DN ต่อบรรทัด", "Base Group Tree" => "รายการกลุ่มหลักแบบ Tree", +"One Group Base DN per line" => "หนึ่ง Group Base DN ต่อบรรทัด", "Group-Member association" => "ความสัมพันธ์ของสมาชิกในกลุ่ม", "Use TLS" => "ใช้ TLS", "Do not use it for SSL connections, it will fail." => "กรุณาอย่าใช้การเชื่อมต่อแบบ SSL การเชื่อมต่อจะเกิดการล้มเหลว", diff --git a/apps/user_ldap/l10n/zh_TW.php b/apps/user_ldap/l10n/zh_TW.php index abc1b03d49..506ae0f0fb 100644 --- a/apps/user_ldap/l10n/zh_TW.php +++ b/apps/user_ldap/l10n/zh_TW.php @@ -1,5 +1,7 @@ "主機", "Password" => "密碼", +"Port" => "連接阜", "Use TLS" => "使用TLS", "Turn off SSL certificate validation." => "關閉 SSL 憑證驗證", "Help" => "說明" diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php index f99902d32f..ae635597b7 100644 --- a/apps/user_ldap/tests/group_ldap.php +++ b/apps/user_ldap/tests/group_ldap.php @@ -20,7 +20,7 @@ * */ -class Test_Group_Ldap extends UnitTestCase { +class Test_Group_Ldap extends PHPUnit_Framework_TestCase { function setUp() { OC_Group::clearBackends(); } diff --git a/apps/user_webdavauth/l10n/eo.php b/apps/user_webdavauth/l10n/eo.php index 245a510134..d945f181e6 100644 --- a/apps/user_webdavauth/l10n/eo.php +++ b/apps/user_webdavauth/l10n/eo.php @@ -1,3 +1,4 @@ "WebDAV-aŭtentigo", "URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/es.php b/apps/user_webdavauth/l10n/es.php index 245a510134..103c3738e2 100644 --- a/apps/user_webdavauth/l10n/es.php +++ b/apps/user_webdavauth/l10n/es.php @@ -1,3 +1,5 @@ "URL: http://" +"WebDAV Authentication" => "Autenticación de WevDAV", +"URL: http://" => "URL: http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "onwCloud enviará las credenciales de usuario a esta URL. Este complemento verifica la respuesta e interpretará los códigos de respuesta HTTP 401 y 403 como credenciales inválidas y todas las otras respuestas como credenciales válidas." ); diff --git a/apps/user_webdavauth/l10n/eu.php b/apps/user_webdavauth/l10n/eu.php index 245a510134..d792c1588b 100644 --- a/apps/user_webdavauth/l10n/eu.php +++ b/apps/user_webdavauth/l10n/eu.php @@ -1,3 +1,5 @@ "URL: http://" +"WebDAV Authentication" => "WebDAV Autentikazioa", +"URL: http://" => "URL: http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloudek erabiltzailearen kredentzialak URL honetara bidaliko ditu. Plugin honek erantzuna aztertzen du eta HTTP 401 eta 403 egoera kodeak baliogabezko kredentzialtzat hartuko ditu, beste erantzunak kredentzial egokitzat hartuko dituelarik." ); diff --git a/apps/user_webdavauth/l10n/fr.php b/apps/user_webdavauth/l10n/fr.php index 339931c7ce..9d528a3a9d 100644 --- a/apps/user_webdavauth/l10n/fr.php +++ b/apps/user_webdavauth/l10n/fr.php @@ -1,3 +1,5 @@ "URL : http://" +"WebDAV Authentication" => "Authentification WebDAV", +"URL: http://" => "URL : http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud enverra les informations de connexion à cette adresse. Ce module complémentaire analyse le code réponse HTTP et considère tout code différent des codes 401 et 403 comme associé à une authentification correcte." ); diff --git a/apps/user_webdavauth/l10n/gl.php b/apps/user_webdavauth/l10n/gl.php index 245a510134..a6b8355c07 100644 --- a/apps/user_webdavauth/l10n/gl.php +++ b/apps/user_webdavauth/l10n/gl.php @@ -1,3 +1,5 @@ "URL: http://" +"WebDAV Authentication" => "Autenticación WebDAV", +"URL: http://" => "URL: http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud enviará as credenciais do usuario a esta URL. Este conector comproba a resposta e interpretará os códigos de estado 401 e 403 como credenciais non válidas, e todas as outras respostas como credenciais válidas." ); diff --git a/apps/user_webdavauth/l10n/it.php b/apps/user_webdavauth/l10n/it.php index 8dd605d84a..a7cd6e8e4b 100644 --- a/apps/user_webdavauth/l10n/it.php +++ b/apps/user_webdavauth/l10n/it.php @@ -1,4 +1,5 @@ "Autenticazione WebDAV", -"URL: http://" => "URL: http://" +"URL: http://" => "URL: http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud invierà le credenziali dell'utente a questo URL. Questa estensione controlla la risposta e interpreta i codici di stato 401 e 403 come credenziali non valide, e tutte le altre risposte come credenziali valide." ); diff --git a/apps/user_webdavauth/l10n/ja_JP.php b/apps/user_webdavauth/l10n/ja_JP.php index 245a510134..1cd14a03c7 100644 --- a/apps/user_webdavauth/l10n/ja_JP.php +++ b/apps/user_webdavauth/l10n/ja_JP.php @@ -1,3 +1,5 @@ "URL: http://" +"WebDAV Authentication" => "WebDAV 認証", +"URL: http://" => "URL: http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloudはこのURLにユーザ資格情報を送信します。このプラグインは応答をチェックし、HTTP状態コードが 401 と 403 の場合は無効な資格情報とし、他の応答はすべて有効な資格情報として処理します。" ); diff --git a/apps/user_webdavauth/l10n/pt_PT.php b/apps/user_webdavauth/l10n/pt_PT.php index 245a510134..d7e87b5c8d 100644 --- a/apps/user_webdavauth/l10n/pt_PT.php +++ b/apps/user_webdavauth/l10n/pt_PT.php @@ -1,3 +1,5 @@ "URL: http://" +"WebDAV Authentication" => "Autenticação WebDAV", +"URL: http://" => "URL: http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "O ownCloud vai enviar as credenciais do utilizador através deste URL. Este plugin verifica a resposta e vai interpretar os códigos de estado HTTP 401 e 403 como credenciais inválidas, e todas as outras como válidas." ); diff --git a/apps/user_webdavauth/l10n/sk_SK.php b/apps/user_webdavauth/l10n/sk_SK.php index 9bd32954b0..6e34b818ed 100644 --- a/apps/user_webdavauth/l10n/sk_SK.php +++ b/apps/user_webdavauth/l10n/sk_SK.php @@ -1,3 +1,4 @@ "WebDAV URL: http://" +"WebDAV Authentication" => "WebDAV overenie", +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/sv.php b/apps/user_webdavauth/l10n/sv.php index 245a510134..c79b35c27c 100644 --- a/apps/user_webdavauth/l10n/sv.php +++ b/apps/user_webdavauth/l10n/sv.php @@ -1,3 +1,5 @@ "URL: http://" +"WebDAV Authentication" => "WebDAV Autentisering", +"URL: http://" => "URL: http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud kommer skicka användaruppgifterna till denna URL. Denna plugin kontrollerar svaret och tolkar HTTP-statuskoderna 401 och 403 som felaktiga uppgifter, och alla andra svar som giltiga uppgifter." ); diff --git a/apps/user_webdavauth/l10n/th_TH.php b/apps/user_webdavauth/l10n/th_TH.php index 9bd32954b0..2bd1f685e6 100644 --- a/apps/user_webdavauth/l10n/th_TH.php +++ b/apps/user_webdavauth/l10n/th_TH.php @@ -1,3 +1,5 @@ "WebDAV URL: http://" +"WebDAV Authentication" => "WebDAV Authentication", +"URL: http://" => "URL: http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud จะส่งข้อมูลการเข้าใช้งานของผู้ใช้งานไปยังที่อยู่ URL ดังกล่าวนี้ ปลั๊กอินดังกล่าวจะทำการตรวจสอบข้อมูลที่โต้ตอบกลับมาและจะทำการแปลรหัส HTTP statuscodes 401 และ 403 ให้เป็นข้อมูลการเข้าใช้งานที่ไม่สามารถใช้งานได้ ส่วนข้อมูลอื่นๆที่เหลือทั้งหมดจะเป็นข้อมูลการเข้าใช้งานที่สามารถใช้งานได้" ); diff --git a/apps/user_webdavauth/l10n/zh_CN.php b/apps/user_webdavauth/l10n/zh_CN.php index 5b06409b42..72d2a0c11d 100644 --- a/apps/user_webdavauth/l10n/zh_CN.php +++ b/apps/user_webdavauth/l10n/zh_CN.php @@ -1,3 +1,5 @@ "URL:http://" +"WebDAV Authentication" => "WebDAV 认证", +"URL: http://" => "URL:http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud 将会发送用户的身份到此 URL。这个插件检查返回值并且将 HTTP 状态编码 401 和 403 解释为非法身份,其他所有返回值为合法身份。" ); diff --git a/config/config.sample.php b/config/config.sample.php index dafb536fa6..f26a53c155 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -66,6 +66,9 @@ $CONFIG = array( /* URL of the appstore to use, server should understand OCS */ "appstoreurl" => "http://api.apps.owncloud.com/v1", +/* Enable SMTP class debugging */ +"mail_smtpdebug" => false, + /* Mode to use for sending mail, can be sendmail, smtp, qmail or php, see PHPMailer docs */ "mail_smtpmode" => "sendmail", @@ -75,6 +78,13 @@ $CONFIG = array( /* Port to use for sending mail, depends on mail_smtpmode if this is used */ "mail_smtpport" => 25, +/* SMTP server timeout in seconds for sending mail, depends on mail_smtpmode if this is used */ +"mail_smtptimeout" => 10, + +/* SMTP connection prefix or sending mail, depends on mail_smtpmode if this is used. + Can be '', ssl or tls */ +"mail_smtpsecure" => "", + /* authentication needed to send mail, depends on mail_smtpmode if this is used * (false = disable authentication) */ diff --git a/core/ajax/share.php b/core/ajax/share.php index 72ffc52e99..077baa8ba5 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -98,7 +98,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo OCP\Util::sendMail($to_address, $to_address, $subject, $text, $from_address, $user); OCP\JSON::success(); } catch (Exception $exception) { - OCP\JSON::error(array('data' => array('message' => $exception->getMessage()))); + OCP\JSON::error(array('data' => array('message' => OC_Util::sanitizeHTML($exception->getMessage())))); } break; } diff --git a/core/css/styles.css b/core/css/styles.css index 496320561f..3c172d11df 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -94,8 +94,9 @@ input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-b /* CONTENT ------------------------------------------------------------------ */ #controls { padding:0 0.5em; width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; } #controls .button { display:inline-block; } -#content { top:3.5em; left:12.5em; position:absolute; } -#leftcontent, .leftcontent { position:fixed; overflow:auto; top:6.4em; width:20em; background:#f8f8f8; border-right:1px solid #ddd; } +#content { height: 100%; width: 100%; position: relative; } +#content-wrapper { height: 100%; width: 100%; padding-top: 3.5em; padding-left: 12.5em; box-sizing: border-box; -moz-box-sizing: border-box; position: absolute;} +#leftcontent, .leftcontent { position:fixed; top: 0; overflow:auto; width:20em; background:#f8f8f8; border-right:1px solid #ddd; box-sizing: border-box; -moz-box-sizing: border-box; height: 100%; padding-top: 6.4em } #leftcontent li, .leftcontent li { background:#f8f8f8; padding:.5em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 200ms; -moz-transition:background-color 200ms; -o-transition:background-color 200ms; transition:background-color 200ms; } #leftcontent li:hover, #leftcontent li:active, #leftcontent li.active, .leftcontent li:hover, .leftcontent li:active, .leftcontent li.active { background:#eee; } #leftcontent li.active, .leftcontent li.active { font-weight:bold; } diff --git a/core/js/js.js b/core/js/js.js index 95889ac8a2..6e0a405114 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -88,7 +88,7 @@ var OC={ PERMISSION_DELETE:8, PERMISSION_SHARE:16, webroot:oc_webroot, - appswebroots:oc_appswebroots, + appswebroots:(typeof oc_appswebroots !== 'undefined') ? oc_appswebroots:false, currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false, coreApps:['', 'admin','log','search','settings','core','3rdparty'], /** @@ -100,6 +100,27 @@ var OC={ linkTo:function(app,file){ return OC.filePath(app,'',file); }, + /** + * Creates an url for remote use + * @param string $service id + * @return string the url + * + * Returns a url to the given service. + */ + linkToRemoteBase:function(service) { + return OC.webroot + '/remote.php/' + service; + }, + /** + * @brief Creates an absolute url for remote use + * @param string $service id + * @param bool $add_slash + * @return string the url + * + * Returns a absolute url to the given service. + */ + linkToRemote:function(service) { + return window.location.protocol + '//' + window.location.host + OC.linkToRemoteBase(service); + }, /** * get the absolute url for a file in an app * @param app the id of the app @@ -504,6 +525,7 @@ function fillHeight(selector) { if(selector.outerHeight() > selector.height()){ selector.css('height', height-(selector.outerHeight()-selector.height()) + 'px'); } + console.warn("This function is deprecated! Use CSS instead"); } /** @@ -519,17 +541,11 @@ function fillWindow(selector) { if(selector.outerWidth() > selector.width()){ selector.css('width', width-(selector.outerWidth()-selector.width()) + 'px'); } + console.warn("This function is deprecated! Use CSS instead"); } $(document).ready(function(){ - $(window).resize(function () { - fillHeight($('#leftcontent')); - fillWindow($('#content')); - fillWindow($('#rightcontent')); - }); - $(window).trigger('resize'); - if(!SVGSupport()){ //replace all svg images with png images for browser that dont support svg replaceSVG(); }else{ diff --git a/core/l10n/el.php b/core/l10n/el.php index 579550fc92..c029b01fd9 100644 --- a/core/l10n/el.php +++ b/core/l10n/el.php @@ -126,5 +126,6 @@ "remember" => "απομνημόνευση", "Log in" => "Είσοδος", "prev" => "προηγούμενο", -"next" => "επόμενο" +"next" => "επόμενο", +"Updating ownCloud to version %s, this may take a while." => "Ενημερώνοντας το ownCloud στην έκδοση %s,μπορεί να πάρει λίγο χρόνο." ); diff --git a/core/l10n/eu.php b/core/l10n/eu.php index 1239ee8603..3f1a290953 100644 --- a/core/l10n/eu.php +++ b/core/l10n/eu.php @@ -126,5 +126,6 @@ "remember" => "gogoratu", "Log in" => "Hasi saioa", "prev" => "aurrekoa", -"next" => "hurrengoa" +"next" => "hurrengoa", +"Updating ownCloud to version %s, this may take a while." => "ownCloud %s bertsiora eguneratzen, denbora har dezake." ); diff --git a/core/l10n/fa.php b/core/l10n/fa.php index a7c3c9ab2e..ad5bafeb1a 100644 --- a/core/l10n/fa.php +++ b/core/l10n/fa.php @@ -17,6 +17,7 @@ "Ok" => "قبول", "Error" => "خطا", "Password" => "گذرواژه", +"Unshare" => "لغو اشتراک", "create" => "ایجاد", "ownCloud password reset" => "پسورد ابرهای شما تغییرکرد", "Use the following link to reset your password: {link}" => "از لینک زیر جهت دوباره سازی پسورد استفاده کنید :\n{link}", diff --git a/core/l10n/hu_HU.php b/core/l10n/hu_HU.php index 49b686423a..a9e20fc646 100644 --- a/core/l10n/hu_HU.php +++ b/core/l10n/hu_HU.php @@ -126,5 +126,6 @@ "remember" => "emlékezzen", "Log in" => "Bejelentkezés", "prev" => "előző", -"next" => "következő" +"next" => "következő", +"Updating ownCloud to version %s, this may take a while." => "Owncloud frissítés a %s verzióra folyamatban. Kis türelmet." ); diff --git a/core/l10n/sr.php b/core/l10n/sr.php index 6b64d1957e..e55ad9250a 100644 --- a/core/l10n/sr.php +++ b/core/l10n/sr.php @@ -1,4 +1,6 @@ "Корисник %s дели са вама датотеку", +"User %s shared a folder with you" => "Корисник %s дели са вама директоријум", "Category type not provided." => "Врста категорије није унет.", "No category to add?" => "Додати још неку категорију?", "This category already exists: " => "Категорија већ постоји:", @@ -39,6 +41,7 @@ "Share with link" => "Подели линк", "Password protect" => "Заштићено лозинком", "Password" => "Лозинка", +"Send" => "Пошаљи", "Set expiration date" => "Постави датум истека", "Expiration date" => "Датум истека", "Share via email:" => "Подели поштом:", @@ -55,6 +58,8 @@ "Password protected" => "Заштићено лозинком", "Error unsetting expiration date" => "Грешка код поништавања датума истека", "Error setting expiration date" => "Грешка код постављања датума истека", +"Sending ..." => "Шаљем...", +"Email sent" => "Порука је послата", "ownCloud password reset" => "Поништавање лозинке за ownCloud", "Use the following link to reset your password: {link}" => "Овом везом ресетујте своју лозинку: {link}", "You will receive a link to reset your password via Email." => "Добићете везу за ресетовање лозинке путем е-поште.", @@ -118,5 +123,6 @@ "remember" => "упамти", "Log in" => "Пријава", "prev" => "претходно", -"next" => "следеће" +"next" => "следеће", +"Updating ownCloud to version %s, this may take a while." => "Надоградња ownCloud-а на верзију %s, сачекајте тренутак." ); diff --git a/core/l10n/th_TH.php b/core/l10n/th_TH.php index 183997e4c9..bcbd70d03e 100644 --- a/core/l10n/th_TH.php +++ b/core/l10n/th_TH.php @@ -1,4 +1,8 @@ "ผู้ใช้งาน %s ได้แชร์ไฟล์ให้กับคุณ", +"User %s shared a folder with you" => "ผู้ใช้งาน %s ได้แชร์โฟลเดอร์ให้กับคุณ", +"User %s shared the file \"%s\" with you. It is available for download here: %s" => "ผู้ใช้งาน %s ได้แชร์ไฟล์ \"%s\" ให้กับคุณ และคุณสามารถสามารถดาวน์โหลดไฟล์ดังกล่าวได้จากที่นี่: %s", +"User %s shared the folder \"%s\" with you. It is available for download here: %s" => "ผู้ใช้งาน %s ได้แชร์โฟลเดอร์ \"%s\" ให้กับคุณ และคุณสามารถดาวน์โหลดโฟลเดอร์ดังกล่าวได้จากที่นี่: %s", "Category type not provided." => "ยังไม่ได้ระบุชนิดของหมวดหมู่", "No category to add?" => "ไม่มีหมวดหมู่ที่ต้องการเพิ่ม?", "This category already exists: " => "หมวดหมู่นี้มีอยู่แล้ว: ", @@ -39,6 +43,8 @@ "Share with link" => "แชร์ด้วยลิงก์", "Password protect" => "ใส่รหัสผ่านไว้", "Password" => "รหัสผ่าน", +"Email link to person" => "ส่งลิงก์ให้ทางอีเมล", +"Send" => "ส่ง", "Set expiration date" => "กำหนดวันที่หมดอายุ", "Expiration date" => "วันที่หมดอายุ", "Share via email:" => "แชร์ผ่านทางอีเมล", @@ -55,6 +61,8 @@ "Password protected" => "ใส่รหัสผ่านไว้", "Error unsetting expiration date" => "เกิดข้อผิดพลาดในการยกเลิกการตั้งค่าวันที่หมดอายุ", "Error setting expiration date" => "เกิดข้อผิดพลาดในการตั้งค่าวันที่หมดอายุ", +"Sending ..." => "กำลังส่ง...", +"Email sent" => "ส่งอีเมล์แล้ว", "ownCloud password reset" => "รีเซ็ตรหัสผ่าน ownCloud", "Use the following link to reset your password: {link}" => "ใช้ลิงค์ต่อไปนี้เพื่อเปลี่ยนรหัสผ่านของคุณใหม่: {link}", "You will receive a link to reset your password via Email." => "คุณจะได้รับลิงค์เพื่อกำหนดรหัสผ่านใหม่ทางอีเมล์", @@ -118,5 +126,6 @@ "remember" => "จำรหัสผ่าน", "Log in" => "เข้าสู่ระบบ", "prev" => "ก่อนหน้า", -"next" => "ถัดไป" +"next" => "ถัดไป", +"Updating ownCloud to version %s, this may take a while." => "กำลังอัพเดท ownCloud ไปเป็นรุ่น %s, กรุณารอสักครู่" ); diff --git a/core/l10n/tr.php b/core/l10n/tr.php index 284a4d9713..58e28a9b3b 100644 --- a/core/l10n/tr.php +++ b/core/l10n/tr.php @@ -1,9 +1,16 @@ "%s kullanıcısı sizinle bir dosyayı paylaştı", +"User %s shared a folder with you" => "%s kullanıcısı sizinle bir dizini paylaştı", +"User %s shared the file \"%s\" with you. It is available for download here: %s" => "%s kullanıcısı \"%s\" dosyasını sizinle paylaştı. %s adresinden indirilebilir", +"User %s shared the folder \"%s\" with you. It is available for download here: %s" => "%s kullanıcısı \"%s\" dizinini sizinle paylaştı. %s adresinden indirilebilir", "Category type not provided." => "Kategori türü desteklenmemektedir.", "No category to add?" => "Eklenecek kategori yok?", "This category already exists: " => "Bu kategori zaten mevcut: ", "Object type not provided." => "Nesne türü desteklenmemektedir.", +"%s ID not provided." => "%s ID belirtilmedi.", +"Error adding %s to favorites." => "%s favorilere eklenirken hata oluştu", "No categories selected for deletion." => "Silmek için bir kategori seçilmedi", +"Error removing %s from favorites." => "%s favorilere çıkarılırken hata oluştu", "Settings" => "Ayarlar", "seconds ago" => "saniye önce", "1 minute ago" => "1 dakika önce", @@ -25,18 +32,25 @@ "Ok" => "Tamam", "The object type is not specified." => "Nesne türü belirtilmemiş.", "Error" => "Hata", +"The app name is not specified." => "uygulama adı belirtilmedi.", +"The required file {file} is not installed!" => "İhtiyaç duyulan {file} dosyası kurulu değil.", "Error while sharing" => "Paylaşım sırasında hata ", +"Error while unsharing" => "Paylaşım iptal ediliyorken hata", "Error while changing permissions" => "İzinleri değiştirirken hata oluştu", +"Shared with you and the group {group} by {owner}" => " {owner} tarafından sizinle ve {group} ile paylaştırılmış", +"Shared with you by {owner}" => "{owner} trafından sizinle paylaştırıldı", "Share with" => "ile Paylaş", "Share with link" => "Bağlantı ile paylaş", "Password protect" => "Şifre korunması", "Password" => "Parola", +"Email link to person" => "Kişiye e-posta linki", "Send" => "Gönder", "Set expiration date" => "Son kullanma tarihini ayarla", "Expiration date" => "Son kullanım tarihi", "Share via email:" => "Eposta ile paylaş", "No people found" => "Kişi bulunamadı", "Resharing is not allowed" => "Tekrar paylaşmaya izin verilmiyor", +"Shared in {item} with {user}" => " {item} içinde {user} ile paylaşılanlarlar", "Unshare" => "Paylaşılmayan", "can edit" => "düzenleyebilir", "access control" => "erişim kontrolü", @@ -45,6 +59,8 @@ "delete" => "sil", "share" => "paylaş", "Password protected" => "Paralo korumalı", +"Error unsetting expiration date" => "Geçerlilik tarihi tanımlama kaldırma hatası", +"Error setting expiration date" => "Geçerlilik tarihi tanımlama hatası", "Sending ..." => "Gönderiliyor...", "Email sent" => "Eposta gönderildi", "ownCloud password reset" => "ownCloud parola sıfırlama", @@ -68,6 +84,9 @@ "Edit categories" => "Kategorileri düzenle", "Add" => "Ekle", "Security Warning" => "Güvenlik Uyarisi", +"No secure random number generator is available, please enable the PHP OpenSSL extension." => "Güvenli rasgele sayı üreticisi bulunamadı. Lütfen PHP OpenSSL eklentisini etkinleştirin.", +"Without a secure random number generator an attacker may be able to predict password reset tokens and take over your account." => "Güvenli rasgele sayı üreticisi olmadan saldırganlar parola sıfırlama simgelerini tahmin edip hesabınızı ele geçirebilir.", +"Your data directory and your files are probably accessible from the internet. The .htaccess file that ownCloud provides is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." => "data dizininiz ve dosyalarınız büyük ihtimalle internet üzerinden erişilebilir. Owncloud tarafından sağlanan .htaccess dosyası çalışmıyor. Web sunucunuzu yapılandırarak data dizinine erişimi kapatmanızı veya data dizinini web sunucu döküman dizini dışına almanızı şiddetle tavsiye ederiz.", "Create an admin account" => "Bir yönetici hesabı oluşturun", "Advanced" => "Gelişmiş", "Data folder" => "Veri klasörü", @@ -101,9 +120,12 @@ "web services under your control" => "kontrolünüzdeki web servisleri", "Log out" => "Çıkış yap", "Automatic logon rejected!" => "Otomatik oturum açma reddedildi!", +"If you did not change your password recently, your account may be compromised!" => "Yakın zamanda parolanızı değiştirmedi iseniz hesabınız riske girebilir.", +"Please change your password to secure your account again." => "Hesabınızı korumak için lütfen parolanızı değiştirin.", "Lost your password?" => "Parolanızı mı unuttunuz?", "remember" => "hatırla", "Log in" => "Giriş yap", "prev" => "önceki", -"next" => "sonraki" +"next" => "sonraki", +"Updating ownCloud to version %s, this may take a while." => "Owncloud %s versiyonuna güncelleniyor. Biraz zaman alabilir." ); diff --git a/core/l10n/uk.php b/core/l10n/uk.php index 16258d22dc..88e18d3eb2 100644 --- a/core/l10n/uk.php +++ b/core/l10n/uk.php @@ -126,5 +126,6 @@ "remember" => "запам'ятати", "Log in" => "Вхід", "prev" => "попередній", -"next" => "наступний" +"next" => "наступний", +"Updating ownCloud to version %s, this may take a while." => "Оновлення ownCloud до версії %s, це може зайняти деякий час." ); diff --git a/core/l10n/zh_CN.php b/core/l10n/zh_CN.php index 6c098e211d..626ede4cc7 100644 --- a/core/l10n/zh_CN.php +++ b/core/l10n/zh_CN.php @@ -43,6 +43,7 @@ "Share with link" => "共享链接", "Password protect" => "密码保护", "Password" => "密码", +"Email link to person" => "发送链接到个人", "Send" => "发送", "Set expiration date" => "设置过期日期", "Expiration date" => "过期日期", @@ -125,5 +126,6 @@ "remember" => "记住", "Log in" => "登录", "prev" => "上一页", -"next" => "下一页" +"next" => "下一页", +"Updating ownCloud to version %s, this may take a while." => "更新 ownCloud 到版本 %s,这可能需要一些时间。" ); diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php index 47f4b423b3..cb2f977383 100644 --- a/core/templates/layout.base.php +++ b/core/templates/layout.base.php @@ -10,7 +10,6 @@ diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index 8395426e4e..5b39503474 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -10,7 +10,6 @@