Bjoern Schiessle
266f1a2afa
harmonize copyright notice
2014-11-26 10:57:47 +01:00
Bjoern Schiessle
fd86d76f98
new folder structure for keys
...
all keys are now in files_encryption/key/path_to_file/filename/
share keys are named: user.shareKey
file key is named: fileKey
2014-11-26 10:57:47 +01:00
Bjoern Schiessle
4643a5d238
replace \OC:: with \OC::->getSession()
2014-11-25 16:15:32 +01:00
Bjoern Schiessle
917bef39b7
don't store private public-share-key in session
2014-11-25 12:32:25 +01:00
Bjoern Schiessle
f274833403
remove unused variable
2014-11-25 10:12:10 +01:00
Vincent Petry
391ece46e3
Fix file upload to ext storage when recovery key is enabled
...
Fixes an issue when uploading files to external storage when recovery
keys are enabled
The Util class only works with real users, so instantiating it with the
virtual recovery key user or public key user can cause issues.
2014-11-20 16:43:44 +01:00
Bjoern Schiessle
f6efbfcf0b
listen to the post_passwordReset hook, backup the old keys and create a new key pair for the user
2014-11-17 17:50:20 +01:00
Morris Jobke
146cb920c9
Merge pull request #12218 from owncloud/issue/10991-fixes
...
Issue/10991 Make unit tests pass on windows
2014-11-17 16:44:45 +01:00
Joas Schilling
b228226700
Fix single run of encryption tests and usages of uniqid() and fopen()
2014-11-17 10:48:13 +01:00
Vincent Petry
676b911b22
Merge pull request #12027 from owncloud/cleanup_exceptions
...
[encryption] clean up encryption exceptions
2014-11-10 12:46:53 +01:00
Bjoern Schiessle
2af7256267
only set the values we need and make sure that we write the file info for both
...
the real file and the part file, because some information from the part file
might be needed later
2014-11-07 15:20:52 +01:00
Bjoern Schiessle
3d19bb2e51
also try to get file info from part file
2014-11-07 15:17:24 +01:00
Bjoern Schiessle
a10ae2816e
clean up encryption exceptions
2014-11-07 13:48:31 +01:00
Bjoern Schiessle
c2a45c1238
throw exception if private key is missing
2014-11-05 13:05:46 +01:00
Bjoern Schiessle
0580c232d7
still try to encrypt files, even if the session is not initialized. The stream wrapper will throw an error which is better than silently continue.
2014-11-04 17:16:36 +01:00
Vincent Petry
146c46b73a
Merge pull request #11659 from jknockaert/master
...
rework getFileSize
2014-10-30 18:06:25 +01:00
jknockaert
4faee4011d
initialisation of cipher
2014-10-28 19:19:10 +01:00
Lukas Reschke
b3a04840b5
Add type hinting to functions
...
It's only reasonable to have proper type hinting here which might even help us to catch bugs.
2014-10-24 14:13:40 +02:00
Lukas Reschke
2d2a4741ce
Make files non executable
...
There is not much sense in having these files marked executable, we should avoid that.
2014-10-24 11:14:51 +02:00
jknockaert
da44150a15
small fix
2014-10-20 23:25:54 +02:00
jknockaert
d277ef6ac2
bugfixes
2014-10-20 23:04:11 +02:00
Jörn Friedrich Dreyer
cb3a4d22b1
make tests compatible with hook based skeleton generation
2014-10-20 11:29:20 +02:00
jknockaert
1b7e9d66b3
ok; still some bugs that had to be fixed
2014-10-20 00:28:41 +02:00
jknockaert
3be57d0169
small fix
2014-10-19 22:54:34 +02:00
jknockaert
e318858152
rework getFileSize
2014-10-19 22:27:15 +02:00
Thomas Müller
d37eee09a5
fixing usage of EncryptionException
2014-10-17 11:46:22 +02:00
Bjoern Schiessle
9147219377
we also encrypt/decrypt files in the versions folder for previews and if encryption is enabled/disabled
2014-10-06 12:02:08 +02:00
Vincent Petry
75593f87d5
Merge pull request #11137 from owncloud/enc-pregfix
...
Fix share key pattern matching
2014-09-23 12:36:34 +02:00
Vincent Petry
1e631754d7
Fix share key finding algorithm in various cases
...
Instead of inaccurate pattern matching, use the list of users who we
know have access to the file to build the list of share keys.
This covers the following cases:
- Move/copy files into a subfolder within a share
- Unsharing from a user
- Deleting files directlry / moving share keys to trashbin
2014-09-23 12:33:07 +02:00
Volkan Gezer
01808c8c84
fix typo
2014-09-19 18:22:09 +02:00
Bjoern Schiessle
a280859bf8
make sure that we really catch the files folder only
2014-09-19 11:47:18 +02:00
Bjoern Schiessle
2ee14c4734
create backup from all keys before recovery
2014-09-19 11:47:18 +02:00
Vincent Petry
da9f9ae9b3
Remove passing by reference to allow for proper GC
...
The garbage collector in PHP 5.3.10 does not properly release the file
handle when calling fclose() due to the fact that it is passed by
reference.
This has the side-effect of preventing file locks to be released as well
when the files_locking app is enabled.
This fix removes the useless passing by reference and now the file
handle and file lock are freed properly.
2014-09-12 19:51:47 +02:00
Jörn Friedrich Dreyer
f551917a3c
kill OC::$session
...
maintain deprecated \OC::$session when getting or setting the session via the server container or UserSession
restore order os OC::$session and OC::$CLI
remove unneded initialization of dummy session
write back session when $useCustomSession is true
log warning when deprecated app is used
2014-08-29 10:22:21 +02:00
Vincent Petry
f282a5cff0
Merge pull request #9754 from owncloud/enc_support_aes_256
...
[encryption] support aes 256
2014-08-13 12:34:21 +02:00
Bjoern Schiessle
da1feafc78
fix detection of system wide mount points
2014-08-12 21:14:22 +02:00
Bjoern Schiessle
0b3ddbed68
add logout hook to remove keys from session
2014-08-07 15:29:35 +02:00
Bjoern Schiessle
c738f71657
make the versions and encryption app aware of the copy operation
2014-07-30 15:14:01 +02:00
Bjoern Schiessle
de9d3797ff
update existing unit tests
2014-07-23 12:14:02 +02:00
Bjoern Schiessle
4bbdcfbccf
support aes 256
2014-07-23 12:14:01 +02:00
Bjoern Schiessle
8105f2ac8a
introduce some encryption exceptions and catch additional error cases
2014-07-16 12:36:30 +02:00
Thomas Müller
064ac77e44
Kill legacy encryption migration
2014-07-08 13:07:05 +02:00
Frank Karlitschek
a468687682
Merge pull request #9453 from owncloud/enc_fix_wrong_file_size
...
[encryption] always take unencrypted size
2014-07-06 10:38:06 -04:00
Bjoern Schiessle
ddac446c5b
always take unencrypted size
2014-07-04 16:44:50 +02:00
Bjoern Schiessle
673b0f5eb9
add owner as parameter for delShareKey
2014-07-04 12:19:59 +02:00
Björn Schießle
f3973c1c20
Merge pull request #9240 from owncloud/enc_check_if_file_exists
...
[encryption] check if file still exists before removing encryption keys
2014-06-30 21:23:59 +02:00
Bjoern Schiessle
618c9fd033
improved error message
2014-06-30 16:28:40 +02:00
Bjoern Schiessle
e4c45b5e26
check if file exists before deleting keys, and add debug output for every
...
delete operation
2014-06-27 23:09:31 +02:00
Bjoern Schiessle
706a8ace58
normalize path before comparison to make sure that we always find the mount point
2014-06-27 22:53:26 +02:00
Bjoern Schiessle
3d0805f27d
always use a \OC\Files\View
2014-06-25 12:27:30 +02:00