Merge branch 'master' into googledrive

This commit is contained in:
Michael Gapczynski 2013-05-30 11:20:22 -04:00
commit bd0d189f6f
820 changed files with 7052 additions and 36205 deletions

View File

@ -46,6 +46,7 @@
"{count} folders" => "{count} pastas", "{count} folders" => "{count} pastas",
"1 file" => "1 ficheiro", "1 file" => "1 ficheiro",
"{count} files" => "{count} ficheiros", "{count} files" => "{count} ficheiros",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Nome da pasta inválido. Palavra 'Shared' é reservado pela ownCloud",
"Unable to rename file" => "Não foi possível renomear o ficheiro", "Unable to rename file" => "Não foi possível renomear o ficheiro",
"Upload" => "Carregar", "Upload" => "Carregar",
"File handling" => "Manuseamento de ficheiros", "File handling" => "Manuseamento de ficheiros",

View File

@ -46,6 +46,7 @@
"{count} folders" => "{count} 個資料夾", "{count} folders" => "{count} 個資料夾",
"1 file" => "1 個檔案", "1 file" => "1 個檔案",
"{count} files" => "{count} 個檔案", "{count} files" => "{count} 個檔案",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "無效的資料夾名稱,'Shared' 的使用被 ownCloud 保留",
"Unable to rename file" => "無法重新命名檔案", "Unable to rename file" => "無法重新命名檔案",
"Upload" => "上傳", "Upload" => "上傳",
"File handling" => "檔案處理", "File handling" => "檔案處理",

View File

@ -13,31 +13,47 @@ use OCA\Encryption;
\OCP\JSON::checkAppEnabled('files_encryption'); \OCP\JSON::checkAppEnabled('files_encryption');
\OCP\JSON::callCheck(); \OCP\JSON::callCheck();
$l=OC_L10N::get('files_encryption'); $l = OC_L10N::get('files_encryption');
$return = false; $return = false;
// Enable recoveryAdmin // Enable recoveryAdmin
$recoveryKeyId = OC_Appconfig::getValue('files_encryption', 'recoveryKeyId'); $recoveryKeyId = OC_Appconfig::getValue('files_encryption', 'recoveryKeyId');
if (isset($_POST['adminEnableRecovery']) && $_POST['adminEnableRecovery'] == 1){ if (isset($_POST['adminEnableRecovery']) && $_POST['adminEnableRecovery'] === '1') {
$return = \OCA\Encryption\Helper::adminEnableRecovery($recoveryKeyId, $_POST['recoveryPassword']); $return = \OCA\Encryption\Helper::adminEnableRecovery($recoveryKeyId, $_POST['recoveryPassword']);
$action = "enable";
// Return success or failure
if ($return) {
\OCP\JSON::success(array('data' => array('message' => $l->t('Recovery key successfully enabled'))));
} else {
\OCP\JSON::error(array(
'data' => array(
'message' => $l->t(
'Could not enable recovery key. Please check your recovery key password!')
)
));
}
// Disable recoveryAdmin // Disable recoveryAdmin
} elseif ( } elseif (
isset($_POST['adminEnableRecovery']) isset($_POST['adminEnableRecovery'])
&& 0 == $_POST['adminEnableRecovery'] && '0' === $_POST['adminEnableRecovery']
) { ) {
$return = \OCA\Encryption\Helper::adminDisableRecovery($_POST['recoveryPassword']); $return = \OCA\Encryption\Helper::adminDisableRecovery($_POST['recoveryPassword']);
$action = "disable";
// Return success or failure
if ($return) {
\OCP\JSON::success(array('data' => array('message' => $l->t('Recovery key successfully disabled'))));
} else {
\OCP\JSON::error(array(
'data' => array(
'message' => $l->t(
'Could not disable recovery key. Please check your recovery key password!')
)
));
}
} }
// Return success or failure
if ($return) {
\OCP\JSON::success(array("data" => array( "message" => $l->t('Recovery key successfully ' . $action.'d'))));
} else {
\OCP\JSON::error(array("data" => array( "message" => $l->t('Could not '.$action.' recovery key. Please check your recovery key password!'))));
}

View File

