Merge pull request #41112 from nextcloud/backport/39221/stable23

[stable23] Bugfix/bulk upload empty files
pull/42395/head
Arthur Schiwon 6 months ago committed by GitHub
commit ac06c3a2f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -211,13 +211,17 @@ class MultipartRequestParser {
throw new BadRequest("Computed md5 hash is incorrect.");
}
$content = stream_get_line($this->stream, $length);
if ($length === 0) {
$content = '';
} else {
$content = stream_get_line($this->stream, $length);
}
if ($content === false) {
throw new Exception("Fail to read part's content.");
}
if (feof($this->stream)) {
if ($length !== 0 && feof($this->stream)) {
throw new Exception("Unexpected EOF while reading stream.");
}

Loading…
Cancel
Save