From: Vincent Bernat Date: Sat, 13 Dec 2008 13:34:09 +0000 (+0000) Subject: Fix a vulnerability in the use of preg_replace (Closes: #508628). X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3e422955ffdb58b07122ef99ecaf28633d8ed0c9;p=roundcube.git Fix a vulnerability in the use of preg_replace (Closes: #508628). --- diff --git a/debian/changelog b/debian/changelog index a7afc15..43650f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ -roundcube (0.2~alpha-3) UNRELEASED; urgency=low +roundcube (0.2~alpha-3) experimental; urgency=high [ Vincent Bernat ] + * Fix a vulnerability in the use of preg_replace (Closes: #508628). * Adapt descriptions of roundcube-database packages to refer them as metapackages instead of virtual package (Closes: #495434). * Add robots.txt from upstream, even if in some configuration, it will diff --git a/debian/patches/dont-use-preg-e-option.patch b/debian/patches/dont-use-preg-e-option.patch new file mode 100644 index 0000000..1179a86 --- /dev/null +++ b/debian/patches/dont-use-preg-e-option.patch @@ -0,0 +1,121 @@ +--- roundcube-0.2~alpha/program/lib/html2text.php 2008-04-12 15:54:45.000000000 +0200 ++++ roundcube-0.2~alpha/program/lib/html2text.php 2008-12-13 14:21:44.000000000 +0100 +@@ -99,6 +99,22 @@ + */ + var $width = 70; + ++ /** ++ * List of preg* regular expression patterns to search for ++ * and replace using callback function. ++ * ++ * @var array $callback_search ++ * @access public ++ */ ++ var $callback_search = array( ++ '/<(h)[123456][^>]*>(.*?)<\/h[123456]>/i', // H1 - H3 ++ '/<(b)[^>]*>(.*?)<\/b>/i', // ++ '/<(strong)[^>]*>(.*?)<\/strong>/i', // ++ '/<(a) [^>]*href=("|\')([^"\']+)\2[^>]*>(.*?)<\/a>/i', ++ // ++ '/<(th)[^>]*>(.*?)<\/th>/i', // and ++ ); ++ + /** + * List of preg* regular expression patterns to search for, + * used in conjunction with $replace. +@@ -112,12 +128,8 @@ + "/[\n\t]+/", // Newlines and tabs + '/]*>.*?<\/script>/i', //