mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
mailheader-decoding: check if there is a possible nested encoding; make sure that the inputstring and the decoded result are different before recursively calling decodeMailHeader on the decoded result (to avoid loops)
This commit is contained in:
parent
b9192c0f4c
commit
3420b15ff4
@ -875,7 +875,8 @@ class translation
|
||||
if ($element->charset != 'x-unknown')
|
||||
{
|
||||
if( strtoupper($element->charset) != 'UTF-8') $element->text = preg_replace($sar,$rar,$element->text);
|
||||
if(preg_match('/\?=.+=\?/', $element->text))
|
||||
// check if there is a possible nested encoding; make sure that the inputstring and the decoded result are different to avoid loops
|
||||
if(preg_match('/\?=.+=\?/', $element->text) && $element->text != $_string)
|
||||
{
|
||||
$element->text = self::decodeMailHeader($element->text, $element->charset);
|
||||
$element->charset = $displayCharset;
|
||||
|
Loading…
Reference in New Issue
Block a user