mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 10:51:38 +01:00
fix/prevent possible breakdown of imap_rfc822_parse_addrlist of non emailaddress header fields
This commit is contained in:
parent
cb98dca3ff
commit
bacd4ac2e6
@ -856,7 +856,15 @@ class felamimail_bo
|
||||
if (!isset(self::$idna2)) self::$idna2 = new egw_idna;
|
||||
$stringA = array();
|
||||
//$_string = str_replace($rfcAddr[0]->host,self::$idna2->decode($rfcAddr[0]->host),$_string);
|
||||
foreach ((array)$rfcAddr as $_rfcAddr) $stringA[] = imap_rfc822_write_address($_rfcAddr->mailbox,self::$idna2->decode($_rfcAddr->host),$_rfcAddr->personal);
|
||||
foreach ((array)$rfcAddr as $_rfcAddr)
|
||||
{
|
||||
if ($_rfcAddr->host=='.SYNTAX-ERROR.')
|
||||
{
|
||||
$stringA = array();
|
||||
break; // skip idna conversion if we encounter an error here
|
||||
}
|
||||
$stringA[] = imap_rfc822_write_address($_rfcAddr->mailbox,self::$idna2->decode($_rfcAddr->host),$_rfcAddr->personal);
|
||||
}
|
||||
if (!empty($stringA)) $_string = implode(',',$stringA);
|
||||
}
|
||||
if ($_tryIDNConversion==='FORCE')
|
||||
|
Loading…
Reference in New Issue
Block a user