Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/connector/sabre/quotaplugin.php')
-rw-r--r--lib/private/connector/sabre/quotaplugin.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/connector/sabre/quotaplugin.php b/lib/private/connector/sabre/quotaplugin.php
index 59d0e188f66..46535da4f7e 100644
--- a/lib/private/connector/sabre/quotaplugin.php
+++ b/lib/private/connector/sabre/quotaplugin.php
@@ -85,12 +85,13 @@ class OC_Connector_Sabre_QuotaPlugin extends \Sabre\DAV\ServerPlugin {
public function getLength() {
$req = $this->server->httpRequest;
$length = $req->getHeader('X-Expected-Entity-Length');
- if (!$length) {
+ if (!is_numeric($length)) {
$length = $req->getHeader('Content-Length');
+ $length = is_numeric($length) ? $length : null;
}
$ocLength = $req->getHeader('OC-Total-Length');
- if ($length && $ocLength) {
+ if (is_numeric($length) && is_numeric($ocLength)) {
return max($length, $ocLength);
}