From e3857bb6c2a2f9a4331a72b0bd74e0d70ee8a8a1 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Tue, 04 Feb 2014 04:22:29 -0500 Subject: [PATCH] Fix infinite loop when converting invalid html to plaintext (#1489566) --- program/lib/Roundcube/rcube_html2text.php | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/program/lib/Roundcube/rcube_html2text.php b/program/lib/Roundcube/rcube_html2text.php index 01362e6..3b4508d 100644 --- a/program/lib/Roundcube/rcube_html2text.php +++ b/program/lib/Roundcube/rcube_html2text.php @@ -616,6 +616,10 @@ break; } + // abort on invalid tag structure (e.g. no closing tag found) + else { + break; + } } while ($end || $next); } -- Gitblit v1.9.1