Commit Graph

149 Commits

Author SHA1 Message Date
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
Morris Jobke 1bb6de7c1b Merge pull request #13425 from owncloud/phpdoc_cleanup
Cleanup of PHPDoc return types
2015-02-10 01:14:00 +01:00
Vincent Petry 5ade2854ee Fix DAV exceptions, some will still return false now
Since the Storage interface isn't ready to work directly with exceptions
like Forbidden and NotFound, the DAV storage has been adapted to still
return false when expected.
2015-01-30 12:02:23 +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 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
Robin Appelman 960ff4f136 Apply wrappers to existing mounts before registering it 2015-01-23 13:48:35 +01:00
Vincent Petry 5fb8a4715d removeStorageWrapper to unregister a storage wrapper 2015-01-23 12:20:54 +01:00
Vincent Petry 6fb553e92c Do not call wrapStorage if storate with same name added twice 2015-01-22 16:24:24 +01:00
Robin McCorkell 2b99fc76ec Cleanup of PHPDoc return types 2015-01-16 20:30:43 +00:00
Morris Jobke fd57820708 Merge pull request #13132 from aptivate/improve_debug_logging_messages
Improve debugging for ServiceUnavailable exceptions
2015-01-07 10:36:27 +01:00
Chris Wilson 402a3ed146 Improve debugging for ServiceUnavailable exceptions
I was getting a lot of these in my logs for no apparent reason, and file
uploads were failing:

	{"app":"webdav","message":"Sabre\\DAV\\Exception\\ServiceUnavailable: ","level":4,"time":"2015-01-06T15:33:39+00:00"}

In order to debug it, I had to add unique messages to all the places where
this exception was thrown, to identify which one it was, and that made the
logs much more useful:

	{"app":"webdav","message":"Sabre\\DAV\\Exception\\ServiceUnavailable: Encryption is disabled","level":4,"time":"2015-01-06T15:36:47+00:00"}
2015-01-06 15:59:38 +00:00
Jörn Friedrich Dreyer c738359a11 add paged provider 2015-01-02 10:28:41 +01:00
Thomas Müller 81243b0f5d adding getDirectDownload() to Wrapper 2014-12-28 17:17:14 +01:00
Thomas Müller 5b00bc1d6e Adding basement for the direct download url 2014-12-28 17:17:14 +01:00
Morris Jobke 5b3971f002 Merge pull request #12639 from owncloud/bad_mtime_format
Fix formatting of bad dates from external storages
2014-12-13 10:07:10 +01:00
Robin McCorkell fdbb68a3c3 Return ? if mtime is 0 or -1
Tooltip contains 'Unable to determine date'. Fixes #6395
2014-12-12 23:54:18 +00:00
Vincent Petry b1bef5cc15 Merge pull request #12587 from owncloud/dav-logerrors
Log exceptions in DAV storage
2014-12-12 11:58:04 +01:00
Robin Appelman f4701d7721 Add public api for mount configurations 2014-12-04 16:47:27 +01:00
Vincent Petry bc12d28f23 Log exceptions in DAV storage
In some cases a "NotFound" might be expected, so just return false as
before. But for other exceptions, the exception is now logged.
2014-12-03 22:20:00 +01:00
Robin Appelman 1bbb18fe87 also clear statcache in mapped local 2014-12-02 16:39:03 +01:00
Robin Appelman db3f7238dd Clear statcache before getting the mtime from local storage backends 2014-12-02 14:25:49 +01:00
Vincent Petry 8db4dd7585 Merge pull request #12469 from owncloud/issue/12460-port-local-changes2mapped
Issue/12460 port local changes2mapped
2014-12-01 10:42:39 +01:00
Robin Appelman 05a069c101 Merge pull request #12426 from owncloud/jail-mask-wrappers
Add Jail and PermissionsMask storage wrappers
2014-11-27 16:00:14 +01:00
Robin Appelman 33b64868d7 Add storage and cache wrappers to apply a permissions mask to a storage 2014-11-27 15:25:57 +01:00
Robin Appelman abb6e89c5d Add storage and cache wrappers to jail a storage to a subfolder 2014-11-27 15:25:53 +01:00
Joas Schilling 7761f0288e Also clearstatcache() in MappedLocal before using the stats
Local change 283c10f010
2014-11-27 14:59:10 +01:00
Joas Schilling 50f85bfd1f Check whether file exists before trying to touch() it
Local changes from d069ee8a8b
and 258ad38fd3
2014-11-27 14:59:09 +01:00
Joas Schilling c5427da76d Check return of disk_free_space before returning it
Local changes copied from ed83597371
and 25370fcb82
2014-11-27 14:59:08 +01:00
Joas Schilling 1062f4fe44 Check file existance in MappedLocal in hasUpdated()
Only fixed in Local by eeee9eacea
2014-11-27 14:59:07 +01:00
Joas Schilling b886d3d645 Make MappedLocal::isLocal() true like for Local
Missed in 788c8540aa
2014-11-27 14:59:07 +01:00
Joas Schilling 4f1bbc4fd5 Remove unused 2nd parameter of buildPath() and rename to getSourcePath() 2014-11-27 11:19:20 +01:00
Joas Schilling 20237fba47 Introduce getSourcePath() in Storage\Local to reduce the difference to MappedLocal 2014-11-27 11:19:18 +01:00
Joas Schilling 2c39aec8cb Replace deprecated constant with new class constant 2014-11-25 16:30:21 +01:00
Joas Schilling bb540722cd Use base class to reset the file mapper 2014-11-19 14:52:07 +01:00
Vincent Petry 4b943a4810 Fix root path handling for WebDAV ext storage
Added missing cleanPath() call that converts "/" to "" when calling
SabreDAV. This is needed because SabreDAV will discard its base URL when
passing "/".
2014-11-11 15:20:36 +01:00
Robin Appelman 283c10f010 Generate stable etags for local files 2014-10-24 16:47:58 +02:00
Vincent Petry ab5149f5df Allow specifying protocol in ext storage OC config
Allow specifying a protocol in the host field when mounting another
ownCloud instance. Note that this was already possible with the WebDAV
config but this bug made it inconsistent.
2014-10-13 17:15:58 +02:00
Jörn Friedrich Dreyer 3427976bb6 strict comparison 2014-10-08 18:49:55 +02:00
Jörn Friedrich Dreyer aa3ad898a9 fix amazon s3 issues
folder size and mtime is always unknown in s3

