Commit Graph

438 Commits

Author SHA1 Message Date
Lukas Reschke 5f044ebf1b Add wrapper for Guzzle 2015-03-25 16:04:41 +01:00
Morris Jobke 1db177b841 Merge pull request #15055 from owncloud/share-activity-grouping
Group sharing activities by user/group and file respectively
2015-03-24 20:23:36 +01:00
Joas Schilling 7de15f3125 *cough* 2015-03-24 17:08:03 +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
Robin Appelman d46b7d73e7 when the path doesnt exist show a proper error page 2015-03-24 12:21:25 +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
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
Joas Schilling 7776e088d6 Group sharing activities by user/group and file respectively 2015-03-20 09:49:33 +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
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 ba3e4ede39 Use insertIfNotExists() instead of manual logic 2015-03-17 16:03:24 +01:00
Joas Schilling 05c4848954 Correctly get the unique mountpoint name when mounting the share
Previously the mount name was checked for uniqueness prior to inserting the
share. This caused problems, when two shares with the same name where done
or folder, mount point, local share with the same name was done, between
sending and accepting of the remote share
2015-03-17 16:03:24 +01:00
Lukas Reschke db033e4e19 Fix PHPDoc and Co.
Ref https://github.com/owncloud/core/pull/14929#discussion_r26501240
2015-03-17 10:37:09 +01:00
Vincent Petry b9d9405135 Fix scanFile signature warnings 2015-03-16 16:45:11 +01:00
Joas Schilling 47af533183 Move mimetype check from template to controller 2015-03-16 12:45:18 +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 4322287fc3 Fix size propagation over shared storage boundary 2015-03-05 22:23:47 +01:00
Robin Appelman c65c717379 Fix external shares without password on oracle 2015-02-27 13:22:57 +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 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Lukas Reschke 5bb0889b30 Remove uneeded assignment
'files' is neither used in the controller or the template
2015-02-24 19:50:23 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Vincent Petry 837365fff2 Merge pull request #14210 from owncloud/activity/225-sharing-extension-jenkins
Activity/225 sharing extension
2015-02-18 14:46:58 +01:00
Joas Schilling 0833a6e332 Correctly create activities for public downloads 2015-02-17 17:26:03 +01:00
Joas Schilling b768a70616 Use filterNotificationTypes to filter the types and group the methods 2015-02-13 11:30:36 +01:00
Joas Schilling 9ccfbc14f6 Copy sharing related activity code to Files_Sharing activity extension 2015-02-13 11:16:43 +01:00
Morris Jobke 1bb6de7c1b Merge pull request #13425 from owncloud/phpdoc_cleanup
Cleanup of PHPDoc return types
2015-02-10 01:14:00 +01:00
Lukas Reschke a67627140c Revert "Add OCS sharing info to capabilities" 2015-02-07 00:12:26 +01:00
Roeland Jago Douma 3be3e20c0f Bit better formatting when using json output 2015-02-06 10:55:33 +01:00
Roeland Jago Douma d4e361db44 Updated sharing capabilities
Moved to files_sharing
Added more capabilities.
Tried to order to capabilities more OO style
2015-02-06 10:33:08 +01:00
Roeland Jago Douma 0452fde212 Converted getCapabilities to non static function 2015-02-04 14:56:31 +01:00
Roeland Jago Douma 4801d9c02a Use single quotes 2015-02-04 14:56:31 +01:00
Roeland Jago Douma ea1f726b7d Only return capabilities if they are set 2015-02-04 14:56:31 +01:00
Roeland Jago Douma b3ea849a87 Added capabilities whether a server allows public links
This fixes #13673.
It now lists link sharing, passwords enforced, and if public uploads are
allowed.
2015-02-04 14:56:31 +01:00
Morris Jobke 87b39e8f03 Merge pull request #13525 from owncloud/s2s-fixscanfileforbrokenstorage
Catch storage exception in scanner for remote shares
2015-01-28 00:31:37 +01:00
Vincent Petry bd888748bd Merge pull request #13490 from owncloud/fix_reshare_s2s_share
use uid provided by setupfs hook to mount server2server shares
2015-01-26 19:54:14 +01:00
Bjoern Schiessle 5ba19ba7fc certificate manager should always use a \OC\Files\View otherwise we will get problems for different primary storages 2015-01-26 16:58:52 +01:00
Bjoern Schiessle 67da1f7e5a certificate manager only needs the user-id, no need to pass on the complete user object 2015-01-26 16:58:52 +01:00
Bjoern Schiessle 66f0db30b2 use uid provided by setupfs hook to mount server2server shares, otherwise mount will fail for public link shares 2015-01-26 16:54:50 +01:00
Vincent Petry d5b61f9afe Prevent double slash in shareinfo request URL 2015-01-26 16:19:38 +01:00
Vincent Petry f6e644b43f Catch storage exception in scanner for remote shares
Whenever an exception occurs during scan of a remote share, the share is
checked for availability. If the storage is gone, it will be removed
automatically.

Also, getDirectoryContent() will now skip unavailable storages.
2015-01-26 13:59:49 +01:00
Bjoern Schiessle 73a058e301 by default send mail for new server-to-server share 2015-01-23 21:59:07 +01:00
Bjoern Schiessle 7216983a08 delete all server-to-server shares if a user gets deleted 2015-01-21 17:11:34 +01:00
Thomas Müller 8ba42abbe4 Merge pull request #13432 from owncloud/animate_gifs_public_sharing
show animated gifs on public sharing page
2015-01-21 17:09:46 +01:00
Vincent Petry 9fbdd1072e Fix webdav mkdir for remote shares 2015-01-21 15:14:57 +01:00
Thomas Müller 87a754c72e avoid $this->cache being null - fixes #13491 2015-01-20 12:38:54 +01:00
Georg Ehrke 374ddbff55 show animated gifs on public sharing page 2015-01-19 16:20:06 +01:00
Robin McCorkell 2b99fc76ec Cleanup of PHPDoc return types 2015-01-16 20:30:43 +00:00