From e9716503a2ca5ddf75c0c1cdb1075ef518a4c2da Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 3 Jul 2017 12:50:37 +0200 Subject: [PATCH] Move "cursor" position on \r\n sequence after single-dot in a line (#5838) --- plugins/managesieve/lib/Roundcube/rcube_sieve_script.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php index 73b8884530a..228213bee94 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php @@ -1277,9 +1277,12 @@ static function tokenize($str, $num = 0, &$position = 0) $text .= substr($str, $position, $pos - $position); $position = $pos + 2; - if ($str[$position] == "\n" - || ($str[$position] == "\r" && $str[$position + 1] == "\n") - ) { + if ($str[$position] == "\n") { + break; + } + + if ($str[$position] == "\r" && $str[$position + 1] == "\n") { + $position++; break; }