Commit graph

596 commits

Author SHA1 Message Date
Joas Schilling
5a7dfcacc5
Make sure we don't scan files that can not be accessed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-12-02 11:14:47 +01:00
Bjoern Schiessle
6f3d9ec024
getJailedPath expects to have a trailing / 2016-08-10 11:35:38 +02:00
Joas Schilling
8ab26381a4
Clear the storage wrappers after clearing the hooks 2016-07-01 15:42:19 +02:00
C. Montero Luque
fe753fe722 Merge branch 'stable9' into local-invalid-9 2016-04-26 16:46:23 -04:00
Robin Appelman
884c8215f8
add tests 2016-04-26 20:17:17 +02:00
Robin Appelman
1397d9a93c triger the propagator from the command line scanner 2016-04-25 18:29:57 +02:00
Vincent Petry
27d12f7a99
Throw NoUserException when attempting to init mount point for null user
In some scenarios initMountPoints is called with an empty user, and
also there is no user in the session.

In such cases, it is unsafe to let the code move on with an empty user.
2016-04-22 14:02:55 +02:00
Thomas Müller
27d6852b3e Merge pull request #24131 from owncloud/dont-transfer-files-to-not-ready-user-stable9
[9.0] Introduce isReadyForUser and verify in file transfer ownership
2016-04-22 10:33:18 +02:00
Thomas Müller
df544e8dbe Introduce isReadyForUser and verify in file transfer ownership - fixes #23786 2016-04-20 20:25:22 +02:00
Roeland Jago Douma
2296552104
When the scanner detects a file is changed clear checksum
Fixes #23782 and #23783

If the file scanner detects a changed file we clear the checksum while
we update the cache.

* Unit test added
2016-04-20 19:09:26 +02:00
Thomas Müller
193a33a8ad Merge pull request #23709 from owncloud/stable9-make-sure-that-encrypted-version-is-set
[stable9] Make sure that the encrypted version is set
2016-04-01 09:08:50 +02:00
Bjoern Schiessle
2cb45e71ea fix creation of versions of encrypted files on external storages
in order to create a 1:1 copy of a file if a version gets created
we need to store this information on copyBetweenStorage(). This
allows us to by-pass the encryption wrapper if we read the source file.
2016-03-31 23:18:45 +02:00
Lukas Reschke
d16553d2d8 Make sure that the encrypted version is set
The code path called when using external storage with WebDAV is using `\OC\Files\Storage\Wrapper\Encryption::getMetaData` which did not contain the actual encrypted version inside the cache entry version. This lead to the following:

1. User uploaded a file
2. File is created and `\OC\Files\Storage\Wrapper\Encryption::getMetaData` is called. It has an empty `encryptedVersion` but sets `encrypted` to either `true` or `false`.
3. The call when updating the file cache will use the old version.
2016-03-31 20:39:35 +02:00
Robin Appelman
5a630c6a0e properly use fileinfo objects 2016-03-23 17:13:32 +01:00
Robin Appelman
f77ce8829c pass the fileinfo to the node if available 2016-03-23 17:13:21 +01:00
Lukas Reschke
f9ad57ee52 Ensure that stored version is at least 1 for cross-storage copy
In case of a move operation from an unencrypted to an encrypted
storage the old encrypted version would stay with "0" while the
correct value would be "1". Thus we manually set the value to "1"
for those cases.

See also https://github.com/owncloud/core/issues/23078
2016-03-16 10:37:41 +01:00
Lukas Reschke
98f79173ed Keep "encryptedVersion" when calling \OC\Files\View::copy
When calling `\OC\Files\View::copy` we should also keep the version to ensure that the file will always have the correct version attached and can be successfully decrypted.