more s3 fixes

make rescanDelay of root dir configurable, add on the fly update of legacy storage ids, !isset -> empty when checking strings

reduce number of http calls on remove and rmdir

fix typo
2014-10-08 18:49:47 +02:00
Lukas Reschke 6eeb905871 Do only follow HTTP and HTTPS redirects
We do not want to follow redirects to other protocols since they might allow an adversary to bypass network restrictions. (i.e. a redirect to ftp:// might be used to access files of a FTP server which might be in a secure zone and not be reachable from the net but from the ownCloud server)

Get final redirect manually using get_headers()

Migrate to HTTPHelper class and add unit tests
2014-09-22 20:02:32 +02:00
Lukas Reschke 33c0d2f743 Fix mapping of relative paths 2014-09-17 11:38:10 +02:00
Robin Appelman 2f22e67570 Also check if the file itself is updatable 2014-09-17 11:35:16 +02:00
Robin Appelman d25a9a118f Check if a folder is deletable before we try to recursively delete it 2014-09-17 11:35:16 +02:00
Robin Appelman ab79caf29b Check if the parent is writable to check if a file is deletable 2014-09-17 11:35:16 +02:00
Morris Jobke b3b3354809 move to public namespace 2014-08-19 14:05:08 +02:00
Stephan Peijnik 2df52e54d7 Fix STORAGE_* constants usage by moving those constants into \OC\Files\Filesystem.
As constants not defined within a class cannot be automatically found by the
autoloader moving those constants into a class makes them accessible to
code which uses them.

Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>
2014-08-19 13:55:35 +02:00
Morris Jobke c6bf51c457 Close open file handles in files library
ref #10392
2014-08-13 15:48:32 +02:00
Robin Appelman 174805f5e3 Merge pull request #9762 from owncloud/owner-public
Return the proper owner for home storages
2014-08-12 14:29:17 +02:00
Clark Tomlinson 26af116fcd Removing unnecessary switch statements in fopen methods. 2014-07-31 09:34:27 -04:00