summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOliver Kohl D.Sc. <oliver@kohl.bz>2015-03-25 21:29:29 +0100
committerOliver Kohl D.Sc. <oliver@kohl.bz>2015-03-25 21:29:29 +0100
commit9323285987c5d3d191a23d8cc930c85b8df48730 (patch)
tree44598af929b556ddbefbe0a7cf537594751b46f6 /lib
parentc6494034c81c6bf60c9dd3517fe5243f035d48f4 (diff)
downloadnextcloud-server-9323285987c5d3d191a23d8cc930c85b8df48730.tar.gz
nextcloud-server-9323285987c5d3d191a23d8cc930c85b8df48730.zip
FIX for webdav.mediencenter.t-online.de
https://webdav.mediencenter.t-online.de returns invalid response code. e.g. {"reqId":"f9a1c394b98108e4e5ca62bf47829c64","remoteAddr":"81.189.45.224","app":"PHP","message":"Undefined offset: 2 at \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/Sabre\/DAV\/Client.php#569","level":3,"time":"2015-03-25T18:25:48+00:00","method":"GET","url":"\/index.php\/apps\/files\/ajax\/getstoragestats.php?dir=External%2FT-Cloud%2FTests"} e.g. {"reqId":"3407d66672b3cef206b0af883e49bff4","remoteAddr":"46.74.125.245","app":"PHP","message":"Undefined index: {DAV:}getlastmodified at \/var\/www\/owncloud\/lib\/private\/files\/storage\/dav.php#563","level":3,"time":"2015-03-25T16:33:21+00:00"}
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/storage/dav.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php
index e0f24e0532d..5fb53d664ed 100644
--- a/lib/private/files/storage/dav.php
+++ b/lib/private/files/storage/dav.php
@@ -602,6 +602,11 @@ class DAV extends \OC\Files\Storage\Common {
return false;
}
} else {
+ // This resolves issues that are flooding the log file due to some malformed
+ // WebDAV response e.g. T-Mobile's cloud named "Mediencenter"
+ if (!isset($response['{DAV:}getlastmodified']))
+ return false;
+
$remoteMtime = strtotime($response['{DAV:}getlastmodified']);
return $remoteMtime > $time;
}