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 "Antony Bowesman (JIRA)" <se...@james.apache.org> on 2008/03/18 22:47:24 UTC
[jira] Created: (MIME4J-41) Content-Type parameter values that
contain only digits are ignored
Content-Type parameter values that contain only digits are ignored
------------------------------------------------------------------
Key: MIME4J-41
URL: https://issues.apache.org/jira/browse/MIME4J-41
Project: Mime4j
Issue Type: Bug
Affects Versions: 0.3, 0.4
Environment: Any
Reporter: Antony Bowesman
Fix For: 0.4, 0.3
Attachments: MessageTest.java
Parameter values in the Content-Type message header are ignored if they only contain digits. This is a particular problem if a message contains an unquoted boundary string that contains only digits, it is not recognised as a valid boundary string and therefore the a Multipart object is created that fails the Message.isMultipart() test.
Attached test case shows the problem
The ContentTypeParser.jj source for value parsing is
String value() :
{Token t;}
{
( t=<ATOKEN>
| t=<QUOTEDSTRING>
)
{ return t.image; }
}
however, if a value contains only digits, it is parsed as <DIGITS>, so will not be assigned.
Sensible solution seems to be to change the value() implementation in JavaCC source to include digit. Patch details
--- ContentTypeParser.jj 2007-05-25 02:04:09.000000000 +1000
+++ ContentTypeParserFix.jj 2008-03-19 08:44:14.109375000 +1100
@@ -122,6 +122,7 @@
{Token t;}
{
( t=<ATOKEN>
+| t=<DIGITS>
| t=<QUOTEDSTRING>
)
{ return t.image; }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] Closed: (MIME4J-41) Content-Type parameter values that
contain only digits are ignored
Posted by "Robert Burrell Donkin (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Burrell Donkin closed MIME4J-41.
---------------------------------------
Resolution: Fixed
Fix committed.
> Content-Type parameter values that contain only digits are ignored
> ------------------------------------------------------------------
>
> Key: MIME4J-41
> URL: https://issues.apache.org/jira/browse/MIME4J-41
> Project: Mime4j
> Issue Type: Bug
> Affects Versions: 0.3, 0.4
> Environment: Any
> Reporter: Antony Bowesman
> Fix For: 0.4, 0.3
>
> Attachments: MessageTest.java
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Parameter values in the Content-Type message header are ignored if they only contain digits. This is a particular problem if a message contains an unquoted boundary string that contains only digits, it is not recognised as a valid boundary string and therefore the a Multipart object is created that fails the Message.isMultipart() test.
> Attached test case shows the problem
> The ContentTypeParser.jj source for value parsing is
> String value() :
> {Token t;}
> {
> ( t=<ATOKEN>
> | t=<QUOTEDSTRING>
> )
> { return t.image; }
> }
> however, if a value contains only digits, it is parsed as <DIGITS>, so will not be assigned.
> Sensible solution seems to be to change the value() implementation in JavaCC source to include digit. Patch details
> --- ContentTypeParser.jj 2007-05-25 02:04:09.000000000 +1000
> +++ ContentTypeParserFix.jj 2008-03-19 08:44:14.109375000 +1100
> @@ -122,6 +122,7 @@
> {Token t;}
> {
> ( t=<ATOKEN>
> +| t=<DIGITS>
> | t=<QUOTEDSTRING>
> )
> { return t.image; }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] Updated: (MIME4J-41) Content-Type parameter values that
contain only digits are ignored
Posted by "Antony Bowesman (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antony Bowesman updated MIME4J-41:
----------------------------------
Attachment: MessageTest.java
Test case showing the unquoted digit boundary string
> Content-Type parameter values that contain only digits are ignored
> ------------------------------------------------------------------
>
> Key: MIME4J-41
> URL: https://issues.apache.org/jira/browse/MIME4J-41
> Project: Mime4j
> Issue Type: Bug
> Affects Versions: 0.3, 0.4
> Environment: Any
> Reporter: Antony Bowesman
> Fix For: 0.3, 0.4
>
> Attachments: MessageTest.java
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Parameter values in the Content-Type message header are ignored if they only contain digits. This is a particular problem if a message contains an unquoted boundary string that contains only digits, it is not recognised as a valid boundary string and therefore the a Multipart object is created that fails the Message.isMultipart() test.
> Attached test case shows the problem
> The ContentTypeParser.jj source for value parsing is
> String value() :
> {Token t;}
> {
> ( t=<ATOKEN>
> | t=<QUOTEDSTRING>
> )
> { return t.image; }
> }
> however, if a value contains only digits, it is parsed as <DIGITS>, so will not be assigned.
> Sensible solution seems to be to change the value() implementation in JavaCC source to include digit. Patch details
> --- ContentTypeParser.jj 2007-05-25 02:04:09.000000000 +1000
> +++ ContentTypeParserFix.jj 2008-03-19 08:44:14.109375000 +1100
> @@ -122,6 +122,7 @@
> {Token t;}
> {
> ( t=<ATOKEN>
> +| t=<DIGITS>
> | t=<QUOTEDSTRING>
> )
> { return t.image; }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org