Closed Bug 312952 Opened 19 years ago Closed 18 years ago

Handle IMAP input "NIL)" correctly.

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: engel, Assigned: engel)

References

Details

Attachments

(2 files)

In almost all cases when |CreateNilString()| is called, it is followed by
|AdvanceToNextToken()|.  If the token would be |NIL)|, this means that the ')'
would erroneously be overlooked by the parser.
   Also note that a token like |"quoted")|, the ')' would be properly retained.

This bug required the following kludge.
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp&rev=1.129&root=/cvsroot&mark=1525-1529#1520

Bug and kludge should be removed.
Also, there might be some kludges in |nsImapServerResponseParser::envelope_data()|,
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp&rev=1.129&root=/cvsroot&mark=1405,1426-1428#1400

However, it seems to me that this code for parsing an ENVELOPE response is not
in use (it should probably still be kept for a more complete implementation of
the IMAP protocol), because neither FETCH ENVELOPE nor FETCH ALL is ever
requested from the server,
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/imap/src/nsImapProtocol.cpp&rev=1.615&root=/cvsroot#2799
Status: NEW → ASSIGNED
(Note that both kludges were relevant only if |envelope_data()| was invoked.)
Depends on: 41236
Blocks: 313038
Attachment #200037 - Flags: review?(bienvenu)
Comment on attachment 200037 [details] [diff] [review]
fix |CreateNilString|, remove two kludges

thanks, Hans-A
Attachment #200037 - Flags: review?(bienvenu) → review+
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
This patch is not yet applied (only the comment with the definition of envelope data is in the CVS).

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/imap/src/nsIMAPGenericParser.cpp&rev=1.51&mark=303-304#294
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
fix checked in, thx, Hans-Andreas!
Status: REOPENED → RESOLVED
Closed: 19 years ago18 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: