james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vishal Mahajan (JIRA)" <server-...@james.apache.org>
Subject [jira] Updated: (JSIEVE-75) incorrect parsing of script containing multiple multi-line forms
Date Thu, 17 Mar 2011 07:24:29 GMT

     [ https://issues.apache.org/jira/browse/JSIEVE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vishal Mahajan updated JSIEVE-75:
---------------------------------

    Attachment: patch.txt

Proposed patch:

- Fixed sieve grammar for scenarios where there are multiple multi-line text instances in
a sieve script. The primary issue was that in those scenarios a line with just the dot (".\r\n")
was getting parsed as a MULTI_LINE_LITERAL.
- Fixed multi-line text unit tests to use CRLF instead of just LF in the beginning and the
end of a multi-line text, as required by section 2.4.2 of RFC 3028.

> incorrect parsing of script containing multiple multi-line forms
> ----------------------------------------------------------------
>
>                 Key: JSIEVE-75
>                 URL: https://issues.apache.org/jira/browse/JSIEVE-75
>             Project: JAMES jSieve
>          Issue Type: Bug
>          Components: JSieve (Main)
>    Affects Versions: 0.4
>            Reporter: Vishal Mahajan
>            Priority: Critical
>         Attachments: patch.txt
>
>
> I am using jSieve 0.4. I have the following sieve script containing two multi-line forms:
> ----
> require ["fileinto", "reject", "tag", "flag"];
> # filter1
> if anyof (header :contains "subject" "abc") {
> reply text:
> reply1
> .
> ;
> reply text:
> reply2
> .
> ;
> }
> ----
> The issue is that the jSieve parser sees only one multi-line form in the above script,
with form data being the text between the first "text:" and last "CRLF.CRLF", i.e.
> ----
> reply1
> .
> ;
> reply text:
> reply2
> ----
> Is there an issue in the sieve.jjt grammar in dealing with multiple multi-line forms?
> One of the odd things I observed in sieve.jjt is that NEWLINE is considered as "\n"|"\r"|"\r\n",
whereas RFC 3028 (section 2.4.2) requires that a multi-line form:
> starts with the keyword "text:",
> followed by a CRLF, and ends with the sequence of a CRLF, a single
> period, and another CRLF.
> which implies that standalone "\n" and "\r" chars should not be considered in determining
start and end of multi-line form data. 

--
This message is automatically generated by JIRA.
For more information on JIRA, 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


Mime
View raw message