Improve handling of backslashes in quoted strings. [Fixes #450] #506

Merged
merged 1 commit into from Feb 10, 2013

Projects

None yet

2 participants

@ConradIrwin
Collaborator

The relevant part of RFC-822 says that '' '"' and "\r" should be
escaped in quoted strings.

I have added escaping for '', but not for '\r' as we already use
quoted-printable form for those (and if we allow raw newlines in headers
we have to be much more careful to avoid header-injection).

I've also fixed unquote() to remove backslash-escaping from the string
as RFC-822 suggests.

@ConradIrwin ConradIrwin Improve handling of backslashes in quoted strings. [Fixes #450]
The relevant part of RFC-822 says that '\' '"' and "\r" should be
escaped in quoted strings.

I have added escaping for '\', but not for '\r' as we already use
quoted-printable form for those (and if we allow raw newlines in headers
we have to be much more careful to avoid header-injection).

I've also fixed unquote() to remove backslash-escaping from the string
as RFC-822 suggests.
32e697c
@jeremy jeremy merged commit feacb87 into mikel:master Feb 10, 2013
@jeremy jeremy added a commit that referenced this pull request Feb 10, 2013
@jeremy jeremy Update CHANGELOG for #506 de16b19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment