Commit Graph

588 Commits

Author SHA1 Message Date
Björn Schießle af2cd6f541 always return normalized path 2013-07-05 15:59:57 +02:00
Björn Schießle 3043dbfb95 delete file keys from the correct location 2013-07-05 15:59:46 +02:00
Björn Schießle eb2587a08f move isSystemWideMountPoint() to util.php 2013-07-05 15:59:29 +02:00
Björn Schießle f2de4cb342 some performance improvements, check for system wide mounts only once while writing share keys 2013-07-05 15:59:19 +02:00
Björn Schießle 2e56f0e2f8 fix path to OC_Mount_Config 2013-07-05 15:59:06 +02:00
Björn Schießle 3e4dcafa89 handle system wide mount points 2013-07-05 15:58:55 +02:00
VicDeo f67fc78531 Merge pull request #3899 from owncloud/encryption_check_php_version
check php version, the encryption app needs php >= 5.3.3
2013-07-04 06:53:17 -07:00
Björn Schießle 4c1820a2a1 Merge pull request #3858 from owncloud/more_ssl_error_messages
add openssl_error_string() output to the owncloud.log
2013-07-02 07:58:22 -07:00
Björn Schießle 4d4484fac1 Merge pull request #3870 from owncloud/reset_migration_status
introduce pre-disable-app hook and first usage in files_encryption
2013-07-02 07:26:48 -07:00
Thomas Müller a7f2563990 typo 2013-07-01 21:12:21 +02:00
Björn Schießle d5c4854708 cast result to bool 2013-07-01 17:18:16 +02:00
Björn Schießle 16a719173f add correct php version 2013-07-01 12:23:26 +02:00
Björn Schießle adcee5b695 check php version, the encryption app needs php >= 5.3.3 2013-07-01 12:16:36 +02:00
Björn Schießle 2e6ebe1ab4 fix function documentation 2013-06-27 14:14:25 +02:00
Björn Schießle c4aef89278 introduce pre-disable-app hook and use it for the encryption app to reset migration status if the app was disabled 2013-06-27 14:09:22 +02:00
Björn Schießle 5a20c8b66f add openssl_error_string() output to the owncloud.log 2013-06-26 15:51:22 +02:00
Jörn Friedrich Dreyer c79f7f4f3c fix numRows usage in files_encryption 2013-06-24 16:29:59 +02:00
Björn Schießle fe61230cc1 always have a defined return value 2013-06-19 16:55:31 +02:00
Björn Schießle e2e370f199 some more error messages 2013-06-19 15:58:34 +02:00
Björn Schießle 83d98e2d8b add some more error messages, in case something went wrong 2013-06-19 15:52:33 +02:00
Florin Peter 8566881758 fix for path_hash not unique as reported at #3641 2013-06-13 20:52:34 +02:00
Florin Peter 35da408222 fix memory problems as reported at #3620 2013-06-13 20:51:22 +02:00
Björn Schießle 7cfb0dc406 Merge branch 'master' into files_encryption_check_private_key
Conflicts:
	apps/files_encryption/appinfo/app.php
	apps/files_encryption/lib/util.php
2013-06-13 13:17:35 +02:00
Björn Schießle bc2862fcb9 Merge branch 'master' into files_encryption_upgrade_fix 2013-06-13 12:53:29 +02:00
Björn Schießle 77944cf7b8 fix typo in var name 2013-06-13 10:11:23 +02:00
Björn Schießle 27fcdb3af5 Merge branch 'master' into files_encryption_upgrade_fix
Conflicts:
	apps/files_encryption/tests/crypt.php
2013-06-12 20:53:45 +02:00
Björn Schießle c78a90fd54 use number of manipulated rows as idicator if it was possible to enter the migration mode 2013-06-12 12:21:11 +02:00
Björn Schießle 20ddd6e1c7 Merge branch 'master' into files_encryption_check_private_key
Conflicts:
	apps/files_encryption/tests/crypt.php
2013-06-11 15:19:02 +02:00
Björn Schießle 3ec6b19cdf use constants for different migration status 2013-06-11 13:07:39 +02:00
Björn Schießle 5fafd55108 make sure that only one process can enter the migration mode 2013-06-11 12:03:50 +02:00
Morris Jobke 1da112750e Merge pull request #3647 from owncloud/missing_backticks
add missing backticks all over the place
2013-06-10 05:15:07 -07:00
Björn Schießle 13017ce9e1 Merge branch 'master' into files_encryption_check_private_key
Conflicts:
	settings/ajax/changepassword.php
