-
Notifications
You must be signed in to change notification settings - Fork 99
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
Fix dash un-escaping to be applied unconditionally #342
Conversation
Added a regression test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this looks good, just one change and I can merge it.
According to RFC 4880, 'an implementation MAY dash-escape any line, SHOULD dash-escape lines commencing "From" followed by a space [...]'. Therefore it is necessary to unescape all lines starting with dash-space sequences, and not just these that have a dash following this sequence. Fixes SecurityInnovation#341 Signed-off-by: Michał Górny <[email protected]>
Quick question, does your regression test pass on your machine? When I try to test it in a python prompt locally I can't get it to pass. |
Well, tests apparently tests pass for me and travis. |
Yeah, it passes for me when I run it through tox on my machine, but typing the code into a |
Are you copy-pasting it from GitHub's UI? When I do that, I get:
Apprently copy-pasting from the actual file works. It seems that github is inserting some weird unicode characters. |
Yep, that was it. Friggin unicode. |
According to RFC 4880, 'an implementation MAY dash-escape any line,
SHOULD dash-escape lines commencing "From" followed by a space [...]'.
Therefore it is necessary to unescape all lines starting with dash-space
sequences, and not just these that have a dash following this sequence.
Fixes #341