@ -15,7 +15,7 @@ use OCA\Encryption;
\OCP\JSON::checkAppEnabled('files_encryption'); \OCP\JSON::checkAppEnabled('files_encryption');
\OCP\JSON::callCheck(); \OCP\JSON::callCheck();
$l=OC_L10N::get('core'); $l = OC_L10N::get('core');
$return = false; $return = false;
@ -28,7 +28,7 @@ $result = $util->checkRecoveryPassword($oldPassword);
if ($result) { if ($result) {
$keyId = $util->getRecoveryKeyId(); $keyId = $util->getRecoveryKeyId();
$keyPath = '/owncloud_private_key/' . $keyId . ".private.key"; $keyPath = '/owncloud_private_key/' . $keyId . '.private.key';
$view = new \OC\Files\View('/'); $view = new \OC\Files\View('/');
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
@ -46,7 +46,7 @@ if ($result) {
// success or failure // success or failure
if ($return) { if ($return) {
\OCP\JSON::success(array("data" => array( "message" => $l->t('Password successfully changed.')))); \OCP\JSON::success(array('data' => array('message' => $l->t('Password successfully changed.'))));
} else { } else {
\OCP\JSON::error(array("data" => array( "message" => $l->t('Could not change the password. Maybe the old password was not correct.')))); \OCP\JSON::error(array('data' => array('message' => $l->t('Could not change the password. Maybe the old password was not correct.'))));
} }

View File

@ -10,22 +10,22 @@
use OCA\Encryption; use OCA\Encryption;
\OCP\JSON::checkLoggedIn(); \OCP\JSON::checkLoggedIn();
\OCP\JSON::checkAppEnabled( 'files_encryption' ); \OCP\JSON::checkAppEnabled('files_encryption');
\OCP\JSON::callCheck(); \OCP\JSON::callCheck();
if ( if (
isset( $_POST['userEnableRecovery'] ) isset($_POST['userEnableRecovery'])
&& ( 0 == $_POST['userEnableRecovery'] || 1 == $_POST['userEnableRecovery'] ) && (0 == $_POST['userEnableRecovery'] || '1' === $_POST['userEnableRecovery'])
) { ) {
$userId = \OCP\USER::getUser(); $userId = \OCP\USER::getUser();
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
$util = new \OCA\Encryption\Util( $view, $userId ); $util = new \OCA\Encryption\Util($view, $userId);
// Save recovery preference to DB // Save recovery preference to DB
$return = $util->setRecoveryForUser( $_POST['userEnableRecovery'] ); $return = $util->setRecoveryForUser($_POST['userEnableRecovery']);
if ($_POST['userEnableRecovery'] == "1") { if ($_POST['userEnableRecovery'] === '1') {
$util->addRecoveryKeys(); $util->addRecoveryKeys();
} else { } else {
$util->removeRecoveryKeys(); $util->removeRecoveryKeys();
@ -38,4 +38,4 @@ if (
} }
// Return success or failure // Return success or failure
( $return ) ? \OCP\JSON::success() : \OCP\JSON::error(); ($return) ? \OCP\JSON::success() : \OCP\JSON::error();

View File

@ -10,7 +10,7 @@ OC::$CLASSPATH['OCA\Encryption\Session'] = 'files_encryption/lib/session.php';
OC::$CLASSPATH['OCA\Encryption\Capabilities'] = 'files_encryption/lib/capabilities.php'; OC::$CLASSPATH['OCA\Encryption\Capabilities'] = 'files_encryption/lib/capabilities.php';
OC::$CLASSPATH['OCA\Encryption\Helper'] = 'files_encryption/lib/helper.php'; OC::$CLASSPATH['OCA\Encryption\Helper'] = 'files_encryption/lib/helper.php';
OC_FileProxy::register( new OCA\Encryption\Proxy() ); OC_FileProxy::register(new OCA\Encryption\Proxy());
// User related hooks // User related hooks
OCA\Encryption\Helper::registerUserHooks(); OCA\Encryption\Helper::registerUserHooks();
@ -21,7 +21,7 @@ OCA\Encryption\Helper::registerShareHooks();
// Filesystem related hooks // Filesystem related hooks
OCA\Encryption\Helper::registerFilesystemHooks(); OCA\Encryption\Helper::registerFilesystemHooks();
stream_wrapper_register( 'crypt', 'OCA\Encryption\Stream' ); stream_wrapper_register('crypt', 'OCA\Encryption\Stream');
// check if we are logged in // check if we are logged in
if (OCP\User::isLoggedIn()) { if (OCP\User::isLoggedIn()) {
@ -46,6 +46,6 @@ if (OCP\User::isLoggedIn()) {
} }
// Register settings scripts // Register settings scripts
OCP\App::registerAdmin( 'files_encryption', 'settings-admin' ); OCP\App::registerAdmin('files_encryption', 'settings-admin');
OCP\App::registerPersonal( 'files_encryption', 'settings-personal' ); OCP\App::registerPersonal('files_encryption', 'settings-personal');

View File

@ -37,58 +37,56 @@ class Hooks {
* @brief Startup encryption backend upon user login * @brief Startup encryption backend upon user login
* @note This method should never be called for users using client side encryption * @note This method should never be called for users using client side encryption
*/ */
public static function login( $params ) { public static function login($params) {
// Manually initialise Filesystem{} singleton with correct // Manually initialise Filesystem{} singleton with correct
// fake root path, in order to avoid fatal webdav errors // fake root path, in order to avoid fatal webdav errors
// NOTE: disabled because this give errors on webdav! // NOTE: disabled because this give errors on webdav!
//\OC\Files\Filesystem::init( $params['uid'], '/' . 'files' . '/' ); //\OC\Files\Filesystem::init( $params['uid'], '/' . 'files' . '/' );
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
$util = new Util( $view, $params['uid'] ); $util = new Util($view, $params['uid']);
// setup user, if user not ready force relogin // setup user, if user not ready force relogin
if(Helper::setupUser($util, $params['password']) === false) { if (Helper::setupUser($util, $params['password']) === false) {
return false; return false;
} }
$encryptedKey = Keymanager::getPrivateKey( $view, $params['uid'] ); $encryptedKey = Keymanager::getPrivateKey($view, $params['uid']);
$privateKey = Crypt::symmetricDecryptFileContent( $encryptedKey, $params['password'] ); $privateKey = Crypt::symmetricDecryptFileContent($encryptedKey, $params['password']);
$session = new Session( $view ); $session = new \OCA\Encryption\Session($view);
$session->setPrivateKey( $privateKey, $params['uid'] ); $session->setPrivateKey($privateKey, $params['uid']);
// Check if first-run file migration has already been performed // Check if first-run file migration has already been performed
$migrationCompleted = $util->getMigrationStatus(); $migrationCompleted = $util->getMigrationStatus();
// If migration not yet done // If migration not yet done
if ( ! $migrationCompleted ) { if (!$migrationCompleted) {
$userView = new \OC_FilesystemView( '/' . $params['uid'] ); $userView = new \OC_FilesystemView('/' . $params['uid']);
// Set legacy encryption key if it exists, to support // Set legacy encryption key if it exists, to support
// depreciated encryption system // depreciated encryption system
if ( if (
$userView->file_exists( 'encryption.key' ) $userView->file_exists('encryption.key')
&& $encLegacyKey = $userView->file_get_contents( 'encryption.key' ) && $encLegacyKey = $userView->file_get_contents('encryption.key')
) { ) {
$plainLegacyKey = Crypt::legacyDecrypt( $encLegacyKey, $params['password'] ); $plainLegacyKey = Crypt::legacyBlockDecrypt($encLegacyKey, $params['password']);
$session->setLegacyKey( $plainLegacyKey ); $session->setLegacyKey($plainLegacyKey);
} }
$publicKey = Keymanager::getPublicKey( $view, $params['uid'] );
// Encrypt existing user files: // Encrypt existing user files:
// This serves to upgrade old versions of the encryption // This serves to upgrade old versions of the encryption
// app (see appinfo/spec.txt) // app (see appinfo/spec.txt)
if ( if (
$util->encryptAll( '/' . $params['uid'] . '/' . 'files', $session->getLegacyKey(), $params['password'] ) $util->encryptAll('/' . $params['uid'] . '/' . 'files', $session->getLegacyKey(), $params['password'])
) { ) {
\OC_Log::write( \OC_Log::write(
@ -99,7 +97,7 @@ class Hooks {
} }
// Register successful migration in DB // Register successful migration in DB
$util->setMigrationStatus( 1 ); $util->setMigrationStatus(1);
} }
@ -111,10 +109,10 @@ class Hooks {
* @brief setup encryption backend upon user created * @brief setup encryption backend upon user created
* @note This method should never be called for users using client side encryption * @note This method should never be called for users using client side encryption
*/ */
public static function postCreateUser( $params ) { public static function postCreateUser($params) {
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
$util = new Util( $view, $params['uid'] ); $util = new Util($view, $params['uid']);
Helper::setupUser($util, $params['password']); Helper::setupUser($util, $params['password']);
} }
@ -123,8 +121,8 @@ class Hooks {
* @brief cleanup encryption backend upon user deleted * @brief cleanup encryption backend upon user deleted
* @note This method should never be called for users using client side encryption * @note This method should never be called for users using client side encryption
*/ */
public static function postDeleteUser( $params ) { public static function postDeleteUser($params) {
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
// cleanup public key // cleanup public key
$publicKey = '/public-keys/' . $params['uid'] . '.public.key'; $publicKey = '/public-keys/' . $params['uid'] . '.public.key';
@ -147,13 +145,13 @@ class Hooks {
// Only attempt to change passphrase if server-side encryption // Only attempt to change passphrase if server-side encryption
// is in use (client-side encryption does not have access to // is in use (client-side encryption does not have access to
// the necessary keys) // the necessary keys)
if (Crypt::mode() == 'server') { if (Crypt::mode() === 'server') {
if ($params['uid'] == \OCP\User::getUser()) { if ($params['uid'] === \OCP\User::getUser()) {
$view = new \OC_FilesystemView('/'); $view = new \OC_FilesystemView('/');
$session = new Session($view); $session = new \OCA\Encryption\Session($view);
// Get existing decrypted private key // Get existing decrypted private key
$privateKey = $session->getPrivateKey(); $privateKey = $session->getPrivateKey();
@ -187,15 +185,16 @@ class Hooks {
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
// Save public key // Save public key
$view->file_put_contents( '/public-keys/'.$user.'.public.key', $keypair['publicKey'] ); $view->file_put_contents('/public-keys/' . $user . '.public.key', $keypair['publicKey']);
// Encrypt private key empty passphrase // Encrypt private key empty passphrase
$encryptedPrivateKey = Crypt::symmetricEncryptFileContent( $keypair['privateKey'], $newUserPassword ); $encryptedPrivateKey = Crypt::symmetricEncryptFileContent($keypair['privateKey'], $newUserPassword);
// Save private key // Save private key
$view->file_put_contents( '/'.$user.'/files_encryption/'.$user.'.private.key', $encryptedPrivateKey ); $view->file_put_contents(
'/' . $user . '/files_encryption/' . $user . '.private.key', $encryptedPrivateKey);
if ( $recoveryPassword ) { // if recovery key is set we can re-encrypt the key files if ($recoveryPassword) { // if recovery key is set we can re-encrypt the key files
$util = new Util($view, $user); $util = new Util($view, $user);
$util->recoverUsersFiles($recoveryPassword); $util->recoverUsersFiles($recoveryPassword);
} }
@ -233,10 +232,11 @@ class Hooks {
} }
} }
if($error) if ($error) // Set flag var 'run' to notify emitting
// Set flag var 'run' to notify emitting
// script that hook execution failed // script that hook execution failed
{
$params['run']->run = false; $params['run']->run = false;
}
// TODO: Make sure files_sharing provides user // TODO: Make sure files_sharing provides user
// feedback on failed share // feedback on failed share
} }
@ -268,14 +268,14 @@ class Hooks {
if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') { if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
$view = new \OC_FilesystemView('/'); $view = new \OC_FilesystemView('/');
$session = new Session($view); $session = new \OCA\Encryption\Session($view);
$userId = \OCP\User::getUser(); $userId = \OCP\User::getUser();
$util = new Util($view, $userId); $util = new Util($view, $userId);
$path = $util->fileIdToPath($params['itemSource']); $path = $util->fileIdToPath($params['itemSource']);
$share = $util->getParentFromShare($params['id']); $share = $util->getParentFromShare($params['id']);
//if parent is set, then this is a re-share action //if parent is set, then this is a re-share action
if ($share['parent'] != null) { if ($share['parent'] !== null) {
// get the parent from current share // get the parent from current share
$parent = $util->getShareParent($params['parent']); $parent = $util->getShareParent($params['parent']);
@ -336,7 +336,7 @@ class Hooks {
foreach ($allFiles as $path) { foreach ($allFiles as $path) {
$usersSharing = $util->getSharingUsersArray($sharingEnabled, $path); $usersSharing = $util->getSharingUsersArray($sharingEnabled, $path);
$util->setSharedFileKeyfiles( $session, $usersSharing, $path ); $util->setSharedFileKeyfiles($session, $usersSharing, $path);
} }
} }
} }
@ -344,7 +344,7 @@ class Hooks {
/** /**
* @brief * @brief
*/ */
public static function postUnshare( $params ) { public static function postUnshare($params) {
// NOTE: $params has keys: // NOTE: $params has keys:
// [itemType] => file // [itemType] => file
@ -353,31 +353,31 @@ class Hooks {
// [shareWith] => test1 // [shareWith] => test1
// [itemParent] => // [itemParent] =>
if ( $params['itemType'] === 'file' || $params['itemType'] === 'folder' ) { if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
$userId = \OCP\User::getUser(); $userId = \OCP\User::getUser();
$util = new Util( $view, $userId); $util = new Util($view, $userId);
$path = $util->fileIdToPath( $params['itemSource'] ); $path = $util->fileIdToPath($params['itemSource']);
// check if this is a re-share // check if this is a re-share
if ( $params['itemParent'] ) { if ($params['itemParent']) {
// get the parent from current share // get the parent from current share
$parent = $util->getShareParent( $params['itemParent'] ); $parent = $util->getShareParent($params['itemParent']);
// get target path // get target path
$targetPath = $util->fileIdToPath( $params['itemSource'] ); $targetPath = $util->fileIdToPath($params['itemSource']);
$targetPathSplit = array_reverse( explode( '/', $targetPath ) ); $targetPathSplit = array_reverse(explode('/', $targetPath));
// init values // init values
$path = ''; $path = '';
$sharedPart = ltrim( $parent['file_target'], '/' ); $sharedPart = ltrim($parent['file_target'], '/');
// rebuild path // rebuild path
foreach ( $targetPathSplit as $pathPart ) { foreach ($targetPathSplit as $pathPart) {
if ( $pathPart !== $sharedPart ) { if ($pathPart !== $sharedPart) {
$path = '/' . $pathPart . $path; $path = '/' . $pathPart . $path;
@ -394,34 +394,36 @@ class Hooks {
} }
// for group shares get a list of the group members // for group shares get a list of the group members
if ( $params['shareType'] == \OCP\Share::SHARE_TYPE_GROUP ) { if ($params['shareType'] === \OCP\Share::SHARE_TYPE_GROUP) {
$userIds = \OC_Group::usersInGroup($params['shareWith']); $userIds = \OC_Group::usersInGroup($params['shareWith']);
} else if ( $params['shareType'] == \OCP\Share::SHARE_TYPE_LINK ){
$userIds = array( $util->getPublicShareKeyId() );
} else { } else {
$userIds = array( $params['shareWith'] ); if ($params['shareType'] === \OCP\Share::SHARE_TYPE_LINK) {
$userIds = array($util->getPublicShareKeyId());
} else {
$userIds = array($params['shareWith']);
}
} }
// if we unshare a folder we need a list of all (sub-)files // if we unshare a folder we need a list of all (sub-)files
if ( $params['itemType'] === 'folder' ) { if ($params['itemType'] === 'folder') {
$allFiles = $util->getAllFiles( $path ); $allFiles = $util->getAllFiles($path);
} else { } else {
$allFiles = array( $path ); $allFiles = array($path);
} }
foreach ( $allFiles as $path ) { foreach ($allFiles as $path) {
// check if the user still has access to the file, otherwise delete share key // check if the user still has access to the file, otherwise delete share key
$sharingUsers = $util->getSharingUsersArray( true, $path ); $sharingUsers = $util->getSharingUsersArray(true, $path);
// Unshare every user who no longer has access to the file // Unshare every user who no longer has access to the file
$delUsers = array_diff( $userIds, $sharingUsers); $delUsers = array_diff($userIds, $sharingUsers);
// delete share key // delete share key
Keymanager::delShareKey( $view, $delUsers, $path ); Keymanager::delShareKey($view, $delUsers, $path);
} }
} }
@ -440,13 +442,15 @@ class Hooks {
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
$view = new \OC_FilesystemView('/'); $view = new \OC_FilesystemView('/');
$session = new Session($view); $session = new \OCA\Encryption\Session($view);
$userId = \OCP\User::getUser(); $userId = \OCP\User::getUser();
$util = new Util( $view, $userId ); $util = new Util($view, $userId);
// Format paths to be relative to user files dir // Format paths to be relative to user files dir
$oldKeyfilePath = \OC\Files\Filesystem::normalizePath($userId . '/' . 'files_encryption' . '/' . 'keyfiles' . '/' . $params['oldpath']); $oldKeyfilePath = \OC\Files\Filesystem::normalizePath(
$newKeyfilePath = \OC\Files\Filesystem::normalizePath($userId . '/' . 'files_encryption' . '/' . 'keyfiles' . '/' . $params['newpath']); $userId . '/' . 'files_encryption' . '/' . 'keyfiles' . '/' . $params['oldpath']);
$newKeyfilePath = \OC\Files\Filesystem::normalizePath(
$userId . '/' . 'files_encryption' . '/' . 'keyfiles' . '/' . $params['newpath']);
// add key ext if this is not an folder // add key ext if this is not an folder
if (!$view->is_dir($oldKeyfilePath)) { if (!$view->is_dir($oldKeyfilePath)) {
@ -454,13 +458,13 @@ class Hooks {
$newKeyfilePath .= '.key'; $newKeyfilePath .= '.key';
// handle share-keys // handle share-keys
$localKeyPath = $view->getLocalFile($userId.'/files_encryption/share-keys/'.$params['oldpath']); $localKeyPath = $view->getLocalFile($userId . '/files_encryption/share-keys/' . $params['oldpath']);
$matches = glob(preg_quote($localKeyPath).'*.shareKey'); $matches = glob(preg_quote($localKeyPath) . '*.shareKey');
foreach ($matches as $src) { foreach ($matches as $src) {
$dst = \OC\Files\Filesystem::normalizePath(str_replace($params['oldpath'], $params['newpath'], $src)); $dst = \OC\Files\Filesystem::normalizePath(str_replace($params['oldpath'], $params['newpath'], $src));
// create destination folder if not exists // create destination folder if not exists
if(!file_exists(dirname($dst))) { if (!file_exists(dirname($dst))) {
mkdir(dirname($dst), 0750, true); mkdir(dirname($dst), 0750, true);
} }
@ -469,11 +473,13 @@ class Hooks {
} else { } else {
// handle share-keys folders // handle share-keys folders
$oldShareKeyfilePath = \OC\Files\Filesystem::normalizePath($userId . '/' . 'files_encryption' . '/' . 'share-keys' . '/' . $params['oldpath']); $oldShareKeyfilePath = \OC\Files\Filesystem::normalizePath(
$newShareKeyfilePath = \OC\Files\Filesystem::normalizePath($userId . '/' . 'files_encryption' . '/' . 'share-keys' . '/' . $params['newpath']); $userId . '/' . 'files_encryption' . '/' . 'share-keys' . '/' . $params['oldpath']);
$newShareKeyfilePath = \OC\Files\Filesystem::normalizePath(
$userId . '/' . 'files_encryption' . '/' . 'share-keys' . '/' . $params['newpath']);
// create destination folder if not exists // create destination folder if not exists
if(!$view->file_exists(dirname($newShareKeyfilePath))) { if (!$view->file_exists(dirname($newShareKeyfilePath))) {
$view->mkdir(dirname($newShareKeyfilePath), 0750, true); $view->mkdir(dirname($newShareKeyfilePath), 0750, true);
} }
@ -481,10 +487,10 @@ class Hooks {
} }
// Rename keyfile so it isn't orphaned // Rename keyfile so it isn't orphaned
if($view->file_exists($oldKeyfilePath)) { if ($view->file_exists($oldKeyfilePath)) {
// create destination folder if not exists // create destination folder if not exists
if(!$view->file_exists(dirname($newKeyfilePath))) { if (!$view->file_exists(dirname($newKeyfilePath))) {
$view->mkdir(dirname($newKeyfilePath), 0750, true); $view->mkdir(dirname($newKeyfilePath), 0750, true);
} }
@ -492,10 +498,10 @@ class Hooks {
} }
// build the path to the file // build the path to the file
$newPath = '/' . $userId . '/files' .$params['newpath']; $newPath = '/' . $userId . '/files' . $params['newpath'];
$newPathRelative = $params['newpath']; $newPathRelative = $params['newpath'];
if($util->fixFileSize($newPath)) { if ($util->fixFileSize($newPath)) {
// get sharing app state // get sharing app state
$sharingEnabled = \OCP\Share::isEnabled(); $sharingEnabled = \OCP\Share::isEnabled();

View File

@ -1,4 +1,18 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Password successfully changed." => "Parool edukalt vahetatud.",
"Could not change the password. Maybe the old password was not correct." => "Ei suutnud vahetada parooli. Võib-olla on vana parool valesti sisestatud.",
"Saving..." => "Salvestamine...", "Saving..." => "Salvestamine...",
"Encryption" => "Krüpteerimine" "Encryption" => "Krüpteerimine",
"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Luba krüpteerimise paroolide taastevõti (võimalda parooli jagamine taastevõtmesse):",
"Recovery account password" => "Konto taasteparool",
"Enabled" => "Sisse lülitatud",
"Disabled" => "Väljalülitatud",
"Change encryption passwords recovery key:" => "Muuda taaste võtme krüpteerimise paroole:",
"Old Recovery account password" => "Konto vana taaste parool",
"New Recovery account password" => "Konto uus taasteparool",
"Change Password" => "Muuda parooli",
"Enable password recovery by sharing all files with your administrator:" => "Luba parooli taaste jagades kõik failid administraatoriga:",
"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Valiku lubamine võimaldab taastada ligipääsu krüpteeritud failidele kui parool on kadunud",
"File recovery settings updated" => "Faili taaste seaded uuendatud",
"Could not update file recovery" => "Ei suuda uuendada taastefaili"
); );

View File

@ -1,6 +1,4 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Recovery key successfully " => "O contrasinal foi recuperado satisfactoriamente",
"Could not " => "Non foi posíbel",
"Password successfully changed." => "O contrasinal foi cambiado satisfactoriamente", "Password successfully changed." => "O contrasinal foi cambiado satisfactoriamente",
"Could not change the password. Maybe the old password was not correct." => "Non foi posíbel cambiar o contrasinal. Probabelmente o contrasinal antigo non é o correcto.", "Could not change the password. Maybe the old password was not correct." => "Non foi posíbel cambiar o contrasinal. Probabelmente o contrasinal antigo non é o correcto.",
"Saving..." => "Gardando...", "Saving..." => "Gardando...",
@ -10,5 +8,11 @@
"Enabled" => "Activado", "Enabled" => "Activado",
"Disabled" => "Desactivado", "Disabled" => "Desactivado",
"Change encryption passwords recovery key:" => "Cambiar a chave de la recuperación do cifrado de contrasinais:", "Change encryption passwords recovery key:" => "Cambiar a chave de la recuperación do cifrado de contrasinais:",
"Change Password" => "Cambiar o contrasinal" "Old Recovery account password" => "Antigo contrasinal de recuperación da conta",
"New Recovery account password" => "Novo contrasinal de recuperación da conta",
"Change Password" => "Cambiar o contrasinal",
"Enable password recovery by sharing all files with your administrator:" => "Activar a recuperación de contrasinais compartindo todos os ficheiros co administrador:",
"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Ao activar esta opción permitiráselle volver a obter acceso aos ficheiros cifrados se perde o contrasinal",
"File recovery settings updated" => "Actualizouse o ficheiro de axustes de recuperación",
"Could not update file recovery" => "Non foi posíbel actualizar o ficheiro de recuperación"
); );

View File

@ -1,6 +1,4 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Recovery key successfully " => "Chiave ripristinata correttamente",
"Could not " => "Impossibile",
"Password successfully changed." => "Password modificata correttamente.", "Password successfully changed." => "Password modificata correttamente.",
"Could not change the password. Maybe the old password was not correct." => "Impossibile cambiare la password. Forse la vecchia password non era corretta.", "Could not change the password. Maybe the old password was not correct." => "Impossibile cambiare la password. Forse la vecchia password non era corretta.",
"Saving..." => "Salvataggio in corso...", "Saving..." => "Salvataggio in corso...",

View File

@ -1,10 +1,9 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Recovery key successfully " => "鍵を復旧することができました。",
"Could not " => "できませんでした。",
"Password successfully changed." => "パスワードを変更できました。", "Password successfully changed." => "パスワードを変更できました。",
"Could not change the password. Maybe the old password was not correct." => "パスワードを変更できませんでした。古いパスワードが間違っているかもしれません。", "Could not change the password. Maybe the old password was not correct." => "パスワードを変更できませんでした。古いパスワードが間違っているかもしれません。",
"Saving..." => "保存中...", "Saving..." => "保存中...",
"Encryption" => "暗号化", "Encryption" => "暗号化",
"Enable encryption passwords recovery key (allow sharing to recovery key):" => "暗号化パスワードの復旧キーを有効にする(復旧キーを共有することを許可):",
"Recovery account password" => "復旧アカウントのパスワード", "Recovery account password" => "復旧アカウントのパスワード",
"Enabled" => "有効", "Enabled" => "有効",
"Disabled" => "無効", "Disabled" => "無効",

View File

@ -1,6 +1,4 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Recovery key successfully " => "Sleutelherstel succesvol",
"Could not " => "Kon niet",
"Password successfully changed." => "Wachtwoord succesvol gewijzigd.", "Password successfully changed." => "Wachtwoord succesvol gewijzigd.",
"Could not change the password. Maybe the old password was not correct." => "Kon wachtwoord niet wijzigen. Wellicht oude wachtwoord niet juist ingevoerd.", "Could not change the password. Maybe the old password was not correct." => "Kon wachtwoord niet wijzigen. Wellicht oude wachtwoord niet juist ingevoerd.",
"Saving..." => "Opslaan", "Saving..." => "Opslaan",

View File

@ -1,6 +1,4 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Recovery key successfully " => "Odzyskanie klucza udane",
"Could not " => "Nie można",
"Password successfully changed." => "Zmiana hasła udana.", "Password successfully changed." => "Zmiana hasła udana.",
"Could not change the password. Maybe the old password was not correct." => "Nie można zmienić hasła. Może stare hasło nie było poprawne.", "Could not change the password. Maybe the old password was not correct." => "Nie można zmienić hasła. Może stare hasło nie było poprawne.",
"Saving..." => "Zapisywanie...", "Saving..." => "Zapisywanie...",

View File

@ -1,4 +1,18 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Password successfully changed." => "Senha alterada com sucesso.",
"Could not change the password. Maybe the old password was not correct." => "Não foi possível alterar a senha. Talvez a senha antiga não estava correta.",
"Saving..." => "Salvando...", "Saving..." => "Salvando...",
"Encryption" => "Criptografia" "Encryption" => "Criptografia",
"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Ativar a criptografia de chave de recuperação de senhas (permitir compartilhar a chave de recuperação):",
"Recovery account password" => "Recuperar a senha da conta",
"Enabled" => "Habilidado",
"Disabled" => "Desabilitado",
"Change encryption passwords recovery key:" => "Mudar a criptografia de chave de recuperação de senhas:",
"Old Recovery account password" => "Recuperação de senha de conta antiga",
"New Recovery account password" => "Senha Nova da conta de Recuperação",
"Change Password" => "Trocar Senha",
"Enable password recovery by sharing all files with your administrator:" => "Habilitar recuperação de senha através da partilha de todos os arquivos com o administrador:",
"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Ativando esta opção irá permitir que você reobtainha acesso aos seus arquivos criptografados se sua senha for perdida",
"File recovery settings updated" => "Configurações de recuperação de arquivo atualizado",
"Could not update file recovery" => "Não foi possível atualizar a recuperação de arquivos"
); );

View File

@ -1,4 +1,9 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Password successfully changed." => "Password alterada com sucesso.",
"Could not change the password. Maybe the old password was not correct." => "Não foi possivel alterar a password. Possivelmente a password antiga não está correcta.",
"Saving..." => "A guardar...", "Saving..." => "A guardar...",
"Encryption" => "Encriptação" "Encryption" => "Encriptação",
"Enabled" => "Activado",
"Disabled" => "Desactivado",
"Change Password" => "Mudar a Password"
); );

View File

@ -1,4 +1,18 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Password successfully changed." => "Пароль изменен удачно.",
"Could not change the password. Maybe the old password was not correct." => "Невозможно изменить пароль. Возможно старый пароль не был верен.",
"Saving..." => "Сохранение...", "Saving..." => "Сохранение...",
"Encryption" => "Шифрование" "Encryption" => "Шифрование",
"Enable encryption passwords recovery key (allow sharing to recovery key):" => "Включить шифрование пароля ключа восстановления (понадобится разрешение для восстановления ключа)",
"Recovery account password" => "Восстановление пароля учетной записи",
"Enabled" => "Включено",
"Disabled" => "Отключено",
"Change encryption passwords recovery key:" => "Изменить шифрование пароля ключа восстановления:",
"Old Recovery account password" => "Старое Восстановление пароля учетной записи",
"New Recovery account password" => "Новое Восстановление пароля учетной записи",
"Change Password" => "Изменить пароль",
"Enable password recovery by sharing all files with your administrator:" => "Включить восстановление пароля путем доступа Вашего администратора ко всем файлам",
"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "Включение этой опции позволит вам получить доступ к зашифрованным файлам, в случае утери пароля",
"File recovery settings updated" => "Настройки файла восстановления обновлены",
"Could not update file recovery" => "Невозможно обновить файл восстановления"
); );

View File

@ -1,4 +1,11 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Password successfully changed." => "Heslo úspešne zmenené.",
"Saving..." => "Ukladám...", "Saving..." => "Ukladám...",
"Encryption" => "Šifrovanie" "Encryption" => "Šifrovanie",
"Enabled" => "Povolené",
"Disabled" => "Zakázané",
"Change encryption passwords recovery key:" => "Zmeniť šifrovacie heslo obnovovacieho kľúča:",
"Change Password" => "Zmeniť heslo",
"File recovery settings updated" => "Nastavenie obnovy súborov aktualizované",
"Could not update file recovery" => "Nemožno aktualizovať obnovenie súborov"
); );

View File

@ -1,4 +1,14 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Password successfully changed." => "成功變更密碼。",
"Could not change the password. Maybe the old password was not correct." => "無法變更密碼,或許是輸入的舊密碼不正確。",
"Saving..." => "儲存中...", "Saving..." => "儲存中...",
"Encryption" => "加密" "Encryption" => "加密",
"Enabled" => "已啓用",
"Disabled" => "已停用",
"Change encryption passwords recovery key:" => "變更加密密碼還原金鑰:",
"Change Password" => "變更密碼",
"Enable password recovery by sharing all files with your administrator:" => "與管理員分享所有檔案以啓用密碼還原功能:",
"Enabling this option will allow you to reobtain access to your encrypted files if your password is lost" => "啓用此選項允許您未來遺失密碼時重新取得已加密的檔案",
"File recovery settings updated" => "檔案還原設定已更新",
"Could not update file recovery" => "無法更新檔案還原設定"
); );

View File

@ -26,21 +26,20 @@
namespace OCA\Encryption; namespace OCA\Encryption;
//require_once '../3rdparty/Crypt_Blowfish/Blowfish.php'; //require_once '../3rdparty/Crypt_Blowfish/Blowfish.php';
require_once realpath( dirname( __FILE__ ) . '/../3rdparty/Crypt_Blowfish/Blowfish.php' ); require_once realpath(dirname(__FILE__) . '/../3rdparty/Crypt_Blowfish/Blowfish.php');
/** /**
* Class for common cryptography functionality * Class for common cryptography functionality
*/ */
class Crypt class Crypt {
{
/** /**
* @brief return encryption mode client or server side encryption * @brief return encryption mode client or server side encryption
* @param string $user name (use system wide setting if name=null) * @param string $user name (use system wide setting if name=null)
* @return string 'client' or 'server' * @return string 'client' or 'server'
*/ */
public static function mode( $user = null ) { public static function mode($user = null) {
return 'server'; return 'server';
@ -52,17 +51,20 @@ class Crypt
*/ */
public static function createKeypair() { public static function createKeypair() {
$res = openssl_pkey_new( array( 'private_key_bits' => 4096 ) ); $res = openssl_pkey_new(array('private_key_bits' => 4096));
// Get private key // Get private key
openssl_pkey_export( $res, $privateKey ); openssl_pkey_export($res, $privateKey);
// Get public key // Get public key
$publicKey = openssl_pkey_get_details( $res ); $publicKey = openssl_pkey_get_details($res);
$publicKey = $publicKey['key']; $publicKey = $publicKey['key'];
return ( array( 'publicKey' => $publicKey, 'privateKey' => $privateKey ) ); return (array(
'publicKey' => $publicKey,
'privateKey' => $privateKey
));
} }
@ -75,7 +77,7 @@ class Crypt
* blocks with encryption alone, hence padding is added to achieve the * blocks with encryption alone, hence padding is added to achieve the
* required length. * required length.
*/ */
public static function addPadding( $data ) { public static function addPadding($data) {
$padded = $data . 'xx'; $padded = $data . 'xx';
@ -88,11 +90,11 @@ class Crypt
* @param string $padded padded data to remove padding from * @param string $padded padded data to remove padding from
* @return string unpadded data on success, false on error * @return string unpadded data on success, false on error
*/ */
public static function removePadding( $padded ) { public static function removePadding($padded) {
if ( substr( $padded, -2 ) == 'xx' ) { if (substr($padded, -2) === 'xx') {
$data = substr( $padded, 0, -2 ); $data = substr($padded, 0, -2);
return $data; return $data;
@ -111,26 +113,26 @@ class Crypt
* @return boolean * @return boolean
* @note see also OCA\Encryption\Util->isEncryptedPath() * @note see also OCA\Encryption\Util->isEncryptedPath()
*/ */
public static function isCatfileContent( $content ) { public static function isCatfileContent($content) {
if ( !$content ) { if (!$content) {
return false; return false;
} }
$noPadding = self::removePadding( $content ); $noPadding = self::removePadding($content);
// Fetch encryption metadata from end of file // Fetch encryption metadata from end of file
$meta = substr( $noPadding, -22 ); $meta = substr($noPadding, -22);
// Fetch IV from end of file // Fetch IV from end of file
$iv = substr( $meta, -16 ); $iv = substr($meta, -16);
// Fetch identifier from start of metadata // Fetch identifier from start of metadata
$identifier = substr( $meta, 0, 6 ); $identifier = substr($meta, 0, 6);
if ( $identifier == '00iv00' ) { if ($identifier === '00iv00') {
return true; return true;
@ -147,15 +149,15 @@ class Crypt
* @param string $path * @param string $path
* @return bool * @return bool
*/ */
public static function isEncryptedMeta( $path ) { public static function isEncryptedMeta($path) {
// TODO: Use DI to get \OC\Files\Filesystem out of here // TODO: Use DI to get \OC\Files\Filesystem out of here
// Fetch all file metadata from DB // Fetch all file metadata from DB
$metadata = \OC\Files\Filesystem::getFileInfo( $path ); $metadata = \OC\Files\Filesystem::getFileInfo($path);
// Return encryption status // Return encryption status
return isset( $metadata['encrypted'] ) and ( bool )$metadata['encrypted']; return isset($metadata['encrypted']) && ( bool )$metadata['encrypted'];
} }
@ -166,18 +168,17 @@ class Crypt
* e.g. filename or /Docs/filename, NOT admin/files/filename * e.g. filename or /Docs/filename, NOT admin/files/filename
* @return boolean * @return boolean
*/ */
public static function isLegacyEncryptedContent( $data, $relPath ) { public static function isLegacyEncryptedContent($data, $relPath) {
// Fetch all file metadata from DB // Fetch all file metadata from DB
$metadata = \OC\Files\Filesystem::getFileInfo( $relPath, '' ); $metadata = \OC\Files\Filesystem::getFileInfo($relPath, '');
// If a file is flagged with encryption in DB, but isn't a // If a file is flagged with encryption in DB, but isn't a
// valid content + IV combination, it's probably using the // valid content + IV combination, it's probably using the
// legacy encryption system // legacy encryption system
if ( if (isset($metadata['encrypted'])
isset( $metadata['encrypted'] ) && $metadata['encrypted'] === true
and $metadata['encrypted'] === true && !self::isCatfileContent($data)
and !self::isCatfileContent( $data )
) { ) {
return true; return true;
@ -197,15 +198,15 @@ class Crypt
* @param string $passphrase * @param string $passphrase
* @return string encrypted file content * @return string encrypted file content
*/ */
public static function encrypt( $plainContent, $iv, $passphrase = '' ) { public static function encrypt($plainContent, $iv, $passphrase = '') {
if ( $encryptedContent = openssl_encrypt( $plainContent, 'AES-128-CFB', $passphrase, false, $iv ) ) { if ($encryptedContent = openssl_encrypt($plainContent, 'AES-128-CFB', $passphrase, false, $iv)) {
return $encryptedContent; return $encryptedContent;
} else { } else {
\OC_Log::write( 'Encryption library', 'Encryption (symmetric) of content failed', \OC_Log::ERROR ); \OCP\Util::writeLog('Encryption library', 'Encryption (symmetric) of content failed', \OCP\Util::ERROR);
return false; return false;
@ -221,15 +222,15 @@ class Crypt
* @throws \Exception * @throws \Exception
* @return string decrypted file content * @return string decrypted file content
*/ */
public static function decrypt( $encryptedContent, $iv, $passphrase ) { public static function decrypt($encryptedContent, $iv, $passphrase) {
if ( $plainContent = openssl_decrypt( $encryptedContent, 'AES-128-CFB', $passphrase, false, $iv ) ) { if ($plainContent = openssl_decrypt($encryptedContent, 'AES-128-CFB', $passphrase, false, $iv)) {
return $plainContent; return $plainContent;
} else { } else {
throw new \Exception( 'Encryption library: Decryption (symmetric) of content failed' ); throw new \Exception('Encryption library: Decryption (symmetric) of content failed');
} }
@ -241,7 +242,7 @@ class Crypt
* @param string $iv IV to be concatenated * @param string $iv IV to be concatenated
* @returns string concatenated content * @returns string concatenated content
*/ */
public static function concatIv( $content, $iv ) { public static function concatIv($content, $iv) {
$combined = $content . '00iv00' . $iv; $combined = $content . '00iv00' . $iv;
@ -254,20 +255,20 @@ class Crypt
* @param string $catFile concatenated data to be split * @param string $catFile concatenated data to be split
* @returns array keys: encrypted, iv * @returns array keys: encrypted, iv
*/ */
public static function splitIv( $catFile ) { public static function splitIv($catFile) {
// Fetch encryption metadata from end of file // Fetch encryption metadata from end of file
$meta = substr( $catFile, -22 ); $meta = substr($catFile, -22);
// Fetch IV from end of file // Fetch IV from end of file
$iv = substr( $meta, -16 ); $iv = substr($meta, -16);
// Remove IV and IV identifier text to expose encrypted content // Remove IV and IV identifier text to expose encrypted content
$encrypted = substr( $catFile, 0, -22 ); $encrypted = substr($catFile, 0, -22);
$split = array( $split = array(
'encrypted' => $encrypted 'encrypted' => $encrypted,
, 'iv' => $iv 'iv' => $iv
); );
return $split; return $split;
@ -283,9 +284,9 @@ class Crypt
* @note IV need not be specified, as it will be stored in the returned keyfile * @note IV need not be specified, as it will be stored in the returned keyfile
* and remain accessible therein. * and remain accessible therein.
*/ */
public static function symmetricEncryptFileContent( $plainContent, $passphrase = '' ) { public static function symmetricEncryptFileContent($plainContent, $passphrase = '') {
if ( !$plainContent ) { if (!$plainContent) {
return false; return false;
@ -293,18 +294,18 @@ class Crypt
$iv = self::generateIv(); $iv = self::generateIv();
if ( $encryptedContent = self::encrypt( $plainContent, $iv, $passphrase ) ) { if ($encryptedContent = self::encrypt($plainContent, $iv, $passphrase)) {
// Combine content to encrypt with IV identifier and actual IV // Combine content to encrypt with IV identifier and actual IV
$catfile = self::concatIv( $encryptedContent, $iv ); $catfile = self::concatIv($encryptedContent, $iv);
$padded = self::addPadding( $catfile ); $padded = self::addPadding($catfile);
return $padded; return $padded;
} else { } else {
\OC_Log::write( 'Encryption library', 'Encryption (symmetric) of keyfile content failed', \OC_Log::ERROR ); \OCP\Util::writeLog('Encryption library', 'Encryption (symmetric) of keyfile content failed', \OCP\Util::ERROR);
return false; return false;
@ -326,21 +327,21 @@ class Crypt
* *
* This function decrypts a file * This function decrypts a file
*/ */
public static function symmetricDecryptFileContent( $keyfileContent, $passphrase = '' ) { public static function symmetricDecryptFileContent($keyfileContent, $passphrase = '') {
if ( !$keyfileContent ) { if (!$keyfileContent) {
throw new \Exception( 'Encryption library: no data provided for decryption' ); throw new \Exception('Encryption library: no data provided for decryption');
} }
// Remove padding // Remove padding
$noPadding = self::removePadding( $keyfileContent ); $noPadding = self::removePadding($keyfileContent);
// Split into enc data and catfile // Split into enc data and catfile
$catfile = self::splitIv( $noPadding ); $catfile = self::splitIv($noPadding);
if ( $plainContent = self::decrypt( $catfile['encrypted'], $catfile['iv'], $passphrase ) ) { if ($plainContent = self::decrypt($catfile['encrypted'], $catfile['iv'], $passphrase)) {
return $plainContent; return $plainContent;
@ -358,11 +359,11 @@ class Crypt
* *
* This function decrypts a file * This function decrypts a file
*/ */
public static function symmetricEncryptFileContentKeyfile( $plainContent ) { public static function symmetricEncryptFileContentKeyfile($plainContent) {
$key = self::generateKey(); $key = self::generateKey();
if ( $encryptedContent = self::symmetricEncryptFileContent( $plainContent, $key ) ) { if ($encryptedContent = self::symmetricEncryptFileContent($plainContent, $key)) {
return array( return array(
'key' => $key, 'key' => $key,
@ -384,13 +385,13 @@ class Crypt
* @returns array keys: keys (array, key = userId), data * @returns array keys: keys (array, key = userId), data
* @note symmetricDecryptFileContent() can decrypt files created using this method * @note symmetricDecryptFileContent() can decrypt files created using this method
*/ */
public static function multiKeyEncrypt( $plainContent, array $publicKeys ) { public static function multiKeyEncrypt($plainContent, array $publicKeys) {
// openssl_seal returns false without errors if $plainContent // openssl_seal returns false without errors if $plainContent
// is empty, so trigger our own error // is empty, so trigger our own error
if ( empty( $plainContent ) ) { if (empty($plainContent)) {
throw new \Exception( 'Cannot mutliKeyEncrypt empty plain content' ); throw new \Exception('Cannot mutliKeyEncrypt empty plain content');
} }
@ -399,13 +400,13 @@ class Crypt
$shareKeys = array(); $shareKeys = array();
$mappedShareKeys = array(); $mappedShareKeys = array();
if ( openssl_seal( $plainContent, $sealed, $shareKeys, $publicKeys ) ) { if (openssl_seal($plainContent, $sealed, $shareKeys, $publicKeys)) {
$i = 0; $i = 0;
// Ensure each shareKey is labelled with its // Ensure each shareKey is labelled with its
// corresponding userId // corresponding userId
foreach ( $publicKeys as $userId => $publicKey ) { foreach ($publicKeys as $userId => $publicKey) {
$mappedShareKeys[$userId] = $shareKeys[$i]; $mappedShareKeys[$userId] = $shareKeys[$i];
$i++; $i++;
@ -437,21 +438,21 @@ class Crypt
* *
* This function decrypts a file * This function decrypts a file
*/ */
public static function multiKeyDecrypt( $encryptedContent, $shareKey, $privateKey ) { public static function multiKeyDecrypt($encryptedContent, $shareKey, $privateKey) {
if ( !$encryptedContent ) { if (!$encryptedContent) {
return false; return false;
} }
if ( openssl_open( $encryptedContent, $plainContent, $shareKey, $privateKey ) ) { if (openssl_open($encryptedContent, $plainContent, $shareKey, $privateKey)) {
return $plainContent; return $plainContent;
} else { } else {
\OC_Log::write( 'Encryption library', 'Decryption (asymmetric) of sealed content failed', \OC_Log::ERROR ); \OCP\Util::writeLog('Encryption library', 'Decryption (asymmetric) of sealed content failed', \OCP\Util::ERROR);
return false; return false;
@ -461,11 +462,13 @@ class Crypt
/** /**
* @brief Asymetrically encrypt a string using a public key * @brief Asymetrically encrypt a string using a public key
* @param $plainContent
* @param $publicKey
* @return string encrypted file * @return string encrypted file
*/ */
public static function keyEncrypt( $plainContent, $publicKey ) { public static function keyEncrypt($plainContent, $publicKey) {
openssl_public_encrypt( $plainContent, $encryptedContent, $publicKey ); openssl_public_encrypt($plainContent, $encryptedContent, $publicKey);
return $encryptedContent; return $encryptedContent;
@ -473,13 +476,15 @@ class Crypt
/** /**
* @brief Asymetrically decrypt a file using a private key * @brief Asymetrically decrypt a file using a private key
* @param $encryptedContent
* @param $privatekey
* @return string decrypted file * @return string decrypted file
*/ */
public static function keyDecrypt( $encryptedContent, $privatekey ) { public static function keyDecrypt($encryptedContent, $privatekey) {
$result = @openssl_private_decrypt( $encryptedContent, $plainContent, $privatekey ); $result = @openssl_private_decrypt($encryptedContent, $plainContent, $privatekey);
if ( $result ) { if ($result) {
return $plainContent; return $plainContent;
} }
@ -493,24 +498,24 @@ class Crypt
*/ */
public static function generateIv() { public static function generateIv() {
if ( $random = openssl_random_pseudo_bytes( 12, $strong ) ) { if ($random = openssl_random_pseudo_bytes(12, $strong)) {
if ( !$strong ) { if (!$strong) {
// If OpenSSL indicates randomness is insecure, log error // 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 ); \OCP\Util::writeLog('Encryption library', 'Insecure symmetric key was generated using openssl_random_pseudo_bytes()', \OCP\Util::WARN);
} }
// We encode the iv purely for string manipulation // We encode the iv purely for string manipulation
// purposes - it gets decoded before use // purposes - it gets decoded before use
$iv = base64_encode( $random ); $iv = base64_encode($random);
return $iv; return $iv;
} else { } else {
throw new \Exception( 'Generating IV failed' ); throw new \Exception('Generating IV failed');
} }
@ -523,12 +528,12 @@ class Crypt
public static function generateKey() { public static function generateKey() {
// Generate key // Generate key
if ( $key = base64_encode( openssl_random_pseudo_bytes( 183, $strong ) ) ) { if ($key = base64_encode(openssl_random_pseudo_bytes(183, $strong))) {
if ( !$strong ) { if (!$strong) {
// If OpenSSL indicates randomness is insecure, log error // If OpenSSL indicates randomness is insecure, log error
throw new \Exception( 'Encryption library, Insecure symmetric key was generated using openssl_random_pseudo_bytes()' ); throw new \Exception('Encryption library, Insecure symmetric key was generated using openssl_random_pseudo_bytes()');
} }
@ -545,15 +550,15 @@ class Crypt
/** /**
* @brief Get the blowfish encryption handeler for a key * @brief Get the blowfish encryption handeler for a key
* @param $key string (optional) * @param $key string (optional)
* @return Crypt_Blowfish blowfish object * @return \Crypt_Blowfish blowfish object
* *
* if the key is left out, the default handeler will be used * if the key is left out, the default handeler will be used
*/ */
public static function getBlowfish( $key = '' ) { public static function getBlowfish($key = '') {
if ( $key ) { if ($key) {
return new \Crypt_Blowfish( $key ); return new \Crypt_Blowfish($key);
} else { } else {
@ -567,13 +572,13 @@ class Crypt
* @param $passphrase * @param $passphrase
* @return mixed * @return mixed
*/ */
public static function legacyCreateKey( $passphrase ) { public static function legacyCreateKey($passphrase) {
// Generate a random integer // Generate a random integer
$key = mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ); $key = mt_rand(10000, 99999) . mt_rand(10000, 99999) . mt_rand(10000, 99999) . mt_rand(10000, 99999);
// Encrypt the key with the passphrase // Encrypt the key with the passphrase
$legacyEncKey = self::legacyEncrypt( $key, $passphrase ); $legacyEncKey = self::legacyEncrypt($key, $passphrase);
return $legacyEncKey; return $legacyEncKey;
@ -583,17 +588,15 @@ class Crypt
* @brief encrypts content using legacy blowfish system * @brief encrypts content using legacy blowfish system
* @param string $content the cleartext message you want to encrypt * @param string $content the cleartext message you want to encrypt
* @param string $passphrase * @param string $passphrase
* @return
* @internal param \OCA\Encryption\the $key encryption key (optional)
* @returns string encrypted content * @returns string encrypted content
* *
* This function encrypts an content * This function encrypts an content
*/ */
public static function legacyEncrypt( $content, $passphrase = '' ) { public static function legacyEncrypt($content, $passphrase = '') {
$bf = self::getBlowfish( $passphrase ); $bf = self::getBlowfish($passphrase);
return $bf->encrypt( $content ); return $bf->encrypt($content);
} }
@ -601,20 +604,17 @@ class Crypt
* @brief decrypts content using legacy blowfish system * @brief decrypts content using legacy blowfish system
* @param string $content the cleartext message you want to decrypt * @param string $content the cleartext message you want to decrypt
* @param string $passphrase * @param string $passphrase
* @return string
* @internal param \OCA\Encryption\the $key encryption key (optional)
* @return string cleartext content * @return string cleartext content
* *
* This function decrypts an content * This function decrypts an content
*/ */
public static function legacyDecrypt( $content, $passphrase = '' ) { private static function legacyDecrypt($content, $passphrase = '') {
$bf = self::getBlowfish( $passphrase ); $bf = self::getBlowfish($passphrase);
$decrypted = $bf->decrypt( $content ); $decrypted = $bf->decrypt($content);
return rtrim( $decrypted, "\0" );;
return $decrypted;
} }
/** /**
@ -623,16 +623,17 @@ class Crypt
* @param int $maxLength * @param int $maxLength
* @return string * @return string
*/ */
private static function legacyBlockDecrypt( $data, $key = '', $maxLength = 0 ) { public static function legacyBlockDecrypt($data, $key = '', $maxLength = 0) {
$result = ''; $result = '';
while ( strlen( $data ) ) { while (strlen($data)) {
$result .= self::legacyDecrypt( substr( $data, 0, 8192 ), $key ); $result .= self::legacyDecrypt(substr($data, 0, 8192), $key);
$data = substr( $data, 8192 ); $data = substr($data, 8192);
} }
if ( $maxLength > 0 ) { if ($maxLength > 0) {
return substr( $result, 0, $maxLength ); return substr($result, 0, $maxLength);
} else { } else {
return rtrim( $result, "\0" ); return rtrim($result, "\0");
} }
} }
@ -640,21 +641,23 @@ class Crypt
* @param $legacyEncryptedContent * @param $legacyEncryptedContent
* @param $legacyPassphrase * @param $legacyPassphrase
* @param $publicKeys * @param $publicKeys
* @param $newPassphrase
* @param $path
* @return array * @return array
*/ */
public static function legacyKeyRecryptKeyfile( $legacyEncryptedContent, $legacyPassphrase, $publicKeys, $newPassphrase, $path ) { public static function legacyKeyRecryptKeyfile($legacyEncryptedContent, $legacyPassphrase, $publicKeys) {
$decrypted = self::legacyBlockDecrypt( $legacyEncryptedContent, $legacyPassphrase ); $decrypted = self::legacyBlockDecrypt($legacyEncryptedContent, $legacyPassphrase);
// Encrypt plain data, generate keyfile & encrypted file // Encrypt plain data, generate keyfile & encrypted file
$cryptedData = self::symmetricEncryptFileContentKeyfile( $decrypted ); $cryptedData = self::symmetricEncryptFileContentKeyfile($decrypted);
// Encrypt plain keyfile to multiple sharefiles // Encrypt plain keyfile to multiple sharefiles
$multiEncrypted = Crypt::multiKeyEncrypt( $cryptedData['key'], $publicKeys ); $multiEncrypted = Crypt::multiKeyEncrypt($cryptedData['key'], $publicKeys);
return array( 'data' => $cryptedData['encrypted'], 'filekey' => $multiEncrypted['data'], 'sharekeys' => $multiEncrypted['keys'] ); return array(
'data' => $cryptedData['encrypted'],
'filekey' => $multiEncrypted['data'],
'sharekeys' => $multiEncrypted['keys']
);
} }

View File

@ -23,15 +23,11 @@
namespace OCA\Encryption; namespace OCA\Encryption;
/**
* @brief Class to manage registration of hooks an various helper methods
*/
/** /**
* Class Helper * @brief Class to manage registration of hooks an various helper methods
* @package OCA\Encryption * @package OCA\Encryption
*/ */
class Helper class Helper {
{
/** /**
* @brief register share related hooks * @brief register share related hooks
@ -39,9 +35,9 @@ class Helper
*/ */
public static function registerShareHooks() { public static function registerShareHooks() {
\OCP\Util::connectHook( 'OCP\Share', 'pre_shared', 'OCA\Encryption\Hooks', 'preShared' ); \OCP\Util::connectHook('OCP\Share', 'pre_shared', 'OCA\Encryption\Hooks', 'preShared');
\OCP\Util::connectHook( 'OCP\Share', 'post_shared', 'OCA\Encryption\Hooks', 'postShared' ); \OCP\Util::connectHook('OCP\Share', 'post_shared', 'OCA\Encryption\Hooks', 'postShared');
\OCP\Util::connectHook( 'OCP\Share', 'post_unshare', 'OCA\Encryption\Hooks', 'postUnshare' ); \OCP\Util::connectHook('OCP\Share', 'post_unshare', 'OCA\Encryption\Hooks', 'postUnshare');
} }
/** /**
@ -50,10 +46,10 @@ class Helper
*/ */
public static function registerUserHooks() { public static function registerUserHooks() {
\OCP\Util::connectHook( 'OC_User', 'post_login', 'OCA\Encryption\Hooks', 'login' ); \OCP\Util::connectHook('OC_User', 'post_login', 'OCA\Encryption\Hooks', 'login');
\OCP\Util::connectHook( 'OC_User', 'post_setPassword', 'OCA\Encryption\Hooks', 'setPassphrase' ); \OCP\Util::connectHook('OC_User', 'post_setPassword', 'OCA\Encryption\Hooks', 'setPassphrase');
\OCP\Util::connectHook( 'OC_User', 'post_createUser', 'OCA\Encryption\Hooks', 'postCreateUser' ); \OCP\Util::connectHook('OC_User', 'post_createUser', 'OCA\Encryption\Hooks', 'postCreateUser');
\OCP\Util::connectHook( 'OC_User', 'post_deleteUser', 'OCA\Encryption\Hooks', 'postDeleteUser' ); \OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OCA\Encryption\Hooks', 'postDeleteUser');
} }
/** /**
@ -62,7 +58,7 @@ class Helper
*/ */
public static function registerFilesystemHooks() { public static function registerFilesystemHooks() {
\OCP\Util::connectHook( 'OC_Filesystem', 'post_rename', 'OCA\Encryption\Hooks', 'postRename' ); \OCP\Util::connectHook('OC_Filesystem', 'post_rename', 'OCA\Encryption\Hooks', 'postRename');
} }
/** /**
@ -72,13 +68,14 @@ class Helper
* @param string $password * @param string $password
* @return bool * @return bool
*/ */
public static function setupUser( $util, $password ) { public static function setupUser($util, $password) {
// Check files_encryption infrastructure is ready for action // Check files_encryption infrastructure is ready for action
if ( !$util->ready() ) { if (!$util->ready()) {
\OC_Log::write( 'Encryption library', 'User account "' . $util->getUserId() . '" is not ready for encryption; configuration started', \OC_Log::DEBUG ); \OCP\Util::writeLog('Encryption library', 'User account "' . $util->getUserId()
. '" is not ready for encryption; configuration started', \OCP\Util::DEBUG);
if ( !$util->setupServerSide( $password ) ) { if (!$util->setupServerSide($password)) {
return false; return false;
} }
} }
@ -95,21 +92,21 @@ class Helper
* @internal param string $password * @internal param string $password
* @return bool * @return bool
*/ */
public static function adminEnableRecovery( $recoveryKeyId, $recoveryPassword ) { public static function adminEnableRecovery($recoveryKeyId, $recoveryPassword) {
$view = new \OC\Files\View( '/' ); $view = new \OC\Files\View('/');
if ( $recoveryKeyId === null ) { if ($recoveryKeyId === null) {
$recoveryKeyId = 'recovery_' . substr( md5( time() ), 0, 8 ); $recoveryKeyId = 'recovery_' . substr(md5(time()), 0, 8);
\OC_Appconfig::setValue( 'files_encryption', 'recoveryKeyId', $recoveryKeyId ); \OC_Appconfig::setValue('files_encryption', 'recoveryKeyId', $recoveryKeyId);
} }
if ( !$view->is_dir( '/owncloud_private_key' ) ) { if (!$view->is_dir('/owncloud_private_key')) {
$view->mkdir( '/owncloud_private_key' ); $view->mkdir('/owncloud_private_key');
} }
if ( if (
( !$view->file_exists( "/public-keys/" . $recoveryKeyId . ".public.key" ) (!$view->file_exists("/public-keys/" . $recoveryKeyId . ".public.key")
|| !$view->file_exists( "/owncloud_private_key/" . $recoveryKeyId . ".private.key" ) ) || !$view->file_exists("/owncloud_private_key/" . $recoveryKeyId . ".private.key"))
) { ) {
$keypair = \OCA\Encryption\Crypt::createKeypair(); $keypair = \OCA\Encryption\Crypt::createKeypair();
@ -118,37 +115,37 @@ class Helper
// Save public key // Save public key
if ( !$view->is_dir( '/public-keys' ) ) { if (!$view->is_dir('/public-keys')) {
$view->mkdir( '/public-keys' ); $view->mkdir('/public-keys');
} }
$view->file_put_contents( '/public-keys/' . $recoveryKeyId . '.public.key', $keypair['publicKey'] ); $view->file_put_contents('/public-keys/' . $recoveryKeyId . '.public.key', $keypair['publicKey']);
// Encrypt private key empthy passphrase // Encrypt private key empthy passphrase
$encryptedPrivateKey = \OCA\Encryption\Crypt::symmetricEncryptFileContent( $keypair['privateKey'], $recoveryPassword ); $encryptedPrivateKey = \OCA\Encryption\Crypt::symmetricEncryptFileContent($keypair['privateKey'], $recoveryPassword);
// Save private key // Save private key
$view->file_put_contents( '/owncloud_private_key/' . $recoveryKeyId . '.private.key', $encryptedPrivateKey ); $view->file_put_contents('/owncloud_private_key/' . $recoveryKeyId . '.private.key', $encryptedPrivateKey);
// create control file which let us check later on if the entered password was correct. // create control file which let us check later on if the entered password was correct.
$encryptedControlData = \OCA\Encryption\Crypt::keyEncrypt( "ownCloud", $keypair['publicKey'] ); $encryptedControlData = \OCA\Encryption\Crypt::keyEncrypt("ownCloud", $keypair['publicKey']);
if ( !$view->is_dir( '/control-file' ) ) { if (!$view->is_dir('/control-file')) {
$view->mkdir( '/control-file' ); $view->mkdir('/control-file');
} }
$view->file_put_contents( '/control-file/controlfile.enc', $encryptedControlData ); $view->file_put_contents('/control-file/controlfile.enc', $encryptedControlData);
\OC_FileProxy::$enabled = true; \OC_FileProxy::$enabled = true;
// Set recoveryAdmin as enabled // Set recoveryAdmin as enabled
\OC_Appconfig::setValue( 'files_encryption', 'recoveryAdminEnabled', 1 ); \OC_Appconfig::setValue('files_encryption', 'recoveryAdminEnabled', 1);
$return = true; $return = true;
} else { // get recovery key and check the password } else { // get recovery key and check the password
$util = new \OCA\Encryption\Util( new \OC_FilesystemView( '/' ), \OCP\User::getUser() ); $util = new \OCA\Encryption\Util(new \OC_FilesystemView('/'), \OCP\User::getUser());
$return = $util->checkRecoveryPassword( $recoveryPassword ); $return = $util->checkRecoveryPassword($recoveryPassword);
if ( $return ) { if ($return) {
\OC_Appconfig::setValue( 'files_encryption', 'recoveryAdminEnabled', 1 ); \OC_Appconfig::setValue('files_encryption', 'recoveryAdminEnabled', 1);
} }
} }
@ -162,15 +159,31 @@ class Helper
* @param $recoveryPassword * @param $recoveryPassword
* @return bool * @return bool
*/ */
public static function adminDisableRecovery( $recoveryPassword ) { public static function adminDisableRecovery($recoveryPassword) {
$util = new Util( new \OC_FilesystemView( '/' ), \OCP\User::getUser() ); $util = new Util(new \OC_FilesystemView('/'), \OCP\User::getUser());
$return = $util->checkRecoveryPassword( $recoveryPassword ); $return = $util->checkRecoveryPassword($recoveryPassword);
if ( $return ) { if ($return) {
// Set recoveryAdmin as disabled // Set recoveryAdmin as disabled
\OC_Appconfig::setValue( 'files_encryption', 'recoveryAdminEnabled', 0 ); \OC_Appconfig::setValue('files_encryption', 'recoveryAdminEnabled', 0);
} }
return $return; return $return;
} }
/**
* @brief checks if access is public/anonymous user
* @return bool
*/
public static function isPublicAccess() {
if (\OCP\USER::getUser() === false
|| (isset($_GET['service']) && $_GET['service'] == 'files'
&& isset($_GET['t']))
) {
return true;
} else {
return false;
}
}
} }

View File

@ -27,8 +27,7 @@ namespace OCA\Encryption;
* @brief Class to manage storage and retrieval of encryption keys * @brief Class to manage storage and retrieval of encryption keys
* @note Where a method requires a view object, it's root must be '/' * @note Where a method requires a view object, it's root must be '/'
*/ */
class Keymanager class Keymanager {
{
/** /**
* @brief retrieve the ENCRYPTED private key from a user * @brief retrieve the ENCRYPTED private key from a user
@ -38,14 +37,14 @@ class Keymanager
* @return string private key or false (hopefully) * @return string private key or false (hopefully)
* @note the key returned by this method must be decrypted before use * @note the key returned by this method must be decrypted before use
*/ */
public static function getPrivateKey( \OC_FilesystemView $view, $user ) { public static function getPrivateKey(\OC_FilesystemView $view, $user) {
$path = '/' . $user . '/' . 'files_encryption' . '/' . $user . '.private.key'; $path = '/' . $user . '/' . 'files_encryption' . '/' . $user . '.private.key';
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
$key = $view->file_get_contents( $path ); $key = $view->file_get_contents($path);
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
@ -58,12 +57,12 @@ class Keymanager
* @param $userId * @param $userId
* @return string public key or false * @return string public key or false
*/ */
public static function getPublicKey( \OC_FilesystemView $view, $userId ) { public static function getPublicKey(\OC_FilesystemView $view, $userId) {
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
$result = $view->file_get_contents( '/public-keys/' . $userId . '.public.key' ); $result = $view->file_get_contents('/public-keys/' . $userId . '.public.key');
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
@ -77,11 +76,11 @@ class Keymanager
* @param $userId * @param $userId
* @return array keys: privateKey, publicKey * @return array keys: privateKey, publicKey
*/ */
public static function getUserKeys( \OC_FilesystemView $view, $userId ) { public static function getUserKeys(\OC_FilesystemView $view, $userId) {
return array( return array(
'publicKey' => self::getPublicKey( $view, $userId ) 'publicKey' => self::getPublicKey($view, $userId),
, 'privateKey' => self::getPrivateKey( $view, $userId ) 'privateKey' => self::getPrivateKey($view, $userId)
); );
} }
@ -92,13 +91,13 @@ class Keymanager
* @param array $userIds * @param array $userIds
* @return array of public keys for the specified users * @return array of public keys for the specified users
*/ */
public static function getPublicKeys( \OC_FilesystemView $view, array $userIds ) { public static function getPublicKeys(\OC_FilesystemView $view, array $userIds) {
$keys = array(); $keys = array();
foreach ( $userIds as $userId ) { foreach ($userIds as $userId) {
$keys[$userId] = self::getPublicKey( $view, $userId ); $keys[$userId] = self::getPublicKey($view, $userId);
} }
@ -118,40 +117,41 @@ class Keymanager
* @note The keyfile is not encrypted here. Client code must * @note The keyfile is not encrypted here. Client code must
* asymmetrically encrypt the keyfile before passing it to this method * asymmetrically encrypt the keyfile before passing it to this method
*/ */
public static function setFileKey( \OC_FilesystemView $view, $path, $userId, $catfile ) { public static function setFileKey(\OC_FilesystemView $view, $path, $userId, $catfile) {
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
//here we need the currently logged in user, while userId can be a different user //here we need the currently logged in user, while userId can be a different user
$util = new Util( $view, \OCP\User::getUser() ); $util = new Util($view, \OCP\User::getUser());
list( $owner, $filename ) = $util->getUidAndFilename( $path ); list($owner, $filename) = $util->getUidAndFilename($path);
$basePath = '/' . $owner . '/files_encryption/keyfiles'; $basePath = '/' . $owner . '/files_encryption/keyfiles';
$targetPath = self::keySetPreparation( $view, $filename, $basePath, $owner ); $targetPath = self::keySetPreparation($view, $filename, $basePath, $owner);
if ( !$view->is_dir( $basePath . '/' . $targetPath ) ) { if (!$view->is_dir($basePath . '/' . $targetPath)) {
// create all parent folders // create all parent folders
$info = pathinfo( $basePath . '/' . $targetPath ); $info = pathinfo($basePath . '/' . $targetPath);
$keyfileFolderName = $view->getLocalFolder( $info['dirname'] ); $keyfileFolderName = $view->getLocalFolder($info['dirname']);
if ( !file_exists( $keyfileFolderName ) ) { if (!file_exists($keyfileFolderName)) {
mkdir( $keyfileFolderName, 0750, true ); mkdir($keyfileFolderName, 0750, true);
} }
} }
// try reusing key file if part file // try reusing key file if part file
if ( self::isPartialFilePath( $targetPath ) ) { if (self::isPartialFilePath($targetPath)) {
$result = $view->file_put_contents( $basePath . '/' . self::fixPartialFilePath( $targetPath ) . '.key', $catfile ); $result = $view->file_put_contents(
$basePath . '/' . self::fixPartialFilePath($targetPath) . '.key', $catfile);
} else { } else {
$result = $view->file_put_contents( $basePath . '/' . $targetPath . '.key', $catfile ); $result = $view->file_put_contents($basePath . '/' . $targetPath . '.key', $catfile);
} }
@ -167,12 +167,12 @@ class Keymanager
* @return string File path without .part extension * @return string File path without .part extension
* @note this is needed for reusing keys * @note this is needed for reusing keys
*/ */
public static function fixPartialFilePath( $path ) { public static function fixPartialFilePath($path) {
if ( preg_match( '/\.part$/', $path ) ) { if (preg_match('/\.part$/', $path)) {
$newLength = strlen( $path ) - 5; $newLength = strlen($path) - 5;
$fPath = substr( $path, 0, $newLength ); $fPath = substr($path, 0, $newLength);
return $fPath; return $fPath;
@ -189,9 +189,9 @@ class Keymanager
* @param string $path Path that may identify a .part file * @param string $path Path that may identify a .part file
* @return bool * @return bool
*/ */
public static function isPartialFilePath( $path ) { public static function isPartialFilePath($path) {
if ( preg_match( '/\.part$/', $path ) ) { if (preg_match('/\.part$/', $path)) {
return true; return true;
@ -213,14 +213,14 @@ class Keymanager
* @note The keyfile returned is asymmetrically encrypted. Decryption * @note The keyfile returned is asymmetrically encrypted. Decryption
* of the keyfile must be performed by client code * of the keyfile must be performed by client code
*/ */
public static function getFileKey( \OC_FilesystemView $view, $userId, $filePath ) { public static function getFileKey(\OC_FilesystemView $view, $userId, $filePath) {
// try reusing key file if part file // try reusing key file if part file
if ( self::isPartialFilePath( $filePath ) ) { if (self::isPartialFilePath($filePath)) {
$result = self::getFileKey( $view, $userId, self::fixPartialFilePath( $filePath ) ); $result = self::getFileKey($view, $userId, self::fixPartialFilePath($filePath));
if ( $result ) { if ($result) {
return $result; return $result;
@ -228,19 +228,19 @@ class Keymanager
} }
$util = new Util( $view, \OCP\User::getUser() ); $util = new Util($view, \OCP\User::getUser());
list( $owner, $filename ) = $util->getUidAndFilename( $filePath ); list($owner, $filename) = $util->getUidAndFilename($filePath);
$filePath_f = ltrim( $filename, '/' ); $filePath_f = ltrim($filename, '/');
$keyfilePath = '/' . $owner . '/files_encryption/keyfiles/' . $filePath_f . '.key'; $keyfilePath = '/' . $owner . '/files_encryption/keyfiles/' . $filePath_f . '.key';
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
if ( $view->file_exists( $keyfilePath ) ) { if ($view->file_exists($keyfilePath)) {
$result = $view->file_get_contents( $keyfilePath ); $result = $view->file_get_contents($keyfilePath);
} else { } else {
@ -264,26 +264,29 @@ class Keymanager
* @note $path must be relative to data/user/files. e.g. mydoc.txt NOT * @note $path must be relative to data/user/files. e.g. mydoc.txt NOT
* /data/admin/files/mydoc.txt * /data/admin/files/mydoc.txt
*/ */
public static function deleteFileKey( \OC_FilesystemView $view, $userId, $path ) { public static function deleteFileKey(\OC_FilesystemView $view, $userId, $path) {
$trimmed = ltrim( $path, '/' ); $trimmed = ltrim($path, '/');
$keyPath = '/' . $userId . '/files_encryption/keyfiles/' . $trimmed; $keyPath = '/' . $userId . '/files_encryption/keyfiles/' . $trimmed;
$result = false; $result = false;
if ( $view->is_dir( $keyPath ) ) { if ($view->is_dir($keyPath)) {
$result = $view->unlink( $keyPath ); $result = $view->unlink($keyPath);
} else if ( $view->file_exists( $keyPath . '.key' ) ) { } else {
if ($view->file_exists($keyPath . '.key')) {
$result = $view->unlink( $keyPath . '.key' ); $result = $view->unlink($keyPath . '.key');
} }
}
if ( !$result ) { if (!$result) {
\OC_Log::write( 'Encryption library', 'Could not delete keyfile; does not exist: "' . $keyPath, \OC_Log::ERROR ); \OCP\Util::writeLog('Encryption library',
'Could not delete keyfile; does not exist: "' . $keyPath, \OCP\Util::ERROR);
} }
@ -298,19 +301,19 @@ class Keymanager
* @note Encryption of the private key must be performed by client code * @note Encryption of the private key must be performed by client code
* as no encryption takes place here * as no encryption takes place here
*/ */
public static function setPrivateKey( $key ) { public static function setPrivateKey($key) {
$user = \OCP\User::getUser(); $user = \OCP\User::getUser();
$view = new \OC_FilesystemView( '/' . $user . '/files_encryption' ); $view = new \OC_FilesystemView('/' . $user . '/files_encryption');
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
if ( !$view->file_exists( '' ) ) if (!$view->file_exists(''))
$view->mkdir( '' ); $view->mkdir('');
$result = $view->file_put_contents( $user . '.private.key', $key ); $result = $view->file_put_contents($user . '.private.key', $key);
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
@ -331,21 +334,21 @@ class Keymanager
* @note The keyfile is not encrypted here. Client code must * @note The keyfile is not encrypted here. Client code must
* asymmetrically encrypt the keyfile before passing it to this method * asymmetrically encrypt the keyfile before passing it to this method
*/ */
public static function setShareKey( \OC_FilesystemView $view, $path, $userId, $shareKey ) { public static function setShareKey(\OC_FilesystemView $view, $path, $userId, $shareKey) {
// Here we need the currently logged in user, while userId can be a different user // Here we need the currently logged in user, while userId can be a different user
$util = new Util( $view, \OCP\User::getUser() ); $util = new Util($view, \OCP\User::getUser());
list( $owner, $filename ) = $util->getUidAndFilename( $path ); list($owner, $filename) = $util->getUidAndFilename($path);
$basePath = '/' . $owner . '/files_encryption/share-keys'; $basePath = '/' . $owner . '/files_encryption/share-keys';
$shareKeyPath = self::keySetPreparation( $view, $filename, $basePath, $owner ); $shareKeyPath = self::keySetPreparation($view, $filename, $basePath, $owner);
// try reusing key file if part file // try reusing key file if part file
if ( self::isPartialFilePath( $shareKeyPath ) ) { if (self::isPartialFilePath($shareKeyPath)) {
$writePath = $basePath . '/' . self::fixPartialFilePath( $shareKeyPath ) . '.' . $userId . '.shareKey'; $writePath = $basePath . '/' . self::fixPartialFilePath($shareKeyPath) . '.' . $userId . '.shareKey';
} else { } else {
@ -356,12 +359,12 @@ class Keymanager
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
$result = $view->file_put_contents( $writePath, $shareKey ); $result = $view->file_put_contents($writePath, $shareKey);
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
if ( if (
is_int( $result ) is_int($result)
&& $result > 0 && $result > 0
) { ) {
@ -382,16 +385,16 @@ class Keymanager
* @param array $shareKeys * @param array $shareKeys
* @return bool * @return bool
*/ */
public static function setShareKeys( \OC_FilesystemView $view, $path, array $shareKeys ) { public static function setShareKeys(\OC_FilesystemView $view, $path, array $shareKeys) {
// $shareKeys must be an array with the following format: // $shareKeys must be an array with the following format:
// [userId] => [encrypted key] // [userId] => [encrypted key]
$result = true; $result = true;
foreach ( $shareKeys as $userId => $shareKey ) { foreach ($shareKeys as $userId => $shareKey) {
if ( !self::setShareKey( $view, $path, $userId, $shareKey ) ) { if (!self::setShareKey($view, $path, $userId, $shareKey)) {
// If any of the keys are not set, flag false // If any of the keys are not set, flag false
$result = false; $result = false;
@ -415,14 +418,14 @@ class Keymanager
* @note The sharekey returned is encrypted. Decryption * @note The sharekey returned is encrypted. Decryption
* of the keyfile must be performed by client code * of the keyfile must be performed by client code
*/ */
public static function getShareKey( \OC_FilesystemView $view, $userId, $filePath ) { public static function getShareKey(\OC_FilesystemView $view, $userId, $filePath) {
// try reusing key file if part file // try reusing key file if part file
if ( self::isPartialFilePath( $filePath ) ) { if (self::isPartialFilePath($filePath)) {
$result = self::getShareKey( $view, $userId, self::fixPartialFilePath( $filePath ) ); $result = self::getShareKey($view, $userId, self::fixPartialFilePath($filePath));
if ( $result ) { if ($result) {
return $result; return $result;
@ -434,14 +437,15 @@ class Keymanager
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
//here we need the currently logged in user, while userId can be a different user //here we need the currently logged in user, while userId can be a different user
$util = new Util( $view, \OCP\User::getUser() ); $util = new Util($view, \OCP\User::getUser());
list( $owner, $filename ) = $util->getUidAndFilename( $filePath ); list($owner, $filename) = $util->getUidAndFilename($filePath);
$shareKeyPath = \OC\Files\Filesystem::normalizePath( '/' . $owner . '/files_encryption/share-keys/' . $filename . '.' . $userId . '.shareKey' ); $shareKeyPath = \OC\Files\Filesystem::normalizePath(
'/' . $owner . '/files_encryption/share-keys/' . $filename . '.' . $userId . '.shareKey');
if ( $view->file_exists( $shareKeyPath ) ) { if ($view->file_exists($shareKeyPath)) {
$result = $view->file_get_contents( $shareKeyPath ); $result = $view->file_get_contents($shareKeyPath);
} else { } else {
@ -461,17 +465,18 @@ class Keymanager
* @param string $userId owner of the file * @param string $userId owner of the file
* @param string $filePath path to the file, relative to the owners file dir * @param string $filePath path to the file, relative to the owners file dir
*/ */
public static function delAllShareKeys( \OC_FilesystemView $view, $userId, $filePath ) { public static function delAllShareKeys(\OC_FilesystemView $view, $userId, $filePath) {
if ( $view->is_dir( $userId . '/files/' . $filePath ) ) { if ($view->is_dir($userId . '/files/' . $filePath)) {
$view->unlink( $userId . '/files_encryption/share-keys/' . $filePath ); $view->unlink($userId . '/files_encryption/share-keys/' . $filePath);
} else { } else {
$localKeyPath = $view->getLocalFile( $userId . '/files_encryption/share-keys/' . $filePath ); $localKeyPath = $view->getLocalFile($userId . '/files_encryption/share-keys/' . $filePath);
$matches = glob( preg_quote( $localKeyPath ) . '*.shareKey' ); $matches = glob(preg_quote($localKeyPath) . '*.shareKey');
foreach ( $matches as $ma ) { foreach ($matches as $ma) {
$result = unlink( $ma ); $result = unlink($ma);
if ( !$result ) { if (!$result) {
\OC_Log::write( 'Encryption library', 'Keyfile or shareKey could not be deleted for file "' . $filePath . '"', \OC_Log::ERROR ); \OCP\Util::writeLog('Encryption library',
'Keyfile or shareKey could not be deleted for file "' . $filePath . '"', \OCP\Util::ERROR);
} }
} }
} }
@ -480,29 +485,31 @@ class Keymanager
/** /**
* @brief Delete a single user's shareKey for a single file * @brief Delete a single user's shareKey for a single file
*/ */
public static function delShareKey( \OC_FilesystemView $view, $userIds, $filePath ) { public static function delShareKey(\OC_FilesystemView $view, $userIds, $filePath) {
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
//here we need the currently logged in user, while userId can be a different user //here we need the currently logged in user, while userId can be a different user
$util = new Util( $view, \OCP\User::getUser() ); $util = new Util($view, \OCP\User::getUser());
list( $owner, $filename ) = $util->getUidAndFilename( $filePath ); list($owner, $filename) = $util->getUidAndFilename($filePath);
$shareKeyPath = \OC\Files\Filesystem::normalizePath( '/' . $owner . '/files_encryption/share-keys/' . $filename ); $shareKeyPath = \OC\Files\Filesystem::normalizePath('/' . $owner . '/files_encryption/share-keys/' . $filename);
if ( $view->is_dir( $shareKeyPath ) ) { if ($view->is_dir($shareKeyPath)) {
$localPath = \OC\Files\Filesystem::normalizePath( $view->getLocalFolder( $shareKeyPath ) ); $localPath = \OC\Files\Filesystem::normalizePath($view->getLocalFolder($shareKeyPath));
self::recursiveDelShareKeys( $localPath, $userIds ); self::recursiveDelShareKeys($localPath, $userIds);
} else { } else {
foreach ( $userIds as $userId ) { foreach ($userIds as $userId) {
if ( !$view->unlink( $shareKeyPath . '.' . $userId . '.shareKey' ) ) { if (!$view->unlink($shareKeyPath . '.' . $userId . '.shareKey')) {
\OC_Log::write( 'Encryption library', 'Could not delete shareKey; does not exist: "' . $shareKeyPath . '.' . $userId . '.shareKey"', \OC_Log::ERROR ); \OCP\Util::writeLog('Encryption library',
'Could not delete shareKey; does not exist: "' . $shareKeyPath . '.' . $userId
. '.shareKey"', \OCP\Util::ERROR);
} }
} }
@ -517,42 +524,43 @@ class Keymanager
* @param string $dir directory * @param string $dir directory
* @param array $userIds user ids for which the share keys should be deleted * @param array $userIds user ids for which the share keys should be deleted
*/ */
private static function recursiveDelShareKeys( $dir, $userIds ) { private static function recursiveDelShareKeys($dir, $userIds) {
foreach ( $userIds as $userId ) { foreach ($userIds as $userId) {
$matches = glob( preg_quote( $dir ) . '/*' . preg_quote( '.' . $userId . '.shareKey' ) ); $matches = glob(preg_quote($dir) . '/*' . preg_quote('.' . $userId . '.shareKey'));
} }
/** @var $matches array */ /** @var $matches array */
foreach ( $matches as $ma ) { foreach ($matches as $ma) {
if ( !unlink( $ma ) ) { if (!unlink($ma)) {
\OC_Log::write( 'Encryption library', 'Could not delete shareKey; does not exist: "' . $ma . '"', \OC_Log::ERROR ); \OCP\Util::writeLog('Encryption library',
'Could not delete shareKey; does not exist: "' . $ma . '"', \OCP\Util::ERROR);
} }
} }
$subdirs = $directories = glob( preg_quote( $dir ) . '/*', GLOB_ONLYDIR ); $subdirs = $directories = glob(preg_quote($dir) . '/*', GLOB_ONLYDIR);
foreach ( $subdirs as $subdir ) { foreach ($subdirs as $subdir) {
self::recursiveDelShareKeys( $subdir, $userIds ); self::recursiveDelShareKeys($subdir, $userIds);
} }
} }
/** /**
* @brief Make preparations to vars and filesystem for saving a keyfile * @brief Make preparations to vars and filesystem for saving a keyfile
*/ */
public static function keySetPreparation( \OC_FilesystemView $view, $path, $basePath, $userId ) { public static function keySetPreparation(\OC_FilesystemView $view, $path, $basePath, $userId) {
$targetPath = ltrim( $path, '/' ); $targetPath = ltrim($path, '/');
$path_parts = pathinfo( $targetPath ); $path_parts = pathinfo($targetPath);
// If the file resides within a subdirectory, create it // If the file resides within a subdirectory, create it
if ( if (
isset( $path_parts['dirname'] ) isset($path_parts['dirname'])
&& !$view->file_exists( $basePath . '/' . $path_parts['dirname'] ) && !$view->file_exists($basePath . '/' . $path_parts['dirname'])
) { ) {
$sub_dirs = explode( DIRECTORY_SEPARATOR, $basePath . '/' . $path_parts['dirname'] ); $sub_dirs = explode(DIRECTORY_SEPARATOR, $basePath . '/' . $path_parts['dirname']);
$dir = ''; $dir = '';
foreach ( $sub_dirs as $sub_dir ) { foreach ($sub_dirs as $sub_dir) {
$dir .= '/' . $sub_dir; $dir .= '/' . $sub_dir;
if ( !$view->is_dir( $dir ) ) { if (!$view->is_dir($dir)) {
$view->mkdir( $dir ); $view->mkdir($dir);
} }
} }
} }

View File

@ -34,8 +34,7 @@ namespace OCA\Encryption;
* Class Proxy * Class Proxy
* @package OCA\Encryption * @package OCA\Encryption
*/ */
class Proxy extends \OC_FileProxy class Proxy extends \OC_FileProxy {
{
private static $blackList = null; //mimetypes blacklisted from encryption private static $blackList = null; //mimetypes blacklisted from encryption
@ -48,13 +47,13 @@ class Proxy extends \OC_FileProxy
* *
* Tests if server side encryption is enabled, and file is allowed by blacklists * Tests if server side encryption is enabled, and file is allowed by blacklists
*/ */
private static function shouldEncrypt( $path ) { private static function shouldEncrypt($path) {
if ( is_null( self::$enableEncryption ) ) { if (is_null(self::$enableEncryption)) {
if ( if (
\OCP\Config::getAppValue( 'files_encryption', 'enable_encryption', 'true' ) == 'true' \OCP\Config::getAppValue('files_encryption', 'enable_encryption', 'true') === 'true'
&& Crypt::mode() == 'server' && Crypt::mode() === 'server'
) { ) {
self::$enableEncryption = true; self::$enableEncryption = true;
@ -67,27 +66,27 @@ class Proxy extends \OC_FileProxy
} }
if ( !self::$enableEncryption ) { if (!self::$enableEncryption) {
return false; return false;
} }
if ( is_null( self::$blackList ) ) { if (is_null(self::$blackList)) {
self::$blackList = explode( ',', \OCP\Config::getAppValue( 'files_encryption', 'type_blacklist', '' ) ); self::$blackList = explode(',', \OCP\Config::getAppValue('files_encryption', 'type_blacklist', ''));
} }
if ( Crypt::isCatfileContent( $path ) ) { if (Crypt::isCatfileContent($path)) {
return true; return true;
} }
$extension = substr( $path, strrpos( $path, '.' ) + 1 ); $extension = substr($path, strrpos($path, '.') + 1);
if ( array_search( $extension, self::$blackList ) === false ) { if (array_search($extension, self::$blackList) === false) {
return true; return true;
@ -101,34 +100,34 @@ class Proxy extends \OC_FileProxy
* @param $data * @param $data
* @return bool * @return bool
*/ */
public function preFile_put_contents( $path, &$data ) { public function preFile_put_contents($path, &$data) {
if ( self::shouldEncrypt( $path ) ) { if (self::shouldEncrypt($path)) {
// Stream put contents should have been converted to fopen // Stream put contents should have been converted to fopen
if ( !is_resource( $data ) ) { if (!is_resource($data)) {
$userId = \OCP\USER::getUser(); $userId = \OCP\USER::getUser();
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
$util = new Util( $view, $userId ); $util = new Util($view, $userId);
$session = new Session( $view ); $session = new \OCA\Encryption\Session($view);
$privateKey = $session->getPrivateKey(); $privateKey = $session->getPrivateKey();
$filePath = $util->stripUserFilesPath( $path ); $filePath = $util->stripUserFilesPath($path);
// Set the filesize for userland, before encrypting // Set the filesize for userland, before encrypting
$size = strlen( $data ); $size = strlen($data);
// Disable encryption proxy to prevent recursive calls // Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
// Check if there is an existing key we can reuse // Check if there is an existing key we can reuse
if ( $encKeyfile = Keymanager::getFileKey( $view, $userId, $filePath ) ) { if ($encKeyfile = Keymanager::getFileKey($view, $userId, $filePath)) {
// Fetch shareKey // Fetch shareKey
$shareKey = Keymanager::getShareKey( $view, $userId, $filePath ); $shareKey = Keymanager::getShareKey($view, $userId, $filePath);
// Decrypt the keyfile // Decrypt the keyfile
$plainKey = Crypt::multiKeyDecrypt( $encKeyfile, $shareKey, $privateKey ); $plainKey = Crypt::multiKeyDecrypt($encKeyfile, $shareKey, $privateKey);
} else { } else {
@ -138,37 +137,41 @@ class Proxy extends \OC_FileProxy
} }
// Encrypt data // Encrypt data
$encData = Crypt::symmetricEncryptFileContent( $data, $plainKey ); $encData = Crypt::symmetricEncryptFileContent($data, $plainKey);
$sharingEnabled = \OCP\Share::isEnabled(); $sharingEnabled = \OCP\Share::isEnabled();
// if file exists try to get sharing users // if file exists try to get sharing users
if ( $view->file_exists( $path ) ) { if ($view->file_exists($path)) {
$uniqueUserIds = $util->getSharingUsersArray( $sharingEnabled, $filePath, $userId ); $uniqueUserIds = $util->getSharingUsersArray($sharingEnabled, $filePath, $userId);
} else { } else {
$uniqueUserIds[] = $userId; $uniqueUserIds[] = $userId;
} }
// Fetch public keys for all users who will share the file // Fetch public keys for all users who will share the file
$publicKeys = Keymanager::getPublicKeys( $view, $uniqueUserIds ); $publicKeys = Keymanager::getPublicKeys($view, $uniqueUserIds);
// Encrypt plain keyfile to multiple sharefiles // Encrypt plain keyfile to multiple sharefiles
$multiEncrypted = Crypt::multiKeyEncrypt( $plainKey, $publicKeys ); $multiEncrypted = Crypt::multiKeyEncrypt($plainKey, $publicKeys);
// Save sharekeys to user folders // Save sharekeys to user folders
Keymanager::setShareKeys( $view, $filePath, $multiEncrypted['keys'] ); Keymanager::setShareKeys($view, $filePath, $multiEncrypted['keys']);
// Set encrypted keyfile as common varname // Set encrypted keyfile as common varname
$encKey = $multiEncrypted['data']; $encKey = $multiEncrypted['data'];
// Save keyfile for newly encrypted file in parallel directory tree // Save keyfile for newly encrypted file in parallel directory tree
Keymanager::setFileKey( $view, $filePath, $userId, $encKey ); Keymanager::setFileKey($view, $filePath, $userId, $encKey);
// Replace plain content with encrypted content by reference // Replace plain content with encrypted content by reference
$data = $encData; $data = $encData;
// Update the file cache with file info // Update the file cache with file info
\OC\Files\Filesystem::putFileInfo( $filePath, array( 'encrypted' => true, 'size' => strlen( $data ), 'unencrypted_size' => $size ), '' ); \OC\Files\Filesystem::putFileInfo($filePath, array(
'encrypted' => true,
'size' => strlen($data),
'unencrypted_size' => $size
), '');
// Re-enable proxy - our work is done // Re-enable proxy - our work is done
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
@ -184,51 +187,51 @@ class Proxy extends \OC_FileProxy
* @param string $path Path of file from which has been read * @param string $path Path of file from which has been read
* @param string $data Data that has been read from file * @param string $data Data that has been read from file
*/ */
public function postFile_get_contents( $path, $data ) { public function postFile_get_contents($path, $data) {
$userId = \OCP\USER::getUser(); $userId = \OCP\USER::getUser();
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
$util = new Util( $view, $userId ); $util = new Util($view, $userId);
$relPath = $util->stripUserFilesPath( $path ); $relPath = $util->stripUserFilesPath($path);
// Disable encryption proxy to prevent recursive calls // Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
// init session // init session
$session = new Session( $view ); $session = new \OCA\Encryption\Session($view);
// If data is a catfile // If data is a catfile
if ( if (
Crypt::mode() == 'server' Crypt::mode() === 'server'
&& Crypt::isCatfileContent( $data ) && Crypt::isCatfileContent($data)
) { ) {
$privateKey = $session->getPrivateKey( $userId ); $privateKey = $session->getPrivateKey($userId);
// Get the encrypted keyfile // Get the encrypted keyfile
$encKeyfile = Keymanager::getFileKey( $view, $userId, $relPath ); $encKeyfile = Keymanager::getFileKey($view, $userId, $relPath);
// Attempt to fetch the user's shareKey // Attempt to fetch the user's shareKey
$shareKey = Keymanager::getShareKey( $view, $userId, $relPath ); $shareKey = Keymanager::getShareKey($view, $userId, $relPath);
// Decrypt keyfile with shareKey // Decrypt keyfile with shareKey
$plainKeyfile = Crypt::multiKeyDecrypt( $encKeyfile, $shareKey, $privateKey ); $plainKeyfile = Crypt::multiKeyDecrypt($encKeyfile, $shareKey, $privateKey);
$plainData = Crypt::symmetricDecryptFileContent( $data, $plainKeyfile ); $plainData = Crypt::symmetricDecryptFileContent($data, $plainKeyfile);
} elseif ( } elseif (
Crypt::mode() == 'server' Crypt::mode() == 'server'
&& isset( $_SESSION['legacyenckey'] ) && \OC::$session->exists('legacyenckey')
&& Crypt::isEncryptedMeta( $path ) && Crypt::isEncryptedMeta($path)
) { ) {
$plainData = Crypt::legacyDecrypt( $data, $session->getLegacyKey() ); $plainData = Crypt::legacyBlockDecrypt($data, $session->getLegacyKey());
} }
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
if ( !isset( $plainData ) ) { if (!isset($plainData)) {
$plainData = $data; $plainData = $data;
@ -241,10 +244,10 @@ class Proxy extends \OC_FileProxy
/** /**
* @brief When a file is deleted, remove its keyfile also * @brief When a file is deleted, remove its keyfile also
*/ */
public function preUnlink( $path ) { public function preUnlink($path) {
// let the trashbin handle this // let the trashbin handle this
if ( \OCP\App::isEnabled( 'files_trashbin' ) ) { if (\OCP\App::isEnabled('files_trashbin')) {
return true; return true;
} }
@ -252,23 +255,24 @@ class Proxy extends \OC_FileProxy
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
$userId = \OCP\USER::getUser(); $userId = \OCP\USER::getUser();
$util = new Util( $view, $userId ); $util = new Util($view, $userId);
// Format path to be relative to user files dir // Format path to be relative to user files dir
$relPath = $util->stripUserFilesPath( $path ); $relPath = $util->stripUserFilesPath($path);
list( $owner, $ownerPath ) = $util->getUidAndFilename( $relPath ); list($owner, $ownerPath) = $util->getUidAndFilename($relPath);
// Delete keyfile & shareKey so it isn't orphaned // Delete keyfile & shareKey so it isn't orphaned
if ( !Keymanager::deleteFileKey( $view, $owner, $ownerPath ) ) { if (!Keymanager::deleteFileKey($view, $owner, $ownerPath)) {
\OC_Log::write( 'Encryption library', 'Keyfile or shareKey could not be deleted for file "' . $ownerPath . '"', \OC_Log::ERROR ); \OCP\Util::writeLog('Encryption library',
'Keyfile or shareKey could not be deleted for file "' . $ownerPath . '"', \OCP\Util::ERROR);
} }
Keymanager::delAllShareKeys( $view, $owner, $ownerPath ); Keymanager::delAllShareKeys($view, $owner, $ownerPath);
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
@ -282,8 +286,8 @@ class Proxy extends \OC_FileProxy
* @param $path * @param $path
* @return bool * @return bool
*/ */
public function postTouch( $path ) { public function postTouch($path) {
$this->handleFile( $path ); $this->handleFile($path);
return true; return true;
} }
@ -293,20 +297,20 @@ class Proxy extends \OC_FileProxy
* @param $result * @param $result
* @return resource * @return resource
*/ */
public function postFopen( $path, &$result ) { public function postFopen($path, &$result) {
if ( !$result ) { if (!$result) {
return $result; return $result;
} }
// Reformat path for use with OC_FSV // Reformat path for use with OC_FSV
$path_split = explode( '/', $path ); $path_split = explode('/', $path);
$path_f = implode( '/', array_slice( $path_split, 3 ) ); $path_f = implode('/', array_slice($path_split, 3));
// FIXME: handling for /userId/cache used by webdav for chunking. The cache chunks are NOT encrypted // FIXME: handling for /userId/cache used by webdav for chunking. The cache chunks are NOT encrypted
if ( count($path_split) >= 2 && $path_split[2] == 'cache' ) { if (isset($path_split) && $path_split[2] === 'cache') {
return $result; return $result;
} }
@ -314,31 +318,31 @@ class Proxy extends \OC_FileProxy
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
$meta = stream_get_meta_data( $result ); $meta = stream_get_meta_data($result);
$view = new \OC_FilesystemView( '' ); $view = new \OC_FilesystemView('');
$util = new Util( $view, \OCP\USER::getUser() ); $util = new Util($view, \OCP\USER::getUser());
// If file is already encrypted, decrypt using crypto protocol // If file is already encrypted, decrypt using crypto protocol
if ( if (
Crypt::mode() == 'server' Crypt::mode() === 'server'
&& $util->isEncryptedPath( $path ) && $util->isEncryptedPath($path)
) { ) {
// Close the original encrypted file // Close the original encrypted file
fclose( $result ); fclose($result);
// Open the file using the crypto stream wrapper // Open the file using the crypto stream wrapper
// protocol and let it do the decryption work instead // protocol and let it do the decryption work instead
$result = fopen( 'crypt://' . $path_f, $meta['mode'] ); $result = fopen('crypt://' . $path_f, $meta['mode']);
} elseif ( } elseif (
self::shouldEncrypt( $path ) self::shouldEncrypt($path)
and $meta ['mode'] != 'r' and $meta ['mode'] !== 'r'
and $meta['mode'] != 'rb' and $meta['mode'] !== 'rb'
) { ) {
$result = fopen( 'crypt://' . $path_f, $meta['mode'] ); $result = fopen('crypt://' . $path_f, $meta['mode']);
} }
// Re-enable the proxy // Re-enable the proxy
@ -353,17 +357,17 @@ class Proxy extends \OC_FileProxy
* @param $data * @param $data
* @return array * @return array
*/ */
public function postGetFileInfo( $path, $data ) { public function postGetFileInfo($path, $data) {
// if path is a folder do nothing // if path is a folder do nothing
if ( is_array( $data ) && array_key_exists( 'size', $data ) ) { if (is_array($data) && array_key_exists('size', $data)) {
// Disable encryption proxy to prevent recursive calls // Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
// get file size // get file size
$data['size'] = self::postFileSize( $path, $data['size'] ); $data['size'] = self::postFileSize($path, $data['size']);
// Re-enable the proxy // Re-enable the proxy
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
@ -377,51 +381,51 @@ class Proxy extends \OC_FileProxy
* @param $size * @param $size
* @return bool * @return bool
*/ */
public function postFileSize( $path, $size ) { public function postFileSize($path, $size) {
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
// if path is a folder do nothing // if path is a folder do nothing
if ( $view->is_dir( $path ) ) { if ($view->is_dir($path)) {
return $size; return $size;
} }
// Reformat path for use with OC_FSV // Reformat path for use with OC_FSV
$path_split = explode( '/', $path ); $path_split = explode('/', $path);
$path_f = implode( '/', array_slice( $path_split, 3 ) ); $path_f = implode('/', array_slice($path_split, 3));
// if path is empty we cannot resolve anything // if path is empty we cannot resolve anything
if ( empty( $path_f ) ) { if (empty($path_f)) {
return $size; return $size;
} }
$fileInfo = false; $fileInfo = false;
// get file info from database/cache if not .part file // get file info from database/cache if not .part file
if ( !Keymanager::isPartialFilePath( $path ) ) { if (!Keymanager::isPartialFilePath($path)) {
$fileInfo = $view->getFileInfo( $path ); $fileInfo = $view->getFileInfo($path);
} }
// if file is encrypted return real file size // if file is encrypted return real file size
if ( is_array( $fileInfo ) && $fileInfo['encrypted'] === true ) { if (is_array($fileInfo) && $fileInfo['encrypted'] === true) {
$size = $fileInfo['unencrypted_size']; $size = $fileInfo['unencrypted_size'];
} else { } else {
// self healing if file was removed from file cache // self healing if file was removed from file cache
if ( !is_array( $fileInfo ) ) { if (!is_array($fileInfo)) {
$fileInfo = array(); $fileInfo = array();
} }
$userId = \OCP\User::getUser(); $userId = \OCP\User::getUser();
$util = new Util( $view, $userId ); $util = new Util($view, $userId);
$fixSize = $util->getFileSize( $path ); $fixSize = $util->getFileSize($path);
if ( $fixSize > 0 ) { if ($fixSize > 0) {
$size = $fixSize; $size = $fixSize;
$fileInfo['encrypted'] = true; $fileInfo['encrypted'] = true;
$fileInfo['unencrypted_size'] = $size; $fileInfo['unencrypted_size'] = $size;
// put file info if not .part file // put file info if not .part file
if ( !Keymanager::isPartialFilePath( $path_f ) ) { if (!Keymanager::isPartialFilePath($path_f)) {
$view->putFileInfo( $path, $fileInfo ); $view->putFileInfo($path, $fileInfo);
} }
} }
@ -432,32 +436,32 @@ class Proxy extends \OC_FileProxy
/** /**
* @param $path * @param $path
*/ */
public function handleFile( $path ) { public function handleFile($path) {
// Disable encryption proxy to prevent recursive calls // Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
$session = new Session( $view ); $session = new \OCA\Encryption\Session($view);
$userId = \OCP\User::getUser(); $userId = \OCP\User::getUser();
$util = new Util( $view, $userId ); $util = new Util($view, $userId);
// Reformat path for use with OC_FSV // Reformat path for use with OC_FSV
$path_split = explode( '/', $path ); $path_split = explode('/', $path);
$path_f = implode( '/', array_slice( $path_split, 3 ) ); $path_f = implode('/', array_slice($path_split, 3));
// only if file is on 'files' folder fix file size and sharing // only if file is on 'files' folder fix file size and sharing
if ( count($path_split) >= 2 && $path_split[2] == 'files' && $util->fixFileSize( $path ) ) { if (isset($path_split) && $path_split[2] === 'files' && $util->fixFileSize($path)) {
// get sharing app state // get sharing app state
$sharingEnabled = \OCP\Share::isEnabled(); $sharingEnabled = \OCP\Share::isEnabled();
// get users // get users
$usersSharing = $util->getSharingUsersArray( $sharingEnabled, $path_f ); $usersSharing = $util->getSharingUsersArray($sharingEnabled, $path_f);
// update sharing-keys // update sharing-keys
$util->setSharedFileKeyfiles( $session, $usersSharing, $path_f ); $util->setSharedFileKeyfiles($session, $usersSharing, $path_f);
} }
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;

View File

@ -26,8 +26,7 @@ namespace OCA\Encryption;
* Class for handling encryption related session data * Class for handling encryption related session data
*/ */
class Session class Session {
{
private $view; private $view;
@ -37,26 +36,26 @@ class Session
* *
* @note The ownCloud key pair is used to allow public link sharing even if encryption is enabled * @note The ownCloud key pair is used to allow public link sharing even if encryption is enabled
*/ */
public function __construct( $view ) { public function __construct($view) {
$this->view = $view; $this->view = $view;
if ( !$this->view->is_dir( 'owncloud_private_key' ) ) { if (!$this->view->is_dir('owncloud_private_key')) {
$this->view->mkdir( 'owncloud_private_key' ); $this->view->mkdir('owncloud_private_key');
} }
$publicShareKeyId = \OC_Appconfig::getValue( 'files_encryption', 'publicShareKeyId' ); $publicShareKeyId = \OC_Appconfig::getValue('files_encryption', 'publicShareKeyId');
if ( $publicShareKeyId === null ) { if ($publicShareKeyId === null) {
$publicShareKeyId = 'pubShare_' . substr( md5( time() ), 0, 8 ); $publicShareKeyId = 'pubShare_' . substr(md5(time()), 0, 8);
\OC_Appconfig::setValue( 'files_encryption', 'publicShareKeyId', $publicShareKeyId ); \OC_Appconfig::setValue('files_encryption', 'publicShareKeyId', $publicShareKeyId);
} }
if ( if (
!$this->view->file_exists( "/public-keys/" . $publicShareKeyId . ".public.key" ) !$this->view->file_exists("/public-keys/" . $publicShareKeyId . ".public.key")
|| !$this->view->file_exists( "/owncloud_private_key/" . $publicShareKeyId . ".private.key" ) || !$this->view->file_exists("/owncloud_private_key/" . $publicShareKeyId . ".private.key")
) { ) {
$keypair = Crypt::createKeypair(); $keypair = Crypt::createKeypair();
@ -67,33 +66,31 @@ class Session
// Save public key // Save public key
if ( !$view->is_dir( '/public-keys' ) ) { if (!$view->is_dir('/public-keys')) {
$view->mkdir( '/public-keys' ); $view->mkdir('/public-keys');
} }
$this->view->file_put_contents( '/public-keys/' . $publicShareKeyId . '.public.key', $keypair['publicKey'] ); $this->view->file_put_contents('/public-keys/' . $publicShareKeyId . '.public.key', $keypair['publicKey']);
// Encrypt private key empty passphrase // Encrypt private key empty passphrase
$encryptedPrivateKey = Crypt::symmetricEncryptFileContent( $keypair['privateKey'], '' ); $encryptedPrivateKey = Crypt::symmetricEncryptFileContent($keypair['privateKey'], '');
// Save private key // Save private key
$this->view->file_put_contents( '/owncloud_private_key/' . $publicShareKeyId . '.private.key', $encryptedPrivateKey ); $this->view->file_put_contents(
'/owncloud_private_key/' . $publicShareKeyId . '.private.key', $encryptedPrivateKey);
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
} }
if ( \OCP\USER::getUser() === false || if (\OCA\Encryption\Helper::isPublicAccess()) {
( isset( $_GET['service'] ) && $_GET['service'] == 'files' &&
isset( $_GET['t'] ) )
) {
// Disable encryption proxy to prevent recursive calls // Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
$encryptedKey = $this->view->file_get_contents( '/owncloud_private_key/' . $publicShareKeyId . '.private.key' ); $encryptedKey = $this->view->file_get_contents( '/owncloud_private_key/' . $publicShareKeyId . '.private.key' );
$privateKey = Crypt::symmetricDecryptFileContent( $encryptedKey, '' ); $privateKey = Crypt::symmetricDecryptFileContent( $encryptedKey, '' );
$this->setPrivateKey( $privateKey ); $this->setPublicSharePrivateKey( $privateKey );
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
} }
@ -103,45 +100,71 @@ class Session
* @brief Sets user private key to session * @brief Sets user private key to session
* @param string $privateKey * @param string $privateKey
* @return bool * @return bool
*
* @note this should only be set on login
*/ */
public function setPrivateKey( $privateKey ) { public function setPrivateKey($privateKey) {
$_SESSION['privateKey'] = $privateKey; \OC::$session->set('privateKey', $privateKey);
return true; return true;
} }
/** /**
* @brief Gets user private key from session * @brief Gets user or public share private key from session
* @returns string $privateKey The user's plaintext private key * @returns string $privateKey The user's plaintext private key
* *
*/ */
public function getPrivateKey() { public function getPrivateKey() {
// return the public share private key if this is a public access
if ( if (\OCA\Encryption\Helper::isPublicAccess()) {
isset( $_SESSION['privateKey'] ) return $this->getPublicSharePrivateKey();
&& !empty( $_SESSION['privateKey'] ) } else {
) { if (!is_null( \OC::$session->get('privateKey') )) {
return \OC::$session->get('privateKey');
return $_SESSION['privateKey'];
} else { } else {
return false; return false;
}
}
}
/**
* @brief Sets public user private key to session
* @param string $privateKey
* @return bool
*/
public function setPublicSharePrivateKey($privateKey) {
\OC::$session->set('publicSharePrivateKey', $privateKey);
return true;
} }
/**
* @brief Gets public share private key from session
* @returns string $privateKey
*
*/
public function getPublicSharePrivateKey() {
if (!is_null( \OC::$session->get('publicSharePrivateKey') )) {
return \OC::$session->get('publicSharePrivateKey');
} else {
return false;
} }
}
/** /**
* @brief Sets user legacy key to session * @brief Sets user legacy key to session
* @param $legacyKey * @param $legacyKey
* @return bool * @return bool
*/ */
public function setLegacyKey( $legacyKey ) { public function setLegacyKey($legacyKey) {
$_SESSION['legacyKey'] = $legacyKey; \OC::$session->set('legacyKey', $legacyKey);
return true; return true;
} }
@ -153,12 +176,9 @@ class Session
*/ */
public function getLegacyKey() { public function getLegacyKey() {
if ( if ( !is_null( \OC::$session->get('legacyKey') ) ) {
isset( $_SESSION['legacyKey'] )
&& !empty( $_SESSION['legacyKey'] )
) {
return $_SESSION['legacyKey']; return \OC::$session->get('legacyKey');
} else { } else {

View File

@ -48,8 +48,7 @@ namespace OCA\Encryption;
* previous version deleted, this is handled by OC\Files\View, and thus the * previous version deleted, this is handled by OC\Files\View, and thus the
* encryption proxies are used and keyfiles deleted. * encryption proxies are used and keyfiles deleted.
*/ */
class Stream class Stream {
{
private $plainKey; private $plainKey;
private $encKeyfiles; private $encKeyfiles;
@ -77,18 +76,18 @@ class Stream
* @param $opened_path * @param $opened_path
* @return bool * @return bool
*/ */
public function stream_open( $path, $mode, $options, &$opened_path ) { public function stream_open($path, $mode, $options, &$opened_path) {
if ( !isset( $this->rootView ) ) { if (!isset($this->rootView)) {
$this->rootView = new \OC_FilesystemView( '/' ); $this->rootView = new \OC_FilesystemView('/');
} }
$util = new Util( $this->rootView, \OCP\USER::getUser() ); $util = new Util($this->rootView, \OCP\USER::getUser());
$this->userId = $util->getUserId(); $this->userId = $util->getUserId();
// Strip identifier text from path, this gives us the path relative to data/<user>/files // Strip identifier text from path, this gives us the path relative to data/<user>/files
$this->relPath = \OC\Files\Filesystem::normalizePath( str_replace( 'crypt://', '', $path ) ); $this->relPath = \OC\Files\Filesystem::normalizePath(str_replace('crypt://', '', $path));
// rawPath is relative to the data directory // rawPath is relative to the data directory
$this->rawPath = $util->getUserFilesDir() . $this->relPath; $this->rawPath = $util->getUserFilesDir() . $this->relPath;
@ -98,10 +97,10 @@ class Stream
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
if ( if (
$mode == 'w' $mode === 'w'
or $mode == 'w+' or $mode === 'w+'
or $mode == 'wb' or $mode === 'wb'
or $mode == 'wb+' or $mode === 'wb+'
) { ) {
// We're writing a new file so start write counter with 0 bytes // We're writing a new file so start write counter with 0 bytes
@ -110,25 +109,25 @@ class Stream
} else { } else {
$this->size = $this->rootView->filesize( $this->rawPath, $mode ); $this->size = $this->rootView->filesize($this->rawPath, $mode);
} }
$this->handle = $this->rootView->fopen( $this->rawPath, $mode ); $this->handle = $this->rootView->fopen($this->rawPath, $mode);
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
if ( !is_resource( $this->handle ) ) { if (!is_resource($this->handle)) {
\OCP\Util::writeLog( 'files_encryption', 'failed to open file "' . $this->rawPath . '"', \OCP\Util::ERROR ); \OCP\Util::writeLog('files_encryption', 'failed to open file "' . $this->rawPath . '"', \OCP\Util::ERROR);
} else { } else {
$this->meta = stream_get_meta_data( $this->handle ); $this->meta = stream_get_meta_data($this->handle);
} }
return is_resource( $this->handle ); return is_resource($this->handle);
} }
@ -136,11 +135,11 @@ class Stream
* @param $offset * @param $offset
* @param int $whence * @param int $whence
*/ */
public function stream_seek( $offset, $whence = SEEK_SET ) { public function stream_seek($offset, $whence = SEEK_SET) {
$this->flush(); $this->flush();
fseek( $this->handle, $offset, $whence ); fseek($this->handle, $offset, $whence);
} }
@ -149,36 +148,37 @@ class Stream
* @return bool|string * @return bool|string
* @throws \Exception * @throws \Exception
*/ */
public function stream_read( $count ) { public function stream_read($count) {
$this->writeCache = ''; $this->writeCache = '';
if ( $count != 8192 ) { if ($count !== 8192) {
// $count will always be 8192 https://bugs.php.net/bug.php?id=21641 // $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' // 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 ); \OCP\Util::writeLog('files_encryption', 'PHP "bug" 21641 no longer holds, decryption system requires refactoring', \OCP\Util::FATAL);
die(); die();
} }
// Get the data from the file handle // Get the data from the file handle
$data = fread( $this->handle, 8192 ); $data = fread($this->handle, 8192);
$result = ''; $result = '';
if ( strlen( $data ) ) { if (strlen($data)) {
if ( !$this->getKey() ) { if (!$this->getKey()) {
// Error! We don't have a key to decrypt the file with // Error! We don't have a key to decrypt the file with
throw new \Exception( 'Encryption key not found for "' . $this->rawPath . '" during attempted read via stream' ); throw new \Exception(
'Encryption key not found for "' . $this->rawPath . '" during attempted read via stream');
} }
// Decrypt data // Decrypt data
$result = Crypt::symmetricDecryptFileContent( $data, $this->plainKey ); $result = Crypt::symmetricDecryptFileContent($data, $this->plainKey);
} }
@ -192,10 +192,10 @@ class Stream
* @param string $key key to use for encryption * @param string $key key to use for encryption
* @return string encrypted data on success, false on failure * @return string encrypted data on success, false on failure
*/ */
public function preWriteEncrypt( $plainData, $key ) { public function preWriteEncrypt($plainData, $key) {
// Encrypt data to 'catfile', which includes IV // Encrypt data to 'catfile', which includes IV
if ( $encrypted = Crypt::symmetricEncryptFileContent( $plainData, $key ) ) { if ($encrypted = Crypt::symmetricEncryptFileContent($plainData, $key)) {
return $encrypted; return $encrypted;
@ -215,7 +215,7 @@ class Stream
public function getKey() { public function getKey() {
// Check if key is already set // Check if key is already set
if ( isset( $this->plainKey ) && isset( $this->encKeyfile ) ) { if (isset($this->plainKey) && isset($this->encKeyfile)) {
return true; return true;
@ -223,18 +223,18 @@ class Stream
// Fetch and decrypt keyfile // Fetch and decrypt keyfile
// Fetch existing keyfile // Fetch existing keyfile
$this->encKeyfile = Keymanager::getFileKey( $this->rootView, $this->userId, $this->relPath ); $this->encKeyfile = Keymanager::getFileKey($this->rootView, $this->userId, $this->relPath);
// If a keyfile already exists // If a keyfile already exists
if ( $this->encKeyfile ) { if ($this->encKeyfile) {
$session = new Session( $this->rootView ); $session = new \OCA\Encryption\Session( $this->rootView );
$privateKey = $session->getPrivateKey( $this->userId ); $privateKey = $session->getPrivateKey($this->userId);
$shareKey = Keymanager::getShareKey( $this->rootView, $this->userId, $this->relPath ); $shareKey = Keymanager::getShareKey($this->rootView, $this->userId, $this->relPath);
$this->plainKey = Crypt::multiKeyDecrypt( $this->encKeyfile, $shareKey, $privateKey ); $this->plainKey = Crypt::multiKeyDecrypt($this->encKeyfile, $shareKey, $privateKey);
return true; return true;
@ -255,7 +255,7 @@ class Stream
* @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 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 * @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 ) { public function stream_write($data) {
// Disable the file proxies so that encryption is not // Disable the file proxies so that encryption is not
// automatically attempted when the file is written to disk - // automatically attempted when the file is written to disk -
@ -265,16 +265,16 @@ class Stream
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
// Get the length of the unencrypted data that we are handling // Get the length of the unencrypted data that we are handling
$length = strlen( $data ); $length = strlen($data);
// Find out where we are up to in the writing of data to the // Find out where we are up to in the writing of data to the
// file // file
$pointer = ftell( $this->handle ); $pointer = ftell($this->handle);
// Get / generate the keyfile for the file we're handling // Get / generate the keyfile for the file we're handling
// If we're writing a new file (not overwriting an existing // If we're writing a new file (not overwriting an existing
// one), save the newly generated keyfile // one), save the newly generated keyfile
if ( !$this->getKey() ) { if (!$this->getKey()) {
$this->plainKey = Crypt::generateKey(); $this->plainKey = Crypt::generateKey();
@ -282,7 +282,7 @@ class Stream
// If extra data is left over from the last round, make sure it // If extra data is left over from the last round, make sure it
// is integrated into the next 6126 / 8192 block // is integrated into the next 6126 / 8192 block
if ( $this->writeCache ) { if ($this->writeCache) {
// Concat writeCache to start of $data // Concat writeCache to start of $data
$data = $this->writeCache . $data; $data = $this->writeCache . $data;
@ -294,15 +294,15 @@ class Stream
} }
// While there still remains some data to be processed & written // While there still remains some data to be processed & written
while ( strlen( $data ) > 0 ) { while (strlen($data) > 0) {
// Remaining length for this iteration, not of the // Remaining length for this iteration, not of the
// entire file (may be greater than 8192 bytes) // entire file (may be greater than 8192 bytes)
$remainingLength = strlen( $data ); $remainingLength = strlen($data);
// If data remaining to be written is less than the // If data remaining to be written is less than the
// size of 1 6126 byte block // size of 1 6126 byte block
if ( $remainingLength < 6126 ) { if ($remainingLength < 6126) {
// Set writeCache to contents of $data // Set writeCache to contents of $data
// The writeCache will be carried over to the // The writeCache will be carried over to the
@ -320,25 +320,25 @@ class Stream
} else { } else {
// Read the chunk from the start of $data // Read the chunk from the start of $data
$chunk = substr( $data, 0, 6126 ); $chunk = substr($data, 0, 6126);
$encrypted = $this->preWriteEncrypt( $chunk, $this->plainKey ); $encrypted = $this->preWriteEncrypt($chunk, $this->plainKey);
// Write the data chunk to disk. This will be // Write the data chunk to disk. This will be
// attended to the last data chunk if the file // attended to the last data chunk if the file
// being handled totals more than 6126 bytes // being handled totals more than 6126 bytes
fwrite( $this->handle, $encrypted ); fwrite($this->handle, $encrypted);
// Remove the chunk we just processed from // Remove the chunk we just processed from
// $data, leaving only unprocessed data in $data // $data, leaving only unprocessed data in $data
// var, for handling on the next round // var, for handling on the next round
$data = substr( $data, 6126 ); $data = substr($data, 6126);
} }
} }
$this->size = max( $this->size, $pointer + $length ); $this->size = max($this->size, $pointer + $length);
$this->unencryptedSize += $length; $this->unencryptedSize += $length;
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
@ -353,17 +353,17 @@ class Stream
* @param $arg1 * @param $arg1
* @param $arg2 * @param $arg2
*/ */
public function stream_set_option( $option, $arg1, $arg2 ) { public function stream_set_option($option, $arg1, $arg2) {
$return = false; $return = false;
switch ( $option ) { switch ($option) {
case STREAM_OPTION_BLOCKING: case STREAM_OPTION_BLOCKING:
$return = stream_set_blocking( $this->handle, $arg1 ); $return = stream_set_blocking($this->handle, $arg1);
break; break;
case STREAM_OPTION_READ_TIMEOUT: case STREAM_OPTION_READ_TIMEOUT:
$return = stream_set_timeout( $this->handle, $arg1, $arg2 ); $return = stream_set_timeout($this->handle, $arg1, $arg2);
break; break;
case STREAM_OPTION_WRITE_BUFFER: case STREAM_OPTION_WRITE_BUFFER:
$return = stream_set_write_buffer( $this->handle, $arg1 ); $return = stream_set_write_buffer($this->handle, $arg1);
} }
return $return; return $return;
@ -373,14 +373,14 @@ class Stream
* @return array * @return array
*/ */
public function stream_stat() { public function stream_stat() {
return fstat( $this->handle ); return fstat($this->handle);
} }
/** /**
* @param $mode * @param $mode
*/ */
public function stream_lock( $mode ) { public function stream_lock($mode) {
return flock( $this->handle, $mode ); return flock($this->handle, $mode);
} }
/** /**
@ -388,7 +388,7 @@ class Stream
*/ */
public function stream_flush() { public function stream_flush() {
return fflush( $this->handle ); return fflush($this->handle);
// Not a typo: http://php.net/manual/en/function.fflush.php // Not a typo: http://php.net/manual/en/function.fflush.php
} }
@ -397,19 +397,19 @@ class Stream
* @return bool * @return bool
*/ */
public function stream_eof() { public function stream_eof() {
return feof( $this->handle ); return feof($this->handle);
} }
private function flush() { private function flush() {
if ( $this->writeCache ) { if ($this->writeCache) {
// Set keyfile property for file in question // Set keyfile property for file in question
$this->getKey(); $this->getKey();
$encrypted = $this->preWriteEncrypt( $this->writeCache, $this->plainKey ); $encrypted = $this->preWriteEncrypt($this->writeCache, $this->plainKey);
fwrite( $this->handle, $encrypted ); fwrite($this->handle, $encrypted);
$this->writeCache = ''; $this->writeCache = '';
@ -425,8 +425,8 @@ class Stream
$this->flush(); $this->flush();
if ( if (
$this->meta['mode'] != 'r' $this->meta['mode'] !== 'r'
and $this->meta['mode'] != 'rb' and $this->meta['mode'] !== 'rb'
and $this->size > 0 and $this->size > 0
) { ) {
// Disable encryption proxy to prevent recursive calls // Disable encryption proxy to prevent recursive calls
@ -434,33 +434,33 @@ class Stream
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
// Fetch user's public key // Fetch user's public key
$this->publicKey = Keymanager::getPublicKey( $this->rootView, $this->userId ); $this->publicKey = Keymanager::getPublicKey($this->rootView, $this->userId);
// Check if OC sharing api is enabled // Check if OC sharing api is enabled
$sharingEnabled = \OCP\Share::isEnabled(); $sharingEnabled = \OCP\Share::isEnabled();
$util = new Util( $this->rootView, $this->userId ); $util = new Util($this->rootView, $this->userId);
// Get all users sharing the file includes current user // Get all users sharing the file includes current user
$uniqueUserIds = $util->getSharingUsersArray( $sharingEnabled, $this->relPath, $this->userId ); $uniqueUserIds = $util->getSharingUsersArray($sharingEnabled, $this->relPath, $this->userId);
// Fetch public keys for all sharing users // Fetch public keys for all sharing users
$publicKeys = Keymanager::getPublicKeys( $this->rootView, $uniqueUserIds ); $publicKeys = Keymanager::getPublicKeys($this->rootView, $uniqueUserIds);
// Encrypt enc key for all sharing users // Encrypt enc key for all sharing users
$this->encKeyfiles = Crypt::multiKeyEncrypt( $this->plainKey, $publicKeys ); $this->encKeyfiles = Crypt::multiKeyEncrypt($this->plainKey, $publicKeys);
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
// Save the new encrypted file key // Save the new encrypted file key
Keymanager::setFileKey( $this->rootView, $this->relPath, $this->userId, $this->encKeyfiles['data'] ); Keymanager::setFileKey($this->rootView, $this->relPath, $this->userId, $this->encKeyfiles['data']);
// Save the sharekeys // Save the sharekeys
Keymanager::setShareKeys( $view, $this->relPath, $this->encKeyfiles['keys'] ); Keymanager::setShareKeys($view, $this->relPath, $this->encKeyfiles['keys']);
// get file info // get file info
$fileInfo = $view->getFileInfo( $this->rawPath ); $fileInfo = $view->getFileInfo($this->rawPath);
if ( !is_array( $fileInfo ) ) { if (!is_array($fileInfo)) {
$fileInfo = array(); $fileInfo = array();
} }
@ -473,10 +473,10 @@ class Stream
$fileInfo['unencrypted_size'] = $this->unencryptedSize; $fileInfo['unencrypted_size'] = $this->unencryptedSize;
// set fileinfo // set fileinfo
$view->putFileInfo( $this->rawPath, $fileInfo ); $view->putFileInfo($this->rawPath, $fileInfo);
} }
return fclose( $this->handle ); return fclose($this->handle);
} }

File diff suppressed because it is too large Load Diff

View File

@ -8,16 +8,16 @@
\OC_Util::checkAdminUser(); \OC_Util::checkAdminUser();
$tmpl = new OCP\Template( 'files_encryption', 'settings-admin' ); $tmpl = new OCP\Template('files_encryption', 'settings-admin');
// Check if an adminRecovery account is enabled for recovering files after lost pwd // Check if an adminRecovery account is enabled for recovering files after lost pwd
$view = new OC_FilesystemView( '' ); $view = new OC_FilesystemView('');
$recoveryAdminEnabled = OC_Appconfig::getValue( 'files_encryption', 'recoveryAdminEnabled' ); $recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
$tmpl->assign( 'recoveryEnabled', $recoveryAdminEnabled ); $tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
\OCP\Util::addscript( 'files_encryption', 'settings-admin' ); \OCP\Util::addscript('files_encryption', 'settings-admin');
\OCP\Util::addscript( 'core', 'multiselect' ); \OCP\Util::addscript('core', 'multiselect');
return $tmpl->fetchPage(); return $tmpl->fetchPage();

View File

@ -7,22 +7,22 @@
*/ */
// Add CSS stylesheet // Add CSS stylesheet
\OC_Util::addStyle( 'files_encryption', 'settings-personal' ); \OC_Util::addStyle('files_encryption', 'settings-personal');
$tmpl = new OCP\Template( 'files_encryption', 'settings-personal'); $tmpl = new OCP\Template('files_encryption', 'settings-personal');
$user = \OCP\USER::getUser(); $user = \OCP\USER::getUser();
$view = new \OC_FilesystemView( '/' ); $view = new \OC_FilesystemView('/');
$util = new \OCA\Encryption\Util( $view, $user ); $util = new \OCA\Encryption\Util($view, $user);
$recoveryAdminEnabled = OC_Appconfig::getValue( 'files_encryption', 'recoveryAdminEnabled' ); $recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
$recoveryEnabledForUser = $util->recoveryEnabledForUser(); $recoveryEnabledForUser = $util->recoveryEnabledForUser();
\OCP\Util::addscript( 'files_encryption', 'settings-personal' ); \OCP\Util::addscript('files_encryption', 'settings-personal');
\OCP\Util::addScript( 'settings', 'personal' ); \OCP\Util::addScript('settings', 'personal');
$tmpl->assign( 'recoveryEnabled', $recoveryAdminEnabled ); $tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
$tmpl->assign( 'recoveryEnabledForUser', $recoveryEnabledForUser ); $tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser);
return $tmpl->fetchPage(); return $tmpl->fetchPage();

View File

@ -16,14 +16,16 @@ require_once realpath(dirname(__FILE__) . '/../lib/stream.php');
require_once realpath(dirname(__FILE__) . '/../lib/util.php'); require_once realpath(dirname(__FILE__) . '/../lib/util.php');
require_once realpath(dirname(__FILE__) . '/../lib/helper.php'); require_once realpath(dirname(__FILE__) . '/../lib/helper.php');
require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); require_once realpath(dirname(__FILE__) . '/../appinfo/app.php');
require_once realpath(dirname(__FILE__) . '/util.php');
use OCA\Encryption; use OCA\Encryption;
/** /**
* Class Test_Encryption_Crypt * Class Test_Encryption_Crypt
*/ */
class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
{
const TEST_ENCRYPTION_CRYPT_USER1 = "test-crypt-user1";
public $userId; public $userId;
public $pass; public $pass;
@ -39,12 +41,31 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
public $genPrivateKey; public $genPrivateKey;
public $genPublicKey; public $genPublicKey;
function setUp() public static function setUpBeforeClass() {
{
// reset backend // reset backend
\OC_User::clearBackends(); \OC_User::clearBackends();
\OC_User::useBackend('database'); \OC_User::useBackend('database');
// Filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
// Filesystem related hooks
\OCA\Encryption\Helper::registerUserHooks();
// clear and register hooks
\OC_FileProxy::clearProxies();
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// create test user
\Test_Encryption_Util::loginHelper(\Test_Encryption_Crypt::TEST_ENCRYPTION_CRYPT_USER1, true);
}
function setUp() {
// set user id
\OC_User::setUserId(\Test_Encryption_Crypt::TEST_ENCRYPTION_CRYPT_USER1);
$this->userId = \Test_Encryption_Crypt::TEST_ENCRYPTION_CRYPT_USER1;
$this->pass = \Test_Encryption_Crypt::TEST_ENCRYPTION_CRYPT_USER1;
// set content for encrypting / decrypting in tests // set content for encrypting / decrypting in tests
$this->dataLong = file_get_contents(realpath(dirname(__FILE__) . '/../lib/crypt.php')); $this->dataLong = file_get_contents(realpath(dirname(__FILE__) . '/../lib/crypt.php'));
$this->dataShort = 'hats'; $this->dataShort = 'hats';
@ -60,53 +81,29 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$this->view = new \OC_FilesystemView('/'); $this->view = new \OC_FilesystemView('/');
\OC_User::setUserId('admin');
$this->userId = 'admin';
$this->pass = 'admin';
$userHome = \OC_User::getHome($this->userId);
$this->dataDir = str_replace('/' . $this->userId, '', $userHome);
// Filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
// Filesystem related hooks
\OCA\Encryption\Helper::registerUserHooks();
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// remember files_trashbin state // remember files_trashbin state
$this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin'); $this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin');
// we don't want to tests with app files_trashbin enabled // we don't want to tests with app files_trashbin enabled
\OC_App::disable('files_trashbin'); \OC_App::disable('files_trashbin');
\OC_Util::tearDownFS();
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
\OC_Util::setupFS($this->userId);
\OC_User::setUserId($this->userId);
$params['uid'] = $this->userId;
$params['password'] = $this->pass;
OCA\Encryption\Hooks::login($params);
} }
function tearDown() function tearDown() {
{
\OC_FileProxy::clearProxies();
// reset app files_trashbin // reset app files_trashbin
if ($this->stateFilesTrashbin) { if ($this->stateFilesTrashbin) {
OC_App::enable('files_trashbin'); OC_App::enable('files_trashbin');
} else { }
else {
OC_App::disable('files_trashbin'); OC_App::disable('files_trashbin');
} }
} }
function testGenerateKey() public static function tearDownAfterClass() {
{ // cleanup test user
\OC_User::deleteUser(\Test_Encryption_Crypt::TEST_ENCRYPTION_CRYPT_USER1);
}
function testGenerateKey() {
# TODO: use more accurate (larger) string length for test confirmation # TODO: use more accurate (larger) string length for test confirmation
@ -119,8 +116,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
/** /**
* @return String * @return String
*/ */
function testGenerateIv() function testGenerateIv() {
{
$iv = Encryption\Crypt::generateIv(); $iv = Encryption\Crypt::generateIv();
@ -133,8 +129,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
/** /**
* @depends testGenerateIv * @depends testGenerateIv
*/ */
function testConcatIv($iv) function testConcatIv($iv) {
{
$catFile = Encryption\Crypt::concatIv($this->dataLong, $iv); $catFile = Encryption\Crypt::concatIv($this->dataLong, $iv);
@ -157,7 +152,8 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
return array( return array(
'iv' => $iv 'iv' => $iv
, 'catfile' => $catFile ,
'catfile' => $catFile
); );
} }
@ -165,8 +161,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
/** /**
* @depends testConcatIv * @depends testConcatIv
*/ */
function testSplitIv($testConcatIv) function testSplitIv($testConcatIv) {
{
// Split catfile into components // Split catfile into components
$splitCatfile = Encryption\Crypt::splitIv($testConcatIv['catfile']); $splitCatfile = Encryption\Crypt::splitIv($testConcatIv['catfile']);
@ -182,8 +177,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
/** /**
* @return string padded * @return string padded
*/ */
function testAddPadding() function testAddPadding() {
{
$padded = Encryption\Crypt::addPadding($this->dataLong); $padded = Encryption\Crypt::addPadding($this->dataLong);
@ -198,8 +192,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
/** /**
* @depends testAddPadding * @depends testAddPadding
*/ */
function testRemovePadding($padded) function testRemovePadding($padded) {
{
$noPadding = Encryption\Crypt::RemovePadding($padded); $noPadding = Encryption\Crypt::RemovePadding($padded);
@ -207,8 +200,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
} }
function testEncrypt() function testEncrypt() {
{
$random = openssl_random_pseudo_bytes(13); $random = openssl_random_pseudo_bytes(13);
@ -220,8 +212,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
} }
function testDecrypt() function testDecrypt() {
{
$random = openssl_random_pseudo_bytes(13); $random = openssl_random_pseudo_bytes(13);
@ -235,8 +226,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
} }
function testSymmetricEncryptFileContent() function testSymmetricEncryptFileContent() {
{
# TODO: search in keyfile for actual content as IV will ensure this test always passes # TODO: search in keyfile for actual content as IV will ensure this test always passes
@ -251,8 +241,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
} }
function testSymmetricStreamEncryptShortFileContent() function testSymmetricStreamEncryptShortFileContent() {
{
$filename = 'tmp-' . time() . '.test'; $filename = 'tmp-' . time() . '.test';
@ -281,7 +270,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$shareKey = Encryption\Keymanager::getShareKey($this->view, $this->userId, $filename); $shareKey = Encryption\Keymanager::getShareKey($this->view, $this->userId, $filename);
// get session // get session
$session = new Encryption\Session($this->view); $session = new \OCA\Encryption\Session($this->view);
// get private key // get private key
$privateKey = $session->getPrivateKey($this->userId); $privateKey = $session->getPrivateKey($this->userId);
@ -307,8 +296,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
* @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 * @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 * reassembly of its data
*/ */
function testSymmetricStreamEncryptLongFileContent() function testSymmetricStreamEncryptLongFileContent() {
{
// Generate a a random filename // Generate a a random filename
$filename = 'tmp-' . time() . '.test'; $filename = 'tmp-' . time() . '.test';
@ -339,7 +327,14 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
//print_r($r); //print_r($r);
// Join IVs and their respective data chunks // 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[11], $r[12].$r[13], $r[14] ); $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[11], $r[12].$r[13], $r[14] );
//print_r($e); //print_r($e);
@ -350,7 +345,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$shareKey = Encryption\Keymanager::getShareKey($this->view, $this->userId, $filename); $shareKey = Encryption\Keymanager::getShareKey($this->view, $this->userId, $filename);
// get session // get session
$session = new Encryption\Session($this->view); $session = new \OCA\Encryption\Session($this->view);
// get private key // get private key
$privateKey = $session->getPrivateKey($this->userId); $privateKey = $session->getPrivateKey($this->userId);
@ -384,8 +379,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
/** /**
* @brief Test that data that is read by the crypto stream wrapper * @brief Test that data that is read by the crypto stream wrapper
*/ */
function testSymmetricStreamDecryptShortFileContent() function testSymmetricStreamDecryptShortFileContent() {
{
$filename = 'tmp-' . time(); $filename = 'tmp-' . time();
@ -412,8 +406,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$this->view->unlink($this->userId . '/files/' . $filename); $this->view->unlink($this->userId . '/files/' . $filename);
} }
function testSymmetricStreamDecryptLongFileContent() function testSymmetricStreamDecryptLongFileContent() {
{
$filename = 'tmp-' . time(); $filename = 'tmp-' . time();
@ -432,8 +425,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$this->view->unlink($this->userId . '/files/' . $filename); $this->view->unlink($this->userId . '/files/' . $filename);
} }
function testSymmetricEncryptFileContentKeyfile() function testSymmetricEncryptFileContentKeyfile() {
{
# TODO: search in keyfile for actual content as IV will ensure this test always passes # TODO: search in keyfile for actual content as IV will ensure this test always passes
@ -448,8 +440,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
} }
function testIsEncryptedContent() function testIsEncryptedContent() {
{
$this->assertFalse(Encryption\Crypt::isCatfileContent($this->dataUrl)); $this->assertFalse(Encryption\Crypt::isCatfileContent($this->dataUrl));
@ -461,8 +452,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
} }
function testMultiKeyEncrypt() function testMultiKeyEncrypt() {
{
# TODO: search in keyfile for actual content as IV will ensure this test always passes # TODO: search in keyfile for actual content as IV will ensure this test always passes
@ -486,8 +476,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
} }
function testKeyEncrypt() function testKeyEncrypt() {
{
// Generate keypair // Generate keypair
$pair1 = Encryption\Crypt::createKeypair(); $pair1 = Encryption\Crypt::createKeypair();
@ -507,8 +496,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
/** /**
* @brief test encryption using legacy blowfish method * @brief test encryption using legacy blowfish method
*/ */
function testLegacyEncryptShort() function testLegacyEncryptShort() {
{
$crypted = Encryption\Crypt::legacyEncrypt($this->dataShort, $this->pass); $crypted = Encryption\Crypt::legacyEncrypt($this->dataShort, $this->pass);
@ -525,10 +513,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
* @brief test decryption using legacy blowfish method * @brief test decryption using legacy blowfish method
* @depends testLegacyEncryptShort * @depends testLegacyEncryptShort
*/ */
function testLegacyDecryptShort($crypted) function testLegacyDecryptShort($crypted) {
{
$decrypted = Encryption\Crypt::legacyDecrypt($crypted, $this->pass); $decrypted = Encryption\Crypt::legacyBlockDecrypt($crypted, $this->pass);
$this->assertEquals($this->dataShort, $decrypted); $this->assertEquals($this->dataShort, $decrypted);
@ -537,8 +524,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
/** /**
* @brief test encryption using legacy blowfish method * @brief test encryption using legacy blowfish method
*/ */
function testLegacyEncryptLong() function testLegacyEncryptLong() {
{
$crypted = Encryption\Crypt::legacyEncrypt($this->dataLong, $this->pass); $crypted = Encryption\Crypt::legacyEncrypt($this->dataLong, $this->pass);
@ -555,10 +541,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
* @brief test decryption using legacy blowfish method * @brief test decryption using legacy blowfish method
* @depends testLegacyEncryptLong * @depends testLegacyEncryptLong
*/ */
function testLegacyDecryptLong($crypted) function testLegacyDecryptLong($crypted) {
{
$decrypted = Encryption\Crypt::legacyDecrypt($crypted, $this->pass); $decrypted = Encryption\Crypt::legacyBlockDecrypt($crypted, $this->pass);
$this->assertEquals($this->dataLong, $decrypted); $this->assertEquals($this->dataLong, $decrypted);
@ -569,14 +554,13 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
* @brief test generation of legacy encryption key * @brief test generation of legacy encryption key
* @depends testLegacyDecryptShort * @depends testLegacyDecryptShort
*/ */
function testLegacyCreateKey() function testLegacyCreateKey() {
{
// Create encrypted key // Create encrypted key
$encKey = Encryption\Crypt::legacyCreateKey($this->pass); $encKey = Encryption\Crypt::legacyCreateKey($this->pass);
// Decrypt key // Decrypt key
$key = Encryption\Crypt::legacyDecrypt($encKey, $this->pass); $key = Encryption\Crypt::legacyBlockDecrypt($encKey, $this->pass);
$this->assertTrue(is_numeric($key)); $this->assertTrue(is_numeric($key));
@ -589,10 +573,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
* @brief test decryption using legacy blowfish method * @brief test decryption using legacy blowfish method
* @depends testLegacyEncryptLong * @depends testLegacyEncryptLong
*/ */
function testLegacyKeyRecryptKeyfileEncrypt($crypted) function testLegacyKeyRecryptKeyfileEncrypt($crypted) {
{
$recrypted = Encryption\Crypt::LegacyKeyRecryptKeyfile($crypted, $this->pass, array($this->genPublicKey), $this->pass, ''); $recrypted = Encryption\Crypt::LegacyKeyRecryptKeyfile($crypted, $this->pass, array($this->genPublicKey));
$this->assertNotEquals($this->dataLong, $recrypted['data']); $this->assertNotEquals($this->dataLong, $recrypted['data']);
@ -603,8 +586,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
} }
function testRenameFile() function testRenameFile() {
{
$filename = 'tmp-' . time(); $filename = 'tmp-' . time();
@ -632,8 +614,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$view->unlink($newFilename); $view->unlink($newFilename);
} }
function testMoveFileIntoFolder() function testMoveFileIntoFolder() {
{
$filename = 'tmp-' . time(); $filename = 'tmp-' . time();
@ -663,8 +644,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$view->unlink($newFolder); $view->unlink($newFolder);
} }
function testMoveFolder() function testMoveFolder() {
{
$view = new \OC\Files\View('/' . $this->userId . '/files'); $view = new \OC\Files\View('/' . $this->userId . '/files');
@ -696,10 +676,10 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
// tear down // tear down
$view->unlink($newFolder); $view->unlink($newFolder);
$view->unlink('/newfolder');
} }
function testChangePassphrase() function testChangePassphrase() {
{
$filename = 'tmp-' . time(); $filename = 'tmp-' . time();
// Save long data as encrypted file using stream wrapper // Save long data as encrypted file using stream wrapper
@ -733,8 +713,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$view->unlink($filename); $view->unlink($filename);
} }
function testViewFilePutAndGetContents() function testViewFilePutAndGetContents() {
{
$filename = '/tmp-' . time(); $filename = '/tmp-' . time();
$view = new \OC\Files\View('/' . $this->userId . '/files'); $view = new \OC\Files\View('/' . $this->userId . '/files');
@ -765,8 +744,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$view->unlink($filename); $view->unlink($filename);
} }
function testTouchExistingFile() function testTouchExistingFile() {
{
$filename = '/tmp-' . time(); $filename = '/tmp-' . time();
$view = new \OC\Files\View('/' . $this->userId . '/files'); $view = new \OC\Files\View('/' . $this->userId . '/files');
@ -787,8 +765,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$view->unlink($filename); $view->unlink($filename);
} }
function testTouchFile() function testTouchFile() {
{
$filename = '/tmp-' . time(); $filename = '/tmp-' . time();
$view = new \OC\Files\View('/' . $this->userId . '/files'); $view = new \OC\Files\View('/' . $this->userId . '/files');
@ -809,8 +786,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase
$view->unlink($filename); $view->unlink($filename);
} }
function testFopenFile() function testFopenFile() {
{
$filename = '/tmp-' . time(); $filename = '/tmp-' . time();
$view = new \OC\Files\View('/' . $this->userId . '/files'); $view = new \OC\Files\View('/' . $this->userId . '/files');

View File

@ -20,8 +20,7 @@ use OCA\Encryption;
/** /**
* Class Test_Encryption_Keymanager * Class Test_Encryption_Keymanager
*/ */
class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase {
{
public $userId; public $userId;
public $pass; public $pass;
@ -33,14 +32,35 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase
public $randomKey; public $randomKey;
public $dataShort; public $dataShort;
function setUp() public static function setUpBeforeClass() {
{
// reset backend // reset backend
\OC_User::clearBackends(); \OC_User::clearBackends();
\OC_User::useBackend('database'); \OC_User::useBackend('database');
// Filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
// clear and register hooks
\OC_FileProxy::clearProxies();
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// disable file proxy by default
\OC_FileProxy::$enabled = false; \OC_FileProxy::$enabled = false;
// setup filesystem
\OC_Util::tearDownFS();
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
\OC_Util::setupFS('admin');
\OC_User::setUserId('admin');
// login admin
$params['uid'] = 'admin';
$params['password'] = 'admin';
OCA\Encryption\Hooks::login($params);
}
function setUp() {
// set content for encrypting / decrypting in tests // set content for encrypting / decrypting in tests
$this->dataLong = file_get_contents(realpath(dirname(__FILE__) . '/../lib/crypt.php')); $this->dataLong = file_get_contents(realpath(dirname(__FILE__) . '/../lib/crypt.php'));
$this->dataShort = 'hats'; $this->dataShort = 'hats';
@ -62,44 +82,28 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase
$userHome = \OC_User::getHome($this->userId); $userHome = \OC_User::getHome($this->userId);
$this->dataDir = str_replace('/' . $this->userId, '', $userHome); $this->dataDir = str_replace('/' . $this->userId, '', $userHome);
// Filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// remember files_trashbin state // remember files_trashbin state
$this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin'); $this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin');
// we don't want to tests with app files_trashbin enabled // we don't want to tests with app files_trashbin enabled
\OC_App::disable('files_trashbin'); \OC_App::disable('files_trashbin');
\OC_Util::tearDownFS();
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
\OC_Util::setupFS($this->userId);
\OC_User::setUserId($this->userId);
$params['uid'] = $this->userId;
$params['password'] = $this->pass;
OCA\Encryption\Hooks::login($params);
} }
function tearDown() function tearDown() {
{
\OC_FileProxy::$enabled = true;
\OC_FileProxy::clearProxies();
// reset app files_trashbin // reset app files_trashbin
if ($this->stateFilesTrashbin) { if ($this->stateFilesTrashbin) {
OC_App::enable('files_trashbin'); OC_App::enable('files_trashbin');
} else { }
else {
OC_App::disable('files_trashbin'); OC_App::disable('files_trashbin');
} }
} }
function testGetPrivateKey() public static function tearDownAfterClass() {
{ \OC_FileProxy::$enabled = true;
}
function testGetPrivateKey() {
$key = Encryption\Keymanager::getPrivateKey($this->view, $this->userId); $key = Encryption\Keymanager::getPrivateKey($this->view, $this->userId);
@ -115,8 +119,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase
} }
function testGetPublicKey() function testGetPublicKey() {
{
$publiceKey = Encryption\Keymanager::getPublicKey($this->view, $this->userId); $publiceKey = Encryption\Keymanager::getPublicKey($this->view, $this->userId);
@ -129,8 +132,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase
$this->assertArrayHasKey('key', $sslInfo); $this->assertArrayHasKey('key', $sslInfo);
} }
function testSetFileKey() function testSetFileKey() {
{
# NOTE: This cannot be tested until we are able to break out # NOTE: This cannot be tested until we are able to break out
# of the FileSystemView data directory root # of the FileSystemView data directory root
@ -163,8 +165,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase
} }
function testGetUserKeys() function testGetUserKeys() {
{
$keys = Encryption\Keymanager::getUserKeys($this->view, $this->userId); $keys = Encryption\Keymanager::getUserKeys($this->view, $this->userId);
@ -187,8 +188,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase
$this->assertArrayHasKey('key', $sslInfoPrivate); $this->assertArrayHasKey('key', $sslInfoPrivate);
} }
function testFixPartialFilePath() function testFixPartialFilePath() {
{
$partFilename = 'testfile.txt.part'; $partFilename = 'testfile.txt.part';
$filename = 'testfile.txt'; $filename = 'testfile.txt';
@ -202,8 +202,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase
$this->assertEquals('testfile.txt', Encryption\Keymanager::fixPartialFilePath($filename)); $this->assertEquals('testfile.txt', Encryption\Keymanager::fixPartialFilePath($filename));
} }
function testRecursiveDelShareKeys() function testRecursiveDelShareKeys() {
{
// generate filename // generate filename
$filename = '/tmp-' . time() . '.txt'; $filename = '/tmp-' . time() . '.txt';
@ -230,7 +229,8 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase
Encryption\Keymanager::delShareKey($this->view, array('admin'), '/folder1/'); Encryption\Keymanager::delShareKey($this->view, array('admin'), '/folder1/');
// check if share key not exists // check if share key not exists
$this->assertFalse($this->view->file_exists('/admin/files_encryption/share-keys/folder1/subfolder/subsubfolder/' . $filename . '.admin.shareKey')); $this->assertFalse($this->view->file_exists(
'/admin/files_encryption/share-keys/folder1/subfolder/subsubfolder/' . $filename . '.admin.shareKey'));
// enable encryption proxy // enable encryption proxy
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;

View File

@ -1 +1 @@
«ß• tÕ.µ¤—dS@t9 øQJ ð˜¯5–¡‹Ç¡iòë³Zg§ESlÁF=<3D>Àªð

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,7 @@ require_once realpath(dirname(__FILE__) . '/../lib/proxy.php');
require_once realpath(dirname(__FILE__) . '/../lib/stream.php'); require_once realpath(dirname(__FILE__) . '/../lib/stream.php');
require_once realpath(dirname(__FILE__) . '/../lib/util.php'); require_once realpath(dirname(__FILE__) . '/../lib/util.php');
require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); require_once realpath(dirname(__FILE__) . '/../appinfo/app.php');
require_once realpath(dirname(__FILE__) . '/util.php');
use OCA\Encryption; use OCA\Encryption;
@ -34,8 +35,9 @@ use OCA\Encryption;
* Class Test_Encryption_Stream * Class Test_Encryption_Stream
* @brief this class provide basic stream tests * @brief this class provide basic stream tests
*/ */
class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase {
{
const TEST_ENCRYPTION_STREAM_USER1 = "test-stream-user1";
public $userId; public $userId;
public $pass; public $pass;
@ -46,15 +48,27 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase
public $dataShort; public $dataShort;
public $stateFilesTrashbin; public $stateFilesTrashbin;
function setUp() public static function setUpBeforeClass() {
{
// reset backend // reset backend
\OC_User::clearBackends();
\OC_User::useBackend('database'); \OC_User::useBackend('database');
// Filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
// clear and register hooks
\OC_FileProxy::clearProxies();
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// create test user
\Test_Encryption_Util::loginHelper(\Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1, true);
}
function setUp() {
// set user id // set user id
\OC_User::setUserId('admin'); \OC_User::setUserId(\Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1);
$this->userId = 'admin'; $this->userId = \Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1;
$this->pass = 'admin'; $this->pass = \Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1;
// init filesystem view // init filesystem view
$this->view = new \OC_FilesystemView('/'); $this->view = new \OC_FilesystemView('/');
@ -62,42 +76,26 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase
// init short data // init short data
$this->dataShort = 'hats'; $this->dataShort = 'hats';
// init filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
// register encryption file proxy
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// remember files_trashbin state // remember files_trashbin state
$this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin'); $this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin');
// we don't want to tests with app files_trashbin enabled // we don't want to tests with app files_trashbin enabled
\OC_App::disable('files_trashbin'); \OC_App::disable('files_trashbin');
// init filesystem for user
\OC_Util::tearDownFS();
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
\OC_Util::setupFS($this->userId);
\OC_User::setUserId($this->userId);
// login user
$params['uid'] = $this->userId;
$params['password'] = $this->pass;
OCA\Encryption\Hooks::login($params);
} }
function tearDown() function tearDown() {
{
// reset app files_trashbin // reset app files_trashbin
if ($this->stateFilesTrashbin) { if ($this->stateFilesTrashbin) {
OC_App::enable('files_trashbin'); OC_App::enable('files_trashbin');
} else { }
else {
OC_App::disable('files_trashbin'); OC_App::disable('files_trashbin');
} }
}
// clear all proxies public static function tearDownAfterClass() {
\OC_FileProxy::clearProxies(); // cleanup test user
\OC_User::deleteUser(\Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1);
} }
function testStreamOptions() { function testStreamOptions() {
@ -113,7 +111,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase
$handle = $view->fopen($filename, 'r'); $handle = $view->fopen($filename, 'r');
// check if stream is at position zero // check if stream is at position zero
$this->assertEquals(0,ftell($handle)); $this->assertEquals(0, ftell($handle));
// set stream options // set stream options
$this->assertTrue(flock($handle, LOCK_SH)); $this->assertTrue(flock($handle, LOCK_SH));
@ -136,7 +134,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase
$handle = $view->fopen($filename, 'r'); $handle = $view->fopen($filename, 'r');
// set stream options // set stream options
$this->assertTrue(stream_set_blocking($handle,1)); $this->assertTrue(stream_set_blocking($handle, 1));
// tear down // tear down
$view->unlink($filename); $view->unlink($filename);
@ -155,7 +153,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase
$handle = $view->fopen($filename, 'r'); $handle = $view->fopen($filename, 'r');
// set stream options // set stream options
$this->assertFalse(stream_set_timeout($handle,1)); $this->assertFalse(stream_set_timeout($handle, 1));
// tear down // tear down
$view->unlink($filename); $view->unlink($filename);
@ -174,7 +172,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase
$handle = $view->fopen($filename, 'r'); $handle = $view->fopen($filename, 'r');
// set stream options // set stream options
$this->assertEquals(0, stream_set_write_buffer($handle,1024)); $this->assertEquals(0, stream_set_write_buffer($handle, 1024));
// tear down // tear down
$view->unlink($filename); $view->unlink($filename);

View File

@ -28,6 +28,7 @@ require_once realpath(dirname(__FILE__) . '/../lib/stream.php');
require_once realpath(dirname(__FILE__) . '/../lib/util.php'); require_once realpath(dirname(__FILE__) . '/../lib/util.php');
require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); require_once realpath(dirname(__FILE__) . '/../appinfo/app.php');
require_once realpath(dirname(__FILE__) . '/../../files_trashbin/appinfo/app.php'); require_once realpath(dirname(__FILE__) . '/../../files_trashbin/appinfo/app.php');
require_once realpath(dirname(__FILE__) . '/util.php');
use OCA\Encryption; use OCA\Encryption;
@ -35,8 +36,9 @@ use OCA\Encryption;
* Class Test_Encryption_Trashbin * Class Test_Encryption_Trashbin
* @brief this class provide basic trashbin app tests * @brief this class provide basic trashbin app tests
*/ */
class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase {
{
const TEST_ENCRYPTION_TRASHBIN_USER1 = "test-trashbin-user1";
public $userId; public $userId;
public $pass; public $pass;
@ -50,15 +52,33 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase
public $subfolder; public $subfolder;
public $subsubfolder; public $subsubfolder;
function setUp() public static function setUpBeforeClass() {
{
// reset backend // reset backend
\OC_User::clearBackends();
\OC_User::useBackend('database'); \OC_User::useBackend('database');
\OC_Hook::clear('OC_Filesystem');
\OC_Hook::clear('OC_User');
// trashbin hooks
\OCA\Files_Trashbin\Trashbin::registerHooks();
// Filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
// clear and register hooks
\OC_FileProxy::clearProxies();
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// create test user
\Test_Encryption_Util::loginHelper(\Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1, true);
}
function setUp() {
// set user id // set user id
\OC_User::setUserId('admin'); \OC_User::setUserId(\Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1);
$this->userId = 'admin'; $this->userId = \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1;
$this->pass = 'admin'; $this->pass = \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1;
// init filesystem view // init filesystem view
$this->view = new \OC_FilesystemView('/'); $this->view = new \OC_FilesystemView('/');
@ -70,48 +90,26 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase
$this->subfolder = '/subfolder1'; $this->subfolder = '/subfolder1';
$this->subsubfolder = '/subsubfolder1'; $this->subsubfolder = '/subsubfolder1';
\OC_Hook::clear('OC_Filesystem');
\OC_Hook::clear('OC_User');
// init filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
// register encryption file proxy
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// trashbin hooks
\OCA\Files_Trashbin\Trashbin::registerHooks();
// remember files_trashbin state // remember files_trashbin state
$this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin'); $this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin');
// we don't want to tests with app files_trashbin enabled // we want to tests with app files_trashbin enabled
\OC_App::enable('files_trashbin'); \OC_App::enable('files_trashbin');
// init filesystem for user
\OC_Util::tearDownFS();
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
\OC_Util::setupFS($this->userId);
\OC_User::setUserId($this->userId);
// login user
$params['uid'] = $this->userId;
$params['password'] = $this->pass;
OCA\Encryption\Hooks::login($params);
} }
function tearDown() function tearDown() {
{
// reset app files_trashbin // reset app files_trashbin
if ($this->stateFilesTrashbin) { if ($this->stateFilesTrashbin) {
OC_App::enable('files_trashbin'); OC_App::enable('files_trashbin');
} else { }
else {
OC_App::disable('files_trashbin'); OC_App::disable('files_trashbin');
} }
}
// clear all proxies public static function tearDownAfterClass() {
\OC_FileProxy::clearProxies(); // cleanup test user
\OC_User::deleteUser(\Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1);
} }
/** /**
@ -129,30 +127,40 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase
$this->assertTrue(is_int($cryptedFile)); $this->assertTrue(is_int($cryptedFile));
// check if key for admin exists // check if key for admin exists
$this->assertTrue($this->view->file_exists('/admin/files_encryption/keyfiles/' . $filename . '.key')); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' . $filename
. '.key'));
// check if share key for admin exists // check if share key for admin exists
$this->assertTrue($this->view->file_exists('/admin/files_encryption/share-keys/' . $filename . '.admin.shareKey')); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/'
. $filename . '.' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
// delete file // delete file
\OC\FIles\Filesystem::unlink($filename); \OC\FIles\Filesystem::unlink($filename);
// check if file not exists // check if file not exists
$this->assertFalse($this->view->file_exists('/admin/files/' . $filename)); $this->assertFalse($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files/' . $filename));
// check if key for admin not exists // check if key for admin not exists
$this->assertFalse($this->view->file_exists('/admin/files_encryption/keyfiles/' . $filename . '.key')); $this->assertFalse($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' . $filename
. '.key'));
// check if share key for admin not exists // check if share key for admin not exists
$this->assertFalse($this->view->file_exists('/admin/files_encryption/share-keys/' . $filename . '.admin.shareKey')); $this->assertFalse($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/'
. $filename . '.' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
// get files // get files
$trashFiles = $this->view->getDirectoryContent('/admin/files_trashbin/files/'); $trashFiles = $this->view->getDirectoryContent(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/files/');
$trashFileSuffix = null; $trashFileSuffix = null;
// find created file with timestamp // find created file with timestamp
foreach($trashFiles as $file) { foreach ($trashFiles as $file) {
if(strncmp($file['path'], $filename, strlen($filename))) { if (strncmp($file['path'], $filename, strlen($filename))) {
$path_parts = pathinfo($file['name']); $path_parts = pathinfo($file['name']);
$trashFileSuffix = $path_parts['extension']; $trashFileSuffix = $path_parts['extension'];
} }
@ -162,10 +170,14 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase
$this->assertNotNull($trashFileSuffix); $this->assertNotNull($trashFileSuffix);
// check if key for admin not exists // check if key for admin not exists
$this->assertTrue($this->view->file_exists('/admin/files_trashbin/keyfiles/' . $filename . '.key.' . $trashFileSuffix)); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keyfiles/' . $filename
. '.key.' . $trashFileSuffix));
// check if share key for admin not exists // check if share key for admin not exists
$this->assertTrue($this->view->file_exists('/admin/files_trashbin/share-keys/' . $filename . '.admin.shareKey.' . $trashFileSuffix)); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/share-keys/' . $filename
. '.' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey.' . $trashFileSuffix));
// return filename for next test // return filename for next test
return $filename . '.' . $trashFileSuffix; return $filename . '.' . $trashFileSuffix;
@ -182,19 +194,24 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase
$path_parts = pathinfo($filename); $path_parts = pathinfo($filename);
$trashFileSuffix = $path_parts['extension']; $trashFileSuffix = $path_parts['extension'];
$timestamp = str_replace('d', '', $trashFileSuffix); $timestamp = str_replace('d', '', $trashFileSuffix);
$fileNameWithoutSuffix = str_replace('.'.$trashFileSuffix, '', $filename); $fileNameWithoutSuffix = str_replace('.' . $trashFileSuffix, '', $filename);
// restore file // restore file
$this->assertTrue(\OCA\Files_Trashbin\Trashbin::restore($filename, $fileNameWithoutSuffix, $timestamp)); $this->assertTrue(\OCA\Files_Trashbin\Trashbin::restore($filename, $fileNameWithoutSuffix, $timestamp));
// check if file exists // check if file exists
$this->assertTrue($this->view->file_exists('/admin/files/' . $fileNameWithoutSuffix)); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files/' . $fileNameWithoutSuffix));
// check if key for admin exists // check if key for admin exists
$this->assertTrue($this->view->file_exists('/admin/files_encryption/keyfiles/' . $fileNameWithoutSuffix . '.key')); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/'
. $fileNameWithoutSuffix . '.key'));
// check if share key for admin exists // check if share key for admin exists
$this->assertTrue($this->view->file_exists('/admin/files_encryption/share-keys/' . $fileNameWithoutSuffix . '.admin.shareKey')); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/'
. $fileNameWithoutSuffix . '.' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
} }
/** /**
@ -212,44 +229,51 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase
$this->assertTrue(is_int($cryptedFile)); $this->assertTrue(is_int($cryptedFile));
// check if key for admin exists // check if key for admin exists
$this->assertTrue($this->view->file_exists('/admin/files_encryption/keyfiles/' . $filename . '.key')); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' . $filename
. '.key'));
// check if share key for admin exists // check if share key for admin exists
$this->assertTrue($this->view->file_exists('/admin/files_encryption/share-keys/' . $filename . '.admin.shareKey')); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/'
. $filename . '.' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
// delete file // delete file
\OC\FIles\Filesystem::unlink($filename); \OC\FIles\Filesystem::unlink($filename);
// check if file not exists // check if file not exists
$this->assertFalse($this->view->file_exists('/admin/files/' . $filename)); $this->assertFalse($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files/' . $filename));
// check if key for admin not exists // check if key for admin not exists
$this->assertFalse($this->view->file_exists('/admin/files_encryption/keyfiles/' . $filename . '.key')); $this->assertFalse($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' . $filename
. '.key'));
// check if share key for admin not exists // check if share key for admin not exists
$this->assertFalse($this->view->file_exists('/admin/files_encryption/share-keys/' . $filename . '.admin.shareKey')); $this->assertFalse($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/'
. $filename . '.' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey'));
// get files
$trashFiles = $this->view->getDirectoryContent('/admin/files_trashbin/files/');
$trashFileSuffix = null;
// find created file with timestamp // find created file with timestamp
foreach($trashFiles as $file) { $query = \OC_DB::prepare('SELECT `timestamp`,`type` FROM `*PREFIX*files_trash`'
if(strncmp($file['name'], $filename, strlen($filename)) == 0) { . ' WHERE `id`=?');
$path_parts = pathinfo($file['name']); $result = $query->execute(array($filename))->fetchRow();
$trashFileSuffix = $path_parts['extension'];
break;
}
}
// check if we found the file we created $this->assertTrue(is_array($result));
$this->assertNotNull($trashFileSuffix);
// build suffix
$trashFileSuffix = 'd' . $result['timestamp'];
// check if key for admin exists // check if key for admin exists
$this->assertTrue($this->view->file_exists('/admin/files_trashbin/keyfiles/' . $filename . '.key.' . $trashFileSuffix)); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keyfiles/' . $filename
. '.key.' . $trashFileSuffix));
// check if share key for admin exists // check if share key for admin exists
$this->assertTrue($this->view->file_exists('/admin/files_trashbin/share-keys/' . $filename . '.admin.shareKey.' . $trashFileSuffix)); $this->assertTrue($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/share-keys/' . $filename
. '.' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey.' . $trashFileSuffix));
// get timestamp from file // get timestamp from file
$timestamp = str_replace('d', '', $trashFileSuffix); $timestamp = str_replace('d', '', $trashFileSuffix);
@ -258,13 +282,19 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase
$this->assertGreaterThan(0, \OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp)); $this->assertGreaterThan(0, \OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp));
// check if key for admin not exists // check if key for admin not exists
$this->assertFalse($this->view->file_exists('/admin/files_trashbin/files/' . $filename . '.' . $trashFileSuffix)); $this->assertFalse($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/files/' . $filename . '.'
. $trashFileSuffix));
// check if key for admin not exists // check if key for admin not exists
$this->assertFalse($this->view->file_exists('/admin/files_trashbin/keyfiles/' . $filename . '.key.' . $trashFileSuffix)); $this->assertFalse($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keyfiles/' . $filename
. '.key.' . $trashFileSuffix));
// check if share key for admin not exists // check if share key for admin not exists
$this->assertFalse($this->view->file_exists('/admin/files_trashbin/share-keys/' . $filename . '.admin.shareKey.' . $trashFileSuffix)); $this->assertFalse($this->view->file_exists(
'/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/share-keys/' . $filename
. '.' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey.' . $trashFileSuffix));
} }
} }

View File

@ -19,8 +19,10 @@ use OCA\Encryption;
/** /**
* Class Test_Encryption_Util * Class Test_Encryption_Util
*/ */
class Test_Encryption_Util extends \PHPUnit_Framework_TestCase class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
{
const TEST_ENCRYPTION_UTIL_USER1 = "test-util-user1";
const TEST_ENCRYPTION_UTIL_LEGACY_USER = "test-legacy-user";
public $userId; public $userId;
public $encryptionDir; public $encryptionDir;
@ -40,16 +42,31 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase
public $dataShort; public $dataShort;
public $legacyEncryptedData; public $legacyEncryptedData;
public $legacyEncryptedDataKey; public $legacyEncryptedDataKey;
public $lagacyKey; public $legacyKey;
public $stateFilesTrashbin;
function setUp() public static function setUpBeforeClass() {
{
// reset backend // reset backend
\OC_User::clearBackends();
\OC_User::useBackend('database'); \OC_User::useBackend('database');
\OC_User::setUserId('admin'); // Filesystem related hooks
$this->userId = 'admin'; \OCA\Encryption\Helper::registerFilesystemHooks();
$this->pass = 'admin';
// clear and register hooks
\OC_FileProxy::clearProxies();
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// create test user
\Test_Encryption_Util::loginHelper(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1, true);
\Test_Encryption_Util::loginHelper(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER, true);
}
function setUp() {
\OC_User::setUserId(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1);
$this->userId = \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1;
$this->pass = \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1;
// set content for encrypting / decrypting in tests // set content for encrypting / decrypting in tests
$this->dataUrl = realpath(dirname(__FILE__) . '/../lib/crypt.php'); $this->dataUrl = realpath(dirname(__FILE__) . '/../lib/crypt.php');
@ -58,7 +75,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase
$this->legacyData = realpath(dirname(__FILE__) . '/legacy-text.txt'); $this->legacyData = realpath(dirname(__FILE__) . '/legacy-text.txt');
$this->legacyEncryptedData = realpath(dirname(__FILE__) . '/legacy-encrypted-text.txt'); $this->legacyEncryptedData = realpath(dirname(__FILE__) . '/legacy-encrypted-text.txt');
$this->legacyEncryptedDataKey = realpath(dirname(__FILE__) . '/encryption.key'); $this->legacyEncryptedDataKey = realpath(dirname(__FILE__) . '/encryption.key');
$this->lagacyKey = '62829813025828180801'; $this->legacyKey = '30943623843030686906';
$keypair = Encryption\Crypt::createKeypair(); $keypair = Encryption\Crypt::createKeypair();
@ -68,43 +85,42 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase
$this->publicKeyDir = '/' . 'public-keys'; $this->publicKeyDir = '/' . 'public-keys';
$this->encryptionDir = '/' . $this->userId . '/' . 'files_encryption'; $this->encryptionDir = '/' . $this->userId . '/' . 'files_encryption';
$this->keyfilesPath = $this->encryptionDir . '/' . 'keyfiles'; $this->keyfilesPath = $this->encryptionDir . '/' . 'keyfiles';
$this->publicKeyPath = $this->publicKeyDir . '/' . $this->userId . '.public.key'; // e.g. data/public-keys/admin.public.key $this->publicKeyPath =
$this->privateKeyPath = $this->encryptionDir . '/' . $this->userId . '.private.key'; // e.g. data/admin/admin.private.key $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('/'); $this->view = new \OC_FilesystemView('/');
$userHome = \OC_User::getHome($this->userId);
$this->dataDir = str_replace('/' . $this->userId, '', $userHome);
// Filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
\OC_FileProxy::register(new OCA\Encryption\Proxy());
\OC_Util::tearDownFS();
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
\OC_Util::setupFS($this->userId);
\OC_User::setUserId($this->userId);
$params['uid'] = $this->userId;
$params['password'] = $this->pass;
OCA\Encryption\Hooks::login($params);
$this->util = new Encryption\Util($this->view, $this->userId); $this->util = new Encryption\Util($this->view, $this->userId);
// remember files_trashbin state
$this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin');
// we don't want to tests with app files_trashbin enabled
\OC_App::disable('files_trashbin');
} }
function tearDown() function tearDown() {
{ // reset app files_trashbin
if ($this->stateFilesTrashbin) {
OC_App::enable('files_trashbin');
}
else {
OC_App::disable('files_trashbin');
}
}
\OC_FileProxy::clearProxies(); public static function tearDownAfterClass() {
// cleanup test user
\OC_User::deleteUser(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1);
\OC_User::deleteUser(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER);
} }
/** /**
* @brief test that paths set during User construction are correct * @brief test that paths set during User construction are correct
*/ */
function testKeyPaths() function testKeyPaths() {
{
$util = new Encryption\Util($this->view, $this->userId); $util = new Encryption\Util($this->view, $this->userId);
$this->assertEquals($this->publicKeyDir, $util->getPath('publicKeyDir')); $this->assertEquals($this->publicKeyDir, $util->getPath('publicKeyDir'));
@ -118,39 +134,37 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase
/** /**
* @brief test setup of encryption directories * @brief test setup of encryption directories
*/ */
function testSetupServerSide() function testSetupServerSide() {
{
$this->assertEquals(true, $this->util->setupServerSide($this->pass)); $this->assertEquals(true, $this->util->setupServerSide($this->pass));
} }
/** /**
* @brief test checking whether account is ready for encryption, * @brief test checking whether account is ready for encryption,
*/ */
function testUserIsReady() function testUserIsReady() {
{
$this->assertEquals(true, $this->util->ready()); $this->assertEquals(true, $this->util->ready());
} }
/** /**
* @brief test checking whether account is not ready for encryption, * @brief test checking whether account is not ready for encryption,
*/ */
function testUserIsNotReady() // function testUserIsNotReady() {
{ // $this->view->unlink($this->publicKeyDir);
$this->view->unlink($this->publicKeyDir); //
// $params['uid'] = $this->userId;
$params['uid'] = $this->userId; // $params['password'] = $this->pass;
$params['password'] = $this->pass; // $this->assertFalse(OCA\Encryption\Hooks::login($params));
$this->assertFalse(OCA\Encryption\Hooks::login($params)); //
// $this->view->unlink($this->privateKeyPath);
$this->view->unlink($this->privateKeyPath); // }
}
/** /**
* @brief test checking whether account is not ready for encryption, * @brief test checking whether account is not ready for encryption,
*/ */
function testIsLagacyUser() function testIsLegacyUser() {
{ \Test_Encryption_Util::loginHelper(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER);
$userView = new \OC_FilesystemView( '/' . $this->userId );
$userView = new \OC_FilesystemView('/' . \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER);
// Disable encryption proxy to prevent recursive calls // Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
@ -161,19 +175,18 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
$params['uid'] = $this->userId; $params['uid'] = \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER;
$params['password'] = $this->pass; $params['password'] = \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER;
$util = new Encryption\Util($this->view, $this->userId); $util = new Encryption\Util($this->view, \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER);
$util->setMigrationStatus(0); $util->setMigrationStatus(0);
$this->assertTrue(OCA\Encryption\Hooks::login($params)); $this->assertTrue(OCA\Encryption\Hooks::login($params));
$this->assertEquals($this->lagacyKey, $_SESSION['legacyKey']); $this->assertEquals($this->legacyKey, \OC::$session->get('legacyKey'));
} }
function testRecoveryEnabledForUser() function testRecoveryEnabledForUser() {
{
$util = new Encryption\Util($this->view, $this->userId); $util = new Encryption\Util($this->view, $this->userId);
@ -193,10 +206,9 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase
} }
function testGetUidAndFilename() function testGetUidAndFilename() {
{
\OC_User::setUserId('admin'); \OC_User::setUserId(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1);
$filename = 'tmp-' . time() . '.test'; $filename = 'tmp-' . time() . '.test';
@ -213,9 +225,11 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase
list($fileOwnerUid, $file) = $util->getUidAndFilename($filename); list($fileOwnerUid, $file) = $util->getUidAndFilename($filename);
$this->assertEquals('admin', $fileOwnerUid); $this->assertEquals(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1, $fileOwnerUid);
$this->assertEquals($file, $filename); $this->assertEquals($file, $filename);
$this->view->unlink($this->userId . '/files/' . $filename);
} }
function testIsSharedPath() { function testIsSharedPath() {
@ -227,10 +241,11 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase
$this->assertFalse($this->util->isSharedPath($path)); $this->assertFalse($this->util->isSharedPath($path));
} }
function testEncryptLagacyFiles() function testEncryptLegacyFiles() {
{ \Test_Encryption_Util::loginHelper(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER);
$userView = new \OC_FilesystemView( '/' . $this->userId);
$view = new \OC_FilesystemView( '/' . $this->userId . '/files' ); $userView = new \OC_FilesystemView('/' . \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER);
$view = new \OC_FilesystemView('/' . \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER . '/files');
// Disable encryption proxy to prevent recursive calls // Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
@ -250,23 +265,23 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase
\OC_FileProxy::$enabled = $proxyStatus; \OC_FileProxy::$enabled = $proxyStatus;
$params['uid'] = $this->userId; $params['uid'] = \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER;
$params['password'] = $this->pass; $params['password'] = \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER;
$util = new Encryption\Util($this->view, $this->userId); $util = new Encryption\Util($this->view, \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER);
$util->setMigrationStatus(0); $util->setMigrationStatus(0);
$this->assertTrue(OCA\Encryption\Hooks::login($params)); $this->assertTrue(OCA\Encryption\Hooks::login($params));
$this->assertEquals($this->lagacyKey, $_SESSION['legacyKey']); $this->assertEquals($this->legacyKey, \OC::$session->get('legacyKey'));
$files = $util->findEncFiles('/' . $this->userId . '/files/'); $files = $util->findEncFiles('/' . \Test_Encryption_Util::TEST_ENCRYPTION_UTIL_LEGACY_USER . '/files/');
$this->assertTrue(is_array($files)); $this->assertTrue(is_array($files));
$found = false; $found = false;
foreach($files['encrypted'] as $encryptedFile) { foreach ($files['encrypted'] as $encryptedFile) {
if($encryptedFile['name'] === 'legacy-encrypted-text.txt') { if ($encryptedFile['name'] === 'legacy-encrypted-text.txt') {
$found = true; $found = true;
break; break;
} }
@ -274,4 +289,29 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase
$this->assertTrue($found); $this->assertTrue($found);
} }
/**
* @param $user
* @param bool $create
* @param bool $password
*/
public static function loginHelper($user, $create = false, $password = false) {
if ($create) {
\OC_User::createUser($user, $user);
}
if ($password === false) {
$password = $user;
}
\OC_Util::tearDownFS();
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
\OC_Util::setupFS($user);
\OC_User::setUserId($user);
$params['uid'] = $user;
$params['password'] = $password;
OCA\Encryption\Hooks::login($params);
}
} }

View File

@ -27,6 +27,7 @@ require_once realpath(dirname(__FILE__) . '/../lib/proxy.php');
require_once realpath(dirname(__FILE__) . '/../lib/stream.php'); require_once realpath(dirname(__FILE__) . '/../lib/stream.php');
require_once realpath(dirname(__FILE__) . '/../lib/util.php'); require_once realpath(dirname(__FILE__) . '/../lib/util.php');
require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); require_once realpath(dirname(__FILE__) . '/../appinfo/app.php');
require_once realpath(dirname(__FILE__) . '/util.php');
use OCA\Encryption; use OCA\Encryption;
@ -34,8 +35,9 @@ use OCA\Encryption;
* Class Test_Encryption_Webdav * Class Test_Encryption_Webdav
* @brief this class provide basic webdav tests for PUT,GET and DELETE * @brief this class provide basic webdav tests for PUT,GET and DELETE
*/ */
class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase {
{
const TEST_ENCRYPTION_WEBDAV_USER1 = "test-webdav-user1";
public $userId; public $userId;
public $pass; public $pass;
@ -46,15 +48,33 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase
public $dataShort; public $dataShort;
public $stateFilesTrashbin; public $stateFilesTrashbin;
function setUp() public static function setUpBeforeClass() {
{ // reset backend
\OC_User::clearBackends();
\OC_User::useBackend('database');
// Filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
// Filesystem related hooks
\OCA\Encryption\Helper::registerUserHooks();
// clear and register hooks
\OC_FileProxy::clearProxies();
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// create test user
\Test_Encryption_Util::loginHelper(\Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1, true);
}
function setUp() {
// reset backend // reset backend
\OC_User::useBackend('database'); \OC_User::useBackend('database');
// set user id // set user id
\OC_User::setUserId('admin'); \OC_User::setUserId(\Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1);
$this->userId = 'admin'; $this->userId = \Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1;
$this->pass = 'admin'; $this->pass = \Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1;
// init filesystem view // init filesystem view
$this->view = new \OC_FilesystemView('/'); $this->view = new \OC_FilesystemView('/');
@ -62,42 +82,29 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase
// init short data // init short data
$this->dataShort = 'hats'; $this->dataShort = 'hats';
// init filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
// register encryption file proxy
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// remember files_trashbin state // remember files_trashbin state
$this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin'); $this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin');
// we don't want to tests with app files_trashbin enabled // we don't want to tests with app files_trashbin enabled
\OC_App::disable('files_trashbin'); \OC_App::disable('files_trashbin');
// init filesystem for user // create test user
\OC_Util::tearDownFS(); \Test_Encryption_Util::loginHelper(\Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1);
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
\OC_Util::setupFS($this->userId);
\OC_User::setUserId($this->userId);
// login user
$params['uid'] = $this->userId;
$params['password'] = $this->pass;
OCA\Encryption\Hooks::login($params);
} }
function tearDown() function tearDown() {
{
// reset app files_trashbin // reset app files_trashbin
if ($this->stateFilesTrashbin) { if ($this->stateFilesTrashbin) {
OC_App::enable('files_trashbin'); OC_App::enable('files_trashbin');
} else { }
else {
OC_App::disable('files_trashbin'); OC_App::disable('files_trashbin');
} }
}
// clear all proxies public static function tearDownAfterClass() {
\OC_FileProxy::clearProxies(); // cleanup test user
\OC_User::deleteUser(\Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1);
} }
/** /**
@ -113,7 +120,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase
$_SERVER['REQUEST_METHOD'] = 'PUT'; $_SERVER['REQUEST_METHOD'] = 'PUT';
$_SERVER['REQUEST_URI'] = '/remote.php/webdav' . $filename; $_SERVER['REQUEST_URI'] = '/remote.php/webdav' . $filename;
$_SERVER['HTTP_AUTHORIZATION'] = 'Basic YWRtaW46YWRtaW4='; $_SERVER['HTTP_AUTHORIZATION'] = 'Basic dGVzdC13ZWJkYXYtdXNlcjE6dGVzdC13ZWJkYXYtdXNlcjE=';
$_SERVER['CONTENT_TYPE'] = 'application/octet-stream'; $_SERVER['CONTENT_TYPE'] = 'application/octet-stream';
$_SERVER['PATH_INFO'] = '/webdav' . $filename; $_SERVER['PATH_INFO'] = '/webdav' . $filename;
$_SERVER['CONTENT_LENGTH'] = strlen($this->dataShort); $_SERVER['CONTENT_LENGTH'] = strlen($this->dataShort);
@ -125,10 +132,12 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase
$this->assertTrue($this->view->file_exists('/' . $this->userId . '/files' . $filename)); $this->assertTrue($this->view->file_exists('/' . $this->userId . '/files' . $filename));
// check if key-file was created // check if key-file was created
$this->assertTrue($this->view->file_exists('/' . $this->userId . '/files_encryption/keyfiles/' . $filename . '.key')); $this->assertTrue($this->view->file_exists(
'/' . $this->userId . '/files_encryption/keyfiles/' . $filename . '.key'));
// check if shareKey-file was created // check if shareKey-file was created
$this->assertTrue($this->view->file_exists('/' . $this->userId . '/files_encryption/share-keys/' . $filename . '.' . $this->userId . '.shareKey')); $this->assertTrue($this->view->file_exists(
'/' . $this->userId . '/files_encryption/share-keys/' . $filename . '.' . $this->userId . '.shareKey'));
// disable encryption proxy to prevent recursive calls // disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled; $proxyStatus = \OC_FileProxy::$enabled;
@ -163,7 +172,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase
// set server vars // set server vars
$_SERVER['REQUEST_METHOD'] = 'GET'; $_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['REQUEST_URI'] = '/remote.php/webdav' . $filename; $_SERVER['REQUEST_URI'] = '/remote.php/webdav' . $filename;
$_SERVER['HTTP_AUTHORIZATION'] = 'Basic YWRtaW46YWRtaW4='; $_SERVER['HTTP_AUTHORIZATION'] = 'Basic dGVzdC13ZWJkYXYtdXNlcjE6dGVzdC13ZWJkYXYtdXNlcjE=';
$_SERVER['PATH_INFO'] = '/webdav' . $filename; $_SERVER['PATH_INFO'] = '/webdav' . $filename;
// handle webdav request // handle webdav request
@ -184,7 +193,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase
// set server vars // set server vars
$_SERVER['REQUEST_METHOD'] = 'DELETE'; $_SERVER['REQUEST_METHOD'] = 'DELETE';
$_SERVER['REQUEST_URI'] = '/remote.php/webdav' . $filename; $_SERVER['REQUEST_URI'] = '/remote.php/webdav' . $filename;
$_SERVER['HTTP_AUTHORIZATION'] = 'Basic YWRtaW46YWRtaW4='; $_SERVER['HTTP_AUTHORIZATION'] = 'Basic dGVzdC13ZWJkYXYtdXNlcjE6dGVzdC13ZWJkYXYtdXNlcjE=';
$_SERVER['PATH_INFO'] = '/webdav' . $filename; $_SERVER['PATH_INFO'] = '/webdav' . $filename;
// handle webdav request // handle webdav request
@ -194,10 +203,12 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase
$this->assertFalse($this->view->file_exists('/' . $this->userId . '/files' . $filename)); $this->assertFalse($this->view->file_exists('/' . $this->userId . '/files' . $filename));
// check if key-file was removed // check if key-file was removed
$this->assertFalse($this->view->file_exists('/' . $this->userId . '/files_encryption/keyfiles' . $filename . '.key')); $this->assertFalse($this->view->file_exists(
'/' . $this->userId . '/files_encryption/keyfiles' . $filename . '.key'));
// check if shareKey-file was removed // check if shareKey-file was removed
$this->assertFalse($this->view->file_exists('/' . $this->userId . '/files_encryption/share-keys' . $filename . '.' . $this->userId . '.shareKey')); $this->assertFalse($this->view->file_exists(
'/' . $this->userId . '/files_encryption/share-keys' . $filename . '.' . $this->userId . '.shareKey'));
} }
/** /**
@ -229,7 +240,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase
$server->addPlugin(new OC_Connector_Sabre_MaintenancePlugin()); $server->addPlugin(new OC_Connector_Sabre_MaintenancePlugin());
// And off we go! // And off we go!
if($body) { if ($body) {
$server->httpRequest->setBody($body); $server->httpRequest->setBody($body);
} }

View File

@ -70,6 +70,28 @@ class Shared_Permissions extends Permissions {
return $filePermissions; return $filePermissions;
} }
/**
* get the permissions for all files in a folder
*
* @param int $parentId
* @param string $user
* @return int[]
*/
public function getDirectoryPermissions($parentId, $user) {
// Root of the Shared folder
if ($parentId === -1) {
return \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_PERMISSIONS);
}
$permissions = $this->get($parentId, $user);
$query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `parent` = ?');
$result = $query->execute(array($parentId));
$filePermissions = array();
while ($row = $result->fetchRow()) {
$filePermissions[$row['fileid']] = $permissions;
}
return $filePermissions;
}
/** /**
* remove the permissions for a file * remove the permissions for a file
* *
@ -83,4 +105,5 @@ class Shared_Permissions extends Permissions {
public function removeMultiple($fileIds, $user) { public function removeMultiple($fileIds, $user) {
// Not a valid action for Shared Permissions // Not a valid action for Shared Permissions
} }
} }

View File

@ -26,6 +26,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
const FORMAT_FILE_APP_ROOT = 2; const FORMAT_FILE_APP_ROOT = 2;
const FORMAT_OPENDIR = 3; const FORMAT_OPENDIR = 3;
const FORMAT_GET_ALL = 4; const FORMAT_GET_ALL = 4;
const FORMAT_PERMISSIONS = 5;
private $path; private $path;
@ -125,6 +126,12 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
$ids[] = $item['file_source']; $ids[] = $item['file_source'];
} }
return $ids; return $ids;
} else if ($format === self::FORMAT_PERMISSIONS) {
$filePermissions = array();
foreach ($items as $item) {
$filePermissions[$item['file_source']] = $item['permissions'];
}
return $filePermissions;
} }
return array(); return array();
} }

View File

@ -84,7 +84,7 @@ if (isset($path)) {
exit(); exit();
} else { } else {
// Save item id in session for future requests // Save item id in session for future requests
$_SESSION['public_link_authenticated'] = $linkItem['id']; \OC::$session->set('public_link_authenticated', $linkItem['id']);
} }
} else { } else {
OCP\Util::writeLog('share', 'Unknown share type '.$linkItem['share_type'] OCP\Util::writeLog('share', 'Unknown share type '.$linkItem['share_type']
@ -97,8 +97,8 @@ if (isset($path)) {
} else { } else {
// Check if item id is set in session // Check if item id is set in session
if (!isset($_SESSION['public_link_authenticated']) if ( ! \OC::$session->exists('public_link_authenticated')
|| $_SESSION['public_link_authenticated'] !== $linkItem['id'] || \OC::$session->get('public_link_authenticated') !== $linkItem['id']
) { ) {
// Prompt for password // Prompt for password
$tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest');

View File

@ -93,6 +93,7 @@ $(document).ready(function() {
}); });
$('.undelete').click('click',function(event) { $('.undelete').click('click',function(event) {
event.preventDefault();
var spinner = '<img class="move2trash" title="'+t('files_trashbin', 'perform restore operation')+'" src="'+ OC.imagePath('core', 'loader.gif') +'"></a>'; var spinner = '<img class="move2trash" title="'+t('files_trashbin', 'perform restore operation')+'" src="'+ OC.imagePath('core', 'loader.gif') +'"></a>';
var files=getSelectedFiles('file'); var files=getSelectedFiles('file');
var fileslist = JSON.stringify(files); var fileslist = JSON.stringify(files);
@ -117,6 +118,7 @@ $(document).ready(function() {
}); });
$('.delete').click('click',function(event) { $('.delete').click('click',function(event) {
event.preventDefault();
console.log("delete selected"); console.log("delete selected");
var spinner = '<img class="move2trash" title="'+t('files_trashbin', 'Delete permanently')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>'; var spinner = '<img class="move2trash" title="'+t('files_trashbin', 'Delete permanently')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>';
var files=getSelectedFiles('file'); var files=getSelectedFiles('file');

View File

@ -79,6 +79,8 @@
"Override UUID detection" => "Zastąp wykrywanie UUID", "Override UUID detection" => "Zastąp wykrywanie UUID",
"UUID Attribute:" => "Atrybuty UUID:", "UUID Attribute:" => "Atrybuty UUID:",
"Username-LDAP User Mapping" => "Mapowanie użytkownika LDAP", "Username-LDAP User Mapping" => "Mapowanie użytkownika LDAP",
"Clear Username-LDAP User Mapping" => "Czyść Mapowanie użytkownika LDAP",
"Clear Groupname-LDAP Group Mapping" => "Czyść Mapowanie nazwy grupy LDAP",
"Test Configuration" => "Konfiguracja testowa", "Test Configuration" => "Konfiguracja testowa",
"Help" => "Pomoc" "Help" => "Pomoc"
); );

View File

@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Failed to clear the mappings." => "Nepodarilo sa vymazať mapovania.",
"Failed to delete the server configuration" => "Zlyhalo zmazanie nastavenia servera.", "Failed to delete the server configuration" => "Zlyhalo zmazanie nastavenia servera.",
"The configuration is valid and the connection could be established!" => "Nastavenie je v poriadku a pripojenie je stabilné.", "The configuration is valid and the connection could be established!" => "Nastavenie je v poriadku a pripojenie je stabilné.",
"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Nastavenie je v poriadku, ale pripojenie zlyhalo. Skontrolujte nastavenia servera a prihlasovacie údaje.", "The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Nastavenie je v poriadku, ale pripojenie zlyhalo. Skontrolujte nastavenia servera a prihlasovacie údaje.",
@ -7,6 +8,7 @@
"Take over settings from recent server configuration?" => "Prebrať nastavenia z nedávneho nastavenia servera?", "Take over settings from recent server configuration?" => "Prebrať nastavenia z nedávneho nastavenia servera?",
"Keep settings?" => "Ponechať nastavenia?", "Keep settings?" => "Ponechať nastavenia?",
"Cannot add server configuration" => "Nemožno pridať nastavenie servera", "Cannot add server configuration" => "Nemožno pridať nastavenie servera",
"mappings cleared" => "mapovanie vymazané",
"Success" => "Úspešné", "Success" => "Úspešné",
"Error" => "Chyba", "Error" => "Chyba",
"Connection test succeeded" => "Test pripojenia bol úspešný", "Connection test succeeded" => "Test pripojenia bol úspešný",
@ -72,6 +74,11 @@
"Email Field" => "Pole email", "Email Field" => "Pole email",
"User Home Folder Naming Rule" => "Pravidlo pre nastavenie mena používateľského priečinka dát", "User Home Folder Naming Rule" => "Pravidlo pre nastavenie mena používateľského priečinka dát",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Nechajte prázdne pre používateľské meno (predvolené). Inak uveďte atribút LDAP/AD.", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Nechajte prázdne pre používateľské meno (predvolené). Inak uveďte atribút LDAP/AD.",
"Internal Username" => "Interné používateľské meno",
"By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder in ownCloud. It is also a port of remote URLs, for instance for all *DAV services. With this setting, the default behaviour can be overriden. To achieve a similar behaviour as before ownCloud 5 enter the user display name attribute in the following field. Leave it empty for default behaviour. Changes will have effect only on newly mapped (added) LDAP users." => "V predvolenom nastavení bude interné používateľské meno vytvorené z UUID atribútu. Zabezpečí sa to, že používateľské meno bude jedinečné a znaky nemusia byť prevedené. Interné meno má obmedzenie, iba tieto znaky sú povolené: [a-zA-Z0-9_ @ -.]. Ostatné znaky sú nahradené ich ASCII alebo jednoducho vynechané. Pri kolíziách bude číslo byť pridané / odobrané. Interné používateľské meno sa používa na identifikáciu používateľa interne. Je to tiež predvolený názov používateľského domovského priečinka v ownCloud. To je tiež port vzdialeného URL, napríklad pre všetky služby * DAV. S týmto nastavením sa dá prepísať predvolené správanie. Pre dosiahnutie podobného správania sa ako pred ownCloud 5 zadajte atribút zobrazenia používateľského mena v tomto poli. Ponechajte prázdne pre predvolené správanie. Zmeny budú mať vplyv iba na novo mapovaných (pridaných) LDAP používateľov.",
"Internal Username Attribute:" => "Atribút interného používateľského mena:",
"Override UUID detection" => "Prepísať UUID detekciu",
"UUID Attribute:" => "UUID atribút:",
"Test Configuration" => "Test nastavenia", "Test Configuration" => "Test nastavenia",
"Help" => "Pomoc" "Help" => "Pomoc"
); );

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -1,109 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="22" width="22" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs>
<svg <linearGradient id="a" y2="45.69" gradientUnits="userSpaceOnUse" x2="24.139" gradientTransform="matrix(.53994 0 0 .53668 -1.7557 -1.7859)" y1="6.5317" x1="24.139">
xmlns:dc="http://purl.org/dc/elements/1.1/" <stop stop-color="#fff" offset="0"/>
xmlns:cc="http://creativecommons.org/ns#" <stop stop-color="#fff" stop-opacity="0" offset="1"/>
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="22"
height="22"
id="svg2406"
inkscape:version="0.48.2 r9819"
sodipodi:docname="add.svg">
<metadata
id="metadata3125">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview3123"
showgrid="false"
inkscape:zoom="10.727273"
inkscape:cx="11.843286"
inkscape:cy="14.728814"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2406" />
<defs
id="defs2408">
<linearGradient
id="linearGradient2264">
<stop
id="stop2266"
style="stop-color:#d7e866;stop-opacity:1"
offset="0" />
<stop
id="stop2268"
style="stop-color:#8cab2a;stop-opacity:1"
offset="1" />
</linearGradient> </linearGradient>
<linearGradient
x1="24.103895"
y1="15.180944"
x2="24.103895"
y2="34.224861"
id="linearGradient2401"
xlink:href="#linearGradient2264"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.8988874,0,0,0.8934652,-10.463705,-9.5659718)" />
<linearGradient
id="linearGradient4222">
<stop
id="stop4224"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop4226"
style="stop-color:#ffffff;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
x1="24.138529"
y1="6.5316639"
x2="24.138529"
y2="45.690399"
id="linearGradient2398"
xlink:href="#linearGradient4222"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.5399382,0,0,0.5366811,-1.8489228,-1.5061978)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4222"
id="linearGradient3128"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.5399382,0,0,0.5366811,-1.7557025,-1.7858588)"
x1="24.138529"
y1="6.5316639"
x2="24.138529"
y2="45.690399" />
</defs> </defs>
<path <path opacity=".4" d="m8.5932 8.2152v-5.9948h5v5.9948h6v5.0052h-6v6h-5v-6h-6v-5.0052h6z" fill-rule="evenodd" stroke="url(#a)"/>
inkscape:connector-curvature="0"
style="opacity:0.40000000000000002;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3128);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
id="path2272"
d="m 8.5932204,8.2151575 0,-5.9948184 4.9999996,0 0,5.9948184 6,0 0,5.0051815 -6,0 0,6 -4.9999996,0 0,-6 -6,0 0,-5.0051815 6,0 z" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 229 B

View File

@ -1,102 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="10" width="10" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<path style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m1 2 4 8 4-7.989z" fill="#fff"/>
<svg <path style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m1 1 4 8 4-7.989z" fill="#999"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="10"
height="10"
id="svg2403"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="caret.svg"
inkscape:export-filename="caret.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="773"
id="namedview3047"
showgrid="false"
inkscape:zoom="25.279067"
inkscape:cx="-3.063006"
inkscape:cy="6.0978375"
inkscape:window-x="0"
inkscape:window-y="-1"
inkscape:window-maximized="1"
inkscape:current-layer="svg2403"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata15">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs2405">
<linearGradient
x1="11.644068"
y1="2.4988678"
x2="11.644068"
y2="15.00281"
id="linearGradient2392"
xlink:href="#linearGradient3678"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(1.0000001,1.1920928e-8)" />
<linearGradient
x1="8.4964771"
y1="-0.061573759"
x2="8.4964771"
y2="8.083209"
id="linearGradient2395"
xlink:href="#linearGradient3678"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526316,0,0,0.9843625,0.5789474,0.06024281)" />
<linearGradient
id="linearGradient3678">
<stop
id="stop3680"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop3682"
style="stop-color:#e6e6e6;stop-opacity:1"
offset="1" />
</linearGradient>
</defs>
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3768"
d="M 1,2 5,10 9,2.011 z"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
<path
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#999999;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
d="M 1,1 5,9 9,1.011 z"
id="path3716"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 269 B

View File

@ -1,112 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="10" width="10" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs>
<svg <linearGradient id="a" y2="8.0832" gradientUnits="userSpaceOnUse" x2="8.4965" gradientTransform="matrix(1.0526 0 0 .98436 -3.4211 1.0602)" y1="-.061574" x1="8.4965">
xmlns:dc="http://purl.org/dc/elements/1.1/" <stop stop-color="#fff" offset="0"/>
xmlns:cc="http://creativecommons.org/ns#" <stop stop-color="#e6e6e6" offset="1"/>
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="10"
height="10"
id="svg2403"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="logout.svg"
inkscape:export-filename="caret.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="800"
id="namedview3047"
showgrid="false"
inkscape:zoom="25.279067"
inkscape:cx="3.6223673"
inkscape:cy="6.0978375"
inkscape:window-x="0"
inkscape:window-y="-31"
inkscape:window-maximized="1"
inkscape:current-layer="svg2403"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata15">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs2405">
<linearGradient
x1="11.644068"
y1="2.4988678"
x2="11.644068"
y2="15.00281"
id="linearGradient2392"
xlink:href="#linearGradient3678"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(1.0000001,1.1920928e-8)" />
<linearGradient
x1="8.4964771"
y1="-0.061573759"
x2="8.4964771"
y2="8.083209"
id="linearGradient2395"
xlink:href="#linearGradient3678"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526316,0,0,0.9843625,0.5789474,0.06024281)" />
<linearGradient
id="linearGradient3678">
<stop
id="stop3680"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop3682"
style="stop-color:#e6e6e6;stop-opacity:1"
offset="1" />
</linearGradient> </linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient2993"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526316,0,0,0.9843625,-3.4210526,1.060243)"
x1="8.4964771"
y1="-0.061573759"
x2="8.4964771"
y2="8.083209" />
</defs> </defs>
<path <path opacity=".5" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m1 2 4 8 4-7.989z"/>
sodipodi:nodetypes="cccc" <path style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m1 1 4 8 4-7.989z" fill="url(#a)"/>
inkscape:connector-curvature="0"
id="path3023"
d="M 1,2 5,10 9,2.011 z"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;opacity:0.5;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
<path
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:url(#linearGradient2993);fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
d="M 1,1 5,9 9,1.011 z"
id="path3716"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 B

After

Width:  |  Height:  |  Size: 367 B

39
core/img/actions/clock.svg Executable file → Normal file
View File

@ -1,20 +1,21 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 100 100" xml:space="preserve"> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<path d="M50,89.836c-23.389,0-42.418-19.027-42.418-42.417C7.582,24.029,26.611,5,50,5c23.389,0,42.418,19.029,42.418,42.419 C92.418,70.809,73.389,89.836,50,89.836z M50,9.912c-20.681,0-37.506,16.826-37.506,37.508c0,20.681,16.826,37.505,37.506,37.505 s37.507-16.824,37.507-37.505C87.507,26.737,70.681,9.912,50,9.912z"/> <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" height="16px" viewBox="0 0 100 100" width="16px" version="1.1" y="0px" x="0px" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M50.001,49.875c-0.141,0-0.283-0.011-0.427-0.037c-1.173-0.206-2.03-1.226-2.03-2.419V29.442c0-1.355,1.1-2.456,2.456-2.456 c1.355,0,2.456,1.1,2.456,2.456v4.003l5.431-14.974c0.464-1.274,1.872-1.937,3.146-1.471c1.274,0.462,1.934,1.871,1.471,3.146 l-10.195,28.11C51.952,49.241,51.019,49.875,50.001,49.875z"/> <path d="m50 89.836c-23.389 0-42.418-19.027-42.418-42.417s19.029-42.419 42.418-42.419 42.418 19.029 42.418 42.419-19.029 42.417-42.418 42.417zm0-79.924c-20.681 0-37.506 16.826-37.506 37.508 0 20.681 16.826 37.505 37.506 37.505s37.507-16.824 37.507-37.505c0-20.683-16.826-37.508-37.507-37.508z"/>
<circle cx="49.999" cy="12.956" r="1.617"/> <path d="m50.001 49.875c-0.141 0-0.283-0.011-0.427-0.037-1.173-0.206-2.03-1.226-2.03-2.419v-17.977c0-1.355 1.1-2.456 2.456-2.456 1.355 0 2.456 1.1 2.456 2.456v4.003l5.431-14.974c0.464-1.274 1.872-1.937 3.146-1.471 1.274 0.462 1.934 1.871 1.471 3.146l-10.195 28.11c-0.357 0.985-1.29 1.619-2.308 1.619z"/>
<path d="M50,14.778c-1.006,0-1.823-0.817-1.823-1.823c0-1.005,0.817-1.823,1.823-1.823c1.004,0,1.821,0.817,1.821,1.823 C51.821,13.961,51.004,14.778,50,14.778z M50,11.542c-0.779,0-1.414,0.635-1.414,1.413c0,0.779,0.635,1.414,1.414,1.414 s1.412-0.635,1.412-1.414C51.412,12.177,50.779,11.542,50,11.542z"/> <circle cy="12.956" cx="49.999" r="1.617"/>
<circle cx="34.343" cy="20.301" r="1.47"/> <path d="m50 14.778c-1.006 0-1.823-0.817-1.823-1.823 0-1.005 0.817-1.823 1.823-1.823 1.004 0 1.821 0.817 1.821 1.823s-0.817 1.823-1.821 1.823zm0-3.236c-0.779 0-1.414 0.635-1.414 1.413 0 0.779 0.635 1.414 1.414 1.414s1.412-0.635 1.412-1.414c0-0.778-0.633-1.413-1.412-1.413z"/>
<path d="M23.617,30.488c0.703,0.409,0.945,1.305,0.537,2.008c-0.405,0.704-1.305,0.947-2.007,0.538 c-0.703-0.403-0.945-1.305-0.539-2.008C22.016,30.325,22.913,30.085,23.617,30.488z"/> <circle cy="20.301" cx="34.343" r="1.47"/>
<circle cx="15.536" cy="47.42" r="1.618"/> <path d="m23.617 30.488c0.703 0.409 0.945 1.305 0.537 2.008-0.405 0.704-1.305 0.947-2.007 0.538-0.703-0.403-0.945-1.305-0.539-2.008 0.408-0.701 1.305-0.941 2.009-0.538z"/>
<path d="M15.536,49.242c-1.006,0-1.823-0.817-1.823-1.823c0.001-1,0.819-1.819,1.823-1.822c1.006,0,1.823,0.817,1.823,1.822 C17.359,48.425,16.542,49.242,15.536,49.242z M15.536,46.006c-0.777,0.003-1.412,0.636-1.414,1.413c0,0.779,0.635,1.414,1.414,1.414 s1.413-0.635,1.413-1.414C16.949,46.641,16.315,46.006,15.536,46.006z"/> <circle cy="47.42" cx="15.536" r="1.618"/>
<path d="M22.147,61.803c0.705-0.406,1.602-0.167,2.007,0.537c0.408,0.703,0.166,1.602-0.537,2.008 c-0.704,0.406-1.604,0.163-2.008-0.537C21.202,63.104,21.447,62.209,22.147,61.803z"/> <path d="m15.536 49.242c-1.006 0-1.823-0.817-1.823-1.823 0.001-1 0.819-1.819 1.823-1.822 1.006 0 1.823 0.817 1.823 1.822 0 1.006-0.817 1.823-1.823 1.823zm0-3.236c-0.777 0.003-1.412 0.636-1.414 1.413 0 0.779 0.635 1.414 1.414 1.414s1.413-0.635 1.413-1.414c0-0.778-0.634-1.413-1.413-1.413z"/>
<path d="M33.07,73.803c0.408-0.706,1.305-0.946,2.008-0.537c0.704,0.403,0.945,1.302,0.538,2.005 c-0.405,0.704-1.307,0.947-2.007,0.537C32.904,75.402,32.667,74.507,33.07,73.803z"/> <path d="m22.147 61.803c0.705-0.406 1.602-0.167 2.007 0.537 0.408 0.703 0.166 1.602-0.537 2.008-0.704 0.406-1.604 0.163-2.008-0.537-0.407-0.707-0.162-1.602 0.538-2.008z"/>
<path d="M48.382,81.884c0-0.896,0.725-1.618,1.618-1.618c0.892-0.003,1.618,0.723,1.618,1.618c0,0.892-0.728,1.618-1.618,1.618 C49.104,83.498,48.385,82.775,48.382,81.884z"/> <path d="m33.07 73.803c0.408-0.706 1.305-0.946 2.008-0.537 0.704 0.403 0.945 1.302 0.538 2.005-0.405 0.704-1.307 0.947-2.007 0.537-0.705-0.406-0.942-1.301-0.539-2.005z"/>
<path d="M50,83.706L50,83.706c-1.002-0.003-1.819-0.82-1.823-1.822c0-1.006,0.817-1.823,1.823-1.823 c1.007,0,1.822,0.817,1.822,1.823C51.822,82.889,51.006,83.706,50,83.706z M50.006,80.47c-0.785,0-1.42,0.635-1.42,1.414 c0.003,0.775,0.637,1.41,1.414,1.413c0.78,0,1.413-0.635,1.413-1.413C51.413,81.104,50.782,80.47,50.006,80.47z"/> <path d="m48.382 81.884c0-0.896 0.725-1.618 1.618-1.618 0.892-0.003 1.618 0.723 1.618 1.618 0 0.892-0.728 1.618-1.618 1.618-0.896-0.004-1.615-0.727-1.618-1.618z"/>
<path d="M64.385,75.271c-0.408-0.703-0.167-1.602,0.537-2.005c0.702-0.409,1.601-0.169,2.008,0.537 c0.406,0.7,0.163,1.603-0.539,2.005C65.686,76.214,64.791,75.971,64.385,75.271z"/> <path d="m50 83.706c-1.002-0.003-1.819-0.82-1.823-1.822 0-1.006 0.817-1.823 1.823-1.823 1.007 0 1.822 0.817 1.822 1.823 0 1.005-0.816 1.822-1.822 1.822zm0.006-3.236c-0.785 0-1.42 0.635-1.42 1.414 0.003 0.775 0.637 1.41 1.414 1.413 0.78 0 1.413-0.635 1.413-1.413 0-0.78-0.631-1.414-1.407-1.414z"/>
<path d="M76.384,64.348c-0.704-0.406-0.945-1.305-0.537-2.008c0.402-0.704,1.301-0.943,2.006-0.537 c0.704,0.402,0.945,1.308,0.539,2.008C77.98,64.511,77.087,64.751,76.384,64.348z"/> <path d="m64.385 75.271c-0.408-0.703-0.167-1.602 0.537-2.005 0.702-0.409 1.601-0.169 2.008 0.537 0.406 0.7 0.163 1.603-0.539 2.005-0.705 0.406-1.6 0.163-2.006-0.537z"/>
<path d="M84.464,49.038c-0.896-0.003-1.618-0.726-1.618-1.618c-0.001-0.892,0.723-1.618,1.618-1.618 c0.893-0.003,1.618,0.726,1.618,1.618C86.077,48.315,85.356,49.034,84.464,49.038z"/> <path d="m76.384 64.348c-0.704-0.406-0.945-1.305-0.537-2.008 0.402-0.704 1.301-0.943 2.006-0.537 0.704 0.402 0.945 1.308 0.539 2.008-0.412 0.7-1.305 0.94-2.008 0.537z"/>
<path d="M84.464,49.242L84.464,49.242c-1.006-0.003-1.822-0.822-1.822-1.823c-0.002-0.486,0.188-0.943,0.532-1.287 c0.344-0.345,0.803-0.535,1.29-0.535c1.007,0,1.822,0.817,1.822,1.822C86.282,48.422,85.463,49.239,84.464,49.242z M84.471,46.006 c-0.386,0-0.74,0.147-1.008,0.416c-0.267,0.267-0.412,0.621-0.412,0.998c0,0.777,0.635,1.41,1.413,1.414 c0.775-0.003,1.408-0.638,1.413-1.415C85.877,46.641,85.246,46.006,84.471,46.006z"/> <path d="m84.464 49.038c-0.896-0.003-1.618-0.726-1.618-1.618-0.001-0.892 0.723-1.618 1.618-1.618 0.893-0.003 1.618 0.726 1.618 1.618-0.005 0.895-0.726 1.614-1.618 1.618z"/>
<path d="M77.853,33.034c-0.705,0.409-1.604,0.166-2.006-0.538c-0.408-0.7-0.168-1.599,0.537-2.008 c0.701-0.406,1.604-0.163,2.008,0.537C78.795,31.732,78.553,32.627,77.853,33.034z"/> <path d="m84.464 49.242c-1.006-0.003-1.822-0.822-1.822-1.823-0.002-0.486 0.188-0.943 0.532-1.287 0.344-0.345 0.803-0.535 1.29-0.535 1.007 0 1.822 0.817 1.822 1.822-0.004 1.003-0.823 1.82-1.822 1.823zm0.007-3.236c-0.386 0-0.74 0.147-1.008 0.416-0.267 0.267-0.412 0.621-0.412 0.998 0 0.777 0.635 1.41 1.413 1.414 0.775-0.003 1.408-0.638 1.413-1.415 0-0.778-0.631-1.413-1.406-1.413z"/>
<path d="M66.93,21.036c-0.407,0.704-1.308,0.943-2.008,0.537c-0.704-0.403-0.945-1.305-0.537-2.008 c0.404-0.703,1.306-0.943,2.006-0.537C67.095,19.437,67.333,20.333,66.93,21.036z"/> <path d="m77.853 33.034c-0.705 0.409-1.604 0.166-2.006-0.538-0.408-0.7-0.168-1.599 0.537-2.008 0.701-0.406 1.604-0.163 2.008 0.537 0.403 0.707 0.161 1.602-0.539 2.009z"/>
<path d="m66.93 21.036c-0.407 0.704-1.308 0.943-2.008 0.537-0.704-0.403-0.945-1.305-0.537-2.008 0.404-0.703 1.306-0.943 2.006-0.537 0.704 0.409 0.942 1.305 0.539 2.008z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 254 B

View File

@ -1,73 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m3 1040.4 1-1 4 3 4-3 1 1-3 4 3 4-1 1-4-3-4 3-1-1 3-4z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="close.svg"
inkscape:export-filename="close.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="12.67268"
inkscape:cx="11.940651"
inkscape:cy="15.685139"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="773"
inkscape:window-x="0"
inkscape:window-y="-1"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 3,1040.3622 1,-1 4,3 4,-3 1,1 -3,4 3,4 -1,1 -4,-3 -4,3 -1,-1 3,-4 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 254 B

View File

@ -1,73 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m3 1040.4 1-1 4 3 4-3 1 1-3 4 3 4-1 1-4-3-4 3-1-1 3-4z" fill="#d40000"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="delete.svg"
inkscape:export-filename="delete-hover.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="12.67268"
inkscape:cx="11.940651"
inkscape:cy="15.685139"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="773"
inkscape:window-x="0"
inkscape:window-y="-1"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#d40000;fill-opacity:1;stroke:none"
d="m 3,1040.3622 1,-1 4,3 4,-3 1,1 -3,4 3,4 -1,1 -4,-3 -4,3 -1,-1 3,-4 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 410 B

View File

@ -1,70 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m3 1040.4 1-1 4 3 4-3 1 1-3 4 3 4-1 1-4-3-4 3-1-1 3-4z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="delete.svg">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="25.345359"
inkscape:cx="1.5609441"
inkscape:cy="8.3505321"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 3,1040.3622 1,-1 4,3 4,-3 1,1 -3,4 3,4 -1,1 -4,-3 -4,3 -1,-1 3,-4 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 395 B

View File

@ -1,73 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m6 1037.4h4l1 7h4l-7 7-7-7h4z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="download.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/play.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="17.921875"
inkscape:cx="-5.3403178"
inkscape:cy="10.148736"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 6,1037.3622 4,0 1,7 4,0 -7,7 -7,-7 4,0 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 321 B

View File

@ -1,240 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" height="17" width="17" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(93.422 -466.66)">
<svg <path d="m-83.897 468.74c-3.9502 0-6.5349 3.4469-6.3643 6.7213h-2.1608l3.904 3.9174 4.0813-3.8722h-2.1489c-0.23705-1.7009 1.1635-3.1145 2.6887-3.0921 1.5965 0.0235 2.8006 1.2292 2.8006 2.7334 0.08961 1.5938-1.6294 3.4279-3.9654 2.5317-0.000083 1.2281 0.0027 2.5439 0 3.764 4.1894 0.82896 7.6398-2.5095 7.6398-6.2509 0-3.5621-2.9188-6.4525-6.4749-6.4525z"/>
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="17"
height="17"
id="svg3972"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="backup.svg"
inkscape:export-filename="/home/ronny/persoenliches/Programme/JBackpack/jbackpack/src/ch/fhnw/jbackpack/icons/16x16/icon.png"
inkscape:export-xdpi="2.8099999"
inkscape:export-ydpi="2.8099999">
<defs
id="defs3974">
<linearGradient
id="linearGradient3820">
<stop
style="stop-color:#7399ab;stop-opacity:1;"
offset="0"
id="stop3822" />
<stop
style="stop-color:#fffeff;stop-opacity:1;"
offset="1"
id="stop3824" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5144">
<stop
style="stop-color:#ab7392;stop-opacity:1;"
offset="0"
id="stop5146" />
<stop
style="stop-color:#ffffff;stop-opacity:0.02909091"
offset="1"
id="stop5148" />
</linearGradient>
<linearGradient
id="linearGradient5130">
<stop
id="stop5140"
offset="0"
style="stop-color:#a08f82;stop-opacity:0.74901961;" />
<stop
id="stop5138"
offset="0.5"
style="stop-color:#ab7392;stop-opacity:0.49803922;" />
<stop
style="stop-color:#ab7392;stop-opacity:0;"
offset="1"
id="stop5134" />
</linearGradient>
<linearGradient
id="linearGradient4519"
osb:paint="gradient">
<stop
style="stop-color:#5d879d;stop-opacity:1;"
offset="0"
id="stop4521" />
<stop
style="stop-color:#5d879d;stop-opacity:0;"
offset="1"
id="stop4523" />
</linearGradient>
<filter
id="filter4697"
inkscape:label="Drop shadow"
width="1.5"
height="1.5"
x="-0.25"
y="-0.25"
color-interpolation-filters="sRGB">
<feGaussianBlur
id="feGaussianBlur4699"
in="SourceAlpha"
stdDeviation="2"
result="blur" />
<feColorMatrix
id="feColorMatrix4701"
result="bluralpha"
type="matrix"
values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.5 0 " />
<feOffset
id="feOffset4703"
in="bluralpha"
dx="4"
dy="4"
result="offsetBlur" />
<feMerge
id="feMerge4705">
<feMergeNode
id="feMergeNode4707"
in="offsetBlur" />
<feMergeNode
id="feMergeNode4709"
in="SourceGraphic" />
</feMerge>
</filter>
<filter
id="filter5086"
inkscape:label="Drop shadow"
width="1.5"
height="1.5"
x="-0.25"
y="-0.25"
color-interpolation-filters="sRGB">
<feGaussianBlur
id="feGaussianBlur5088"
in="SourceAlpha"
stdDeviation="5"
result="blur" />
<feColorMatrix
id="feColorMatrix5090"
result="bluralpha"
type="matrix"
values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.5 0 " />
<feOffset
id="feOffset5092"
in="bluralpha"
dx="10"
dy="10"
result="offsetBlur" />
<feMerge
id="feMerge5094">
<feMergeNode
id="feMergeNode5096"
in="offsetBlur" />
<feMergeNode
id="feMergeNode5098"
in="SourceGraphic" />
</feMerge>
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5130"
id="linearGradient5136"
x1="119.76609"
y1="431.36642"
x2="631.76611"
y2="431.36642"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5144"
id="radialGradient5150"
cx="294.02567"
cy="300.53604"
fx="294.02567"
fy="300.53604"
r="183.84033"
gradientTransform="matrix(0.66691196,0.43225768,-0.44145763,0.68110633,230.61036,-24.143353)"
gradientUnits="userSpaceOnUse" />
<filter
inkscape:collect="always"
id="filter4381"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="2.5"
id="feGaussianBlur4383" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3820"
id="linearGradient3575"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.06875313,0,0,0.06875313,2.829762,444.82336)"
x1="339.43503"
y1="370.08636"
x2="66.978798"
y2="135.09288" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="45.254834"
inkscape:cx="12.081283"
inkscape:cy="8.5032287"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1920"
inkscape:window-height="1033"
inkscape:window-x="-3"
inkscape:window-y="-3"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0">
<inkscape:grid
type="xygrid"
id="grid4447"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3977">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(93.42207,-466.65551)">
<path
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m -83.896989,468.73997 c -3.950245,0 -6.534942,3.44694 -6.364259,6.72133 l -2.160822,0 3.904021,3.91738 4.081269,-3.87222 -2.148938,0 c -0.237051,-1.70092 1.163456,-3.1145 2.688727,-3.0921 1.596496,0.0235 2.800571,1.22922 2.800571,2.73336 0.08961,1.59378 -1.629405,3.4279 -3.965431,2.53172 -8.3e-5,1.22806 0.0027,2.54389 0,3.76397 4.189434,0.82896 7.639781,-2.50953 7.639781,-6.25087 0,-3.56212 -2.9188,-6.45252 -6.474921,-6.45252 z"
id="path4438"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccscccccc"
inkscape:export-filename="/home/samtuke/owncloud/git/owncloud/core/img/actions/history.png"
inkscape:export-xdpi="89.929733"
inkscape:export-ydpi="89.929733" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 788 B

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 182 B

11
core/img/actions/lock.svg Executable file → Normal file
View File

@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" height="16px" viewBox="0 0 71 100" width="16px" version="1.1" y="0px" x="0px" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <path d="m65.5 45v-15c0-16.542-13.458-30-30-30s-30 13.458-30 30v15h-5.5v55h71v-55h-5.5zm-52-15c0-12.131 9.869-22 22-22s22 9.869 22 22v15h-44v-15z"/>
width="16px" height="16px" viewBox="0 0 71 100" xml:space="preserve">
<path d="M65.5,45V30c0-16.542-13.458-30-30-30s-30,13.458-30,30v15H0v55h71V45H65.5z M13.5,30c0-12.131,9.869-22,22-22
s22,9.869,22,22v15h-44V30z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 424 B

View File

@ -1,178 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<path style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m8.0001 0c-0.4714 0-0.96103 0.5419-0.95 1v6c-0.00747 0.52831 0.42163 1 0.95 1s0.95747-0.47169 0.95-1v-6c0.014622-0.6051-0.4786-1-0.95-1zm-3.3438 2.5c-0.087186 0.019294-0.17163 0.050959-0.25 0.09375-2.9995 1.5715-3.9184 4.7979-3.125 7.4688 0.7934 2.67 3.2799 4.937 6.6875 4.937 3.3592 0 5.8772-2.149 6.7192-4.781 0.841-2.6321-0.058-5.8234-3.125-7.594-0.434-0.2536-1.059-0.0899-1.313 0.3437-0.2536 0.4336-0.09 1.0589 0.344 1.3125 2.3908 1.3798 2.8825 3.4944 2.2812 5.375-0.6012 1.8806-2.344 3.4375-4.9062 3.4375-2.5759 0-4.2976-1.6502-4.875-3.5938-0.5776-1.9435-0.047-4.048 2.1873-5.2187 0.3787-0.2063 0.5791-0.6925 0.4558-1.1057-0.1232-0.4133-0.5572-0.7103-0.987-0.6755-0.0313-0.0015-0.0626-0.0015-0.0938 0z"/>
<svg <path style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m8.0001 1c-0.4714 0-0.96103 0.5419-0.95 1v6c-0.00747 0.52831 0.42163 1 0.95 1s0.95747-0.47169 0.95-1v-6c0.014622-0.6051-0.4786-1-0.95-1zm-3.3438 2.5c-0.087186 0.019294-0.17163 0.050959-0.25 0.09375-2.9995 1.5715-3.9184 4.7979-3.125 7.4688 0.7934 2.67 3.2799 4.937 6.6875 4.937 3.3592 0 5.8772-2.149 6.7192-4.781 0.841-2.6321-0.058-5.8234-3.125-7.594-0.434-0.2536-1.059-0.0899-1.313 0.3437-0.2536 0.4336-0.09 1.0589 0.344 1.3125 2.3908 1.3798 2.8825 3.4944 2.2812 5.375-0.6012 1.8806-2.344 3.4375-4.9062 3.4375-2.5759 0-4.2976-1.6502-4.875-3.5938-0.5776-1.9436-0.047-4.0481 2.1873-5.2188 0.3787-0.2063 0.5791-0.6925 0.4558-1.1057-0.1232-0.4133-0.5572-0.7103-0.987-0.6755-0.0313-0.0015-0.0626-0.0015-0.0938 0z" fill="#fff"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="16"
height="16"
id="svg2403"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="logout.svg"
inkscape:export-filename="logout.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="745"
id="namedview3047"
showgrid="false"
inkscape:zoom="25.279067"
inkscape:cx="-1.6512429"
inkscape:cy="6.4537904"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2403" />
<metadata
id="metadata15">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs2405">
<linearGradient
x1="11.644068"
y1="2.4988678"
x2="11.644068"
y2="15.00281"
id="linearGradient2392"
xlink:href="#linearGradient3678"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(1.0000001,1.1920928e-8)" />
<linearGradient
x1="8.4964771"
y1="-0.061573759"
x2="8.4964771"
y2="8.083209"
id="linearGradient2395"
xlink:href="#linearGradient3678"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526316,0,0,0.9843625,0.578947,0.06024281)" />
<linearGradient
id="linearGradient3678">
<stop
id="stop3680"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop3682"
style="stop-color:#e6e6e6;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient3879"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526316,0,0,0.9843625,0.578947,0.06024281)"
x1="8.4964771"
y1="-0.061573759"
x2="8.4964771"
y2="8.083209" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient3908"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(1.0000001,1.1920928e-8)"
x1="11.644068"
y1="2.4988678"
x2="11.644068"
y2="15.00281" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient3914"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526316,0,0,0.9843625,0.578947,0.06024281)"
x1="8.4964771"
y1="-0.061573759"
x2="8.4964771"
y2="8.083209" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient3916"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(1.0000001,1.1920928e-8)"
x1="11.644068"
y1="2.4988678"
x2="11.644068"
y2="15.00281" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient3919"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(1.0000001,1.1920928e-8)"
x1="11.644068"
y1="2.4988678"
x2="11.644068"
y2="15.00281" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient3922"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526316,0,0,0.9843625,0.578947,0.06024281)"
x1="8.4964771"
y1="-0.061573759"
x2="8.4964771"
y2="8.083209" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient3925"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526316,0,0,0.9843625,0.578947,0.06024281)"
x1="8.4964771"
y1="-0.061573759"
x2="8.4964771"
y2="15.216674" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient3942"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526316,0,0,0.9843625,-0.42098964,0.06024281)"
x1="8.4964771"
y1="-0.061573759"
x2="8.4964771"
y2="15.216674" />
</defs>
<path
sodipodi:nodetypes="sccsccsccssscscssscscc"
inkscape:connector-curvature="0"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
d="m 8.0000634,0 c -0.4714045,0 -0.9610304,0.5419023 -0.95,1 l 0,6 c -0.00747,0.5283126 0.4216346,1 0.95,1 0.5283654,0 0.957472,-0.4716874 0.95,-1 l 0,-6 c 0.014622,-0.605105 -0.4785955,-1 -0.95,-1 z m -3.34375,2.5 c -0.087186,0.019294 -0.1716251,0.050959 -0.25,0.09375 -2.9994999,1.5715133 -3.91842874,4.7978566 -3.125,7.46875 C 2.0747421,12.733393 4.5611725,15 7.9688134,15 11.327833,15 13.846204,12.850562 14.687563,10.21875 15.528922,7.5869378 14.630363,4.3955638 11.562563,2.625 11.128957,2.3713639 10.503661,2.535122 10.250038,2.9687356 9.9964154,3.4023491 10.160192,4.0276401 10.593813,4.28125 c 2.390793,1.3798311 2.882452,3.4944109 2.28125,5.375 -0.601202,1.880589 -2.344037,3.4375 -4.9062496,3.4375 -2.575923,0 -4.297634,-1.650181 -4.875,-3.59375 C 2.5164474,7.5564313 3.0469519,5.451888 5.2813134,4.28125 5.6599659,4.0748887 5.8603711,3.5887067 5.7371222,3.1754605 5.6138734,2.7622144 5.1798937,2.4652349 4.7500634,2.5 4.7188384,2.49846 4.6875384,2.49846 4.6563134,2.5 z"
id="path3781" />
<path
id="path3927"
d="m 8.0000634,1 c -0.4714045,0 -0.9610304,0.5419023 -0.95,1 l 0,6 c -0.00747,0.5283126 0.4216346,1 0.95,1 0.5283654,0 0.957472,-0.4716874 0.95,-1 l 0,-6 c 0.014622,-0.605105 -0.4785955,-1 -0.95,-1 z m -3.34375,2.5 c -0.087186,0.019294 -0.1716251,0.050959 -0.25,0.09375 -2.9994999,1.5715133 -3.91842874,4.7978566 -3.125,7.46875 C 2.0747421,13.733393 4.5611725,16 7.9688134,16 11.327833,16 13.846204,13.850562 14.687563,11.21875 15.528922,8.5869378 14.630363,5.3955638 11.562563,3.625 11.128957,3.3713639 10.503661,3.535122 10.250038,3.9687356 9.9964154,4.4023491 10.160192,5.0276401 10.593813,5.28125 c 2.390793,1.3798311 2.882452,3.4944109 2.28125,5.375 -0.601202,1.880589 -2.344037,3.4375 -4.9062496,3.4375 -2.575923,0 -4.297634,-1.650181 -4.875,-3.59375 C 2.5164474,8.5564313 3.0469519,6.451888 5.2813134,5.28125 5.6599659,5.0748887 5.8603711,4.5887067 5.7371222,4.1754605 5.6138734,3.7622144 5.1798937,3.4652349 4.7500634,3.5 4.7188384,3.49846 4.6875384,3.49846 4.6563134,3.5 z"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sccsccsccssscscssscscc" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,58 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g>
<svg <rect stroke-linejoin="round" height="10.244" width="15.244" stroke="#000" stroke-linecap="square" y="2.6281" x=".37806" stroke-width=".75613"/>
xmlns:dc="http://purl.org/dc/elements/1.1/" <path d="m-0.6 11 8.6-5l8.6 5" stroke="#fff" stroke-width="1px" fill="none"/>
xmlns:cc="http://creativecommons.org/ns#" <path d="m0 2.5 8 6.5 8-6.5" stroke="#fff" stroke-linecap="round" stroke-width="1px"/>
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="16"
height="16"
id="svg2985">
<defs
id="defs2987">
<linearGradient
id="linearGradient3767">
<stop
id="stop3769"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop3771"
style="stop-color:#ffffff;stop-opacity:0"
offset="1" />
</linearGradient>
</defs>
<metadata
id="metadata2990">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1">
<rect
width="15.243872"
height="10.243872"
x="0.37806413"
y="2.6280646"
id="rect2995"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.75612825;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<path
d="M -0.6,11 8,6 l 8.6,5"
id="path3765"
style="fill:none;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
d="M 0,2.5 8,9 16,2.5"
id="path3775"
style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 195 B

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 660 B

View File

@ -1,73 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m1 1037.4v14h5v-14zm9 0v14h5v-14z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="play-big.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/play-add.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.2402344"
inkscape:cx="110.24162"
inkscape:cy="54.102269"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 1,1037.3622 0,14 5,0 0,-14 z m 9,0 0,14 5,0 0,-14 z"
id="path3086-7"
sodipodi:nodetypes="cccccccccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 374 B

View File

@ -1,72 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m3 3v10h4v-10h-4zm6 0v10h4v-10h-4z" transform="translate(0 1036.4)"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="play-next.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/play-big.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="17.921875"
inkscape:cx="-5.3403178"
inkscape:cy="10.148736"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="M 3 3 L 3 13 L 7 13 L 7 3 L 3 3 z M 9 3 L 9 13 L 13 13 L 13 3 L 9 3 z "
transform="translate(0,1036.3622)"
id="path3086" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 407 B

View File

@ -1,83 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <g>
xmlns:dc="http://purl.org/dc/elements/1.1/" <path d="m2 1037.4 11 6-11 6z"/>
xmlns:cc="http://creativecommons.org/ns#" <path d="m11 1045.4v2h-2v2h2v2h2v-2h2v-2h-2v-2z"/>
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="play-add.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/play-add.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="25.345359"
inkscape:cx="2.4224415"
inkscape:cy="8.0693339"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<g
id="g4806"
style="fill:#000000;fill-opacity:1">
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3086"
d="m 2,1037.3622 11,6 -11,6 z"
style="fill:#000000;fill-opacity:1;stroke:none" />
<path
sodipodi:nodetypes="ccccccccccccc"
id="rect2984"
d="m 11,1045.3622 0,2 -2,0 0,2 2,0 0,2 2,0 0,-2 2,0 0,-2 -2,0 0,-2 z"
style="fill:#000000;fill-opacity:1;stroke:none"
inkscape:connector-curvature="0" />
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 429 B

View File

@ -1,73 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m0 1036.4 16 8-16 8z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="play.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/play-add.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="17.921875"
inkscape:cx="-5.3403178"
inkscape:cy="10.148736"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 0,1036.3622 16,8 -16,8 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 361 B

View File

@ -1,79 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m7 1038.4 7 6-7 6z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/" <path d="m2 1038.4 7 6-7 6z"/>
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="play-big.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/play-big.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="17.921875"
inkscape:cx="-5.3403178"
inkscape:cy="10.148736"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 7,1038.3622 7,6 -7,6 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 2,1038.3622 7,6 -7,6 z"
id="path3086-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 392 B

View File

@ -1,79 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m9 1038.4-7 6 7 6z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/" <path d="m14 1038.4-7 6 7 6z"/>
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="next.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/play-next.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="17.921875"
inkscape:cx="-5.3403178"
inkscape:cy="10.148736"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 9,1038.3622 -7,6 7,6 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 14,1038.3622 -7,6 7,6 z"
id="path3086-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 393 B

View File

@ -1,73 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m2 1038.4 12 6-12 6z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="play.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/play-add.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="17.921875"
inkscape:cx="-5.3403178"
inkscape:cy="10.148736"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 2,1038.3622 12,6 -12,6 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 361 B

View File

@ -1,292 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<path d="m8 1c-3.866 0-7 3.134-7 7s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zm0.80208 0.89323c1.2011 0.026708 2.2625 0.74821 3.3359 1.2214l1.732 2.3971-0.274 1.03 0.529 0.3281-0.009 1.2213c-0.0121 0.34937 0.005 0.69921-0.0091 1.0482-0.16635 0.66235-0.55063 1.2666-0.875 1.8685-0.21989 0.10841 0.02005-0.7185-0.11849-0.97526 0.032-0.5934-0.471-0.566-0.811-0.2364-0.421 0.2454-1.346 0.3194-1.376-0.3464-0.239-0.8001-0.035-1.6526 0.291-2.3971l-0.537-0.6563 0.191-1.6862-0.857-0.8658 0.201-0.948-1.0028-0.5651c-0.1977-0.1552-0.5738-0.2166-0.6563-0.4284 0.0814-0.0046 0.166-0.0109 0.2461-0.0091zm-2.4609 0.00912c0.031442 0.00459 0.069992 0.026431 0.1276 0.072917 0.338 0.1857-0.0825 0.3964-0.1823 0.5925-0.5398 0.3651 0.166 0.6641 0.401 0.957 0.3767-0.1082 0.7535-0.6467 1.3034-0.483 0.7034-0.2195 0.5913 0.5891 0.9935 0.9479 0.0522 0.1689 0.88 0.7185 0.3828 0.5377-0.4095-0.3174-0.8649-0.2935-1.1576 0.1641-0.7909 0.4286-0.3228-0.8252-0.7018-1.1302-0.5729-0.6392-0.3328 0.4775-0.401 0.8112-0.3725-0.0081-1.0681-0.2866-1.4492 0.1641l0.3736 0.6106 0.4467-0.6836c0.1085-0.2474 0.2447 0.1923 0.3645 0.2735 0.1431 0.2759 0.823 0.7434 0.3099 0.875-0.7606 0.4219-1.3589 1.0618-2.0052 1.6315-0.218 0.46-0.663 0.4074-0.9388 0.0273-0.6672-0.4105-0.6177 0.6566-0.5833 1.0573l0.58333-0.36458v0.60156c-0.0165 0.1138-0.0024 0.2322-0.0091 0.3464-0.4087 0.427-0.8207-0.5995-1.1758-0.8295l-0.0273-1.5039c0.0129-0.4225-0.0763-0.8551 0.0091-1.2669 0.8038-0.8625 1.6202-1.7561 2.0964-2.8529h0.78385c0.5478 0.2654 0.2357-0.5881 0.4557-0.556zm-1.1576 7.8204c0.095099-0.010145 0.20328 0.011573 0.31901 0.072921 0.73794 0.10562 1.2897 0.6409 1.8776 1.0482 0.46872 0.46452 1.4828 0.31578 1.5951 1.1029-0.17061 0.85375-1.0105 1.3122-1.75 1.6133-0.1846 0.103-0.383 0.185-0.5925 0.219-0.6856 0.171-0.982-0.532-1.1211-1.058-0.3104-0.65-1.0862-1.142-0.9752-1.941 0.0182-0.397 0.235-1.0134 0.6471-1.0573z"/>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="16"
height="16"
id="svg2457"
inkscape:version="0.48.1 r9760"
sodipodi:docname="world.svg"
inkscape:export-filename="/home/jancborchardt/owncloud-sharing/core/img/actions/settings.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<metadata
id="metadata23">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="776"
id="namedview21"
showgrid="false"
inkscape:zoom="17.875"
inkscape:cx="-12.837249"
inkscape:cy="5.7622378"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2457" />
<defs
id="defs2459">
<linearGradient
id="linearGradient5128">
<stop
id="stop5130"
style="stop-color:#e5e5e5;stop-opacity:1"
offset="0" />
<stop
id="stop5132"
style="stop-color:#ababab;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="86.132919"
y1="105.105"
x2="84.63858"
y2="20.895"
id="linearGradient3260"
xlink:href="#linearGradient5128"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(9.6142312e-2,0,0,9.6142312e-2,1.8468935,1.9430362)" />
<linearGradient
id="linearGradient3397">
<stop
id="stop3399"
style="stop-color:#aaaaaa;stop-opacity:1"
offset="0" />
<stop
id="stop3401"
style="stop-color:#8c8c8c;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="21"
y1="0"
x2="21"
y2="16.004715"
id="linearGradient3264"
xlink:href="#linearGradient3397"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-17.058189,0)" />
<linearGradient
x1="63.9995"
y1="3.1001"
x2="63.9995"
y2="122.8994"
id="linearGradient3309"
gradientUnits="userSpaceOnUse">
<stop
id="stop3311"
style="stop-color:#f6f6f6;stop-opacity:1"
offset="0" />
<stop
id="stop3313"
style="stop-color:#cccccc;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="25"
y1="0"
x2="25"
y2="16.000105"
id="linearGradient3262"
xlink:href="#linearGradient3309"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-17.058189,0)" />
<linearGradient
id="linearGradient3678">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3680" />
<stop
style="stop-color:#e6e6e6;stop-opacity:1;"
offset="1"
id="stop3682" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3309-5"
id="linearGradient3066-2"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-17.058189,0)"
x1="25"
y1="0"
x2="25"
y2="16.000105" />
<linearGradient
x1="63.9995"
y1="3.1001"
x2="63.9995"
y2="122.8994"
id="linearGradient3309-5"
gradientUnits="userSpaceOnUse">
<stop
id="stop3311-3"
style="stop-color:#f6f6f6;stop-opacity:1"
offset="0" />
<stop
id="stop3313-3"
style="stop-color:#cccccc;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient3920"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-17.058189,-0.444)"
x1="25"
y1="0"
x2="25"
y2="16.000105" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678-0"
id="linearGradient3920-6"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-17.058189,-0.444)"
x1="25"
y1="0"
x2="25"
y2="16.000105" />
<linearGradient
id="linearGradient3678-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3680-5" />
<stop
style="stop-color:#e6e6e6;stop-opacity:1;"
offset="1"
id="stop3682-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-5-7"
id="linearGradient3784"
x1="0.5"
y1="7.5560002"
x2="15.5"
y2="7.5560002"
gradientUnits="userSpaceOnUse" />
<linearGradient
x1="46.395508"
y1="12.707516"
x2="46.395508"
y2="38.409042"
id="linearGradient3795-2"
xlink:href="#linearGradient3587-6-5-3-5-7"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.4100229,0,0,0.5447147,28.02322,-5.9219706)" />
<linearGradient
id="linearGradient3587-6-5-3-5-7">
<stop
id="stop3589-9-2-2-6-2"
style="stop-color:#000000;stop-opacity:1"
offset="0" />
<stop
id="stop3591-7-4-73-5-1"
style="stop-color:#363636;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-5-7"
id="linearGradient3810"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.4100229,0,0,0.5447147,28.02322,-5.9219706)"
x1="46.395508"
y1="12.707516"
x2="46.395508"
y2="38.409042" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-5-7"
id="linearGradient3813"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.4100229,0,0,0.5447147,10.462268,-5.974418)"
x1="46.395508"
y1="12.707516"
x2="46.395508"
y2="38.409042" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-5-7"
id="linearGradient3816"
gradientUnits="userSpaceOnUse"
x1="7.4930072"
y1="0.0035526801"
x2="7.4930072"
y2="14.998127" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-5-7"
id="linearGradient3798"
x1="8.8461542"
y1="0.89504272"
x2="8.8461542"
y2="15.048951"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-5-7-2"
id="linearGradient3798-6"
x1="8.8461542"
y1="0.89504272"
x2="8.8461542"
y2="15.048951"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3587-6-5-3-5-7-2">
<stop
id="stop3589-9-2-2-6-2-9"
style="stop-color:#000000;stop-opacity:1"
offset="0" />
<stop
id="stop3591-7-4-73-5-1-7"
style="stop-color:#363636;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
gradientTransform="translate(-1,-1)"
y2="15.048951"
x2="8.8461542"
y1="0.89504272"
x1="8.8461542"
gradientUnits="userSpaceOnUse"
id="linearGradient3815"
xlink:href="#linearGradient3587-6-5-3-5-7-2"
inkscape:collect="always" />
</defs>
<path
inkscape:connector-curvature="0"
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none"
d="M 8,1 C 4.1340071,1 1,4.134007 1,7.9999999 1,11.865994 4.1340071,15 8,15 11.865994,15 15,11.865994 15,7.9999999 15,4.134007 11.865994,1 8,1 z m 0.8020833,0.8932295 c 1.2010717,0.026708 2.2624547,0.7482116 3.3359377,1.2213541 L 13.869792,5.511719 13.596354,6.5416669 14.125,6.8697919 14.1159,8.0911458 c -0.0121,0.349374 0.005,0.6992101 -0.0091,1.048177 -0.166346,0.6623539 -0.550627,1.2665712 -0.875,1.8684892 -0.219888,0.108406 0.02005,-0.7185 -0.11849,-0.97526 C 13.14504,9.4386408 12.642422,9.4660089 12.302112,9.7955727 11.881413,10.041226 10.955977,10.114914 10.92581,9.4492183 10.687264,8.6490761 10.891165,7.7966268 11.217384,7.0520835 L 10.679623,6.3958335 10.87103,4.7096354 10.014259,3.8437502 10.21478,2.8958336 9.2121752,2.3307295 C 9.0145444,2.1755339 8.6384357,2.114115 8.5559252,1.902344 8.6372992,1.897654 8.7219474,1.891447 8.8020189,1.893224 z m -2.4609375,0.00912 c 0.031442,0.00459 0.069992,0.026431 0.1276042,0.072917 C 6.8067806,2.1608975 6.3863479,2.3716106 6.2864583,2.5677086 5.7466682,2.9328038 6.4524911,3.2318365 6.6875,3.5247398 7.0642392,3.4164892 7.4410308,2.8779535 7.9908854,3.0416669 8.6942527,2.8222093 8.5821719,3.630807 8.984375,3.9895836 9.036567,4.1585309 9.8643709,4.7080895 9.3671875,4.5273437 8.9577408,4.2098855 8.5022772,4.2337911 8.2096354,4.6914062 7.4187262,5.1199798 7.8867869,3.8662153 7.5078125,3.5611981 6.9348738,2.9219861 7.1750002,4.0387484 7.1067708,4.3723957 6.7342944,4.364267 6.0387231,4.0858224 5.6575521,4.5364583 L 6.03125,5.1471356 6.4778646,4.4635416 C 6.5864179,4.2161129 6.7226128,4.6558348 6.8424479,4.736979 6.9855355,5.0129459 7.6653536,5.4804485 7.1523438,5.6119794 6.3917179,6.0339397 5.7934201,6.6737624 5.1471354,7.2434895 4.9290953,7.7034971 4.4841468,7.6508764 4.2083333,7.2708332 3.5410706,6.8603335 3.5906422,7.9274218 3.625,8.3281249 l 0.5833333,-0.3645833 0,0.6015625 C 4.19179,8.6789089 4.2058787,8.7972867 4.1992147,8.9114582 3.790491,9.3384813 3.3785344,8.3120287 3.0234334,8.0820311 L 2.9960896,6.5781252 C 3.0089957,6.1556005 2.9197821,5.7229754 3.0052082,5.3111981 3.8089547,4.4486619 4.6253679,3.5550749 5.1015624,2.4583336 l 0.7838542,0 C 6.4331575,2.7236662 6.1210544,1.8701843 6.3411457,1.902344 z M 5.1835938,9.722656 c 0.095099,-0.010145 0.2032823,0.011573 0.3190103,0.072921 0.7379441,0.1056226 1.289687,0.640901 1.8776042,1.048178 0.4687224,0.464525 1.4828124,0.315782 1.5950521,1.102865 -0.1706086,0.853749 -1.0104785,1.312191 -1.75,1.61328 C 7.0406658,13.662851 6.8423351,13.744732 6.6328125,13.77865 5.9471995,13.950405 5.6507787,13.2474 5.5117188,12.721359 5.2012551,12.071255 4.4254987,11.578795 4.5364583,10.779953 4.5547311,10.382752 4.7714976,9.7666104 5.1835938,9.7226607 z"
id="path3002" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,72 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m12.594 1.3438c-0.532-0.0313-1.094 0.1562-1.594 0.6562l3 3c1.5-1.5 0.188-3.5625-1.406-3.6562zm-2.594 1.6562l-7 7-2 5 5-2 7-7-3-3zm-6.5 7.5l2 2-2.5 1.5-1-1 1.5-2.5z" transform="translate(0 1036.4)"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="rename.svg"
inkscape:export-filename="/home/jancborchardt/rename.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="8.9609376"
inkscape:cx="13.152158"
inkscape:cy="4.0337477"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="M 12.59375 1.34375 C 12.0625 1.3125 11.5 1.5 11 2 L 14 5 C 15.5 3.5 14.1875 1.4375 12.59375 1.34375 z M 10 3 L 3 10 L 1 15 L 6 13 L 13 6 L 10 3 z M 3.5 10.5 L 5.5 12.5 L 3 14 L 2 13 L 3.5 10.5 z "
transform="translate(0,1036.3622)"
id="path3086" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

After

Width:  |  Height:  |  Size: 420 B

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 524 B

View File

@ -1,270 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs>
<svg <linearGradient id="c" y2="7.556" xlink:href="#a" gradientUnits="userSpaceOnUse" x2="15.5" y1="7.556" x1=".5"/>
xmlns:dc="http://purl.org/dc/elements/1.1/" <linearGradient id="a">
xmlns:cc="http://creativecommons.org/ns#" <stop offset="0"/>
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" <stop stop-color="#363636" offset="1"/>
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="16"
height="16"
id="svg2457"
inkscape:version="0.48.1 r9760"
sodipodi:docname="settings.svg"
inkscape:export-filename="/home/jancborchardt/owncloud-sharing/core/img/actions/settings.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<metadata
id="metadata23">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="776"
id="namedview21"
showgrid="false"
inkscape:zoom="17.875"
inkscape:cx="-0.41568268"
inkscape:cy="1.2867133"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2457" />
<defs
id="defs2459">
<linearGradient
id="linearGradient5128">
<stop
id="stop5130"
style="stop-color:#e5e5e5;stop-opacity:1"
offset="0" />
<stop
id="stop5132"
style="stop-color:#ababab;stop-opacity:1"
offset="1" />
</linearGradient> </linearGradient>
<linearGradient <linearGradient id="b" y2="14.998" xlink:href="#a" gradientUnits="userSpaceOnUse" x2="7.493" y1=".0035527" x1="7.493"/>
x1="86.132919"
y1="105.105"
x2="84.63858"
y2="20.895"
id="linearGradient3260"
xlink:href="#linearGradient5128"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(9.6142312e-2,0,0,9.6142312e-2,1.8468935,1.9430362)" />
<linearGradient
id="linearGradient3397">
<stop
id="stop3399"
style="stop-color:#aaaaaa;stop-opacity:1"
offset="0" />
<stop
id="stop3401"
style="stop-color:#8c8c8c;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="21"
y1="0"
x2="21"
y2="16.004715"
id="linearGradient3264"
xlink:href="#linearGradient3397"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-17.058189,0)" />
<linearGradient
x1="63.9995"
y1="3.1001"
x2="63.9995"
y2="122.8994"
id="linearGradient3309"
gradientUnits="userSpaceOnUse">
<stop
id="stop3311"
style="stop-color:#f6f6f6;stop-opacity:1"
offset="0" />
<stop
id="stop3313"
style="stop-color:#cccccc;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="25"
y1="0"
x2="25"
y2="16.000105"
id="linearGradient3262"
xlink:href="#linearGradient3309"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-17.058189,0)" />
<linearGradient
id="linearGradient3678">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3680" />
<stop
style="stop-color:#e6e6e6;stop-opacity:1;"
offset="1"
id="stop3682" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3309-5"
id="linearGradient3066-2"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-17.058189,0)"
x1="25"
y1="0"
x2="25"
y2="16.000105" />
<linearGradient
x1="63.9995"
y1="3.1001"
x2="63.9995"
y2="122.8994"
id="linearGradient3309-5"
gradientUnits="userSpaceOnUse">
<stop
id="stop3311-3"
style="stop-color:#f6f6f6;stop-opacity:1"
offset="0" />
<stop
id="stop3313-3"
style="stop-color:#cccccc;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678"
id="linearGradient3920"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-17.058189,-0.444)"
x1="25"
y1="0"
x2="25"
y2="16.000105" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3678-0"
id="linearGradient3920-6"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-17.058189,-0.444)"
x1="25"
y1="0"
x2="25"
y2="16.000105" />
<linearGradient
id="linearGradient3678-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3680-5" />
<stop
style="stop-color:#e6e6e6;stop-opacity:1;"
offset="1"
id="stop3682-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-5-7"
id="linearGradient3784"
x1="0.5"
y1="7.5560002"
x2="15.5"
y2="7.5560002"
gradientUnits="userSpaceOnUse" />
<linearGradient
x1="46.395508"
y1="12.707516"
x2="46.395508"
y2="38.409042"
id="linearGradient3795-2"
xlink:href="#linearGradient3587-6-5-3-5-7"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.4100229,0,0,0.5447147,28.02322,-5.9219706)" />
<linearGradient
id="linearGradient3587-6-5-3-5-7">
<stop
id="stop3589-9-2-2-6-2"
style="stop-color:#000000;stop-opacity:1"
offset="0" />
<stop
id="stop3591-7-4-73-5-1"
style="stop-color:#363636;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-5-7"
id="linearGradient3810"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.4100229,0,0,0.5447147,28.02322,-5.9219706)"
x1="46.395508"
y1="12.707516"
x2="46.395508"
y2="38.409042" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-5-7"
id="linearGradient3813"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.4100229,0,0,0.5447147,10.462268,-5.974418)"
x1="46.395508"
y1="12.707516"
x2="46.395508"
y2="38.409042" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-5-7"
id="linearGradient3816"
gradientUnits="userSpaceOnUse"
x1="7.4930072"
y1="0.0035526801"
x2="7.4930072"
y2="14.998127" />
</defs> </defs>
<g <g opacity=".6" transform="translate(.027972 .944)" fill="#fff">
transform="translate(0.027972,0.944)" <path d="m6.9375 0.056c-0.2484 0-0.4375 0.18908-0.4375 0.4375v1.25c-0.5539 0.1422-1.0512 0.3719-1.5312 0.6563l-0.9063-0.9063c-0.17566-0.17566-0.44934-0.17566-0.625 0l-1.5 1.5c-0.17566 0.17566-0.17566 0.44934 0 0.625l0.9063 0.9063c-0.2844 0.48-0.5141 0.9773-0.6563 1.5312h-1.25c-0.24842 0-0.4375 0.1891-0.4375 0.4375v2.125c1e-8 0.24842 0.18908 0.4375 0.4375 0.4375h1.25c0.1422 0.5539 0.37188 1.0512 0.65625 1.5312l-0.9063 0.907c-0.17566 0.17566-0.17566 0.44934 0 0.625l1.5 1.5c0.17566 0.17566 0.44934 0.17566 0.625 0l0.9063-0.907c0.48 0.285 0.9773 0.514 1.5312 0.656v1.25c1e-7 0.24842 0.18908 0.4375 0.4375 0.4375h2.125c0.2484 0 0.4375-0.189 0.4375-0.438v-1.25c0.5539-0.1422 1.0512-0.37188 1.5312-0.65625l0.90625 0.90625c0.17566 0.17566 0.44934 0.17566 0.625 0l1.5-1.5c0.17566-0.17566 0.17566-0.44934 0-0.625l-0.906-0.906c0.285-0.48 0.514-0.9771 0.656-1.531h1.25c0.249 0 0.438-0.1891 0.438-0.4375v-2.125c0-0.2484-0.189-0.4375-0.438-0.4375h-1.25c-0.142-0.5539-0.371-1.0512-0.656-1.5312l0.906-0.9063c0.17566-0.17566 0.17566-0.44934 0-0.625l-1.5-1.5c-0.17566-0.17566-0.44934-0.17566-0.625 0l-0.906 0.9063c-0.48-0.2844-0.977-0.5141-1.531-0.6563v-1.25c0-0.24842-0.1891-0.4375-0.4375-0.4375zm1.0625 4.1573c1.8451 0 3.3427 1.4975 3.3427 3.3427 0 1.8451-1.4975 3.3427-3.3427 3.3427-1.8451 0-3.3427-1.4979-3.3427-3.343s1.4976-3.3427 3.3427-3.3427z" display="block" fill="#fff"/>
id="g2479-3"
style="opacity:0.6;fill:#ffffff;fill-opacity:1">
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994000000003;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
id="path2426-2"
d="M 6.9375,0.056 C 6.6890831,0.056 6.5,0.245082 6.5,0.4935 l 0,1.25 C 5.9460971,1.885701 5.448836,2.115378 4.96875,2.39975 L 4.0625,1.4935 c -0.1756569,-0.175658 -0.449342,-0.175658 -0.625,0 l -1.5,1.5 c -0.175657,0.175658 -0.175657,0.449342 0,0.625 L 2.84375,4.52475 C 2.5593789,5.004836 2.329701,5.502097 2.1875,6.056 l -1.25,0 C 0.68908301,6.056 0.5,6.245082 0.5,6.4935 l 0,2.125 c 1e-8,0.248418 0.189083,0.4375 0.4375,0.4375 l 1.25,0 c 0.1422009,0.553903 0.371879,1.051164 0.65625,1.53125 L 1.9375,11.4935 c -0.175657,0.175658 -0.175657,0.449342 0,0.625 l 1.5,1.5 c 0.1756579,0.175658 0.449342,0.175658 0.625,0 L 4.96875,12.71225 C 5.4488361,12.996622 5.946097,13.2263 6.5,13.3685 l 0,1.25 c 1e-7,0.248418 0.189083,0.4375 0.4375,0.4375 l 2.125,0 C 9.3109176,15.056 9.5,14.866918 9.5,14.6185 l 0,-1.25 c 0.553903,-0.1422 1.051164,-0.371878 1.53125,-0.65625 l 0.90625,0.90625 c 0.175658,0.175658 0.449342,0.175658 0.625,0 l 1.5,-1.5 c 0.175658,-0.175658 0.175658,-0.449342 0,-0.625 L 13.15625,10.58725 C 13.440622,10.107164 13.6703,9.609903 13.8125,9.056 l 1.25,0 C 15.310918,9.056 15.5,8.866917 15.5,8.6185 l 0,-2.125 C 15.5,6.245082 15.310917,6.056 15.0625,6.056 l -1.25,0 C 13.6703,5.502097 13.440622,5.004836 13.15625,4.52475 L 14.0625,3.6185 c 0.175658,-0.175658 0.175658,-0.449342 0,-0.625 l -1.5,-1.5 c -0.175658,-0.175658 -0.449342,-0.175658 -0.625,0 L 11.03125,2.39975 C 10.551164,2.115378 10.053903,1.885701 9.5,1.7435 l 0,-1.25 C 9.4999996,0.245082 9.310918,0.056 9.0625,0.056 z M 8,4.2133427 c 1.8451469,0 3.342657,1.4975104 3.342657,3.3426573 0,1.8451469 -1.4975101,3.342657 -3.342657,3.342657 C 6.1548531,10.898657 4.6573427,9.4011469 4.6573427,7.556 4.6573427,5.7108531 6.1548531,4.2133427 8,4.2133427 z"
sodipodi:nodetypes="ssccssssccssssccssssccssssccssssccssssccssssccssssssss" />
</g> </g>
<g <g opacity=".7" transform="translate(0 -.056)" fill="url(#c)">
id="g2479" <path d="m6.9375 0.056c-0.2484 0-0.4375 0.18908-0.4375 0.4375v1.25c-0.5539 0.1422-1.0512 0.3719-1.5312 0.6563l-0.9063-0.9063c-0.17566-0.17566-0.44934-0.17566-0.625 0l-1.5 1.5c-0.17566 0.17566-0.17566 0.44934 0 0.625l0.9063 0.9063c-0.2844 0.48-0.5141 0.9773-0.6563 1.5312h-1.25c-0.24842 0-0.4375 0.1891-0.4375 0.4375v2.125c1e-8 0.24842 0.18908 0.4375 0.4375 0.4375h1.25c0.1422 0.5539 0.37188 1.0512 0.65625 1.5312l-0.9063 0.907c-0.17566 0.17566-0.17566 0.44934 0 0.625l1.5 1.5c0.17566 0.17566 0.44934 0.17566 0.625 0l0.9063-0.907c0.48 0.285 0.9773 0.514 1.5312 0.656v1.25c1e-7 0.24842 0.18908 0.4375 0.4375 0.4375h2.125c0.2484 0 0.4375-0.189 0.4375-0.438v-1.25c0.5539-0.1422 1.0512-0.37188 1.5312-0.65625l0.90625 0.90625c0.17566 0.17566 0.44934 0.17566 0.625 0l1.5-1.5c0.17566-0.17566 0.17566-0.44934 0-0.625l-0.906-0.906c0.285-0.48 0.514-0.9771 0.656-1.531h1.25c0.249 0 0.438-0.1891 0.438-0.4375v-2.125c0-0.2484-0.189-0.4375-0.438-0.4375h-1.25c-0.142-0.5539-0.371-1.0512-0.656-1.5312l0.906-0.9063c0.17566-0.17566 0.17566-0.44934 0-0.625l-1.5-1.5c-0.17566-0.17566-0.44934-0.17566-0.625 0l-0.906 0.9063c-0.48-0.2844-0.977-0.5141-1.531-0.6563v-1.25c0-0.24842-0.1891-0.4375-0.4375-0.4375zm1.0625 4.1573c1.8451 0 3.3427 1.4975 3.3427 3.3427 0 1.8451-1.4975 3.3427-3.3427 3.3427-1.8451 0-3.3427-1.4979-3.3427-3.343s1.4976-3.3427 3.3427-3.3427z" display="block" fill="url(#b)"/>
transform="translate(0,-0.056)"
style="fill-opacity:1;fill:url(#linearGradient3784);opacity:0.7">
<path
inkscape:connector-curvature="0"
style="fill:url(#linearGradient3816);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994000000003;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
id="path2426"
d="M 6.9375,0.056 C 6.6890831,0.056 6.5,0.245082 6.5,0.4935 l 0,1.25 C 5.9460971,1.885701 5.448836,2.115378 4.96875,2.39975 L 4.0625,1.4935 c -0.1756569,-0.175658 -0.449342,-0.175658 -0.625,0 l -1.5,1.5 c -0.175657,0.175658 -0.175657,0.449342 0,0.625 L 2.84375,4.52475 C 2.5593789,5.004836 2.329701,5.502097 2.1875,6.056 l -1.25,0 C 0.68908301,6.056 0.5,6.245082 0.5,6.4935 l 0,2.125 c 1e-8,0.248418 0.189083,0.4375 0.4375,0.4375 l 1.25,0 c 0.1422009,0.553903 0.371879,1.051164 0.65625,1.53125 L 1.9375,11.4935 c -0.175657,0.175658 -0.175657,0.449342 0,0.625 l 1.5,1.5 c 0.1756579,0.175658 0.449342,0.175658 0.625,0 L 4.96875,12.71225 C 5.4488361,12.996622 5.946097,13.2263 6.5,13.3685 l 0,1.25 c 1e-7,0.248418 0.189083,0.4375 0.4375,0.4375 l 2.125,0 C 9.3109176,15.056 9.5,14.866918 9.5,14.6185 l 0,-1.25 c 0.553903,-0.1422 1.051164,-0.371878 1.53125,-0.65625 l 0.90625,0.90625 c 0.175658,0.175658 0.449342,0.175658 0.625,0 l 1.5,-1.5 c 0.175658,-0.175658 0.175658,-0.449342 0,-0.625 L 13.15625,10.58725 C 13.440622,10.107164 13.6703,9.609903 13.8125,9.056 l 1.25,0 C 15.310918,9.056 15.5,8.866917 15.5,8.6185 l 0,-2.125 C 15.5,6.245082 15.310917,6.056 15.0625,6.056 l -1.25,0 C 13.6703,5.502097 13.440622,5.004836 13.15625,4.52475 L 14.0625,3.6185 c 0.175658,-0.175658 0.175658,-0.449342 0,-0.625 l -1.5,-1.5 c -0.175658,-0.175658 -0.449342,-0.175658 -0.625,0 L 11.03125,2.39975 C 10.551164,2.115378 10.053903,1.885701 9.5,1.7435 l 0,-1.25 C 9.4999996,0.245082 9.310918,0.056 9.0625,0.056 z M 8,4.2133427 c 1.8451469,0 3.342657,1.4975104 3.342657,3.3426573 0,1.8451469 -1.4975101,3.342657 -3.342657,3.342657 C 6.1548531,10.898657 4.6573427,9.4011469 4.6573427,7.556 4.6573427,5.7108531 6.1548531,4.2133427 8,4.2133427 z"
sodipodi:nodetypes="ssccssssccssssccssssccssssccssssccssssccssssccssssssss" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -1,70 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m12.228 1037.4c-1.3565 0-2.4592 1.0977-2.4592 2.4542 0 0.075 0.0084 0.1504 0.0149 0.2236l-4.7346 2.4145c-0.4291-0.3667-0.98611-0.5863-1.5947-0.5863-1.3565 0-2.4542 1.0977-2.4542 2.4543 0 1.3565 1.0977 2.4542 2.4542 2.4542 0.54607 0 1.0528-0.1755 1.4606-0.477l4.8637 2.4741c-0.0024 0.044-0.0099 0.089-0.0099 0.1342 0 1.3565 1.1027 2.4542 2.4592 2.4542s2.4542-1.0977 2.4542-2.4542-1.0977-2.4592-2.4542-2.4592c-0.63653 0-1.218 0.2437-1.6544 0.6409l-4.6953-2.4c0.01892-0.1228 0.03478-0.2494 0.03478-0.3775 0-0.072-0.0089-0.1437-0.0149-0.2137l4.7395-2.4145c0.42802 0.3627 0.98488 0.5813 1.5898 0.5813 1.3565 0 2.4542-1.1027 2.4542-2.4592s-1.0977-2.4542-2.4542-2.4542z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="share.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.919596"
inkscape:cx="-4.1004833"
inkscape:cy="12.085717"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid2985"
empspacing="8"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
dotted="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;overflow:visible"
d="m 12.227825,1037.3622 c -1.356528,0 -2.45919,1.0977 -2.45919,2.4542 0,0.075 0.0084,0.1504 0.0149,0.2236 l -4.734564,2.4145 c -0.429101,-0.3667 -0.986112,-0.5863 -1.594748,-0.5863 -1.356527,0 -2.454223,1.0977 -2.454223,2.4543 0,1.3565 1.097696,2.4542 2.454223,2.4542 0.546067,0 1.052763,-0.1755 1.46061,-0.477 l 4.863734,2.4741 c -0.0024,0.044 -0.0099,0.089 -0.0099,0.1342 0,1.3565 1.102663,2.4542 2.45919,2.4542 1.356527,0 2.454223,-1.0977 2.454223,-2.4542 0,-1.3565 -1.097696,-2.4592 -2.454223,-2.4592 -0.636532,0 -1.218019,0.2437 -1.654365,0.6409 L 5.878678,1044.7 c 0.01892,-0.1228 0.03478,-0.2494 0.03478,-0.3775 0,-0.072 -0.0089,-0.1437 -0.0149,-0.2137 l 4.73953,-2.4145 c 0.428025,0.3627 0.984876,0.5813 1.58978,0.5813 1.356527,0 2.454223,-1.1027 2.454223,-2.4592 0,-1.3565 -1.097696,-2.4542 -2.454223,-2.4542 z"
id="circle54"
inkscape:connector-curvature="0" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1003 B

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -1,73 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m1 1042.4v4h3l3 3h1v-10h-1l-3 3z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="sound.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/sound.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.1681698"
inkscape:cx="17.017228"
inkscape:cy="33.367762"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 1,1042.3622 0,4 3,0 3,3 1,0 0,-10 -1,0 -3,3 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 373 B

View File

@ -1,78 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m1 1042.4v4h3l3 3h1v-10h-1l-3 3z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/" <path d="m13.25 1039.4-0.78125 0.625c0.96519 1.1998 1.5312 2.7153 1.5312 4.375s-0.56606 3.1752-1.5312 4.375l0.78125 0.625c1.0983-1.3697 1.75-3.1078 1.75-5s-0.65174-3.6303-1.75-5zm-1.5625 1.25-0.8125 0.6563c0.68791 0.8565 1.125 1.9096 1.125 3.0937s-0.43709 2.2372-1.125 3.0938l0.8125 0.6562c0.82312-1.0271 1.3125-2.3314 1.3125-3.75s-0.48938-2.7229-1.3125-3.75zm-1.5625 1.25-0.78125 0.625c0.41127 0.5135 0.65625 1.1659 0.65625 1.875s-0.24498 1.3615-0.65625 1.875l0.78125 0.625c0.54532-0.6836 0.875-1.5576 0.875-2.5s-0.32968-1.8164-0.875-2.5z"/>
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="sound-off.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/pause.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.1681698"
inkscape:cx="17.017228"
inkscape:cy="33.367762"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="776"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 1,1042.3622 0,4 3,0 3,3 1,0 0,-10 -1,0 -3,3 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 13.25,1039.3622 -0.78125,0.625 c 0.965189,1.1998 1.53125,2.7153 1.53125,4.375 0,1.6597 -0.566061,3.1752 -1.53125,4.375 l 0.78125,0.625 c 1.098257,-1.3697 1.75,-3.1078 1.75,-5 0,-1.8922 -0.651743,-3.6303 -1.75,-5 z m -1.5625,1.25 -0.8125,0.6563 c 0.687912,0.8565 1.125,1.9096 1.125,3.0937 0,1.1841 -0.437088,2.2372 -1.125,3.0938 l 0.8125,0.6562 c 0.823121,-1.0271 1.3125,-2.3314 1.3125,-3.75 0,-1.4186 -0.489379,-2.7229 -1.3125,-3.75 z m -1.5625,1.25 -0.78125,0.625 c 0.411273,0.5135 0.65625,1.1659 0.65625,1.875 0,0.7091 -0.244977,1.3615 -0.65625,1.875 l 0.78125,0.625 c 0.545316,-0.6836 0.875,-1.5576 0.875,-2.5 0,-0.9424 -0.329684,-1.8164 -0.875,-2.5 z"
id="path3105"
inkscape:connector-curvature="0" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 391 B

View File

@ -1,61 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 16 9" xml:space="preserve" overflow="visible" height="9px" width="16px" version="1.1" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 16 9">
<path d="m7.999 0c-3.109 0-5.926 1.719-7.999 4.5 2.073 2.781 4.89 4.5 7.999 4.5 3.111 0 5.928-1.719 8.001-4.5-2.073-2.781-4.892-4.5-8.001-4.5zm0.001 7.5c-1.657 0-3-1.343-3-3s1.343-3 3-3c1.657 0 3 1.343 3 3s-1.343 3-3 3z" fill="#222"/>
<svg <circle cy="4.501" cx="8" r="1.5" fill="#222"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
width="16px"
height="9px"
viewBox="0 0 16 9"
overflow="visible"
enable-background="new 0 0 16 9"
xml:space="preserve"
id="svg2"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="eye_all.svg"><metadata
id="metadata12"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1021"
id="namedview10"
showgrid="false"
inkscape:zoom="20.75"
inkscape:cx="8.0963855"
inkscape:cy="4.5"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<defs
id="defs4">
</defs>
<path
fill="#575756"
d="M7.999,0C4.89,0,2.073,1.719,0,4.5C2.073,7.281,4.89,9,7.999,9C11.11,9,13.927,7.281,16,4.5 C13.927,1.719,11.108,0,7.999,0z M8,7.5c-1.657,0-3-1.343-3-3s1.343-3,3-3c1.657,0,3,1.343,3,3S9.657,7.5,8,7.5z"
id="path6"
style="fill:#222222;fill-opacity:1" />
<circle
fill="#575756"
cx="8"
cy="4.501"
r="1.5"
id="circle8"
style="fill:#222222;fill-opacity:1" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 211 B

View File

@ -1,88 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16px" width="16px" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<path style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m12 12-4-8-4 7.989z"/>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
id="svg6077"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="triangle-n.svg"
inkscape:export-filename="triangle-n.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs6079">
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-4-5-4-0-1"
id="linearGradient7308"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0,-0.54681372,-0.39376081,0,14.87048,24.63452)"
x1="34.992828"
y1="0.94087797"
x2="34.992828"
y2="33.955856" />
<linearGradient
id="linearGradient3587-6-5-3-4-5-4-0-1">
<stop
offset="0"
style="stop-color:#000000;stop-opacity:1"
id="stop3589-9-2-2-3-2-53-4-3" />
<stop
offset="1"
style="stop-color:#363636;stop-opacity:1"
id="stop3591-7-4-73-7-9-86-9-3" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.197802"
inkscape:cx="-6.9113863"
inkscape:cy="8"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1280"
inkscape:window-height="773"
inkscape:window-x="0"
inkscape:window-y="-1"
inkscape:window-maximized="1" />
<metadata
id="metadata6082">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
d="M 12,12 8,3.9999999 3.9999999,11.989 z"
id="path3716"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 211 B

View File

@ -1,88 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16px" width="16px" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<path style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m4 4 4 8 4-7.989z"/>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
id="svg6077"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="triangle-s.svg"
inkscape:export-filename="/home/tol/tanghus-owncloud/core/img/actions/triangle-s.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs6079">
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-4-5-4-0-1"
id="linearGradient7308"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0,0.54681372,-0.39376081,0,14.87048,-9.6346)"
x1="34.992828"
y1="0.94087797"
x2="34.992828"
y2="33.955856" />
<linearGradient
id="linearGradient3587-6-5-3-4-5-4-0-1">
<stop
offset="0"
style="stop-color:#000000;stop-opacity:1"
id="stop3589-9-2-2-3-2-53-4-3" />
<stop
offset="1"
style="stop-color:#363636;stop-opacity:1"
id="stop3591-7-4-73-7-9-86-9-3" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.197802"
inkscape:cx="1.0398514"
inkscape:cy="8"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1280"
inkscape:window-height="773"
inkscape:window-x="0"
inkscape:window-y="-1"
inkscape:window-maximized="1" />
<metadata
id="metadata6082">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
d="M 4,3.9999999 8,12 12,4.0109999 z"
id="path3716"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 437 B

View File

@ -1,73 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m10 1051.4h-4l-1-7h-4l7-7 7 7h-4z" fill="#fff"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="upload.svg"
inkscape:export-filename="/home/jancborchardt/owncloud/core/img/actions/play.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="17.921875"
inkscape:cx="-5.3403178"
inkscape:cy="10.148736"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="774"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 10,1051.3622 -4,0 -1,-7 -4,0 7,-7 7,7 -4,0 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 386 B

View File

@ -1,73 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<g transform="translate(0 -1036.4)">
<svg <path d="m10 1051.4h-4l-1-7h-4l7-7 7 7h-4z"/>
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg3875"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="upload-white.svg"
inkscape:export-filename="/home/user/owncloud/core/img/actions/upload-white.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3877" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="17.921875"
inkscape:cx="-5.3403178"
inkscape:cy="10.148736"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1280"
inkscape:window-height="774"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3883"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3880">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 10,1051.3622 -4,0 -1,-7 -4,0 7,-7 7,7 -4,0 z"
id="path3086"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 374 B

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Some files were not shown because too many files have changed in this diff Show More