2013-06-10 12:12:07 +02:00
Jörn Friedrich Dreyer 124f34422c add missing backticks all over the place 2013-06-10 09:53:29 +02:00
Björn Schießle d7a9852f7b use pre_setPassword hook to update the encryption keys if the back-end doesn't support password change; improved output to let the admin know what happened 2013-06-06 13:32:02 +02:00
Florin Peter 14ac4fab05 better handling for http post 2013-06-04 00:41:47 +02:00
Florin Peter ef97481a0d changed redirect handling 2013-06-03 23:41:57 +02:00
Florin Peter dc8bcf0688 reformat code 2013-06-03 18:42:13 +02:00
Björn Schießle 471d2b732c introduce decryptPrivateKey() method which also checks if the result is a valid private key to avoid additional checks on various places 2013-06-03 14:19:31 +02:00
Florin Peter 46e5e9bd73 cleanup unused method legacyKeyRecryptKeyfile 2013-05-31 22:49:32 +02:00
Florin Peter a134ffcf2c code optimized and cleaned up unused vars 2013-05-31 16:52:33 +02:00
Florin Peter e9d1ea712c allow the user to login but do not allow upload and show error message on the web 2013-05-31 15:57:18 +02:00
Florin Peter 2e3bfdb12c check if the decrypted private key is valid on login and on read/write files 2013-05-31 13:58:58 +02:00
Florin Peter 1bfe975938 Merge branch 'master' into files_encryption_upgrade_fix
Conflicts:
	apps/files_encryption/lib/util.php
2013-05-31 12:58:12 +02:00
Florin Peter 96ef926161 normalize path to prevent following split to fail 2013-05-31 01:57:32 +02:00
Florin Peter 8e324aad38 fix re-encrypt legacy files 2013-05-31 01:36:49 +02:00
Florin Peter 986e9dd362 use legacyDecrypt to decrypt key file like the previous files_encryption 2013-05-31 01:35:48 +02:00
Florin Peter eaa4f92275 added our own file extension .part will not work here if we use file_get_contents so we used our own extension '.etmp' 2013-05-30 22:07:36 +02:00
Florin Peter 8c17f26226 fixed problems with file_get_contents and file_put_contents this problem was related to text editor with big text files 2013-05-30 01:13:22 +02:00
Florin Peter 313631edf6 Merge branch 'master' into file_encryption_external_storage_fixes
Conflicts:
	apps/files_encryption/hooks/hooks.php
2013-05-30 00:45:29 +02:00
Florin Peter 1202ab9995 Merge branch 'master' into file_encryption_external_storage_fixes 2013-05-29 19:19:40 +02:00
Florin Peter d265264542 fix for share folder on external storage 2013-05-29 19:11:39 +02:00
Björn Schießle b44192f366 check list of users with access to the file from the bottom to the top. This way we avoid calling getFileInfo() on every dir, which creates a lot of overhead, especially for external storages 2013-05-29 13:10:26 +02:00
Florin Peter efd629462e changes after review 2013-05-29 12:23:33 +02:00
Florin Peter c398fc59ad Merge branch 'master' into remove_unused_vars
Conflicts:
	apps/files_encryption/hooks/hooks.php
	apps/files_encryption/lib/proxy.php
	apps/files_encryption/lib/session.php
	apps/files_encryption/lib/stream.php
2013-05-29 09:21:00 +02:00
Florin Peter 71a532fc4d fixed if fopen returns false typically on external storage 2013-05-28 20:50:14 +02:00
Florin Peter 4b4b447e2a fixed missing convert to new session handler 2013-05-28 17:06:37 +02:00
Florin Peter 6ae7bde788 fixed encryption session namespace to avoid problems 2013-05-28 17:04:35 +02:00
Robin Appelman cc0cf93136 merge master into sessionclass 2013-05-28 14:55:42 +02:00
Florin Peter 09b54ccb2b Merge branch 'master' into remove_unused_vars
Conflicts:
	apps/files_encryption/lib/session.php
	apps/files_encryption/lib/util.php
2013-05-28 11:00:49 +02:00
Florin Peter 0041711fe3 fix for undefined index 2013-05-28 09:36:14 +02:00
Florin Peter 6f9e425939 fix for losing private key while being logged in and accessing a public link 2013-05-28 09:27:04 +02:00
Robin Appelman 9c99048429 fix syntax error 2013-05-28 01:31:26 +02:00
Robin Appelman 44f9af5a7f Use the new session wrapper 2013-05-28 01:04:09 +02:00
Florin Peter e1e1c58969 changed to public log api 2013-05-27 20:51:52 +02:00
Florin Peter 7224fc98b2 replace == with === and replace != with !== 2013-05-27 20:44:38 +02:00
Björn Schießle 2c3c60c1af Merge branch 'master' into remove_unused_vars
Conflicts:
	apps/files_encryption/hooks/hooks.php
	apps/files_encryption/lib/crypt.php
	apps/files_encryption/lib/proxy.php
