Commit Graph

16 Commits

Author SHA1 Message Date
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
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
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
Joas Schilling 2c39aec8cb Replace deprecated constant with new class constant 2014-11-25 16:30:21 +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
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
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
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
Philippe Kueck ef114b6594 silently discard the response body, needed for apache/mod_dav and maybe other dav servers which return an html body 2014-07-03 12:04:38 +02:00
Robin Appelman d78a2a9f78 Add StorageNotAvailableException 2014-06-30 15:46:37 +02:00
Robin Appelman db3f0cee4a Fix parsing of webdav permissions 2014-06-27 17:28:56 +02:00
Robin Appelman 6f5d5b9a30 Also check for updated permissions for webdav storages 2014-06-27 17:27:47 +02:00
Robin Appelman 5b8c2ac750 Use the etag to check for updates in webdav storages where available 2014-06-27 17:10:46 +02:00
Thomas Müller 171475b95a fix autoloader 2014-06-27 08:52:40 +02:00