Author: leithoff
New Revision: 55752
URL: http://svn.stylite.de/viewvc/egroupware?rev=55752&view=rev
Log:
prevent possible endless recursion on decodeMailHeader
Modified:
trunk/egroupware/api/src/Mail/Html.php
— trunk/egroupware/api/src/Mail/Html.php (original)
+++ trunk/egroupware/api/src/Mail/Html.php Fri Apr 15 10:50:02 2016
@@ -25,18 +25,18 @@
*
* @param string $_string -> part of an mailheader
* @param string $displayCharset the charset parameter specifies the character set to represent the result by (if iconv_mime_decode is to be used)
-
-
@param integer $reclevel param to control recursive calls (to prevent endless recursion)
-
@return string
*/
- static function decodeMailHeader($_string, $displayCharset=‘utf-8’)
- {
-/*
@@ -73,20 +73,10 @@
$openTags = substr_count($element->text,’?=’);
if(preg_match(’/?=.+=?/’, $element->text) && $openTags>0 && $openTags==substr_count($element->text,’=?’) && $element->text != $_string)
{
-/* //try to be smart about concatenating
-error_log(METHOD.LINE.$translatedString);
-error_log(METHOD.LINE.$newString);
-
if ($translatedString && $newString && strpos($translatedString,$newString)===0)
-
{
-
$newString = $translatedString;
-
}
-
else
-*/
@@ -94,7 +84,7 @@
$convertAtEnd = true;
}
}
-
if ($convertAtEnd) $newString = self::decodeMailHeader($newString,$displayCharset,$reclevel);
return preg_replace('/([\000-\012\015\016\020-\037\075])/','',$newString);
}
elseif(function_exists(mb_decode_mimeheader))
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs