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 "Niklas Therning (JIRA)" <se...@james.apache.org> on 2008/07/11 09:29:31 UTC
[jira] Created: (MIME4J-49) Message or body part with empty header
causes infinite loop
Message or body part with empty header causes infinite loop
-----------------------------------------------------------
Key: MIME4J-49
URL: https://issues.apache.org/jira/browse/MIME4J-49
Project: Mime4j
Issue Type: Bug
Affects Versions: 0.4
Reporter: Niklas Therning
Fix For: 0.4
If a message or body part contains an empty header the parser will loop indefinitely (when in non-strict mode). Seems like qmail sometimes sends out failure notices which have body parts with empty headers.
--
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] Commented: (MIME4J-49) Message or body part with empty
header causes infinite loop
Posted by "Niklas Therning (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612787#action_12612787 ]
Niklas Therning commented on MIME4J-49:
---------------------------------------
This very simple patch seems to fix this problem. Should I check this in?
Index: src/main/java/org/apache/james/mime4j/AbstractEntity.java
===================================================================
--- src/main/java/org/apache/james/mime4j/AbstractEntity.java (revision 675691)
+++ src/main/java/org/apache/james/mime4j/AbstractEntity.java (working copy)
@@ -163,6 +163,9 @@
// Strip away line delimiter
int len = fieldbuf.length();
+ if (len == 0 && endOfHeader) {
+ return false;
+ }
if (len > 0 && fieldbuf.charAt(len - 1) == '\n') {
len--;
}
> Message or body part with empty header causes infinite loop
> -----------------------------------------------------------
>
> Key: MIME4J-49
> URL: https://issues.apache.org/jira/browse/MIME4J-49
> Project: Mime4j
> Issue Type: Bug
> Affects Versions: 0.4
> Reporter: Niklas Therning
> Fix For: 0.4
>
>
> If a message or body part contains an empty header the parser will loop indefinitely (when in non-strict mode). Seems like qmail sometimes sends out failure notices which have body parts with empty headers.
--
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-49) Message or body part with empty header
causes infinite loop
Posted by "Niklas Therning (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niklas Therning closed MIME4J-49.
---------------------------------
Resolution: Cannot Reproduce
Assignee: Niklas Therning
Turns out the infinite loop was caused by another bug. Mime4j handles empty headers just fine. Sorry about that. I'll close this one now.
> Message or body part with empty header causes infinite loop
> -----------------------------------------------------------
>
> Key: MIME4J-49
> URL: https://issues.apache.org/jira/browse/MIME4J-49
> Project: Mime4j
> Issue Type: Bug
> Affects Versions: 0.4
> Reporter: Niklas Therning
> Assignee: Niklas Therning
> Fix For: 0.4
>
>
> If a message or body part contains an empty header the parser will loop indefinitely (when in non-strict mode). Seems like qmail sometimes sends out failure notices which have body parts with empty headers.
--
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] Commented: (MIME4J-49) Message or body part with empty
header causes infinite loop
Posted by "Oleg Kalnichevski (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612797#action_12612797 ]
Oleg Kalnichevski commented on MIME4J-49:
-----------------------------------------
Looks good to me. Would it be a big deal to add a test case for this issue, though?
Oleg
> Message or body part with empty header causes infinite loop
> -----------------------------------------------------------
>
> Key: MIME4J-49
> URL: https://issues.apache.org/jira/browse/MIME4J-49
> Project: Mime4j
> Issue Type: Bug
> Affects Versions: 0.4
> Reporter: Niklas Therning
> Fix For: 0.4
>
>
> If a message or body part contains an empty header the parser will loop indefinitely (when in non-strict mode). Seems like qmail sometimes sends out failure notices which have body parts with empty headers.
--
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] Commented: (MIME4J-49) Message or body part with empty
header causes infinite loop
Posted by "Niklas Therning (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612803#action_12612803 ]
Niklas Therning commented on MIME4J-49:
---------------------------------------
I'll add a test case for this
> Message or body part with empty header causes infinite loop
> -----------------------------------------------------------
>
> Key: MIME4J-49
> URL: https://issues.apache.org/jira/browse/MIME4J-49
> Project: Mime4j
> Issue Type: Bug
> Affects Versions: 0.4
> Reporter: Niklas Therning
> Fix For: 0.4
>
>
> If a message or body part contains an empty header the parser will loop indefinitely (when in non-strict mode). Seems like qmail sometimes sends out failure notices which have body parts with empty headers.
--
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