Commit graph

1099 commits

Author SHA1 Message Date
Lukas Reschke
8491cfe878 Merge pull request #2467 from nextcloud/backport-1972-invalid-files-from-scanner-9
[stable9] Make sure we don't scan files that can not be accessed
2016-12-05 23:29:01 +01:00
Robin Appelman
b9ff7172f2
only update the cache if the storage operation succeeds
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-02 18:56:29 +01:00
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
ca6a7d9e6a
Run the license script 2016-07-22 09:48:05 +02:00
Vincent Petry
ac56629c86
Capped cache for cache info in UserMountCache 2016-06-20 17:37:38 +02:00
Robin Appelman
d46cb39e3c
skip scanning for a user when the user is not setup yet 2016-06-09 11:37:02 +02:00
Vincent Petry
4eb87be488 Merge pull request #24944 from owncloud/fix_21173_stable9
stable9: normalize path in getInternalPath
2016-06-02 15:30:47 +02:00
Georg Ehrke
a08c9b3526
normalize path in getInternalPath 2016-06-01 13:06:59 +02:00
Robin Appelman
2ca5f3f957
trigger size calculation after scanning 2016-06-01 10:27:56 +02:00
Piotr Filiciak
002a7f8294 replaced UnseekableException => NotPermittedException 2016-05-25 15:38:48 +02:00
Piotr Filiciak
7a791c5472
Code style and doc fix 2016-05-25 11:11:56 +02:00
Piotr Filiciak
f29f85709a
Http Range requests support in downloads
Http range requests support is required for video preview
2016-05-25 11:11:47 +02:00
Robin Appelman
f8979a9ee2 cap the normalized path cache (#24390) 2016-05-12 16:24:56 +02:00
Petr Svoboda
7fb631a13b solves problem with moving files via WebDAV
When moving files via WebDAV I sometimes got 

PHP Fatal error:  Nesting level too deep - recursive dependency? in /var/www/owncloud/lib/private/files/view.php on line 729

This small change has fixed the problem for me
2016-05-04 17:23:12 +02:00
C. Montero Luque
fe753fe722 Merge branch 'stable9' into local-invalid-9 2016-04-26 16:46:23 -04:00
C. Montero Luque
4f5c03e310 Merge pull request #24261 from owncloud/scanner-propagate-9
[9.0] triger the propagator from the command line scanner
2016-04-26 14:50:02 -04:00
Robin Appelman
06bfd58b2c
error out if a local storage isn't setup correctly 2016-04-26 20:17:17 +02:00
Thomas Müller
6c861f71eb Merge pull request #24202 from owncloud/backport-stable9-23972
[9.0] Call private cache methods only for `OC\Files\Cache\Cache`
2016-04-25 23:10:51 +02:00
Robin Appelman
1397d9a93c triger the propagator from the command line scanner 2016-04-25 18:29:57 +02:00
Robin Appelman
51f5edd749 add locks in the scanner to prevent multiple scanners running on the same files 2016-04-25 15:46:04 +02:00
Daniel Jagszent
1aa8765177
[9.0] Call private cache methods only for OC\Files\Cache\Cache 2016-04-25 14:55:05 +02:00
Thomas Müller
98431b490e Merge pull request #24195 from owncloud/stable9-fs-initmountpoint-nulluser
[stable9] Throw NoUserException when attempting to init mount point for null user
2016-04-22 17:26:06 +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
Robin Appelman
74ed0a8aba dont do optimized size propagation for encrypted files 2016-04-21 14:24:53 +02:00
Thomas Müller
68f62ad50a Merge pull request #24129 from owncloud/stable9_24098
[stable9] When the scanner detects a file is changed clear checksum
2016-04-21 12:56:04 +02:00
Thomas Müller
fdab395925 Merge pull request #23576 from owncloud/background-scan-unscanned-9
[9.0] handle completely unscanned storages in the background scanner
2016-04-20 20:22:07 +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
Björn Schießle
ccddb18cab
preserve information if it is a rename operation or not 2016-04-20 12:34:20 +02:00
Joas Schilling
d2c11a35b7 Correctly return an empty string for empty files 2016-04-08 15:08:52 +02:00
Morris Jobke
7fdac35654 Fix PHP memory leak in file_get_contents()
* ref https://bugs.php.net/bug.php?id=61961
* ref https://github.com/owncloud/core/issues/20261#issuecomment-180000256
* code is based on the proposal of @chriseqipe
* fixes #20261
2016-04-04 18:14:39 +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
Joas Schilling
7c7e079a36 Lock the mountpoint while removing 2016-03-30 23:50:10 +02:00
Robin Appelman
4f78cb1e3d handle completely unscanned storages in the background scanner 2016-03-24 19:41:03 +01:00
Robin Appelman
5a630c6a0e properly use fileinfo objects 2016-03-23 17:13:32 +01:00
Robin Appelman
c864420d6c improve reuse in getUserFolder 2016-03-23 17:13:24 +01:00
Robin Appelman
f77ce8829c pass the fileinfo to the node if available 2016-03-23 17:13:21 +01:00
Robin Appelman
70a5233f69 Query the cache when checking if a node exists 2016-03-23 17:13:17 +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
Robin Appelman
9d688e655d move failedstorage to core 2016-03-15 12:49:12 +01:00
Lukas Reschke
3a73f97706 Verify the getResponse returns a ResponseInterface
Can also return `null` as per PHPDoc. Regression added by 97f5c095f4

Fixes https://github.com/owncloud/core/issues/23145
2016-03-14 16:15:18 +01:00
Vincent Petry
11f76b2918 Fix call to disk_free_space when a file is provided
In the case of shared files, we have to call free_space() on the file
name. This has the side-effect that when uploading to a local storage
without quota set, it will call disk_free_space with the file name,
which fails.

This fix uses the parent folder in case the given path is a file.
2016-03-09 15:53:37 +01:00
Vincent Petry
d63f5561fb Fix share mounting recursion 2016-03-08 12:58:46 +01:00
Robin Appelman
f603c57751 allow availability recheck for external storages 2016-03-03 20:07:18 +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
Lukas Reschke
c353d51810 Remove Scrutinizer Auto Fixer 2016-03-01 17:48:23 +01:00
Lukas Reschke
c430f5ba53 Map Maci 2016-03-01 17:45:05 +01:00
Lukas Reschke
933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00