You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by hi...@apache.org on 2005/10/14 16:44:28 UTC

svn commit: r321138 - /james/server/trunk/src/java/org/apache/mailet/MailAddress.java

Author: hilmer
Date: Fri Oct 14 07:43:16 2005
New Revision: 321138

URL: http://svn.apache.org/viewcvs?rev=321138&view=rev
Log:
James-425

Modified:
    james/server/trunk/src/java/org/apache/mailet/MailAddress.java

Modified: james/server/trunk/src/java/org/apache/mailet/MailAddress.java
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/mailet/MailAddress.java?rev=321138&r1=321137&r2=321138&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/mailet/MailAddress.java (original)
+++ james/server/trunk/src/java/org/apache/mailet/MailAddress.java Fri Oct 14 07:43:16 2005
@@ -110,11 +110,14 @@
             //<local-part> ::= <dot-string> | <quoted-string>
             if (address.charAt(pos) == '\"') {
                 userSB.append(parseQuotedLocalPart(address));
+                if (userSB.toString().length() == 2) {
+                    throw new ParseException("No quoted local-part (user account) found at position " + (pos + 2));
+                }
             } else {
                 userSB.append(parseUnquotedLocalPart(address));
-            }
-            if (userSB.toString().length() == 0) {
-                throw new ParseException("No local-part (user account) found at position " + (pos + 1));
+                if (userSB.toString().length() == 0) {
+                    throw new ParseException("No local-part (user account) found at position " + (pos + 1));
+                }
             }
 
             //find @



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org