From 8953c7a2577d0ad342fce1a3b6da1df08853ea60 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 9 Mar 2017 11:41:46 +0100 Subject: [PATCH] Fix possible defect in handling \r\n in scripts (#5685) --- CHANGELOG | 1 + plugins/managesieve/Changelog | 1 + plugins/managesieve/lib/Roundcube/rcube_sieve_script.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 9094637e5..a14b89ca6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,7 @@ CHANGELOG Roundcube Webmail - Add rewrite rule to disable access to /vendor/bin folder in .htaccess (#5630) - Fix bug where it was too easy accidentally move a folder when using the subscription checkbox (#5655) - Managesieve: Fix parser issue with empty lines between comments (#5657) +- Managesieve: Fix possible defect in handling \r\n in scripts (#5685) - Fix/rephrase "unsaved changes" warning when cancelling a draft (#5610) RELEASE 1.3-beta diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index 329738a81..397503cfc 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,4 +1,5 @@ - Fix handling of scripts with nested rules (#5540) +- Fix possible defect in handling \r\n in scripts (#5685) * version 8.8 [2016-11-27] ----------------------------------------------------------- diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php index 9d1c71445..8dbab5f75 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php @@ -1261,7 +1261,7 @@ class rcube_sieve_script if ($str[$position] == "\n") { $position++; } - else if ($str[$position] == "\r" && $str[$position] == "\n") { + else if ($str[$position] == "\r" && $str[$position + 1] == "\n") { $position += 2; }