fix(dav): Fix quota check for chunk upload

Do not ignore OC-Total-Length when Content-Length and
 X-Expected-Entity-Length are missing

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2024-03-19 17:25:40 +01:00 committed by backportbot[bot]
parent 991ee6fbb8
commit ae7105b990

View file

@ -250,11 +250,13 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin {
}
$ocLength = $req->getHeader('OC-Total-Length');
if (is_numeric($length) && is_numeric($ocLength)) {
return max($length, $ocLength);
if (!is_numeric($ocLength)) {
return $length;
}
return $length;
if (!is_numeric($length)) {
return $ocLength;
}
return max($length, $ocLength);
}
/**