Closed
Bug 250559
Opened 20 years ago
Closed 20 years ago
don't recognize .CR not as message terminator
Categories
(MailNews Core :: Networking: POP, defect)
MailNews Core
Networking: POP
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ch.ey, Assigned: ch.ey)
Details
Attachments
(1 file)
5.93 KB,
patch
|
Bienvenu
:
review+
mscott
:
superreview+
|
Details | Diff | Splinter Review |
According to RFC 1939 only .CRLF has to be accepted as terminating. But currently we also accept .LF and .CR as terminator. The former is because of restriction in ReadNextLine(). But the later is a bug in HandleLine() that can easily be fixed.
Assignee | ||
Comment 1•20 years ago
|
||
This patch is basically a one-liner: - if ((line[0] == '.') && - ((line[1] == nsCRT::CR) || (line[1] == nsCRT::LF))) + // line contains only dot and linebreak -> message end + if (line[0] == '.' && line_length == 1 + MSG_LINEBREAK_LEN) Currently everything with dot in the first and CR or LF in the second line is treated as terminator, also ".\rThis is no terminator"\r\n. This patch changes this. It tests if the dot is alone on a line with MSG_LINEBREAK (inserted by |res = BufferInput(MSG_LINEBREAK, MSG_LINEBREAK_LEN);| in nsPop3Protocol::RetrResponse()). All the other changes are just cleanups. The removed code junk at #2919 and following is never triggered, so removed.
Assignee | ||
Updated•20 years ago
|
Attachment #152684 -
Flags: review?(bienvenu)
Comment 2•20 years ago
|
||
Comment on attachment 152684 [details] [diff] [review] proposed patch is there an advantage to doing this, other than more conformance with the RFC? Could it break us with some poorly behaved servers?
Attachment #152684 -
Flags: review?(bienvenu) → review+
Assignee | ||
Comment 3•20 years ago
|
||
It can break us with those servers. Though the servers not sending CRLF I know send LF, not CR. Also accepting single CR and LF can make us terminate the message to early, so I think the drawback isn't bigger than the gain. Besides from my position that faulty servers shouldn't make us violate RFC's.
Assignee | ||
Updated•20 years ago
|
Attachment #152684 -
Flags: superreview?(mscott)
Updated•20 years ago
|
Attachment #152684 -
Flags: superreview?(mscott) → superreview+
Comment 4•20 years ago
|
||
fixed on trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•