Commit Graph

289 Commits

Author SHA1 Message Date
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Vincent Petry 5b6caf763c Removed broken webdav tests
The encryption webdav tests are too broad and do not qualify as unit
test. Also, since the sabre upgrade they are not fixable.
The matching functionality is already tested in other classes on a
smaller scale.
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
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Bjoern Schiessle ed29c6ce86 get correct user for paths to the trash bin, needed for remote shares if the size of of trash gets calculated 2015-01-30 14:39:09 +01:00
Joas Schilling 333f4e7913 Fix intendation 2015-01-29 16:57:46 +01:00
Joas Schilling 4a5f626979 Fix more assertions 2015-01-29 16:54:27 +01:00
Joas Schilling 9a7dd57bc8 Fix 2 assertions 2015-01-29 16:09:35 +01:00
Bjoern Schiessle c78e3c4a7f make sure that we always create a public share key for remote shares 2015-01-29 14:23:14 +01:00
Vincent Petry 67f1534e0f Call final unlink in trash wrapper's storage
In the case of cross-storage delete, the files are copied to the trash,
then deleted. The final delete on the source storage would still reach
the trash wrapper.

This fix makes forwards that second call to the wrapped storage to make
the final delete work.

It fixes the issue with remote shares, local shares and external
storage.

Also, it uses a new function "renameRecursive" that renames the files
and preserves the mtimes (like "copy_recursive" did in the past))
2015-01-23 12:20:54 +01:00
Morris Jobke 870bc429b2 Merge pull request #13416 from owncloud/reauthenticate-if-session-differs-from-basic-auth
Prioritise Basic Auth header over Cookie
2015-01-19 22:23:02 +01:00
Bjoern Schiessle 15ae6b47ed replace hook with storage wrapper 2015-01-19 09:16:15 +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
Lukas Reschke 64ee942e7d Merge pull request #13288 from owncloud/enc_fix_public_download
[encryption] fix download of public shared files
2015-01-14 11:55:13 +01:00
Bjoern Schiessle 83574053a3 if we download a public shared file we need to retrieve the user from the path 2015-01-13 14:22:54 +01:00
Bjoern Schiessle 89f17ef6fe adapt decrypt all and restore/delete key backups to the new folder structure for encryption key introduced with OC8 2015-01-13 12:45:33 +01:00
Björn Schießle 331d73c3a3 Merge pull request #13182 from owncloud/download_versions
make versions of shared files downloadable
2015-01-12 12:03:21 +01:00
Bjoern Schiessle 0500d3a506 unit tests 2015-01-09 15:49:44 +01:00
Bjoern Schiessle d699d31518 make versions of shared files downloadable 2015-01-09 12:46:24 +01:00
Morris Jobke eab4c029c2 Merge pull request #12961 from owncloud/try_to_cache_keys
cache keys to read them only once from the hard disc
2014-12-22 09:50:29 +01:00
Bjoern Schiessle aea991c22e cache keys to read them only once from the hard disc 2014-12-19 16:04:13 +01:00
Bjoern Schiessle 24993280ed Next step in server-to-server sharing next generation, see #12285
Beside some small improvements and bug fixes this will probably the final state for OC8.

To test this you need to set up two ownCloud instances. Let's say:

URL: myPC/firstOwnCloud user: user1
URL: myPC/secondOwnCloud user: user2
Now user1 can share a file with user2 by entering the username and the URL to the second ownCloud to the share-drop-down, in this case "user2@myPC/secondOwnCloud".

The next time user2 login he will get a notification that he received a server-to-server share with the option to accept/decline it. If he accept it the share will be mounted. In both cases a event will be send back to user1 and add a notification to the activity stream that the share was accepted/declined.

