You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-issues@incubator.apache.org by "Michael Kliewe (JIRA)" <ji...@apache.org> on 2011/04/12 14:08:05 UTC

[jira] [Created] (ZETACOMP-73) If a mail contains the Tag, the mail is not processed correctly and an exception is thrown

If a mail contains the Tag, the mail is not processed correctly and an exception is thrown
------------------------------------------------------------------------------------------

                 Key: ZETACOMP-73
                 URL: https://issues.apache.org/jira/browse/ZETACOMP-73
             Project: Zeta Components
          Issue Type: Bug
          Components: Mail
            Reporter: Michael Kliewe


These lines are problematic in imap_transport.php:
while ( strpos( $response, $tag ) === false )

For example in the top() method:
This loop is running until there is a line with the $tag in it. So if the tag is A0001 and there is a "A0001" inside the mail (in the text or in the base64 attachment), the loop is stopped in the middle of the mail.

This detection of the end of the mail has to be enhanced. My first fix is this:
while ( strpos( $response, $tag . ' ' ) !== 0 )

This only finds occurrences of "A0001 " if it is at the beginning of a line, so this is better, but not perfect... I don't know what the perfect solution would be, I think there also has to be a ")" in the line before the end.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira