From: stekkel Date: Wed, 11 Jun 2003 17:53:17 +0000 (+0000) Subject: extra safety check before we process groups X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a16b3ffa719908854416c9663c3110766c3fef06;p=squirrelmail.git extra safety check before we process groups git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4997 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/mime/Rfc822Header.class.php b/class/mime/Rfc822Header.class.php index a331124d..91bd6267 100644 --- a/class/mime/Rfc822Header.class.php +++ b/class/mime/Rfc822Header.class.php @@ -389,14 +389,18 @@ class Rfc822Header { break; case ':': /* process the group addresses */ /* group marker */ - $group = substr($address, 0, $pos); - $address = substr($address, $pos+1); - $result = $this->parseAddress($address, $ar, $addr_ar, $group, $lookup); - $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 = $this->parseAddress($address, $ar, $addr_ar, $group, $lookup); + $addr_ar = $result[0]; + $pos = $result[1]; + $address = substr($address, $pos++); + $j = strlen($address); + $group = ''; + } else { + $pos = $j; + } break; case ' ': ++$pos;