If user1 decides to unshare the file again from user2 the share will automatically be removed from the second ownCloud server and user2 will see a notification in his activity stream that user1@myPC/firstOwnCloud has unshared the file/folder from him.
2014-12-19 15:20:24 +01:00
Morris Jobke d41082f4d6 first step to drop \OCP\Config:: in favour of IConfig 2014-12-17 11:12:37 +01:00
Joas Schilling b85e34c1da Correctly namespace encryption tests 2014-12-09 09:47:27 +01:00
Joas Schilling e67fe0336b Use self:: instead of the class name in encryption tests 2014-12-09 09:47:27 +01:00
Joas Schilling efac8ced90 Update OCA\Encryption to OCA\Files_Encryption in the encryption app itself 2014-12-09 09:47:26 +01:00
Morris Jobke 0d4f0ab871 reduce OC_Preferences, OC_Config and \OCP\Config usage
* files_encryption
* files_versions
* files_trashbin
* tests
* status.php
* core
* server container
2014-12-08 22:42:37 +01:00
Bjoern Schiessle 49cfc30359 upgrade to new folder structure 2014-12-02 16:03:54 +01:00
Bjoern Schiessle a90606fb14 change private/public key names for consistency reasons 2014-11-26 10:57:47 +01:00
Bjoern Schiessle fd86d76f98 new folder structure for keys
all keys are now in files_encryption/key/path_to_file/filename/
share keys are named: user.shareKey
file key is named: fileKey
2014-11-26 10:57:47 +01:00
Joas Schilling 2c39aec8cb Replace deprecated constant with new class constant 2014-11-25 16:30:21 +01:00
Vincent Petry 391ece46e3 Fix file upload to ext storage when recovery key is enabled
Fixes an issue when uploading files to external storage when recovery
keys are enabled

The Util class only works with real users, so instantiating it with the
virtual recovery key user or public key user can cause issues.
2014-11-20 16:43:44 +01:00
Joas Schilling 76ebd3a050 Make apps/ extend the \Test\TestCase and fix overwritten methods 2014-11-19 14:52:09 +01:00
Joas Schilling b228226700 Fix single run of encryption tests and usages of uniqid() and fopen() 2014-11-17 10:48:13 +01:00
Joas Schilling a3a064fe96 Skip some more tests on Windows which just can not work at all 2014-11-17 10:48:06 +01:00
Thomas Müller f776bcd4a0 remove unnecessary require calls - the ownCloud class loader is supposed to take care of this 2014-10-30 17:20:40 +01:00
Vincent Petry 5536f6edd0 Properly register sharing hooks and proxies
This will fix failing tests when shares weren't cleant up on delete due
to missing hooks.

Added login for user1 in setUp().
2014-10-30 12:05:15 +01:00
Vincent Petry e8f9b929bd Added encryption test when moving file as non-owner 2014-10-29 12:57:12 +01:00
Jörn Friedrich Dreyer cb3a4d22b1 make tests compatible with hook based skeleton generation 2014-10-20 11:29:20 +02:00
Bjoern Schiessle 9147219377 we also encrypt/decrypt files in the versions folder for previews and if encryption is enabled/disabled 2014-10-06 12:02:08 +02:00
Vincent Petry 75593f87d5 Merge pull request #11137 from owncloud/enc-pregfix
Fix share key pattern matching
2014-09-23 12:36:34 +02:00
Vincent Petry 1e631754d7 Fix share key finding algorithm in various cases
Instead of inaccurate pattern matching, use the list of users who we
know have access to the file to build the list of share keys.

This covers the following cases:

- Move/copy files into a subfolder within a share
- Unsharing from a user
- Deleting files directlry / moving share keys to trashbin
2014-09-23 12:33:07 +02:00
Bjoern Schiessle 2ee14c4734 create backup from all keys before recovery 2014-09-19 11:47:18 +02:00
Bjoern Schiessle 5a2fef4309 login as user1 before performing a test 2014-08-15 15:48:44 +02:00
Vincent Petry f282a5cff0 Merge pull request #9754 from owncloud/enc_support_aes_256
[encryption] support aes 256
2014-08-13 12:34:21 +02:00
Morris Jobke d4eaa74b76 fixes from git push force 2014-08-12 21:29:05 +02:00
Bjoern Schiessle 53c5a84eac add unit tests 2014-08-12 21:15:39 +02:00
Morris Jobke e15b4d08a6 Disable encryption migration tests 2014-08-05 18:35:53 +02:00
Morris Jobke 676fa459d7 Minor fixes
* instanceof \OC\Files\View
* fix misplaced paranthesis
* remove misplaced character in comment
2014-08-05 16:53:28 +02:00
Bjoern Schiessle 1a797f90bb add unit test for rename and copy operation 2014-07-30 15:14:01 +02:00