summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-12-15 10:30:15 +0100
committerGitHub <noreply@github.com>2017-12-15 10:30:15 +0100
commitcfb3f44459f274eb4e13e6c69425080acfc6c8fe (patch)
tree244c1dc6f737933acbcc38985d9c94ab1e0dff12
parentb19b1379699cf7790a13575f27a05b2f6db14f6a (diff)
parentca70694502301a60d615d1bb9dff304a41c86a51 (diff)
downloadnextcloud-server-cfb3f44459f274eb4e13e6c69425080acfc6c8fe.tar.gz
nextcloud-server-cfb3f44459f274eb4e13e6c69425080acfc6c8fe.zip
Merge pull request #7523 from nextcloud/check_empty_content_length
Also check for empty content length
-rw-r--r--lib/private/AppFramework/Http/Request.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 072dd9f172f..77ecb02165b 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -406,6 +406,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
if ($this->method === 'PUT'
&& $this->getHeader('Content-Length') !== 0
&& $this->getHeader('Content-Length') !== null
+ && $this->getHeader('Content-Length') !== ''
&& strpos($this->getHeader('Content-Type'), 'application/x-www-form-urlencoded') === false
&& strpos($this->getHeader('Content-Type'), 'application/json') === false
) {