Commit graph

276 commits

Author SHA1 Message Date
Roeland Jago Douma
1ee56c702d [WEBDAV] check if delete of source is allowed on move
Fixes #5251

If we perform a move we need to make sure first that the source can be
deleted. Else the dest might be cleared but the move will fail later.

* Added unit tests

Eventually we need more and better checking here.
2015-10-07 11:58:16 +02:00
Morris Jobke
b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Joas Schilling
1493e86dea Allow listeners to set status code and message 2015-09-23 15:15:07 +02:00
Robin Appelman
b520a1e520 Merge pull request #19081 from owncloud/prevent0bytedownloads
prevent 0 byte downloads when storage returns false
2015-09-21 13:50:35 +02:00
Thomas Müller
100d9e1976 Merge pull request #19095 from owncloud/set-priority-to-1-for-maintenance
Make sure Maintenance is checked before auth and others
2015-09-18 08:17:58 +02:00
Joas Schilling
44e6c4f398 Do not "use" Server 2015-09-17 15:11:05 +02:00
Joas Schilling
5eddde6486 Add a Sabre plugin that emits an event for apps 2015-09-17 13:59:27 +02:00
Jörn Friedrich Dreyer
773941dfb0 prevent 0 byte downloads when storage returns false 2015-09-17 11:16:00 +02:00
Joas Schilling
bc89bca803 Make sure Maintenance is checked before auth and others 2015-09-17 11:06:51 +02:00
Joas Schilling
e0992c1297 Check for maintenance mode first so we send the 503 instead of login verification 2015-09-16 09:38:36 +02:00
Robin Appelman
688981b55c allow hook cancel 2015-09-14 20:35:33 +02:00
Robin Appelman
75f126da49 use the correct path for cache updates when doing chunked assembly 2015-09-14 20:35:33 +02:00
Robin Appelman
6386327150 work directly on storages when doing a chunked upload assembly 2015-09-14 20:35:33 +02:00
Robin Appelman
b424151459 handle notfound exceptions in lock plugin 2015-09-14 20:35:33 +02:00
Robin Appelman
e612d3123f wrap the entire put operation in a read lock 2015-09-14 20:35:33 +02:00
Robin Appelman
209abaadbb expose locking api in sabre connector 2015-09-14 20:35:33 +02:00
Lukas Reschke
f3561e2349 Explicitly specify status code 200 as response code
Potentially fixes https://github.com/owncloud/core/issues/17586
2015-08-25 18:07:40 +02:00
Robin Appelman
b7cbff23d9 handle single file dav endpoints 2015-08-11 14:46:46 +02:00
Robin Appelman
fd35365041 only add tags plugin when loggedin 2015-08-11 14:43:46 +02:00
Robin Appelman
b0c8654f9e split out creating the sabre dav server to it's own factory 2015-08-11 14:43:46 +02:00
Robin Appelman
8c5302847b add test framework for doing full request webdav tests 2015-08-11 14:43:46 +02:00
Vincent Petry
6c139674a4 Merge pull request #18030 from owncloud/dav-upload-updater
go trough the updater when uploading over webdav
2015-08-06 15:28:10 +02:00
Robin Appelman
2a90cbe603 go trough the updater when uploading over webdav 2015-08-03 13:42:36 +02:00
Robin Appelman
91fbee8988 also log the class for dav exceptions 2015-07-24 13:30:52 +02:00
Vincent Petry
b3b080e1c0 Strip public webdav info about sharing and mount points
Remove information about whether a file is an incoming share or mount
point when requested over public webdav.
2015-07-13 14:20:35 +02:00
Thomas Müller
d3ac73c0c9 Remove OC_Log 2015-07-03 18:00:16 +02:00
Vincent Petry
cf245b80fe Only delete part file on error if it is really a part file 2015-07-01 12:52:06 +02:00
Vincent Petry
fd4efdded9 Clean up part file only once, not twice on error 2015-07-01 09:47:05 +02:00
Thomas Müller
134dc136e6 Avoid namespace clash 2015-06-30 15:07:48 +02:00
Thomas Müller
3f3c603922 Adding exception handling for ServerNotAvailableException - refs #17192 2015-06-30 15:05:59 +02:00
Morris Jobke
2bcd0af177 Merge pull request #17189 from owncloud/files-straypartfilesonexception
Cleanup part file after upload exception
2015-06-30 11:58:26 +02:00
Vincent Petry
3217d4dad1 Cleanup part file after upload exception
Added unit tests for checking for stray part files.
Convert exception to sabre exception in upload put method.

Also added unit test for exception mapping, which also indirectly tests
that the part file is being deleted on exception.

This applies to both chunking and non-chunking mode.

Added some unit tests for chunk upload.
2015-06-29 17:31:14 +02:00
Vincent Petry
2fa432dfb8 Fix class name conflict
Looks like PHP 5.6.x doesn't like name conflicts.

\Sabre\DAV\Server would overlap with \OC\Connector\Sabre\Server.
2015-06-29 17:11:14 +02:00
Thomas Müller
372a9afabe Fixing ctor calls and ctor itself to not break usage in calendar and contacts ..... 2015-06-29 15:54:05 +02:00
Thomas Müller
f8127046ee Unit tests added for MaintenancePlugin 2015-06-29 14:18:09 +02:00
Thomas Müller
e236e564af In case of maintenance we should add a message to the exception 2015-06-29 12:31:01 +02:00
Morris Jobke
f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Robin Appelman
24f0151f81 handle locked exceptions when getting file/directory info in sabre 2015-06-17 14:13:10 +02:00
Thomas Müller
d2305f2527 Merge pull request #16729 from owncloud/scanner-read-lock
keep a read lock while scanning a file or folder
2015-06-17 11:52:54 +02:00
Vincent Petry
1f91e9e65d Convert invalid path exception to sabre exception on MOVE 2015-06-15 17:49:11 +02:00
Robin Appelman
7d72f7d8ce keep a read lock while scanning a file or folder 2015-06-15 14:32:29 +02:00
Thomas Müller
b6165b6865 Merge pull request #16912 from owncloud/webdav-smalltransferlockfix
Webdav PUT small file lock must be shared during hooks
2015-06-15 11:30:59 +02:00
Vincent Petry
4497aa4c68 Webdav PUT small file lock must be shared during hooks
Fixed code path for Webdav PUT of small files to use shared locks during
hook execution, and exclusive during the file operation

This makes it possible for versions to be copied by accessing the file
in a post_write hook.
2015-06-12 18:52:18 +02:00
Robin Appelman
05cecb101d verify path when getting a node for sabredav 2015-06-11 17:11:33 +02:00
Vincent Petry
f13a2d9251 Revert "verify path when getting a node for sabredav" 2015-06-11 15:25:06 +02:00
Robin Appelman
4d10dab813 verify path when getting a node for sabredav 2015-06-11 14:12:04 +02:00
Vincent Petry
6ae5ae2e31 Prevent deleting Webdav root 2015-06-05 16:55:09 +02:00
Joas Schilling
1df95ea1ca Fix "@throws" tags on doc blocks 2015-06-05 13:55:59 +02:00
Vincent Petry
06dda427f3 Validate path in getChild 2015-06-05 12:08:18 +02:00
Vincent Petry
6ab38be40e Translate invalid path exception to sabre exception for files 2015-06-03 12:22:31 +02:00