Commit Graph

5375 Commits

Author SHA1 Message Date
Thomas Müller 7b06dd485d Merge pull request #23250 from owncloud/fix-support-for-php7-in-htaccess
Fix several .htaccess and .user.ini related problems
2016-03-15 16:03:18 +01:00
Robin McCorkell 1b2f1cc272 Prevent certain DBs throwing exceptions on same-value updates
A PreconditionNotMetException must only be thrown if explicit
preconditions are specified for setValues(), not if the value is merely
the same as was already in the DB.
2016-03-15 13:02:19 +01:00
Thomas Müller ad9a0804f3 Merge pull request #23226 from owncloud/fix_23190
Generate a valid URL for link notification
2016-03-15 12:55:13 +01:00
Robin Appelman 0aa83511a1 remove old share propagation entries from appconfig 2016-03-15 12:50:22 +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
Thomas Müller e9eeb3607f Merge pull request #23074 from owncloud/issue-22835-correctly-use-querybuilder-api
Correctly escape join statements and use selectAlias
2016-03-15 12:14:17 +01:00
Roeland Jago Douma 1db82073a4 Generate a valid URL for link notification
fixes #23197

* Updated unit test
2016-03-15 11:10:24 +01:00
Lukas Reschke 5278bfe0e4 Add support for custom values in integrity checker 2016-03-15 10:41:17 +01:00
Lukas Reschke c7abd307c0 Replace all required values 2016-03-15 10:41:17 +01:00
Lukas Reschke 0b0077e62d Revert "Removed unnecessary check 'installed' system value' call." 2016-03-15 10:23:40 +01:00
Thomas Müller 9657f9a01b Merge pull request #23171 from maxolasersquad/master
Removed unnecessary check 'installed' system value' call.
2016-03-14 17:18:36 +01:00
Thomas Müller a058bb0d7e Merge pull request #23225 from owncloud/Phiber2000-fix_logtimezone
fix broken logtimezone
2016-03-14 17:08:48 +01:00
Thomas Müller b25077748e Merge pull request #22901 from owncloud/add-dav-authenticated
Add DAV authenticated also to other scopes
2016-03-14 16:33:09 +01:00
Thomas Müller 3661b47b6d Merge pull request #23124 from owncloud/improved-rewrite-rule
Improved rewrite rule
2016-03-14 16:13:50 +01:00
Thomas Müller f6a5fe452d Merge pull request #23190 from owncloud/use-proper-url-for-search-results
Use proper URLs for search results
2016-03-14 16:11:17 +01:00
Thomas Müller d219284961 Merge pull request #23191 from owncloud/fix-external-dav-storage
Verify the getResponse returns a ResponseInterface
2016-03-14 16:10:40 +01:00
Thomas Müller 852acd364a Merge pull request #23218 from owncloud/memcached-not-found-on-remove-means-success
Fix errors in memcached implementation
2016-03-14 16:08:47 +01:00
Phiber2000 3e7b2810e2 fix broken logtimezone 2016-03-14 15:10:47 +01:00
Joas Schilling 2f67aa9bc4 Fix errors in memcached implementation 2016-03-14 12:39:34 +01:00
Joas Schilling c3c491689b Shorter cache key for URL entries 2016-03-14 11:05:46 +01:00
Roeland Jago Douma 3f8c998afe Do not recurse link share fetching
* Might fix an issue on oracle
2016-03-13 13:31:28 +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
Lukas Reschke 3c06b08c92 Use proper URLs for search results
Fixes https://github.com/owncloud/core/issues/23136
2016-03-12 22:29:47 +01:00
Lukas Reschke 42a70ed482 Require at least libxml 2.7.0
Fixes https://github.com/owncloud/core/issues/23168
2016-03-12 22:13:05 +01:00
David Baucum c519447522 Removed unnecessary check 'installed' system value' call.
OC_Utils::checkServer makes an unnecessary call to $config->getSystemValue('installed', false), which replicates the call made immediately before it during the call to needUpgrade.
2016-03-11 15:59:11 -05:00
Thomas Müller a8922e9d35 Merge pull request #23125 from owncloud/add-port-support-to-trusteddomain
Explicitly check for port
2016-03-11 14:55:27 +01:00
Robin Appelman a8db587b1f move failedstorage to core 2016-03-11 13:15:45 +01:00
Roeland Jago Douma b8ce9c5554 Use more generic node instead of File/Folder
The phpdoc for the sharing functions was very restrictive. As a
consequence passing node object (for example from the OCS Share API
where we don't really care if it is a file or folder), would actually
be invalid.

With this loser restriction the interfaces become more generic.
2016-03-11 08:51:07 +01:00
Lukas Reschke dc6789fd5b Explicitly check for port
The setup uses `\OCP\IRequest::getInsecureServerHost` which in some cases can also include a port. This makes the trusted domain check fail thus.

I've decided to add this here that way because adjusting the setup would require parsing the host properly. This is not something that can be done very good in PHP. Check the following example for why `parse_url` is not our friend: https://3v4l.org/k501Z
2016-03-10 22:32:29 +01:00
Lukas Reschke 3e8decf5e9 Improved rewrite rule
As per https://github.com/owncloud/core/issues/23098 and https://github.com/owncloud/core/issues/23117
2016-03-10 22:20:02 +01:00
Thomas Müller 51072f742e Merge pull request #21582 from owncloud/core_composer
Composers PSR-4 autoloader in core
2016-03-10 12:06:44 +01:00
Joas Schilling 6b4117df34 Correctly escape join statements and use selectAlias 2016-03-10 10:24:08 +01:00
Thomas Müller 308c99f1fd Merge pull request #23029 from owncloud/add-rewrite-rules-after-setup
Add base rewrite rule only when RewriteBase is defined
2016-03-10 08:25:18 +01:00
Roeland Jago Douma d16b371e38 POC for PSR-4 autoloader server.php => Server.php 2016-03-09 16:53:39 +01:00
Lukas Reschke bc4a043a76 Add base rewrite rule only when RewriteBase is defined
In case Apache is configured with an `Alias` such as with the ownCloud packages the rewrite rules will fail when no valid RewriteBase is configured.
2016-03-09 15:13:07 +01:00
Thomas Müller 0cc53ee06d Merge pull request #22602 from owncloud/fix_slow_chunkcheck
Do not check all chunks of a chunked upload if we do not need to
2016-03-09 15:06:44 +01:00
Thomas Müller d0a70a9776 Merge pull request #23006 from owncloud/require-xml-reader
Add XMLReader as requirement
2016-03-09 15:03:50 +01:00
Roeland Jago Douma e8f22a16f6 Select queries in the default share provider should query for file/folder
There can be leftover calendar and contacts shares in the oc_share
table. We need to filter those out properly.
2016-03-09 11:19:57 +01:00
Lukas Reschke 642c38ffb2 Add XMLReader as requirement
The SabreDAV release in 9.0 requires XMLReader, while this is usually compiled in by default some distributions like Gentoo don't.

Without this ownCloud gives a fatal 500 error instead of telling people to enable XMLReader.

Fixes https://github.com/owncloud/core/issues/23003
2016-03-09 11:11:00 +01:00
Vincent Petry e5a107cc45 Fix share mounting recursion 2016-03-08 14:46:42 +01:00
Roeland Jago Douma e08f98075c Do not check all chunks of a chunked upload if we do not need to
Fixes #22601

Before we did a full test on all chunks to verify if a chunked upload
was completed. This is unneeded since if we are missing one chunk we can
already fail.

Also we look from back to front since it is much more likely that we
find a missing chunk thus can error out early.
2016-03-07 19:52:30 +01:00
Lukas Reschke 1fd76b6379 Remove double URL encoding
ZipStreamer as bundled with 9.0 will properly encode the filename already.

Fixes https://github.com/owncloud/core/issues/22836#issuecomment-193336245
2016-03-07 19:29:15 +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
Joas Schilling 69d7097a1a Make sure that the return value is an array 2016-03-07 11:57:05 +01:00
Lukas Reschke 14f932f3c7 Add DAV authenticated also to other scopes
Fixes https://github.com/owncloud/core/issues/22893
2016-03-07 11:17:33 +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
C. Montero Luque 7a0720f300 Merge branch 'master' into fix-db-locking-cleanup 2016-03-04 13:35:04 -05:00
Morris Jobke 138219d74a Run cleanup of expired DB file locks to background job
* fixes #22819

The old way fired a DELETE statement on each destruction of the
DBLockingProvider. Which could cause a lot of queries. It's enough
to run this every 5 minutes in a background job, which in the end
could result in file locks that exists 5 minutes longer - in the
worst case and for not properly released locks.

This makes the DB based locking a lot more performant and could
result in a similar performance to the Redis based locking provider.
2016-03-04 15:52:23 +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
Joas Schilling 98f5423df7 ucwords does not support delimiter on 5.4 2016-03-04 12:13:16 +01:00
Thomas Müller 8d2238e055 Merge pull request #22796 from owncloud/fix-encryption-on-version-restore
Keep "encryptedVersion" when calling `\OC\Files\View::copy`
2016-03-03 16:31:11 +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 e55c52c078 Exclude the assets folder from integrity check
We should not scan the assets folder as this can contain user specific content. Partially addresses https://github.com/owncloud/core/issues/22803
2016-03-03 13:46:41 +01:00
C. Montero Luque 4d69e562a0 Merge pull request #22757 from owncloud/apply-license
Update copyright information and author file
2016-03-01 15:36:37 -05: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
Lukas Reschke 2d68c1b945 Exclude custom data directory from integrity checker
We should not scan any custom data directory in the integrity checker as well. Otherwise this would lead to a massive increased update time that may likely exceed the timeout.

To test this:

1. Install ownCloud 8.2.2, set as data dir another folder than `data` such as `data-asdf`. Make sure that folder lives in the web root as well.
2. Update that instance to 9.0.0 beta2 => Errors are shown in the code integrity check
3. Apply this patch and trigger the rescan in the admin settings => No errors are shown anymore (can also do a new update with that patch applied)

Fixes https://github.com/owncloud/core/issues/22698
2016-03-01 17:16:10 +01:00
Thomas Müller 5fe5233f41 Merge pull request #22681 from owncloud/add-autodiscovery-for-ocs
Add autodiscovery support to server-to-server sharing implementation
2016-03-01 11:27:28 +01:00
Thomas Müller fd4742d430 Merge pull request #22613 from owncloud/quota-changedavreturnvaluewhennoquotaset
Don't return quota when none set
2016-03-01 08:30:58 +01:00
Thomas Müller 71e5de3865 Merge pull request #22677 from owncloud/allow-to-overwrite-single-l10n-string-via-theme
Allow to overwrite a single language string via the theme folder
2016-03-01 08:26:28 +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
Thomas Müller caf6c43187 Merge pull request #22736 from owncloud/propagation-ignore-encryption
ignore encryption keys for propagation
2016-03-01 08:19:42 +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
Vincent Petry 11215f4e27 Return -3 for unlimited quota
Returns -3 for unlimited quota in Webdav response.
Also adjusted personal page to show unlimited quota when set.
2016-02-29 14:36:20 +01:00
Joas Schilling 2a0cda74d4 Use IQueryBuilder::PARAM_* instead of \PDO::PARAM_* 2016-02-29 09:44:40 +01:00
Thomas Müller 6526c122af Merge pull request #22683 from owncloud/fix_22682
Relax rootfolder check
2016-02-29 08:53:58 +01:00
Roeland Jago Douma b116e80c56 Relax rootfolder check
* Updated unit tests
* Added intergration test
2016-02-26 16:05:32 +01:00
Joas Schilling 78570a5f72 Allow to overwrite a single language string via the theme folder 2016-02-26 13:56:02 +01:00
Roeland Jago Douma bfcdf40a64 Expiration date can only be enforced if default is enabled
If the default expiration date is not enebaled it can not be enforced.

* Added unit tests
2016-02-26 11:38:06 +01:00
Thomas Müller 62d7885c3b Merge pull request #22660 from owncloud/fix_22656
Do not allow sharing of the users root folder
2016-02-26 10:49:12 +01:00
Thomas Müller 0795cc373d Merge pull request #22646 from owncloud/fix_22642
Set default expiration date if none given on share creation
2016-02-26 10:48:21 +01:00
Thomas Müller cbde4bb92f Merge pull request #22650 from owncloud/fix_hook
Fix verifyExpirationDate passwordSet argument
2016-02-26 09:32:41 +01:00
Lukas Reschke 59028cced0 Add autodiscovery support to server-to-server sharing
Adds autodiscovery support to server-to-server sharing as specified in the specification. If no discovery data is found it is using the fallback ownCloud endpoints for legacy support.
2016-02-26 09:26:55 +01:00
Thomas Müller cb41b1a863 Merge pull request #22584 from owncloud/fix-app-load-order-fixes-22508
Before installing new shipped apps we need to load authentication apps
2016-02-25 21:43:32 +01:00
Roeland Jago Douma 8213d5df4f Do not allow sharing of the root folder
Sharing of the users root folder should not be allowed as it is very
weird UX. Also many of our clients have no proper way of displaying
this.

Added unit test

Also added intergration tests to make sure we won't allow it in the
future.
2016-02-25 20:40:30 +01:00
Thomas Müller 776d91f3bc Merge pull request #21854 from owncloud/fix-share-hook-group-add
Fix addUserToGroup hook of the share code
2016-02-25 16:56:19 +01:00
Roeland Jago Douma 9412f69104 Fix verifyExpirationDate passwordSet argument
Password set should be false if the password is null.

Also updated the unit tests to tests this now.
2016-02-25 15:39:02 +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
Roeland Jago Douma 6d4f80d680 Set default expiration date if none given on share creation
When we create a share for the first time we should set the default
expiration date. If none is given.

Fixes #22642
2016-02-25 14:21:46 +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
Thomas Müller 2ec1c738d0 Merge pull request #22573 from owncloud/issue-22568-allow-string-object-ids
Make sure we can store strings as per the interface
2016-02-24 12:15:23 +01:00
Thomas Müller 4124d909b6 Merge pull request #22565 from owncloud/avoid-scanning-root-storage
Avoids scanning the root storage
2016-02-24 12:14:39 +01:00
Thomas Müller bfde96a623 Fix PHPDoc of OC_App::loadApps() 2016-02-23 15:57:12 +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
Thomas Müller 9a0950f10b Merge pull request #22569 from owncloud/issue-22566-too-much-mapping-entries
Allow defining a limit and offset for getObjectIdsForTags
2016-02-23 15:02:08 +01:00
Thomas Müller ad6238c808 Install new shipped apps after upgrading all existing apps 2016-02-23 10:31:11 +01:00
Joas Schilling fb8b34bdd0 Allow defining a limit and offset for getObjectIdsForTags 2016-02-23 09:04:15 +01:00
Joas Schilling 8754ea6c8a Make sure we don't quote column names twice 2016-02-23 08:50:52 +01:00
Thomas Müller 7bf658ab18 Before installing new shipped apps we need to load authentication apps - fixes #22508 2016-02-23 08:41:12 +01:00
Thomas Müller 4537eaac41 Add ILIKE support to querybuilder 2016-02-22 19:46:37 +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
Joas Schilling 24c7f38a00 Make sure we can store strings as per the interface 2016-02-22 15:43:20 +01:00
Thomas Müller a70421ff2f Merge pull request #22552 from owncloud/fix-avconv-preview-parameters
Move `-an` after the input arg because it is an output option
2016-02-22 14:14:35 +01:00
Roeland Jago Douma fe08b5e9d9 We should check for exceptions when trying to get the avatar
Fixes #22550

* Updated phpdoc of avatatmanager
* Add unit test
2016-02-22 10:14:14 +01:00