-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net_smtp: Properly reject messages with long lines.
RFC 5322 says that lines in a message cannot exceed 998 characters. We use a sufficiently sized buffer to accomodate this requirement, but previously bbs_readline would return the same value if the buffer was exhausted as if read or poll had failed, and so the SMTP server would just abruptly disconnect if a line that was longer than the spec allowed was received. Now, a different return value is used, allowing the SMTP server to differentiate buffer exhaustion from I/O failure, and we return a proper SMTP error code before disconnecting.
- Loading branch information
1 parent
3b479c6
commit 7b38c23
Showing
4 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters