Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sieve plugin does not use \r\n in multi-line text literals #6686

Closed
ScottPeterJohnson opened this issue Mar 17, 2019 · 2 comments
Closed

Sieve plugin does not use \r\n in multi-line text literals #6686

ScottPeterJohnson opened this issue Mar 17, 2019 · 2 comments

Comments

@ScottPeterJohnson
Copy link

Hello!
I'm using Roundcube with JSieve, which (correctly) fails to parse some Sieve scripts as saved by Roundcube. They generate "\n", when they should generate "\r\n". This specifically fails when saving vacation messages over one line in length.

Here is the location that needs changing, as far as I can tell. It might be more spec-compliant to change other uses of \n in this file too.
https://github.com/roundcube/roundcubemail/blob/master/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php#L1205
Please see section 2.4.2 of the Sieve RFC:
https://tools.ietf.org/html/rfc5228#section-2.4.2

For entering larger amounts of text, such as an email message, a
   multi-line form is allowed.  It starts with the keyword "text:",
   followed by a CRLF, and ends with the sequence of a CRLF, a single
   period, and another CRLF.
@alecpl
Copy link
Member

alecpl commented Mar 17, 2019

I don't know how I missed that. Indeed \n is not allowed alone and should be always \r\n when used as a "separator whitespace". Not only for multiline text syntax.

This probably does not apply to the multiline text value itself. At least I didn't found anything that would require \r\n in there.

@alecpl
Copy link
Member

alecpl commented Apr 21, 2019

Fixed.

@alecpl alecpl closed this as completed Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants