Commit Graph

1064 Commits

Author SHA1 Message Date
Lukas Reschke 676041ba7e 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:36:15 +01:00
Thomas Müller 0f6ea9fd29 Merge pull request #23039 from owncloud/invalid-share-storage
dont break when there is an invalid share
2016-03-15 12:15:05 +01:00
Lukas Reschke d43051f7de 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-12 22:45:07 +01:00
Robin Appelman a8db587b1f move failedstorage to core 2016-03-11 13:15:45 +01:00
Vincent Petry e5a107cc45 Fix share mounting recursion 2016-03-08 14:46:42 +01:00
Thomas Müller 19dc02b8e0 Merge pull request #22900 from owncloud/diskfreespace-filesworkaround
Fix call to disk_free_space when a file is provided
2016-03-07 15:07:31 +01:00
Thomas Müller fa436b5b0c Merge pull request #22812 from owncloud/node-lock
Add locking to the node api
2016-03-07 14:43:49 +01:00
Vincent Petry 89881ed511 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-07 11:01:24 +01:00
Thomas Müller b56dbd0607 Merge pull request #22816 from owncloud/external-unavailable-recheck
allow availability recheck for external storages
2016-03-04 15:29:17 +01:00
Robin Appelman 6990100e6e allow availability recheck for external storages 2016-03-03 14:19:34 +01:00
Lukas Reschke 72c8187cbb 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:15:36 +01:00
Robin Appelman 02635c6f2f Add locking to the node api 2016-03-03 13:47:00 +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
Thomas Müller da18d04b38 Merge pull request #22733 from owncloud/size-propagation-new-file
fix size propagation for new files
2016-03-01 08:20:34 +01:00
Robin Appelman 003a686c1b ignore encryption keys for propagation 2016-02-29 17:47:09 +01:00
Robin Appelman 8c700cc99d fix size propagation for new files 2016-02-29 17:31:01 +01:00
Thomas Müller 914ac09aae Merge pull request #22636 from owncloud/fix-ssl-on-external-storages
Fix HTTPS support on external storages
2016-02-25 14:36:00 +01:00
Thomas Müller efc966698f Merge pull request #22579 from owncloud/fix_broken_unencrypted_size
Heal unencrypted file sizes at download time (second approach)
2016-02-25 14:34:48 +01:00
Lukas Reschke bf4a038535 Add proxy support to external storage
Otherwise debugging issues is a PITA
2016-02-24 19:48:47 +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
Morris Jobke 8c77fdef3e Avoids scanning the root storage
This check will skip the background scan for the root storage
because there is nothing in the root storage that isn't already
in another (mostly user-) storage.

Fixes #22501
2016-02-22 16:43:47 +01:00
Thomas Müller fb38625741 Merge pull request #22518 from owncloud/checkdeletebeforecopyinsteadofrename
Check delete permission before attemping copy+delete
2016-02-19 16:06:55 +01:00
Vincent Petry a9e0cfad8b Check delete permission before attemping copy+delete
Some move operations when cross-storage will be replaced by copy and
delete. Before attempting this, first check whether the source storage
has delete permissions.

This also prevents renaming system-wide external storages.
2016-02-19 12:59:10 +01:00
Scrutinizer Auto-Fixer 0d0151a3e1 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2016-02-19 09:43:11 +01:00
Thomas Müller 48f6ae0b2d Merge pull request #22493 from owncloud/issue_22467
getRootFolder should not setup the FS for any user
2016-02-18 16:46:00 +01:00
Thomas Müller 2a9b0aaaa1 Merge pull request #22482 from owncloud/getowner-cache
cache result for getowner
2016-02-18 16:45:40 +01:00
Roeland Jago Douma b539bb15e1 Make scrutinizer happy 2016-02-18 14:25:18 +01:00
Roeland Jago Douma 7abb8693a1 getRootFolder should not setup the FS for any user
Fixes #22467

This can go wrong when an app (take the ldap app) DIs something that
needs the rootFolder. This break if we use cookie auth since then we
know the user at that point and thus try to setup the fs for that user.

However if there are then incomming shares from an ldap user they will
fails since the user manager can't find them yet.

Now getRootFolder does not setup the fs for any user.
2016-02-18 13:55:54 +01:00
Joas Schilling 6374472e2e No more static 2016-02-18 10:12:23 +01:00
Robin Appelman f309bc960d cache result for getowner 2016-02-17 19:14:46 +01:00
Vincent Petry 8f96ef147f Don't apply quota in stream wrapper for part files
When overwriting shared files as recipient, the part file is written on
the uploader's storage before overwriting the target file.

If the uploader has no quota left, they should still be able to
overwrite that file with Webdav. To make this work, they need to be able
to write the part file to their own storage first.
2016-02-17 11:52:49 +01:00
Bjoern Schiessle 9dc759b4dc remember signature version and only set it on update to make sure that other
apps like files_versions still get the old signature version
2016-02-10 13:27:32 +01:00
Vincent Petry 3736f13826 Check if partial cache entry or not in encryption wrapper 2016-02-09 23:43:27 +01:00
Lukas Reschke 5ccb9dfa7e Use database for keeping track of the version 2016-02-09 23:43:27 +01:00
Lukas Reschke 3badf5caf5 Use number of chunk for HMAC as well
Prevents switching single blocks within the encrypted file.
2016-02-09 23:43:26 +01:00
Björn Schießle 9bb97c714b fixing unit tests 2016-02-09 23:43:26 +01:00
Björn Schießle cf3a8f274f make it backward compatible to work with signed and un-signed files 2016-02-09 23:43:25 +01:00
Vincent Petry 19980be116 Fix part file partial cache logic in encryption code
The encryption code uses partial cache entries for the part file (which
are not stored in the database) but are useful for other parts of the
code to retrieve the file size again.

This means that in the fixed code $info was empty, so getData() could
not be called.

The fix makes sure to support both cases when the cache entry exists and
doesn't.
2016-02-09 09:47:34 +01:00
Thomas Müller a03279a3a8 Merge pull request #22207 from owncloud/mountcache-exists-check
better exists check for insert mount cache
2016-02-08 17:57:59 +01:00
Robin Appelman 26a8fb157d better exists check for insert mount cache 2016-02-08 15:18:42 +01:00
Vincent Petry 41ba9280f7 Make sure fileinfo exists when calling getCheckSum in node API 2016-02-08 12:24:18 +01:00
Robin Appelman fb76d7de69 remove unused Storage->getLocalFolder 2016-02-05 16:48:08 +01:00
Scrutinizer Auto-Fixer 466a085253 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2016-02-05 09:38:43 +00:00
Thomas Müller ab1c79827e Merge pull request #22071 from owncloud/cache-split-insert
split cache->insert from cache->put
2016-02-03 14:32:28 +01:00
Robin Appelman f2bba59b79 split cache->insert from cache->put 2016-02-03 12:55:36 +01:00
Thomas Müller 621f54da51 Merge pull request #21997 from owncloud/checksums
Checksums
2016-02-03 11:36:22 +01:00
Roeland Jago Douma 2035a179bc Add store/retrieve checksums
* Add extra db column to filecache
* Bump version
* Update filecache code to actually handle checksum
* Webdav code to store/retrieve checksums
2016-02-03 09:03:51 +01:00
Robin Appelman 8a30058f52 filter invalid storages from the mount cache early 2016-02-02 18:10:13 +01:00