james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hil...@apache.org
Subject svn commit: r321138 - /james/server/trunk/src/java/org/apache/mailet/MailAddress.java
Date Fri, 14 Oct 2005 14:44:28 GMT
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


Mime
View raw message