Merge pull request #23563 from nextcloud/backport/23497/stable20

[stable20] CalDavBackend: check if timerange is array before accessing
This commit is contained in:
Roeland Jago Douma 2020-10-24 10:57:58 +02:00 committed by GitHub
commit 1ab03a0d3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@
* @author Thomas Citharel <nextcloud@tcit.fr> * @author Thomas Citharel <nextcloud@tcit.fr>
* @author Thomas Müller <thomas.mueller@tmit.eu> * @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Vinicius Cubas Brand <vinicius@eita.org.br> * @author Vinicius Cubas Brand <vinicius@eita.org.br>
* @author Simon Spannagel <simonspa@kth.se>
* *
* @license AGPL-3.0 * @license AGPL-3.0
* *
@ -1364,7 +1365,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$requirePostFilter = false; $requirePostFilter = false;
} }
// There was a time-range filter // There was a time-range filter
if ($componentType === 'VEVENT' && isset($filters['comp-filters'][0]['time-range'])) { if ($componentType === 'VEVENT' && isset($filters['comp-filters'][0]['time-range']) && is_array($filters['comp-filters'][0]['time-range'])) {
$timeRange = $filters['comp-filters'][0]['time-range']; $timeRange = $filters['comp-filters'][0]['time-range'];
// If start time OR the end time is not specified, we can do a // If start time OR the end time is not specified, we can do a