Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-144

POP3Handler breaks with message numbers out of bounds

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.1.3, 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: POP3Server
    • Labels:
      None
    • Environment:
      Operating System: Other
      Platform: All
    • Bugzilla Id:
      25489

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rohammer@earthlink.net Rich
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: