From 669f1993181605632adb9aafd3b30d2259eb3eed Mon Sep 17 00:00:00 2001 From: Ferda Date: Mon, 3 Jul 2017 11:47:00 +0200 Subject: [PATCH] fix wrong "text" parsing accept lines containing dots only - I thing check position index should be $position, not $pos --- plugins/managesieve/lib/Roundcube/rcube_sieve_script.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php index 774be462341..8a916be57c4 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php @@ -1277,9 +1277,10 @@ static function tokenize($str, $num = 0, &$position = 0) $text .= substr($str, $position, $pos - $position); $position = $pos + 2; - if ($str[$pos] == "\n" - || ($str[$pos] == "\r" && $str[$pos + 1] == "\n") - ) { + if ($str[$position] == "\n") { + break; + } else if ($str[$position] == "\r" && $str[$position + 1] == "\n"){ + $position++; break; } }