Commit Graph

688 Commits

Author SHA1 Message Date
Morris Jobke de8c15e1a4 Merge pull request #14764 from owncloud/shared-etag-propagate
Propagate etags across shared storages
2015-04-28 10:58:50 +02:00
Thomas Müller 7d0eba7a41 Merge pull request #15886 from owncloud/fix-15848-master
Adjust isLocal() on encryption wrapper
2015-04-27 15:06:26 +02:00
Thomas Müller 678b7d7e4d Merge pull request #15860 from owncloud/enc_fallback_old_encryption
[encryption] handle encrypted files correctly which where encrypted with a old version of ownCloud (<=oc6)
2015-04-27 14:32:19 +02:00
Thomas Müller 936d564058 fixes #15848 2015-04-27 14:26:05 +02:00
Robin Appelman 45784f213f fix propagation when renaming a directly reshared folder 2015-04-27 14:07:16 +02:00
Robin Appelman 849e5521de Make the change propagator an emitter 2015-04-27 14:07:15 +02:00
Bjoern Schiessle 27683f9442 fall back to the ownCloud default encryption module and aes128 if we read a encrypted file without a header 2015-04-27 13:01:18 +02:00
Joas Schilling d600955a51 Make getDefaultModuleId public and get module protected 2015-04-27 11:03:51 +02:00
Bjoern Schiessle 9a5783b284 fix unit tests 2015-04-24 16:47:27 +02:00
jknockaert 49df8ef525 Update encryption.php 2015-04-24 16:44:00 +02:00
jknockaert 238302ee7d fixed name 2015-04-24 16:44:00 +02:00
jknockaert 1756562501 Update encryption.php 2015-04-24 16:44:00 +02:00
jknockaert 735f6cc037 fix encryption header error
When moving back the pointer to position 0 (using stream_seek), the pointer on the encrypted stream will be moved to the position immediately after the header. Reading the header again (invoked by stream_read) will cause an error, writing the header again (invoked by stream_write) will corrupt the file. Reading/writing the header should therefore happen when opening the file rather than upon read or write. Note that a side-effect of this PR is that empty files will still get an encryption header; I think that is OK, but it is different from how it was originally implemented.
2015-04-24 16:43:16 +02:00
Joas Schilling 1592be117a Use public interfaces for type hinting 2015-04-24 13:06:03 +02:00
Bjoern Schiessle 24128d1384 only update share keys if the file was encrypted 2015-04-24 10:19:09 +02:00
Bjoern Schiessle 2646bccb83 update share keys if file gets copied 2015-04-23 17:18:48 +02:00
Bjoern Schiessle 2990b0e07e update share keys if a file is moved to a shared folder 2015-04-23 17:18:48 +02:00
Vincent Petry 903d52d45f Merge pull request #15809 from owncloud/view-null-root
dont allow using null as view root
2015-04-22 18:10:26 +02:00
Robin Appelman bd57902d1d typo 2015-04-22 16:24:37 +02:00
Thomas Müller 750f0bc489 Merge pull request #15799 from owncloud/fix-enc-folder-move
Fix enc folder move
2015-04-22 16:04:29 +02:00
Robin Appelman f391f88d7f dont allow using null as view root 2015-04-22 14:51:02 +02:00
Morris Jobke a971fa8a90 Merge pull request #15549 from owncloud/jcf-fix-cache-update
don't update identical values
2015-04-22 13:34:08 +02:00
Thomas Müller 225cde2183 pass KeyStorage via ctor 2015-04-22 13:09:42 +02:00
Thomas Müller 987bc138df calling renameKeys() on directory level as well - fixes #15778 2015-04-22 12:12:27 +02:00
Thomas Müller fc4127dd62 add $encryptionModuleId to methods of Keys/IStorage 2015-04-22 11:53:05 +02:00
Björn Schießle 570718fb6b Merge pull request #15757 from owncloud/enc-fixfeofforlastblock
Fix encryption feof to not return too early
2015-04-22 11:32:21 +02:00
Bjoern Schiessle 19e8c4fcb1 get dirname from sharePath 2015-04-21 14:58:01 +02:00
Björn Schießle b0fcf0fa0e Merge pull request #15636 from owncloud/enc2_performance_improvement
[encryption2] set size and unencrypted size to zero at the beginning of a write operation
2015-04-21 11:01:33 +02:00
Vincent Petry 76dad297ff Fix encryption feof to not return too early
This is because stream_read will pre-cache the next block which causes
feof($this->source) to return true prematurely. So we cannot rely on it.

Fixed encryption stream wrapper unit tests to actually simulate 6k/8k
blocks to make sure we cover the matching logic.

Added two data files with 8192 and 8193 bytes.
2015-04-20 18:32:40 +02:00
Thomas Müller 32995ace1c move permission related code into getMetaData() 2015-04-20 16:50:12 +02:00
Thomas Müller 23f1bdc3d4 Introduce Storage::getMetaData() to allow storage implementations more control over the data array 2015-04-20 14:54:54 +02:00
Thomas Müller 92b60e36de Introduce Storage::getData() to allow storage implementations more control over the data array 2015-04-20 14:25:39 +02:00
Bjoern Schiessle 7fe0e09d14 set size and unencrypted size to zero on fopen 2015-04-20 11:06:13 +02:00
Bjoern Schiessle 67500d5f2f if we start writing a file from the beginning, size should start by zero; result of floor needs to be casted to int in order to compare it with ->size 2015-04-16 14:15:04 +02:00
Bjoern Schiessle e3d77c4b01 add migration script from old encryption to new one 2015-04-16 14:15:04 +02:00
Björn Schießle 4f0437fbde Merge pull request #15598 from owncloud/fix-enc-file-size-master
Fix file size of encrypted files
2015-04-14 16:48:04 +02:00
Morris Jobke 82cab25762 Merge pull request #13360 from owncloud/cross-storage-move
Proper copy/move between multiple local storages
2015-04-14 14:35:08 +02:00
Thomas Müller 967e882757 return size from cache in case the cache entry is marked as encrypted 2015-04-14 13:08:59 +02:00
Thomas Müller 387984a0d5 preserve filesize on rename after upload 2015-04-14 12:27:12 +02:00
Robin Appelman f605c98531 Fix cross storage move with shared storages 2015-04-13 17:10:05 +02:00
Robin Appelman addfafd9da Fix moving mount points 2015-04-13 17:10:02 +02:00
Robin Appelman caadc8cdd9 reuse cache move logic 2015-04-13 17:10:01 +02:00
Robin Appelman d7b3a1a35a preserve cache data when doing a cross storage move 2015-04-13 17:10:01 +02:00
Robin Appelman c29419e6d7 fix rebase issue 2015-04-13 15:13:03 +02:00
Robin Appelman 0772e3b4c1 Properly handle copy/move failures in cross storage copy/move 2015-04-13 15:13:03 +02:00
Robin Appelman 404773940d Detect storage full when doing cross storage copy/move 2015-04-13 15:13:03 +02:00
Robin Appelman d26c6cab90 properly return false if we cant delete the source file 2015-04-13 15:13:03 +02:00
Robin Appelman c4ec8fbeff Make getSourcePath accessible for storage wrappers 2015-04-13 15:13:03 +02:00
Robin Appelman 31e94708f8 Improve cross storage copy between local storages 2015-04-13 15:13:02 +02:00
Robin Appelman 8575bb2cb9 Move cross storage copy logic to the storage 2015-04-13 15:13:02 +02:00