From: stekkel Date: Wed, 11 Jun 2003 17:54:12 +0000 (+0000) Subject: extra safetycheck before we process group addresses X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4e46337cdd2272e2a44653207342e8b7411f8911;p=squirrelmail.git extra safetycheck before we process group addresses git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4998 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_general.php b/functions/imap_general.php index 6e52519d..c7c41fcb 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -607,14 +607,18 @@ function parseAddress($address, $max=0, $addr_ar = array(), $group = '', $host=' break; case ':': /* process the group addresses */ /* group marker */ - $group = substr($address, 0, $pos); - $address = substr($address, $pos+1); - $result = parseAddress($address, $max, $addr_ar, $group); - $addr_ar = $result[0]; - $pos = $result[1]; - $address = substr($address, $pos++); - $j = strlen($address); - $group = ''; + if (strpos($address,';',$pos)) { + $group = substr($address, 0, $pos); + $address = substr($address, $pos+1); + $result = parseAddress($address, $max, $addr_ar, $group); + $addr_ar = $result[0]; + $pos = $result[1]; + $address = substr($address, $pos++); + $j = strlen($address); + $group = ''; + } else { + $pos = $j; + } break; default: ++$pos;