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 se...@james.apache.org on 2004/07/16 14:28:40 UTC

[jira] Resolved: (JAMES-306) AttachmentFileNameIs may throw UnsupportedEncodingException

Message:

   The following issue has been resolved as FIXED.

   Resolver: Vincenzo Gianferrari Pini
       Date: Fri, 16 Jul 2004 5:27 AM

Such exceptions are totally harmless and as such are completely ignored by the committed fix.
In such fix, other exceptions are thrown up (to be handled by "onMatchException" clause) and logged if debug is requested ("-d" parameter).
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-306

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-306
    Summary: AttachmentFileNameIs may throw  UnsupportedEncodingException
       Type: Bug

     Status: Resolved
   Priority: Minor
 Resolution: FIXED

    Project: James
 Components: 
             Matchers/Mailets (bundled)
   Fix Fors:
             2.2.1
   Versions:
             2.2.0

   Assignee: Vincenzo Gianferrari Pini
   Reporter: Vincenzo Gianferrari Pini

    Created: Fri, 16 Jul 2004 4:17 AM
    Updated: Fri, 16 Jul 2004 5:27 AM

Description:
As the purpose of the matcher is to find matching attachments, the code is written with the following logic:

1) If there are attachements
    1.1) If at least one of them matches, the matcher returns a match.
    1.2) If none of them matches
        1.2.1) If there is no exception, the matcher returns a no-match.
        1.2.2) If there is any exception, the matcher throws a MessagingException.
2) If there are no attachements
    2.1) If there is no exception, the matcher returns a no-match.
    2.2) If there is any exception, the matcher throws a MessagingException.

The important thing here is that in case 1.1 an exception is never thrown, and it would be a *major* bug. Instead all the other cases (1.2.1, 1.2.2, 2.1 and 2.2) can all be considered simply as a no-match, and that's why I use (and suggest to use) an onMatchException="noMatch" clause in the invocation if looking for "dangerous" attachments.

In any case, just to avoid any future confusion, we should catch and ignore any exception corresponding to "unsupported" (but irrelevant as not related to attachments) encodings, and let flow up only other types of exceptions, to be handled by an appropriate onMatchException clause whose choice is up to the James administrator.


---------------------------------------------------------------------
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