Infinite loop in Horde/Icalendar.php when syncing

Carsten Schumann <[email protected]>
Newsgroups gmane.comp.horde.sync
Message-ID <[email protected]>
Hi guys,

I have reinstalled my horde webmail since I had to upgrade from webmail 
1.2.4 to 4.0.2 for my new Ipad. The web frontend works fine but when I 
try to sync my mobile phone against kronolith, apache ends up in an 
infinite loop in Horde/Icalendar.php:584 while trying to parse the 
answer from my phone.

The loop reads:

         while 
(preg_match_all('/^([^:]+;\s*(ENCODING=)?QUOTED-PRINTABLE(.*=\r?\n)+(.*[^=])?(\r?\n|$))/mU', 
$vCal, $matches)) {
             foreach ($matches[1] as $s) {
                 $r = preg_replace('/=\r?\n\s/', '', $s);
                 $vCal = str_replace($s, $r, $vCal);
             }
         }


$vCal has the value

X-IRMC-LUID:3422981680^M CATEGORIES:Memo^M 
SUMMARY;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:Feuerwehr:=20Baumaktion=20Au=^M 
fr=C3=A4umen^M DTSTART:20071201T100000Z^M DTEND:20071201T120000Z

and after the preg_match_all instruction, $matches[1] contains an array 
with one element

SUMMARY;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:Feuerwehr:=20Baumaktion=20Au=^M 
fr=C3=A4umen^M

which is not altered by the preg_replace expression. As $r==$s nothing 
is altered by str_replace expression in $vCal. So the preg_match_all 
matches again and again and again... ;-)

Is this issue known and is there a bugfix/workaround?

Best regards,
Carsten




-- 
sync mailing list - Join the hunt: http://horde.org/bounties/#sync
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.