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 ji...@apache.org on 2004/04/13 23:33:43 UTC

[jira] Resolved: (JAMES-144) POP3Handler breaks with message numbers out of bounds

Message:

   The following issue has been resolved as FIXED.

   Resolver: Noel J. Bergman
       Date: Tue, 13 Apr 2004 2:32 PM

This should be fixed in CVS, and the next test build.  The wrong exception type was being caught.  Also cleared up some of the non-critical text.

With respect to the response to RETR 0 returning "no such message", "already deleted", or anything else, I tweaked it a bit to clarify, but RFC 1939 section 9 makes it cleaer that the text is purely optional for a human reader. Only the +OK or -ERR are significant.
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-144

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-144
    Summary: POP3Handler breaks with message numbers out of bounds
       Type: Bug

     Status: Resolved
   Priority: Major
 Resolution: FIXED

    Project: James
 Components: 
             POP3Server
   Fix Fors:
             2.2.0a19
   Versions:
             2.2.0a18
             2.1.3
             2.1

   Assignee: 
   Reporter: Rich

    Created: Fri, 12 Dec 2003 7:41 PM
    Updated: Tue, 13 Apr 2004 2:32 PM
Environment: Operating System: Other
Platform: All

Description:
When, for instance,
LIST 4
is given as a command when the mailbox contains only two messages, the response 
should be
-ERR Message (4) does not exist.
But instead it exits, breaking the connection ungracefully.

As I see it this is because the code catches ArrayIndexOutOfBoundsException.  
But ArrayList.get() throws IndexOutOfBoundsException.

It appears that I have fixed this, for the most part, in my working copy by 
changing ArrayIndexOutOfBoundsException to IndexOutOfBoundsException in the 
five places where it occurs in POP3Handler.

Another problem, not as bad, is shown by the following sequence:
retr 0
-ERR Message (0) deleted.

I think the correct response should be:
-ERR Message (0) does not exist.

This would be a little more work to fix, and the problem is not as bad as the 
former.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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