extra safetycheck before we process group addresses
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 11 Jun 2003 17:54:12 +0000 (17:54 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 11 Jun 2003 17:54:12 +0000 (17:54 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4998 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_general.php

index 6e52519de19e2a88b5e7b0000e902d5f7abae8e9..c7c41fcbe82db770b387d9775d8b46f732c531c8 100755 (executable)
@@ -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;