2013-05-27 18:09:35 +02:00
Björn Schießle 4c05259ccf legacyBlockDecryprt() needs to be public 2013-05-27 17:35:38 +02:00
Björn Schießle df22a7c495 make legacyDecrypt() private als always call legacyBlockDecrypt() from other classes 2013-05-27 17:35:28 +02:00
Björn Schießle 8b35578833 fix migration from old to new encryption 2013-05-27 17:35:06 +02:00
Florin Peter 5d32e214b7 reformat code 2013-05-27 17:26:58 +02:00
Florin Peter 690bf9b8c4 Merge branch 'master' into remove_unused_vars
Conflicts:
	apps/files_encryption/lib/util.php
2013-05-27 17:26:35 +02:00
Björn Schießle 1a3f7891ea remove unused varaibles 2013-05-27 15:31:26 +02:00
Florin Peter 80433fc4c4 Merge branch 'master' into file_encryption_util_is_error
Conflicts:
	apps/files_encryption/lib/util.php
2013-05-27 14:41:53 +02:00
Björn Schießle 5e243b48bb Merge pull request #3481 from owncloud/firsttime_enc
fix first time encryption after app was enabled
2013-05-27 05:17:31 -07:00
Florin Peter 89f0c8f39d added check by numRows()
changed to public api where it was possible
reformat code to comply with the coding guidelines
2013-05-27 12:41:55 +02:00
Florin Peter 788c5940f0 fixed error rising from fetchRow 2013-05-25 23:20:55 +02:00
Florin Peter 9a6cd89a69 added OC_DB::isError and logging 2013-05-25 21:33:05 +02:00
Björn Schießle f56802a437 no use the recoveryPassword var instead of accessing the POST array 2013-05-24 18:37:58 +02:00
Björn Schießle 5ce4149e75 fix first time encryption after app was enabled 2013-05-24 17:35:00 +02:00
Florin Peter 6c8de5ae6d fixes after review from @DeepDiver1975 2013-05-23 23:56:31 +02:00
Björn Schießle 7b07168c46 code clean up; nicer solution to solve the public link share problem if a user is logged in 2013-05-23 21:18:31 +02:00
Björn Schießle a9ebf2aabe fix public link share if a user is logged in 2013-05-23 20:30:07 +02:00
Florin Peter c6722581f9 fix pgsql error 2013-05-22 02:02:42 +02:00
Florin Peter afbfa742d7 improved tests 2013-05-22 01:11:55 +02:00
Florin Peter 9ca9a22c6a fixed finding encrypted files in subfolders and removed unused code 2013-05-22 00:54:47 +02:00
Florin Peter 1deeec93b7 fixed postFileSize 2013-05-21 21:09:25 +02:00
Björn Schießle 9d324db054 fix path to 3rdparty apps 2013-05-21 12:33:32 +02:00
Björn Schießle 4c27c7e199 fix path, needs to be relative to data/ 2013-05-21 12:22:03 +02:00
Björn Schießle 64591cf754 move 3rdparty dependencies to app 2013-05-21 10:30:24 +02:00
Florin Peter 4bf840e2ca cleanup unused code optimize tests 2013-05-21 00:00:55 +02:00
Florin Peter 1fa2f19ee4 removed dead code for delShareKey 2013-05-20 21:24:39 +02:00
Florin Peter 8e0540d0e4 key creation should never override a private or public key 2013-05-20 21:22:03 +02:00
Florin Peter 3b850a2524 reformat code added and changed phpdoc 2013-05-20 01:24:36 +02:00
Florin Peter 5d572c3449 update phpdoc 2013-05-19 22:31:00 +02:00
Florin Peter ddda2a1f79 changed database column 'recovery' to 'recovery_enabled' because recovery is a pgsql keyword
more info about pgsql keywords http://www.postgresql.org/docs/9.1/static/sql-keywords-appendix.html
2013-05-19 07:04:31 +02:00
Florin Peter 681252669a changed migrationStatus to migration_status for pgsql 2013-05-18 22:10:00 +02:00
Florin Peter 3aa48616a6 remove unused code 2013-05-17 22:44:45 +02:00
Florin Peter cea9208cec fix broken legacy tests 2013-05-17 21:59:53 +02:00
Björn Schießle eaa61b8539 fix migration to new encryption 2013-05-17 17:29:32 +02:00
Björn Schießle 002445e23d some typo fixed 2013-05-17 14:49:54 +02:00
Björn Schießle 93771f735b gremove unused code 2013-05-17 14:13:05 +02:00
Björn Schießle 0b40c1d08a Merge branch 'files_encryption' of github.com:owncloud/core into files_encryption 2013-05-17 11:20:17 +02:00
Björn Schießle ca6a77d39b upgrade from old encryption to the new one needs to generate share keys too 2013-05-17 11:15:36 +02:00
Florin Peter 42b4963dd0 moved enable and disable recovery to Helper class for unit tests 2013-05-17 00:58:41 +02:00
Florin Peter 3793e4d2d6 fix for recover files in subfolder 2013-05-16 22:57:55 +02:00
Florin Peter d40d6aa358 fix typo in addRecoveryKeys 2013-05-16 22:39:09 +02:00
Björn Schießle 9d1e60325c allow admin to recover users files in case of password lost 2013-05-16 14:53:04 +02:00
Florin Peter c651950a17 fix for re-share and removed check if file exists because we are sometime into a pre_put_contents hook 2013-05-16 00:34:45 +02:00
Florin Peter c0c4fe5fd3 fix if file is not yet created 2013-05-16 00:31:17 +02:00
Florin Peter ec2e193a44 removed unused code 2013-05-15 21:01:03 +02:00
Björn Schießle 57c0a7ed69 add recovery key to all files if the user enabled the feature and removes them again on disable 2013-05-15 17:56:45 +02:00
Björn Schießle 64d94c540a enable admin to change the recovery password 2013-05-15 16:12:20 +02:00
Björn Schießle 5b160edebb check if the user knows the correct recovery password before changing the recovery key settings 2013-05-15 14:02:13 +02:00
Florin Peter 499fe6ca8e disabled FileProxy in Keymanager::getPrivateKey 2013-05-15 02:36:23 +02:00
Florin Peter ddedf20106 prevent of infinite loop with FileProxy 2013-05-15 02:34:36 +02:00
Florin Peter 0a7aa6e8cd fix for Allowed memory size of xx bytes exhausted while reading big files 2013-05-14 22:32:39 +02:00
Florin Peter 84c56a5d56 fix for zero size files 2013-05-14 21:29:24 +02:00
Florin Peter 517105660d fix for public link share 2013-05-14 20:11:07 +02:00
Florin Peter 81ae4cb5d0 added test for public shared file via link 2013-05-14 00:00:20 +02:00
Florin Peter a4e9e2fc79 added post_deleteUser hook for cleanup public key 2013-05-13 22:49:27 +02:00
Florin Peter b2d021b2a5 added post_createUser hook 2013-05-13 22:34:11 +02:00
Florin Peter 61ed347d26 added handling for public file access via files_sharing link 2013-05-13 21:24:59 +02:00
Björn Schießle aa3eb6bb5b don't handle public share keys in lib/public/share.php but in apps/files_encryption/lib/util.php instead 2013-05-13 17:40:57 +02:00
Björn Schießle 517efdf952 don't create a recovery user, only generate recovery key similar to the public link share key 2013-05-13 17:26:21 +02:00
Björn Schießle d1e2e47592 generate random key name for share key to avoid name conflicts 2013-05-13 15:15:35 +02:00
Björn Schießle a6ef25ba08 use preShare hook only to check if all pub keys are available and the postShare hook to finaly update the shareKeys if the file was shared successfully 2013-05-13 14:28:45 +02:00
Florin Peter e88595638c fix for webdav 2013-05-11 00:23:30 +02:00
Florin Peter e25aa78caf added helper class and moved hook registration to it 2013-05-09 19:36:18 +02:00
Sam Tuke 163fe64016 Fixes to code formatting and indentation 2013-05-09 18:24:07 +02:00
Sam Tuke 92e28839ff Improvements to code formatting & indentation 2013-05-09 18:16:59 +02:00
Sam Tuke 3003dd46d1 Implemented initial recoveryAdmin functionality in crypto file proxy 2013-05-09 18:09:20 +02:00
Sam Tuke 101e037529 Fixed bugs with pre_share hook usage
Made sure new user being shared to is added to array of sharing users
2013-05-09 14:43:06 +02:00
Sam Tuke 28866de44b Added pre_share hook
Switched it for post_share hook in encryption hooks
Stop a file from being shared if the encryption procedure fails for any users
2013-05-08 16:22:08 +02:00
Florin Peter 8b54553872 fix for wrong file infos 2013-05-07 13:42:49 +02:00
Florin Peter a9649713d3 fix empty path 2013-05-07 13:42:08 +02:00
Florin Peter fe6d12ddec fix file info put on stream 2013-05-06 21:15:25 +02:00
Florin Peter 5610429a02 handling for re-share and re-unshare should work now 2013-05-05 23:41:42 +02:00
Sam Tuke c8946ea608 Added support for user-specified password for adminRecovery account in admin settings page
Made encryptAll() (file migration for unencrypted + legacy encrypted files) run only on first login for each user (status stored in DB)
Made recoveryAdmin user member of 'admin' user group automatically
Set recoveryadmin settings to only display on user settings if enabled by an admin
Updated encryption db xml schema
2013-05-04 16:14:38 +02:00
Florin Peter 9605d14a17 fixed re-share problems 2013-05-04 03:37:22 +02:00
Sam Tuke ba29147e34 Fixed recoveryadmin settings in user and admin settings pages (js, templates, ajax)
Renamed recovery methods in Util{} for clarity
Added note about bug causing slow page load and redundant keypair generation
recoveryAdmin functionality not yet complete
2013-05-01 19:21:01 +02:00
Florin Peter d3db4ee103 fixed re-share problems 2013-05-01 11:04:40 +02:00
Florin Peter fbbc76f281 fix for sharing files 2013-04-30 20:44:42 +02:00
Florin Peter 27ce7845b4 fixed tests, now tests should work via autotest.sh
files_encryption app is now enabled in enable_all.php
2013-04-30 01:35:46 +02:00
Florin Peter 4a63faf64b speed improvement 2013-04-29 01:43:59 +02:00
Florin Peter f9760f6521 improved file size 2013-04-27 23:34:25 +02:00
Florin Peter 7f1f0464a8 added self healing if file get remove from file cache 2013-04-27 23:02:42 +02:00
Florin Peter 770aebfb9e check if file exists before fixing file size 2013-04-27 20:22:38 +02:00
Florin Peter ba080e0d2e removed preRename and moved postRename to hooks.php
added postWrite and postTouch to fix file size and sharing keys
2013-04-27 20:21:46 +02:00
Florin Peter 05523b76c0 fix reusing keys
fix webdav part files
2013-04-27 20:18:57 +02:00
Florin Peter 813641e6e8 improved file size
created new method fixFileSize in Util so it can be used with files_trashbin
2013-04-27 00:05:20 +02:00
Florin Peter d017bbb065 fix share for renamed or moved files 2013-04-25 23:24:07 +02:00
Florin Peter 8ee7959092 implement postRename
@samtuke no need anymore for fixPartialFilePath this is now handled by rename
share-keys are now handled properly
webdav .part files are handled properly
2013-04-25 22:49:47 +02:00
Florin Peter 328dea93c7 webdav fix for file chunking
upload with big files should now work
@samtuke and @schiesbn we need a solution for the cache files created by webdav
2013-04-25 20:23:54 +02:00
Florin Peter fac288a4ad added unencrypted file size to file cache
improved file size calculation and speeds
2013-04-25 15:20:06 +02:00
Florin Peter 170d09203f fixed file_proxy handling 2013-04-25 14:56:11 +02:00
Florin Peter f8819f54c2 Merge branch 'files_encryption' of https://github.com/owncloud/core into files_encryption 2013-04-23 19:09:01 +02:00
Florin Peter baa6fd639f improved file size handling 2013-04-23 19:08:52 +02:00
Sam Tuke b7d8da87d0 Development snapshot
working on stream handling (large files) in Util->encryptAll()
2013-04-23 18:41:01 +02:00
Sam Tuke c6bfc7315b Stream writing improved: working with dolphin + kate, gedit & nautilus give errors, suspect those issues are clientside
.part file paths fixed in stream{}
2013-04-23 17:36:35 +02:00
Sam Tuke a1d241783e Updated buglist 2013-04-23 14:12:28 +02:00
Florin Peter 8ab9433fdf fix wrong file path in proxy 2013-04-22 18:54:23 +02:00
Florin Peter 2827004634 Merge branch 'files_encryption' of https://github.com/owncloud/core into files_encryption 2013-04-22 18:51:11 +02:00
Florin Peter 37c7205941 fix wrong file path in util 2013-04-22 18:50:59 +02:00
Björn Schießle a4364a93d0 delete all share keys if a file gets deleted 2013-04-22 15:29:58 +02:00
Björn Schießle b5cb5dab51 fix encryption to owncloud user for public link shares 2013-04-22 14:30:10 +02:00
Björn Schießle b57478fa27 fix comment, remove unused variable 2013-04-22 14:14:28 +02:00
Björn Schießle 1705938848 removed some leftover code; use already existing var for path to users file folder 2013-04-22 12:32:38 +02:00
Florin Peter eade87dc79 Merge branch 'files_encryption' of https://github.com/owncloud/core into files_encryption 2013-04-22 12:32:35 +02:00
Florin Peter f6ac34afea improved handling for getSharingUsersArray 2013-04-22 12:25:55 +02:00
Björn Schießle 8a46e809f0 remove util::getPaths(), this function was broken and is replaced my util::getAllFiles(). When unsharing a folder only remove the share key for sub files if the user really no longer have access to the file. Can happen that a sub-file/-folder is shared to a group the user is a member of or explicitly once more to the same user 2013-04-22 12:22:07 +02:00
Björn Schießle 8790ceba25 Merge branch 'files_encryption' of github.com:owncloud/core into files_encryption 2013-04-22 11:59:26 +02:00
Björn Schießle a2ba3c8a43 fix sharing of folders. First we need to collect all files. Than we need to find all users with access to the file because this can vary from file to file and than we can encrypt it for all recipients 2013-04-22 11:58:39 +02:00
Florin Peter 6b47da10be improved rename and file size support
fix missing user_id on write
2013-04-22 04:40:49 +02:00
FlorinPeter 9a0b73070c Merge pull request #2992 from FlorinPeter/files_encryption
fix for trashbin
2013-04-20 05:35:29 -07:00
Björn Schießle 12785b93f1 make sure that all share keys get deleted if a file/folder gets unshared from a user/group 2013-04-19 13:17:08 +02:00
Florin Peter 0e1970438b fixed incorrect filesize, download via web is now possible
fixed broken file-info
2013-04-18 22:34:22 +02:00
Björn Schießle 2bd338c49f getUsersSharingFile() no longer needed, use getSharingUsersArray() instead; fix filterShareReadyUsers() to return the correct results 2013-04-18 20:02:27 +02:00
Björn Schießle 935d039860 necessary changes in util.php after the changes in \OCP\Share::getUsersSharingFile() (fe58e4b1a6) 2013-04-18 17:53:59 +02:00
Björn Schießle 39c717b24c some fixes to the keymanager class to identify the file owner and the owner path correctly. 2013-04-18 17:52:27 +02:00
Björn Schießle 1df36e0c88 rename $shareFilePath to $path to avoid confusions, it is not about paths to share files but about general path to files stored in ownCloud 2013-04-18 16:39:00 +02:00
Björn Schießle 40905c8941 fix file sharing, sharing files works now; moved the identification of file owner and the owner path in the keymanager functions so that other functions doesn't have to deal with it 2013-04-18 16:34:23 +02:00
Björn Schießle 7892fddcb9 remove ToDo, every time the file key gets encrypted new share keys are generated and a new encrypted filekey. We always need to use the latest share-keys and encrypted keyfiles 2013-04-18 15:44:57 +02:00
Björn Schießle bd3024242f always save key file, the key doesn't change but the encrypted keyfile change always the same way like the share-keys change 2013-04-18 15:42:28 +02:00
Björn Schießle a646a1169f return filename relative to users file dir and not relative to data dir 2013-04-18 13:41:21 +02:00
Florin Peter 2434739d69 fix for trashbin 2013-04-18 02:03:03 +02:00
Sam Tuke 6dd8c79461 Development snapshot
Working on stream{} write
2013-04-17 17:20:37 +02:00
Sam Tuke f89a3604aa Working on stream{} writing
Development snapshot
2013-04-16 18:29:22 +02:00
Sam Tuke 770dcbf663 Fixed stream{} reading of encrypted files (stream_read()) 2013-04-16 14:53:54 +02:00
Sam Tuke b4dd6ae36c Merge pull request #2885 from FlorinPeter/files_encryption
fix performance issues
2013-04-16 04:25:59 -07:00
Sam Tuke f378a7f572 Fixed proxy class handing of read / write files
Various work on other classes
2013-04-16 13:22:16 +02:00
Björn Schießle 854b920787 fix some more paths 2013-04-12 15:18:19 +02:00
Björn Schießle 02d1f86a53 fix some confusion about paths relative to the files dir and to the data dir 2013-04-12 14:30:02 +02:00
Björn Schießle f87229ddaf fix stream wrapper to make initial encryption work 2013-04-12 14:13:38 +02:00
Florin Peter 8f0bbdc5cb fix performance issues 2013-04-11 22:55:48 +02:00
Björn Schießle c3a284569b make sure that public-keys dir exists 2013-04-10 16:46:02 +02:00
Björn Schießle fff979a590 add $view as parameter for getFileKey() call 2013-04-10 15:14:44 +02:00
Björn Schießle 98de385b8a add $view as parameter for session constructor 2013-04-10 15:08:28 +02:00
Sam Tuke 400cf5beb3 Fixed naming bug of public owncloud key dir, which caused new keypair to be generated on each pageload 2013-04-09 19:11:38 +02:00
Sam Tuke 14451bdaf0 Development snapshot;
Fixed errors from Hooks::login();
Work on enable/disable recoveryAdmin for lost passwords in settings page (template, ajax, js);
Work on fixing sharing files to users (still broken);
2013-03-29 21:11:29 +01:00
Sam Tuke ff6f52d5ec Merge branch 'master' into files_encryption
Conflicts:
	apps/files_encryption/hooks/hooks.php
	apps/files_encryption/lib/crypt.php
	apps/files_encryption/lib/keymanager.php
