Support obs-FWS in the FWS parser (#431) #435
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The function mailimf_fws_parse() does not support obs-FWS, which is defined in RFC5322, section 3.2.2.
For the example in #431, when msg-id-aaa@example.com is parsed and mailimf_fws_parse() is called after that, it will set cur_token at the position of '\r' in the 5th line. This will cause problems in certain situations. The example in #431 triggers the problem because the message-id afterwards is invalid. Another examples which also trigger problems are that there is a "WSP CRLF" line in the To header field or there are more than three continuous "WSP CRLF" lines in the References header field (see below).
The bugfix here adds the support of obs-FWS and fixes all these problems.