Bjoern Schiessle
b2dde14dbc
coding style fixes
2013-09-06 16:07:18 +02:00
Bjoern Schiessle
93f4dec798
fix part file handling and real size calculation, this should also solve #4581
...
Conflicts:
apps/files_encryption/lib/stream.php
2013-09-06 16:06:34 +02:00
Bjoern Schiessle
f6830e7462
check shares for the real file and not for the .part file
2013-09-06 16:05:11 +02:00
Bjoern Schiessle
404e36323a
first check if a extension exists before comparing it
2013-09-06 16:05:03 +02:00
Bjoern Schiessle
597a3cf1ad
handle part files correctly
2013-09-06 16:04:56 +02:00
Bjoern Schiessle
fb462e83cc
no longer enforce log out, but provide useful errors/warnings instead
2013-09-06 12:27:40 +02:00
Arthur Schiwon
c01675de5d
more is_resource checks before readdir
2013-09-05 11:58:57 +02:00
Bjoern Schiessle
3d49631b8d
make sure that initial encryption also starts for a fresh installation
2013-09-03 13:24:30 +02:00
Bjoern Schiessle
bab63c22ee
encryption error messages, distinguish between a re-enabled encryption app and a password change from outside
2013-09-02 11:26:11 +02:00
Bjoern Schiessle
d7dca966a2
improved error messaging, initial commit
2013-08-30 10:17:50 +02:00
Bjoern Schiessle
1be11bb03d
don't change the etags if a file gets encrypted/decrypted to avoid that the sync client downloads all files again
2013-08-18 11:21:01 +02:00
Bjoern Schiessle
cabe92ef12
Merge branch 'master' into decrypt_files_again
...
Conflicts:
apps/files_encryption/tests/keymanager.php
2013-08-17 13:15:22 +02:00
Bjoern Schiessle
7b1067c2a0
change decryptUnknownKeyfile() to decryptKeyfile(), we always use openssl_seal
2013-08-12 16:19:08 +02:00
Bjoern Schiessle
0bab8935c9
preserve mtime if file gets encrypted/decrypted
2013-08-12 14:30:43 +02:00
Bjoern Schiessle
b982868c14
fix array declaration
2013-08-12 13:59:49 +02:00
Bjoern Schiessle
5ba8d38b7f
remove old comments, TODos, etc.
2013-08-09 15:55:17 +02:00
Bjoern Schiessle
23e9721644
use OC\Files\View to read encrypted file, so that it also works with external storages
2013-07-31 16:35:14 +02:00
Bjoern Schiessle
2549322763
we need to use the path relative to data/
2013-07-30 18:17:33 +02:00
Bjoern Schiessle
3640c99462
encrypt/decrypt file versions
2013-07-30 12:19:04 +02:00
Bjoern Schiessle
a7a7ef2b3a
improved error handling
2013-07-30 09:48:30 +02:00
Bjoern Schiessle
b6fa0e4eef
working decrypt files method
2013-07-29 17:06:05 +02:00
Björn Schießle
15cb8e4efd
only check for external mount points if the external storage app is enabled
2013-07-05 16:00:34 +02:00
Björn Schießle
af2cd6f541
always return normalized path
2013-07-05 15:59:57 +02:00
Björn Schießle
eb2587a08f
move isSystemWideMountPoint() to util.php
2013-07-05 15:59:29 +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
Jörn Friedrich Dreyer
c79f7f4f3c
fix numRows usage in files_encryption
2013-06-24 16:29:59 +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
Jörn Friedrich Dreyer
124f34422c
add missing backticks all over the place
2013-06-10 09:53:29 +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
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
8e324aad38
fix re-encrypt legacy files
2013-05-31 01:36:49 +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
6ae7bde788
fixed encryption session namespace to avoid problems
2013-05-28 17:04:35 +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
Florin Peter
7224fc98b2
replace == with === and replace != with !==
2013-05-27 20:44:38 +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
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
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
9ca9a22c6a
fixed finding encrypted files in subfolders and removed unused code
2013-05-22 00:54:47 +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
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
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
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
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
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
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
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
Florin Peter
e88595638c
fix for webdav
2013-05-11 00:23:30 +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
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
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
f9760f6521
improved file size
2013-04-27 23:34:25 +02:00
Florin Peter
770aebfb9e
check if file exists before fixing file size
2013-04-27 20:22:38 +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
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
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
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
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
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
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
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
a646a1169f
return filename relative to users file dir and not relative to data dir
2013-04-18 13:41:21 +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
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
Björn Schießle
fff979a590
add $view as parameter for getFileKey() call
2013-04-10 15:14:44 +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
Björn Schießle
a65d741a3f
move getUidAndFilename() tu util.php
2013-03-26 12:39:55 +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
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
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
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
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
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
680c5b3dad
Removed debugging output
2013-02-05 16:11:50 +00:00
Sam Tuke
a1f200c1e5
Cleaned up path formatting with new method stripUserFilesPath()
2013-02-05 15:59:28 +00:00
Sam Tuke
53248a9b60
Recryption of legacy encrypted files now working on login
2013-02-05 15:35:29 +00:00
Sam Tuke
0677d56ee2
Added debugging output relating to recrypting legacy files
2013-02-01 19:31:15 +00:00
Sam Tuke
06847f609b
Improved support for detecting and recrypting legacy files. Bugs remain.
2013-01-31 19:40:51 +00:00
Sam Tuke
c1f20fe37a
Made encyrption keyfiles be deleted when their parents are
...
Made encryption keyfiles be renamed when their parents are
Fixed bugs with encryptAll() execution on login
2013-01-29 19:54:40 +00:00
Sam Tuke
094213e231
Fixed many coding guidelines issues
...
Continued work on upgrade path via login hook listener
New spec file with notes
2013-01-24 18:37:34 +00:00