webdav client crashes for secure connections if he doesn't have the right root certificate for ssl verification. For the moment I print at least a useful error message to the OC log and the Apache log
This commit is contained in:
parent
515adceace
commit
ab036d4764
2 changed files with 3 additions and 0 deletions
1
3rdparty/Sabre/DAV/Client.php
vendored
1
3rdparty/Sabre/DAV/Client.php
vendored
|
@ -249,6 +249,7 @@ class Sabre_DAV_Client {
|
||||||
// Automatically follow redirects
|
// Automatically follow redirects
|
||||||
CURLOPT_FOLLOWLOCATION => true,
|
CURLOPT_FOLLOWLOCATION => true,
|
||||||
CURLOPT_MAXREDIRS => 5,
|
CURLOPT_MAXREDIRS => 5,
|
||||||
|
//CURLOPT_SSL_VERIFYPEER => false,
|
||||||
);
|
);
|
||||||
|
|
||||||
switch ($method) {
|
switch ($method) {
|
||||||
|
|
|
@ -96,6 +96,8 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
|
||||||
$responseType=$response["{DAV:}resourcetype"]->resourceType;
|
$responseType=$response["{DAV:}resourcetype"]->resourceType;
|
||||||
return (count($responseType)>0 and $responseType[0]=="{DAV:}collection")?'dir':'file';
|
return (count($responseType)>0 and $responseType[0]=="{DAV:}collection")?'dir':'file';
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
|
error_log($e->getMessage());
|
||||||
|
\OCP\Util::writeLog("webdav client", \OCP\Util::sanitizeHTML($e->getMessage()), \OCP\Util::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue