Commit Graph

229 Commits

Author SHA1 Message Date
Vincent Petry 17b141337a Delete orphaned shares in a background job 2015-04-08 10:47:55 +02:00
Bjoern Schiessle fac7ec3fc4 fix re-shares with encryption 2015-04-07 13:30:30 +02:00
Bjoern Schiessle 8b1a12a224 use loginHelper from base class 2015-04-07 13:30:30 +02:00
Bjoern Schiessle 391fab35f0 reset storage for each unit test 2015-04-07 13:30:30 +02:00
Thomas Müller 00338f9dca Removing files_encryption left overs 2015-04-07 13:30:28 +02:00
Morris Jobke cfe241a959 Merge pull request #13964 from rullzer/capabilities
Add OCS sharing info to capabilities - take 2
2015-03-30 10:06:05 +02:00
Thomas Müller 4d12c4a38b Merge pull request #13938 from owncloud/deprecate-iappconfig
Deprecated \OCP\IAppConfig - add missing methods to IConfig
2015-03-27 16:07:41 +01:00
Morris Jobke d082e37270 Merge pull request #15244 from owncloud/use_default_share_folder
always fall back to default share folder
2015-03-26 22:39:04 +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
Bjoern Schiessle a3592534ef always fall back to default share folder 2015-03-26 21:56:44 +01:00
Robin Appelman 1be7da4a57 replace share proxy with hook 2015-03-26 19:56:57 +01:00
Robin Appelman 173c31e42a rename proxy test 2015-03-26 19:56:31 +01:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Lukas Reschke 5f044ebf1b Add wrapper for Guzzle 2015-03-25 16:04:41 +01:00
Morris Jobke 09ea260957 Merge pull request #15160 from owncloud/deduplicate-external-manager-tests
Deduplicate external manager tests
2015-03-24 20:15:56 +01:00
Robin Appelman 1bd141b655 Merge pull request #15158 from owncloud/fix-failing-master
Fix failing master unit tests
2015-03-24 17:54:11 +01:00
Joas Schilling 8c33f05e93 Merge the two tests into one 2015-03-24 17:26:38 +01:00
Joas Schilling 7de15f3125 *cough* 2015-03-24 17:08:03 +01:00
Morris Jobke 2370af62ea Merge pull request #14998 from rullzer/ocs_api_new_url
OCS API should return fancy OC url
2015-03-24 17:04:31 +01:00
Morris Jobke 965d97a8f5 Merge pull request #14580 from owncloud/issue/13765-duplicate-remote-share
"Integrity constraint violation" when sharing the same item twice with the same user
2015-03-24 15:05:58 +01:00
Lukas Reschke e2453d78c0 Properly catch whether a share is `null`
Despite it's PHPDoc the function might return `null` which was not properly catched and thus in some situations the share was resolved to the sharing users root directory.

To test this perform the following steps:

* Share file in owncloud 7 (7.0.4.2)
* Delete the parent folder of the shared file
* The share stays is in the DB and the share via the sharelink is inaccessible. (which is good)
* Upgrade to owncloud 8 (8.0.2) (This step is crucial. The bug is not reproduceable without upgrading from 7 to 8. It seems like the old tokens are handled different than the newer ones)
* Optional Step: Logout, Reset Browser Session, etc.
* Access the share via the old share url: almost empty page, but there is a dowload button which adds a "/download" to the URL.
* Upon clicking, a download.zip is downloaded which contains EVERYTHING from the owncloud directory (of the user who shared the file)
* No exception is thrown and no error is logged.

This will add a check whether the share is a valid one and also adds unit tests to prevent further regressions in the future. Needs to be backported to ownCloud 8.

Adding a proper clean-up of the orphaned shares is out-of-scope and would probably require some kind of FK or so.

Fixes https://github.com/owncloud/core/issues/15097
2015-03-24 11:21:58 +01:00
Roeland Jago Douma bdde2156da Added extra unit test 2015-03-21 09:47:07 +01:00
Thomas Müller afa8872955 Merge pull request #14857 from owncloud/preview-provider-registration-in-manager
Preview provider registration in manager
2015-03-20 16:34:22 +01:00
Vincent Petry 67160e0861 Do not automatically add "update" permission to shared mounts
In the past it seems the update permission was needed to be able to
rename shared mounts, but it doesn't seem to be the case any more.

