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

Support obs-FWS in the FWS parser (#431) #435

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dafanz
Copy link

@dafanz dafanz commented May 31, 2023

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).

From: AAA <aaa@example.com>
To: BBB <bbb@example.com>,
	
 CCC <ccc@example.com>
References: <msg-id-aaa@example.com>
	
	
	
 <msg-id-bbb@example.com>
Message-ID: <msg-id-ccc@example.com>

A test mail

The bugfix here adds the support of obs-FWS and fixes all these problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant