Problem in Pigeonhole sievec

Thorsten Hater thorsten.hater at gmail.com
Mon May 28 15:44:19 EEST 2018


Thanks for the feedback, I simply expected that addresses and
simple strings were treated differently.

Thorsten

On Mon, May 28, 2018 at 1:55 PM, Steffen Kaiser <skdovecot at inf.h-brs.de>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Mon, 28 May 2018, Thorsten Hater wrote:
>
> I stumbled upon the following behaviour of Pigeonhole, which I consider
>> to be problematic. A user deployed a Sieve script similar to the following
>> snippet
>>
>> if not anyof (address :is ["from","cc"] ["...", ..., "... at ...
>> GARBAGE", ...] {
>>  fileinto "inbox.Trash";
>>  stop;
>> }
>>
>> Note the extra line break before GARBAGE. This script is obviously broken,
>> but gets accepted by sievec and only fails later, at runtime with
>>
>> line X: error: found stray carriage-return (CR) character in quoted
>>    string started at line X.
>>
>> So, the question is whether line breaks in strings are allowed in general
>> and the runtime error is unavoidable, or should sievec return an error?
>>
>
> https://www.ietf.org/rfc/rfc3028.txt first hit of quoted-string
>
>  quoted-string = DQUOTE *CHAR DQUOTE
>            ;; in general, \ CHAR inside a string maps to CHAR
>            ;; so \" maps to " and \\ maps to \
>            ;; note that newlines and other characters are all allowed
>            ;; strings
>
> So, it's correct. But the address should reject the CR. I guess,
> Pigeonhole triggers the error for sanity purpose?
>
> - -- Steffen Kaiser
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iQEVAwUBWwvuQsQnQQNheMxiAQILoAgAyRjSObVJkrAmxzyLau9gIvvMOM2R++HP
> pwsptIQ72xoYJOO/Lnd1TmfKTE9QYwtOGkSKr8tiJVD8JOpL5fUbB6mZNOTXkAv0
> TOW2gA7v06nXq6K0ETum8anoKTIF0o4j5aQJ5yQ5CrzlVQqUwTsf4mVVNqK0hn/L
> X5RAuCVQyx6sdvCB+lSOGmLv/fT8+xHS03U6jzCp/Yov5OKsT29oOOF6dXWR49Iw
> BL+DOd9T37hHF6ENp4A5wxX6iCMKLsWL0f5xTcxwRK5GOiCDoUH6ZpiywD0PtCuT
> VlusmbIByGON7foNlCPusTVcfq8GenMhOrgFcbp1PfRrShIQgsjWSg==
> =vgR1
> -----END PGP SIGNATURE-----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20180528/a0a3e2ef/attachment.html>


More information about the dovecot mailing list