Uploaded image for project: 'James jSieve'
  1. James jSieve
  2. JSIEVE-75

incorrect parsing of script containing multiple multi-line forms

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 0.4
    • 0.5
    • JSieve (Main)
    • None

    Description

      I am using jSieve 0.4. I have the following sieve script containing two multi-line forms:


      require ["fileinto", "reject", "tag", "flag"];

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

      Attachments

        1. patch.txt
          5 kB
          Vishal Mahajan

        Activity

          People

            bago Stefano Bagnara
            vmahajan@zimbra.com Vishal Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: