Commit Graph

11380 Commits

Author SHA1 Message Date
Robin Appelman 70a5233f69 Query the cache when checking if a node exists 2016-03-23 17:13:17 +01:00
Thomas Müller 0009bf244b Merge pull request #23464 from owncloud/stable9-backport-23443
[stable9] Log more information by default
2016-03-23 09:13:10 +01:00
Thomas Müller 6edf403f3f Merge pull request #23475 from owncloud/stable9-RealRancor-exclude_lost_and_found
[stable9] Exclude lost+found dir in integrity check
2016-03-23 08:06:36 +01:00
Lukas Reschke 43516ebef9 Only use the user session if ownCloud is already installed
When installing ownCloud with autotest and MySQL some log entries may be created which will invoke the logging class. IUserSession has a dependency on the database which will make the installation fail => 💣
2016-03-22 22:27:35 +01:00
Thomas Müller 1a100c69ba Merge pull request #23473 from owncloud/stable9_23398
[stable 9]  Allow blocking of group sharing
2016-03-22 17:16:23 +01:00
Thomas Müller 03fcbc8ceb Merge pull request #23479 from owncloud/backport-23461-activity-without-sharing
[9.0] Fix "AutoloadNotAllowedException" when files_sharing is disabled
2016-03-22 17:15:24 +01:00
Joas Schilling 0d9edd80f1 Fix "AutoloadNotAllowedException" when files_sharing is disabled 2016-03-22 15:01:52 +01:00
RealRancor b3ead7568d Exclude lost+found dir in integrity check 2016-03-22 12:59:18 +01:00
Roeland Jago Douma aa75cfcf14 Block group sharing in API and in share manager
* Fix tests
2016-03-22 12:37:20 +01:00
Roeland Jago Douma e9fc791e9f Add config to sharemanager 2016-03-22 12:37:08 +01:00
Joas Schilling 50e94db4d5 Do not abort with an exception when a default app can not be enabled 2016-03-22 10:28:59 +01:00
Lukas Reschke 177ad39854 Log more information by default
This modifies the logger to add the following logging information by default:

- Request Method
- Request URL
- Current user
2016-03-22 09:46:02 +01:00
Thomas Müller 3d19a179c7 Merge pull request #23383 from owncloud/backport-use-raw-path
[stable9] Use raw PATH_INFO
2016-03-21 18:03:10 +01:00
Thomas Müller fefaa1fd87 Merge pull request #23293 from owncloud/backport-23108
[stable9] Ensure that stored version is at least 1 for cross-storage copy
2016-03-21 09:48:15 +01:00
Lukas Reschke d9b632c001 Use raw PATH_INFO
PATH_INFO will be empty at this point and thus the logic in base.php did not catch this. Changing this to "getRawPathInfo" will ensure that the path info is properly read.

Fixes https://github.com/owncloud/core/issues/23199
2016-03-18 10:30:26 +01:00
Lukas Reschke 1fdf790c8f Write .htaccess update only if not already written
The ownCloud update routine also runs the "updateHtaccess" code in case only an application gets updated. This leads to having entries multiple time in the .htaccess file leading to unpredictable behaviour.

With 9.0 we added the "#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####" entry to the .htaccess file, this change uses it to ensure that only to the .htaccess gets written if the file has not been modified already. Since the .htaccess modifications are optional this is not a big deal.

Without this change updates of applications can break the rewrite rules (ending in endless redirects) as well as breaking the code integrity checker.
2016-03-18 09:18:46 +01:00
Thomas Müller 382b18e85e Merge pull request #23309 from owncloud/backport-23164-stable9
[stable9] Prevent certain DBs throwing exceptions on same-value updates
2016-03-17 20:52:11 +01:00
Lukas Reschke dbcb037639 Require at least libxml 2.7.0
Fixes https://github.com/owncloud/core/issues/23168
2016-03-16 17:13:13 +01:00
Robin McCorkell aa91d50d04 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-16 14:50:00 +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 9ef7340dc7 Add support for custom values in integrity checker 2016-03-15 17:03:16 +01:00
Lukas Reschke d1978a6950 Replace all required values 2016-03-15 17:03:13 +01:00
Thomas Müller b580d26270 Merge pull request #23237 from owncloud/backport-22901
[stable9] Add DAV authenticated also to other scopes
2016-03-15 16:03:35 +01:00
Robin Appelman 9d688e655d move failedstorage to core 2016-03-15 12:49:12 +01:00
Thomas Müller 5a6b2956d8 Merge pull request #23022 from owncloud/stable9_backport_22602
[stable 9]   Do not check all chunks of a chunked upload if we do not need to
2016-03-15 12:15:45 +01:00
Thomas Müller 99de93a6c6 Merge pull request #23075 from owncloud/backport-23074-oracle-ext-storage
[9.0] Correctly escape join statements and use selectAlias
2016-03-15 12:13:54 +01:00
Thomas Müller 4159187a6e Merge pull request #23229 from owncloud/backport-23218-memcached-exceptions-on-success
[9.0] Fix errors in memcached implementation
2016-03-15 12:10:23 +01:00
Thomas Müller 6f64c99653 Merge pull request #23230 from owncloud/backport-23191
[stable9] Verify the getResponse returns a ResponseInterface
2016-03-15 12:09:55 +01:00
Thomas Müller ce0f28c123 Merge pull request #23231 from owncloud/backport-23190
[stable9] Use proper URLs for search results
2016-03-15 12:07:45 +01:00
Thomas Müller cca3a249fd Merge pull request #23240 from owncloud/backport-23222
backport of #23222
2016-03-15 12:07:15 +01:00
Roeland Jago Douma 3a5e90fa03 Generate a valid URL for link notification
fixes #23197