2013-03-28 18:39:12 +01:00
Björn Schießle e717f7150e check for dir in deleteFileKey() and delShareKey(), to always handle all share keys and file keys on delete 2013-03-26 16:52:58 +01:00
Björn Schießle 73157133e8 reuse function provided in util.php 2013-03-26 16:22:26 +01:00
Björn Schießle 6beeb2466f also delete share keys if a different user than the owner deletes a shared file 2013-03-26 16:17:26 +01:00
Björn Schießle b1d620300e delete share keys if file gets deleted 2013-03-26 14:22:18 +01:00
Björn Schießle 5f233ee814 get the correct paths and owner to access shared files 2013-03-26 12:40:31 +01:00
Björn Schießle a65d741a3f move getUidAndFilename() tu util.php 2013-03-26 12:39:55 +01:00
Björn Schießle 890f0142a2 get shared keys from new location 2013-03-26 12:24:04 +01:00
Björn Schießle 5995b6996b always call stripUserFilesPath(), we need to keep the Shared/ to find the correct owner of the file later 2013-03-26 12:23:28 +01:00
Björn Schießle f10be4ea17 new file structure for share keys; sub-folder need to be generated each by one (we don't have a recursive mkdir) 2013-03-26 11:58:54 +01:00
Sam Tuke fd4e59b748 Added method for setting user keyfile recovery preference
Fixed method for checking if keyfile recovery is enabled for a user
Added unit test for above 2 methods
Made proxy{} always use sharing
Made proxy{} work regardless of sharing API enabled or not
Implemented proxy-based sharing to admin if user keyfile recovery is enabled
2013-03-20 19:26:59 +01:00
Sam Tuke c89fd49870 Improved folder creation code
Created stub method for checking user pwd recovery preference from db
Added pwd recovery column to db
Added comments
2013-03-19 19:53:15 +01:00
Sam Tuke c1f1fbda08 Fixed stream wrapper bugs
Switched encryptAll() to use stream-based instead of file-at-a-time encryption
Development snapshot
2013-03-09 19:18:34 +01:00
Tom Needham 370f202251 Rebase to current master 2013-03-05 00:25:56 +00:00
Björn Schießle f2b86d0227 make sure that $this->userId is initialized before using it as a parameter 2013-03-04 17:58:56 +01:00
Björn Schießle e65e6a12f1 define key size in constructor, otherwise the key size will depend on the servers openssl conf 2013-03-04 15:33:38 +01:00
Sam Tuke 0bc7d3bcf8 Added notes where to reuse old keys instead of generating new ones 2013-02-27 18:50:57 +00:00
Sam Tuke 953319a2c3 Made proxy class reuse existing keyfiles not gen new ones;
Added notes about reusing shareKeys
2013-02-27 18:46:44 +00:00
Sam Tuke 69bc42f920 Deleting encrypted files with missing keyfiles/shareKeys now succeeds 2013-02-27 16:15:03 +00:00
Sam Tuke 14eae441eb Unsharing a single file now works 2013-02-27 15:31:23 +00:00
Sam Tuke aae9b0b1bf Started work on post unshare hook
Development snapshot
2013-02-26 18:33:31 +00:00
Sam Tuke 4550ae6a69 Shared encrypted files now readable by both sharer and sharee 2013-02-26 18:11:29 +00:00
Björn Schießle ca1b94d890 make sure that home folders are mounted correctly before write/read keyfile 2013-02-25 12:29:07 +01:00
Björn Schießle 31c434b795 the default should be to encrypt all files if the user/admin doesn't specify a blacklist explicitely 2013-02-22 16:08:08 +01:00
Björn Schießle 40efeb9187 isSharedFile() doesn't detect all shares, just use getUsersSharingFile() directly either you get a list of users or not 2013-02-22 16:02:27 +01:00
Sam Tuke 2d267501a1 Development snapshot
Added comments
Added methods
2013-02-20 19:18:00 +00:00
Sam Tuke 1b880f2f96 Moved dependencies out of Crypt methods (encKeyfileToMultipleUsers)(DI)
Fixed bug preventing sharing with users other than 'ownCloud'
Added comments
Moved functionality into filterShareReadyUsers()
Other changes
2013-02-19 19:16:50 +00:00
Sam Tuke 14ae373dfe Fixed wrong array key reference 2013-02-19 17:42:37 +00:00
Björn Schießle fd629983fa remove debug output 2013-02-19 17:10:32 +01:00
Björn Schießle 8c35bbcba7 remove debug output, fix typo in file names 2013-02-14 16:33:57 +01:00
Bart Visscher cd35d257bb Fix NoSpaceAfterComma and SpaceBeforeComma 2013-02-14 08:36:26 +01:00
Björn Schießle 5005195db0 create keypair for ownCloud with empty passphrase, will be used for public link shares 2013-02-13 17:57:45 +01:00
Björn Schießle 9356f9a6bf add post_unshareALll hook, update recursively all keyfiles if a folder was shared/unshared 2013-02-13 17:23:27 +01:00
Björn Schießle 4952dfe956 add post_unshare hook, also add public link shares to the list of user with access to a file 2013-02-13 14:56:39 +01:00
Björn Schießle a692264fa4 add option to keep duplicates in the list of users with access to a file, e.g. for the unshare operation we need to know if access was granted more than once, for example as group share and as individual share 2013-02-12 17:00:33 +01:00
Björn Schießle d1bbb30385 also find users with access to the file if a folder above the actual file was already shared 2013-02-12 16:48:04 +01:00
Björn Schießle 1e5d03da80 use right location of the file is the source and not the target it is shared to 2013-02-12 12:45:54 +01:00
Björn Schießle 8eef919a75 take group shares into account if we retrieve the list a all recipients 2013-02-12 12:08:34 +01:00
Björn Schießle 3e3cee98c8 - moved the enrcyption of the filekey ifg file gets shared from the post shared hook to
Crypt::encKeyfileToMultipleUsers() because this can be reused if files get unshared
- switch from preUnshare hook to postUnshare hook because afterward we can simply get the
  updated list of users with access to the file and call Crypt::encKeyfileToMultipleUsers()
2013-02-11 13:28:37 +01:00
Björn Schießle 2787aafae6 added some TODOs 2013-02-11 12:12:21 +01:00
Sam Tuke 92f06243be Implementing sharing support
New file-specific methods in lib/public/share
Changes to how keyfiles are stored
2013-02-11 10:21:23 +00:00
Tom Needham f141f8b523 Add further capabilities to /cloud/capabilitites api call 2013-02-10 14:42:23 +01:00
Sam Tuke b3e59ca1e3 Work on post_share hook for files_encryption
New method in OCP\Share{}:: getUsersSharingFile()
Development shapshot
2013-02-09 18:39:32 +00:00
Sam Tuke 1aba986d9f Fixed bug causing nested file read over webdav to fail 2013-02-09 12:42:18 +00:00
Sam Tuke b95bc663af Merge branch 'master' into files_encryption-style-fixes
Conflicts:
	apps/files_encryption/lib/crypt.php
	apps/files_encryption/lib/util.php
2013-02-09 11:52:11 +00:00
Thomas Müller 7f58e27495 cleanup - more to come after 2013-02-09 18:01:38 +01:00
Sam Tuke 954a627483 Added comment 2013-02-06 18:24:35 +00:00
Sam Tuke 6870add18f Development snapshot 2013-02-06 15:08:36 +00:00
Sam Tuke 16a5ace434 Fixed bug causing encrypted files to be doubly encrypted at login
Added comments and docblocks
2013-02-06 14:30:40 +00:00
Sam Tuke 3b9e2f1bab Merge branch 'master' into files_encryption-style-fixes
Conflicts:
	apps/files_encryption/lib/crypt.php
	apps/files_encryption/lib/keymanager.php
2013-02-05 18:43:55 +00:00
Sam Tuke 20b1d12cbf Fixed comment typo, wrapped return value conditional on var assignment in session{} 2013-02-05 17:28:26 +00:00