summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-03-15 01:29:57 +0100
committerGitHub <noreply@github.com>2019-03-15 01:29:57 +0100
commitd9119c0c647480f408499a62aaffcefc931ed4b3 (patch)
tree3ceeeeb2b1b211b2a6216f1089de912a79fc0e02
parentd734a4ba7b5a3163954afe69baa4bcfd158f36b9 (diff)
parent54b14946b422c9cb685f673e4c799b862eda33cb (diff)
downloadnextcloud-server-d9119c0c647480f408499a62aaffcefc931ed4b3.tar.gz
nextcloud-server-d9119c0c647480f408499a62aaffcefc931ed4b3.zip
Merge pull request #14694 from nextcloud/backport/14684/stable15
[stable15] handle long etags from dav external storage
-rw-r--r--lib/private/Files/Storage/DAV.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index abb76660ca8..52ed8900569 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -726,7 +726,11 @@ class DAV extends Common {
return null;
}
if (isset($response['{DAV:}getetag'])) {
- return trim($response['{DAV:}getetag'], '"');
+ $etag = trim($response['{DAV:}getetag'], '"');
+ if (strlen($etag) > 40) {
+ $etag = md5($etag);
+ }
+ return $etag;
}
return parent::getEtag($path);
}