Removing the "update" permission that used to be added automatically
fixes the read-only permission check when trying to overwrite a
read-only file over WebDAV.
2015-03-20 12:33:59 +01:00
Vincent Petry eef5851a67 Fix share permission related unit tests 2015-03-20 11:30:51 +01:00
Thomas Müller 857b22c61b Merge pull request #15025 from rullzer/ocs_respect_enforced_date
Ocs respect enforced date
2015-03-19 17:06:04 +01:00
Robin Appelman be6edd465a Merge pull request #14537 from owncloud/oci-external-share
Fix external shares without password on oracle
2015-03-19 16:20:12 +01:00
Roeland Jago Douma dd3307dd19 Added unit test
Tests added to make sure that removing an expire date when this is
enforced is not allowed.
2015-03-19 10:47:09 +01:00
Vincent Petry c2315aa015 Fix shared storage permission checks 2015-03-18 19:56:31 +01:00
Morris Jobke f4b6f3cfd1 fix unit tests 2015-03-17 18:55:44 +01:00
Joas Schilling 8ebb198ef3 Add a unit test for the naming conflict on the mountpoint name 2015-03-17 16:55:03 +01:00
Joas Schilling 3052b9571e Fix controller test 2015-03-16 12:45:18 +01:00
Roeland Jago Douma ec31ee9117 Mark functions private 2015-03-11 16:30:54 +01:00
Roeland Jago Douma e9a003fe21 Slight better formatting 2015-03-11 15:11:50 +01:00
Roeland Jago Douma 09ee297356 New array syntax 2015-03-11 15:02:55 +01:00
Roeland Jago Douma c985186246 Added new header 2015-03-11 15:02:55 +01:00
Roeland Jago Douma af76716775 Now added enabled element
This change allows for more generic parsing for the capabilities.
2015-03-11 15:02:55 +01:00
Roeland Jago Douma 39b0f0725e Add file_sharing info to capabilities
Display the capabilities regarding file sharing in the capabilities API.
This will allow the clients to provide users a better experince.
2015-03-11 15:02:55 +01:00
Joas Schilling 6a677ce8fe Do not make setupMounts() public just because of testing 2015-03-11 11:10:43 +01:00
Robin Appelman dcd2d7aff5 Add unit tests for external share mananger 2015-03-10 10:17:53 +01:00
Lukas Reschke 48243a2949 Allow iframes from same domain in share view
This is required because the PDF Viewer itself is embedded using an iframe from the same domain. The default policy is blocking this.

Going on further, we have to come up with a solution in the future how to handle previews by applications, one example might be that they call their own endpoint and not the generic share page to allow applications to have full control over how to display previews.

Anyways, to test this behaviour use a decent newer browser (such as Chrome 41) and share a PDF file, obviously the PDF viewer needs to be enabled as well. Without this patch publicly shared PDF files should not get previewed and an error is thrown. (if it isn't then your browser is probably not obeying our Content-Security-Policy and you might consider switching to another one ;))
2015-03-10 10:06:15 +01:00
Vincent Petry ec19d9c267 Add unit test for size propagation across share boundaries 2015-03-09 12:56:22 +01:00
Roeland Jago Douma 4436a9ce35 Shares should have a least read permission
* Throw 400 when a share is created or updated without read permissions
* Added unit tests
2015-03-01 17:13:17 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Joas Schilling ac5bb97d04 Reset the group backend aswell 2015-02-25 16:03:12 +01:00
Joas Schilling 993d89b3cc Extend the class so the Filesystem is cleaned up 2015-02-25 16:03:10 +01:00
Vincent Petry 4290e1990e Merge pull request #13829 from owncloud/appmanager-list
Better caching for enabled apps
2015-02-23 16:03:32 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Robin Appelman 5394a81c05 Dont fatal error test when encryption is enabled 2015-02-17 15:05:29 +01:00
Joas Schilling 9ccfbc14f6 Copy sharing related activity code to Files_Sharing activity extension 2015-02-13 11:16:43 +01:00