* Updated unit test
2016-03-15 07:34:53 +01:00
Phiber2000 e2c557ab82 backport of #23222 (#23225) 2016-03-14 17:59:40 +01:00
Lukas Reschke e1727477ac Add DAV authenticated also to other scopes
Fixes https://github.com/owncloud/core/issues/22893
2016-03-14 17:57:37 +01:00
Lukas Reschke effc522572 Use proper URLs for search results
Fixes https://github.com/owncloud/core/issues/23136
2016-03-14 16:16:25 +01:00
Thomas Müller 689f3dea45 Merge pull request #22943 from owncloud/backport-22800-stable9
[9.0] don't hide server not available exception, fixes #20536
2016-03-14 16:15:50 +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
Thomas Müller a09ffb274b Merge pull request #23065 from owncloud/stable9-add-rewrite-rules-after-setup
[stable9] Add base rewrite rule only when RewriteBase is defined
2016-03-14 16:14:21 +01:00
Joas Schilling 9190885b4e Fix errors in memcached implementation 2016-03-14 16:13:35 +01:00
Joas Schilling 69cf557d0b Shorter cache key for URL entries 2016-03-14 13:34:34 +01:00
Lukas Reschke 9bc99bb297 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-11 14:54:20 +01:00
Lukas Reschke bd17cc793c Improved rewrite rule
As per https://github.com/owncloud/core/issues/23098 and https://github.com/owncloud/core/issues/23117
2016-03-10 22:18:53 +01:00
Thomas Müller 730620cfb2 Merge pull request #22912 from owncloud/stable9-diskfreespace-filesworkaround
[stable9] Fix call to disk_free_space when a file is provided
2016-03-10 15:31:38 +01:00
Thomas Müller 85168315ab Merge pull request #23071 from owncloud/backport-23032-no-response-on-cli
[9.0] Do not set response status in CLI in case of error
2016-03-10 10:54:25 +01:00
Joas Schilling 09febaad49 Correctly escape join statements and use selectAlias 2016-03-10 10:28:39 +01:00
Thomas Müller 83894b58fe Merge pull request #23016 from owncloud/stable9_backport_23008
[stable 9] Select queries in the default share provider should query for file/folder
2016-03-10 09:10:22 +01:00
Vincent Petry f374368568 Do not set response status in CLI in case of error 2016-03-10 08:57:29 +01:00
Lukas Reschke b315a5ee29 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 22:41:32 +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
Lukas Reschke 316f86f2a3 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 15:29:08 +01:00
Roeland Jago Douma 313b881d2b 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-09 14:48:31 +01:00
Roeland Jago Douma 9120448302 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 13:56:35 +01:00
Thomas Müller e2b43c4095 Merge pull request #22908 from owncloud/backport-22904-group-manager-wrong-return
[9.0] Make sure that the return value is an array
2016-03-09 12:26:42 +01:00
Thomas Müller d84cccb911 Merge pull request #22919 from owncloud/backport-double-url-encoding
[stable9] Remove double URL encoding
2016-03-09 12:26:29 +01:00
Vincent Petry d63f5561fb Fix share mounting recursion 2016-03-08 12:58:46 +01:00
Arthur Schiwon 213dfa2b85 don't hide server not available exception, fixes #20536 2016-03-08 12:40:12 +01:00
Lukas Reschke fab42c7cd2 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:33:50 +01:00
Joas Schilling 71b3033b35 Make sure that the return value is an array 2016-03-07 13:55:33 +01:00
Morris Jobke 9737290e39 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 20:13:05 +01:00
Thomas Müller 434747f450 Merge pull request #22832 from owncloud/external-unavailable-recheck9
[9.0] allow availability recheck for external storages
2016-03-04 15:29:27 +01:00
Joas Schilling 62399f7852 ucwords does not support delimiter on 5.4 2016-03-04 12:20:50 +01:00
Thomas Müller 4fc6deaaf0 Merge pull request #22822 from owncloud/stable9-exclude-assets
[stable9] Exclude the assets folder from integrity check
2016-03-04 11:50:24 +01:00
Robin Appelman f603c57751 allow availability recheck for external storages 2016-03-03 20:07:18 +01:00
Vincent Petry e155f28f5e Revert "No longer evaluate appinfo/version" 2016-03-03 18:42:23 +01:00
Lukas Reschke 4186bcbdf2 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 16:00:34 +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
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 256dfd27b6 Merge pull request #17451 from owncloud/apps-disablebrokenappafterenable
Disable app that bricks the server after enabling
2016-03-01 11:26:18 +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
Jenkins for ownCloud a06f59c580 [tx-robot] updated from transifex 2016-03-01 01:55:33 -05:00
Thomas Müller 3adb6ae0f5 Merge pull request #22707 from owncloud/use-our-public-api
Use IQueryBuilder::PARAM_* instead of \PDO::PARAM_*
2016-03-01 07:24:57 +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
Vincent Petry 1dbe240b0e Disable app that bricks the server after enabling
If an app is getting enabled in the web UI, an ajax call is now made to
make sure the server still works. If it doesn't, it sends an emergency
app disabling call to disable the breaking app.
2016-02-29 12:07:37 +01:00
Joas Schilling a1c02a0567 Fix since version 2016-02-29 11:02:10 +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
Thomas Müller 3e8e0049b4 Merge pull request #22673 from owncloud/fix_enforced_expire_date_setting
Expiration date can only be enforced if default is enabled
2016-02-29 07:08:57 +01:00
Jenkins for ownCloud a39332832c [tx-robot] updated from transifex 2016-02-28 01:55:12 -05: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