Fix parsing dot-staffed lines in multiline text (#5838)

pull/5890/head
Aleksander Machniak 7 years ago
parent 412163416e
commit 0abd84dc02

@ -3,6 +3,7 @@ CHANGELOG Roundcube Webmail
- Add Preferences > Mailbox View > Main Options > Layout (#5829) - Add Preferences > Mailbox View > Main Options > Layout (#5829)
- Password: Fix compatibility with PHP 7+ in cpanel_webmail driver (#5820) - Password: Fix compatibility with PHP 7+ in cpanel_webmail driver (#5820)
- Managesieve: Fix parsing dot-staffed lines in multiline text (#5838)
- Fix decoding non-ascii attachment names from TNEF attachments (#5646, #5799) - Fix decoding non-ascii attachment names from TNEF attachments (#5646, #5799)
- Fix uninitialized string offset in rcube_utils::bin2ascii() and make sure rcube_utils::random_bytes() result has always requested length (#5788) - Fix uninitialized string offset in rcube_utils::bin2ascii() and make sure rcube_utils::random_bytes() result has always requested length (#5788)
- Fix bug where HTML messages with @media styles could moddify style of page body (#5811) - Fix bug where HTML messages with @media styles could moddify style of page body (#5811)

@ -1,3 +1,5 @@
- Fix parsing dot-staffed lines in multiline text (#5838)
* version 8.9 [2017-05-22] * version 8.9 [2017-05-22]
----------------------------------------------------------- -----------------------------------------------------------
- Fix handling of scripts with nested rules (#5540) - Fix handling of scripts with nested rules (#5540)

@ -1277,11 +1277,13 @@ class rcube_sieve_script
$text .= substr($str, $position, $pos - $position); $text .= substr($str, $position, $pos - $position);
$position = $pos + 2; $position = $pos + 2;
if ($str[$pos] == "\n" if ($str[$position] == "\n"
|| ($str[$pos] == "\r" && $str[$pos + 1] == "\n") || ($str[$position] == "\r" && $str[$position + 1] == "\n")
) { ) {
break; break;
} }
$text .= "\n.";
} }
// remove dot-stuffing // remove dot-stuffing

@ -5,6 +5,8 @@ if header :contains "Subject" "vacation"
vacation :days 1 text: vacation :days 1 text:
# test # test
test test /* test */ test test /* test */
..
..test
test test
. .
; ;

Loading…
Cancel
Save