Commit Graph

194 Commits

Author SHA1 Message Date
Thomas Müller 00338f9dca Removing files_encryption left overs 2015-04-07 13:30:28 +02:00
Vincent Petry 7ad4dfa201 Merge pull request #15227 from owncloud/ocetag-header
Copy Etag header to OC-Etag for sabre calls
2015-03-27 13:10:27 +01:00
Morris Jobke e8109f0bc3 Merge pull request #13802 from owncloud/share-partfilepermissions
Fix share permission checks
2015-03-26 22:01:05 +01:00
Lukas Reschke 8ebe667202 Remove unneeded argument 2015-03-26 20:45:39 +01:00
Lukas Reschke 55fd0082aa Serve all files with a Content-Disposition of 'attachment' via WebDAV
As an additional security hardening it's sensible to serve these files with a Content-Disposition of 'attachment'. Currently they are served 'inline' and get a "secure mimetype" assigned in case of potential dangerous files.

To test this change ensure that:

- [ ] Syncing with the Desktop client still works
- [ ] Syncing with the Android client still works
- [ ] Syncing with the iOS client still works

I verified that the 1.8 OS X and iOS client still work with this change.
2015-03-26 20:01:05 +01:00
Vincent Petry 70acd58336 Copy Etag header to OC-Etag for sabre calls 2015-03-26 16:06:43 +01:00
Vincent Petry a84ade5f32 Revert "adding OC-ETag header"
This reverts commit 30ee8b6f99.
2015-03-26 15:04:41 +01:00
Vincent Petry daceb1a9ac Revert "adding unit tests"
This reverts commit 8d327c94a8.
2015-03-26 15:04:36 +01:00
Vincent Petry cda7f7fd61 Merge pull request #15168 from owncloud/oc-etag-master
adding OC-ETag header
2015-03-26 13:52:43 +01:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Thomas Müller 8d327c94a8 adding unit tests 2015-03-26 10:49:26 +01:00
Thomas Müller 43beaba0dc Merge pull request #15171 from owncloud/sabre-logforbiddenasdebug
Log forbidden in debug level
2015-03-24 23:31:35 +01:00
Lukas Reschke ec12f5e019 Merge pull request #14949 from owncloud/sabre-2.1.3
Update sabre-2.1.3 thirdparty submodule
2015-03-24 23:16:57 +01:00
Vincent Petry 72c1c89bcd Log forbidden in debug level 2015-03-24 22:08:11 +01:00
Thomas Müller 30ee8b6f99 adding OC-ETag header 2015-03-24 21:36:46 +01:00
Vincent Petry 331f0196e0 Merge pull request #15150 from owncloud/sabre-removerangeexceptionforencryption
Remove range header exception for encryption
2015-03-24 14:29:01 +01:00
jknockaert a1b68b5a48 Remove range header exception for encryption
revert #10422
2015-03-24 13:19:49 +01:00
Vincent Petry eb894e6625 Soft fail in CustomPropertiesBackend whenever storage not available
When a storage is not available, it will not fail the whole call any
more but still return a usable file list.
2015-03-23 17:41:32 +01:00
Vincent Petry 5ba508b346 Fix permission checks in Sabre connector
This fixes moving files in and out of shared folders with some exotic
permission combinations.
2015-03-19 21:18:48 +01:00
Vincent Petry 50194c31b4 Soft fail in custom properties backend
This makes it possible for clients to still receive a file list (minus
the broken files) instead of getting no list at all
2015-03-18 12:36:37 +01:00
Vincent Petry 5ea8ab3bb0 Fix Principal connector override 2015-03-17 12:22:29 +01:00
Thomas Müller 0f3e36fdfd Adding a more meaningful message for sabre dav exception - fixes #14516 2015-03-11 11:53:31 +01:00
Thomas Müller 49e1a81eba fixing namespaces and PHPDoc 2015-03-09 10:38:37 +01:00
Thomas Müller 4bac595068 adding storage specific filename verification - refs #13640 2015-03-09 10:38:37 +01:00
Thomas Müller f72f9e0159 Merge pull request #14530 from owncloud/revert-14403
Revert "Updating license headers"
2015-02-27 00:39:29 -08:00
Morris Jobke 522469614b Merge pull request #14505 from owncloud/dav-copy-fix
Fixes WebDAV copy
2015-02-26 15:42:53 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Vincent Petry ae2f37ac06 Removed unused $node variable 2015-02-26 11:16:42 +01:00
Vincent Petry f39fcbc250 Fixes WebDAV copy
- added existence check for source argument
- removed extra logic for folders, as $view->copy() already supports
  that internally
