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

Script parsing fails when the string contains a backslash

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.3
    • 0.5
    • JSieve (Main)
    • None

    Description

      The following script fails to parse because one of the string literals contains a backslash. The parser also reports an error in the wrong line.

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

      1. test
        if allof (header :contains "to" "
        ") {
        keep;
        stop;
        }
      1. test2
        if anyof (header :contains "subject" "foo") {
        keep;
        stop;
        }

      org.apache.jsieve.parser.generated.TokenMgrError: Lexical error at line 14, column 0. Encountered: <EOF> after : "\")

      {\n keep;\n stop;\n}

      \n"

      Attachments

        1. backslash-rule.sieve
          0.2 kB
          Boris Burtin
        2. patch.txt
          3 kB
          Vishal Mahajan

        Activity

          People

            bago Stefano Bagnara
            bburtin Boris Burtin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: