[sync] Infinite loop in Horde/Icalendar.php when syncing
Carsten Schumann
grypho at tempus-vivit.net
Fri Aug 19 08:03:38 UTC 2011
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
More information about the sync
mailing list