2015-02-25 16:35:13 +01:00
Thomas Müller e9d25e4fdb using Doctrine\DBAL\Connection::executeUpdate() 2015-02-25 13:43:26 +01:00
Thomas Müller b3de86d851 Remove locks plugin.
Reasoning:
- a WebDAV server is not required to implement locking support
- WebDAV Locking is know to break the sync algorithm
- the current lock implementation is known to be broken (locks are not moved if a file is moved, locks on shared files don't work)
2015-02-25 10:30:47 +01:00
Lukas Reschke 432d7be8cc Show a empty response for GET on non-files instead of the Browser Plugin 2015-02-23 22:27:23 +01:00
Vincent Petry 9f6dcb9d3e Sabre Update to 2.1
- VObject fixes for Sabre\VObject 3.3
- Remove VObject property workarounds
- Added prefetching for tags in sabre tags plugin
- Moved oc_properties logic to separate PropertyStorage backend (WIP)
- Fixed Sabre connector namespaces
- Improved files plugin to handle props on-demand
- Moved allowed props from server class to files plugin
- Fixed tags caching for files that are known to have no tags
  (less queries)
- Added/fixed unit tests for Sabre FilesPlugin, TagsPlugin
- Replace OC\Connector\Sabre\Request with direct call to
  httpRequest->setUrl()
- Fix exception detection in DAV client when using Sabre\DAV\Client
- Added setETag() on Node instead of using the static FileSystem
- Also preload tags/props when depth is infinity
2015-02-23 22:27:23 +01:00
Thomas Müller df3c73de72 Merge pull request #14403 from owncloud/update-license-headers
Update license headers
2015-02-23 13:53:16 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Lukas Reschke 9a08c7ecb9 Merge pull request #14275 from chris-se/master
DAV authentication: use Owncloud's internal user instead of HTTP auth one
2015-02-23 10:25:13 +01:00
Morris Jobke 5d7d2adcbf Merge pull request #14207 from owncloud/propfind-optimize
Optimize quota calculation for propfind
2015-02-18 00:18:47 +01:00
Christian Seiler 535757bc42 DAV authentication: also use Owncloud's internal user for short-circuit
It still works otherwise, but without this, the performance optimization
of #13416 is defeated in these situations.
2015-02-16 23:47:39 +01:00
Christian Seiler 1377ebc7e9 DAV authentication: use Owncloud's internal user instead of HTTP-supplied one
Fixes: #14048, #14104, calendar#712
2015-02-16 23:34:49 +01:00
Lukas Reschke 886bda5f81 Refactor OC_Request into TrustedDomainHelper and IRequest
This changeset removes the static class `OC_Request` and moves the functions either into `IRequest` which is accessible via `\OC::$server::->getRequest()` or into a separated `TrustedDomainHelper` class for some helper methods which should not be publicly exposed.

This changes only internal methods and nothing on the public API. Some public functions in `util.php` have been deprecated though in favour of the new non-static functions.

Unfortunately some part of this code uses things like `__DIR__` and thus is not completely unit-testable. Where tests where possible they ahve been added though.

Fixes https://github.com/owncloud/core/issues/13976 which was requested in https://github.com/owncloud/core/pull/13973#issuecomment-73492969
2015-02-16 22:13:00 +01:00
Robin Appelman 9abaa0cc61 pass fileinfo to getStorageInfo 2015-02-13 17:59:58 +01:00
Robin Appelman fb2a3284df Cache quota info for directories 2015-02-13 17:50:53 +01:00
Vincent Petry 8210200770 Revert "adding OC-ETag header"
This reverts commit 96a931929e.
2015-02-05 20:43:37 +01:00
Robin Appelman 05035ef4af Fix webdav put for single file webdav shares 2015-01-29 12:47:12 +01:00
Thomas Müller b7cf4d551e let init() take an INode - fixes PHP message 2015-01-27 11:31:37 +01:00
Lukas Reschke 476579b9c6 Fix WebDAV auth for session authentication only
\Sabre\DAV\Auth\Backend\AbstractBasic::authenticate was only calling \OC_Connector_Sabre_Auth::validateUserPass when the response of \Sabre\HTTP\BasicAuth::getUserPass was not null.

However, there is a case where the value can be null and the user could be authenticated anyways: The authentication via ownCloud web-interface and then accessing WebDAV resources. This was not possible anymore with this patch because it never reached the code path in this scenario.

This patchs allows authenticating with a session without isDavAuthenticated value stored (this is for ugly WebDAV clients that send the cookie in any case) and thus the functionality should work again.

To test this go to the admin settings and test if the WebDAV check works fine. Furthermore all the usual stuff (WebDAV / Shibboleth / etc...) needs testing as well.
2015-01-20 10:03:14 +01:00
Lukas Reschke 730460c9fa Close session properly 2015-01-19 16:25:44 +01:00
Lukas Reschke dfbc405a45 Prioritise Basic Auth header over Cookie
There are a lot of clients that support multiple WebDAV accounts in the same application. However, they resent all the cookies they received from one of the accounts also to the other one. In the case of ownCloud this means that we will always show the user from the session and not the user that is specified in the basic authentication header.

This patch adds a workaround the following way:

1. If the user authenticates via the Sabre Auth Connector add a hint to the session that this was authorized via Basic Auth (this is to prevent logout CSRF)
2. If the request contains this hint and the username specified in the basic auth header differs from the one in the session relogin the user using basic auth

Fixes https://github.com/owncloud/core/issues/11400 and https://github.com/owncloud/core/issues/13245 and probably some other issues as well.

This requires proper testing also considering LDAP / Shibboleth and whatever instances.
2015-01-17 13:29:07 +01:00
Thomas Müller 5f171618fd remove unused variable and fix undefined variable 2015-01-08 09:46:40 +01:00
Vincent Petry 2e57fe93e4 Disable part files for OC ext storage backend + s2s backend
When uploading files to an OC ext storage backend or when using server
to server sharing storage, part files aren't needed because the backend
already has its own part files and takes care of the final atomic rename
operation.

This also fixes issues when using two encrypted ownCloud instances where
one mounts the other either as external storage (ownCloud backend) or
through server to server sharing.
2015-01-07 21:21:51 +01:00