To test this the following steps are necessary (from https://github.com/owncloud/core/issues/22781#issuecomment-191328982):

1. setup a new ownCloud 9.0 beta2
2. enable encryption
2. upload a docx (5.7MB large)
3. upload the same file again and overwrite the existing file
4. I can download the original file and the first version
5. I restore the first version
6. restored version can no longer be downloaded with the error described above

The manual cache operation in `\OCA\Files_Versions\Storage` is unfortunately necessary since `\OCA\Files_Versions\Storage::copyFileContents` is not using `\OCP\Files\Storage::moveFromStorage` in the case when an object storage is used. Due to the workaround added in 54cea05271 the stream is directly copied and thus bypassing the FS.
2016-03-03 14:41:53 +01:00
Bjoern Schiessle
834b51b83b recalculate unencrypted size if we assume that the size stored in the db is not correct 2016-02-23 15:09:46 +01:00
Robin Appelman
c3e4ced64a fix getNodeForPath for non existing part files 2016-02-11 17:22:40 +01:00
Björn Schießle
9bb97c714b fixing unit tests 2016-02-09 23:43:26 +01:00
Robin Appelman
fb76d7de69 remove unused Storage->getLocalFolder 2016-02-05 16:48:08 +01:00
Thomas Müller
67bf225fbe Merge pull request #21956 from owncloud/cross-cache-move
Add fallback moveFromCache implementation
2016-01-29 17:03:16 +01:00
Robin Appelman
ec3f6549f6 Add fallback moveFromCache implementation 2016-01-29 13:06:59 +01:00
Joas Schilling
2563c3ffaf Fix failing oracle and postgres tests 2016-01-27 12:53:44 +01:00
Robin Appelman
644a8ab797 add IUserMountCache->getMountsForFileId 2016-01-27 12:53:44 +01:00
Robin Appelman
99415a9f7f multiple minor fies 2016-01-20 16:32:52 +01:00
Robin Appelman
222e719c87 sort in tests 2016-01-20 16:30:22 +01:00
Robin Appelman
8940429976 log duplicates 2016-01-20 16:30:22 +01:00
Robin Appelman
cf6ee1c866 cache mountpoints in the db 2016-01-20 16:30:22 +01:00
Robin Appelman
d2c579e167 fix quota wrapper 2016-01-14 12:54:42 +01:00
Robin Appelman
62d383e1ba fix tests 2016-01-14 12:54:42 +01:00
Thomas Müller
24271cf953 Merge pull request #21216 from owncloud/fopen-statcache
Clear SMB statcache after fopen
2015-12-28 10:21:26 +01:00
Morris Jobke
a18c0983d5 Use TempManager instead of tmpFile 2015-12-18 11:25:33 +01:00
Morris Jobke
90b0831cec Use TempManager instead of tmpFolder 2015-12-18 11:19:53 +01:00
Roeland Jago Douma
1f715289bf Removed deprecated function OC_User::deleteUser
Replaced with proper OCP calls
2015-12-17 16:18:40 +01:00
Roeland Jago Douma
835911bce5 Removed deprecated private OC_User::createUser
All function calls are replaced with the recommended (which was already
the body of the function).
2015-12-17 16:18:40 +01:00
Robin Appelman
38a2467a4f test for statcache after fopen 2015-12-15 13:48:17 +01:00
Vincent Petry
28e9bc1156 Fix more unit tests to pass a mock storage instead of null to FileInfo 2015-12-08 16:33:39 +01:00
Thomas Müller
0c3d97921f Merge pull request #20904 from owncloud/view-mime-filter
Fix mimetype filter in getDirectoryContent
2015-12-07 10:20:43 +01:00
Morris Jobke
cbe6eeffa1 last change of OC_Config to the proper interface in tests/ 2015-12-03 14:03:05 +01:00
Morris Jobke
542ce7dd0d Reduce OC_Config usage in tests/ 2015-12-03 13:48:19 +01:00
Robin Appelman
19b2fe6a3a Fix mimetype filter in getDirectoryContent 2015-12-03 13:09:13 +01:00
Morris Jobke
e9c8f82fc5 Replace OC_Config in tests with IConfig calls 2015-12-03 09:38:41 +01:00
Robin Appelman
0062888aaf Also add metadata for postDelete hooks triggered from the view 2015-12-02 13:51:26 +01:00
Thomas Müller
8d218bf3ef Merge pull request #20875 from owncloud/remove-changepropagator
remove old propagation logic
2015-12-02 13:03:31 +01:00
Robin Appelman
62cc316c6a remove old propagation logic 2015-12-01 16:50:20 +01:00
Robin Appelman
0d63e95a5d Add metadata to post delete hooks 2015-12-01 13:22:58 +01:00
Thomas Müller
318e5e2864 More group DB 2015-11-30 10:55:13 +01:00
Thomas Müller
757aa45db7 Adding more DB groups to test suits
Adding more DB groups to test suits
2015-11-30 10:55:06 +01:00
Thomas Müller
56170dd825 Further unit test suite tweats 2015-11-30 10:55:05 +01:00