]> source.dussan.org Git - nextcloud-server.git/commitdiff
CalDavBackend: check if timerange is array before accessing 23563/head
authorSimon Spannagel <simonspa@kth.se>
Fri, 16 Oct 2020 05:47:29 +0000 (07:47 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 19 Oct 2020 10:56:51 +0000 (10:56 +0000)
Signed-off-by: Simon Spannagel <simonspa@kth.se>
apps/dav/lib/CalDAV/CalDavBackend.php

index 913261287216df49ab67d608f0a57cb3bc1b2f20..82c14086833bf5cfeefda9fa8be0ff8eb2bf68cd 100644 (file)
@@ -16,6 +16,7 @@
  * @author Thomas Citharel <nextcloud@tcit.fr>
  * @author Thomas Müller <thomas.mueller@tmit.eu>
  * @author Vinicius Cubas Brand <vinicius@eita.org.br>
+ * @author Simon Spannagel <simonspa@kth.se>
  *
  * @license AGPL-3.0
  *
@@ -1364,7 +1365,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
                                $requirePostFilter = false;
                        }
                        // 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'];
 
                                // If start time OR the end time is not specified, we can do a