Branch 'roundcubemail-plugins-kolab-format2-horde5' - plugins/libkolab

Thomas Brüderli bruederli at kolabsys.com
Fri Feb 22 21:51:51 CET 2013


 plugins/libkolab/lib/kolab_date_recurrence.php |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 26f438c152f8db77524d9b65f2ec300393ef9636
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Fri Feb 22 21:49:00 2013 +0100

    Sanity check for Horde_Date_Recurrence results that will avoid endless loops

diff --git a/plugins/libkolab/lib/kolab_date_recurrence.php b/plugins/libkolab/lib/kolab_date_recurrence.php
index 9eeeca1..69c5906 100644
--- a/plugins/libkolab/lib/kolab_date_recurrence.php
+++ b/plugins/libkolab/lib/kolab_date_recurrence.php
@@ -74,6 +74,10 @@ class kolab_date_recurrence
     {
         $time = false;
         if ($this->next && ($next = $this->engine->nextActiveRecurrence(array('year' => $this->next->year, 'month' => $this->next->month, 'mday' => $this->next->mday + 1, 'hour' => $this->next->hour, 'min' => $this->next->min, 'sec' => $this->next->sec)))) {
+            if (!$next->after($this->next)) {
+                // avoid endless loops if recurrence computation fails
+                return false;
+            }
             if ($this->allday) {
                 $next->hour = $this->hour;  # fix time for all-day events
                 $next->min = 0;





More information about the commits mailing list