Closed Bug 223692 Opened 22 years ago Closed 22 years ago

Don't use the initial-response argument with AUTH LOGIN

Categories

(MailNews Core :: Networking: SMTP, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ch.ey, Assigned: ch.ey)

References

()

Details

Attachments

(1 file, 1 obsolete file)

I just discovered or better got confirmed that the SMTP client shouldn't use the initial-response argument with AUTH LOGIN. "The original design of LOGIN by Mark Crispin (and what we documented) does NOT permit the client to use an initial response." The documentation (currently as draft) is available through the above URL. Read RFC 2554 too: "The optional initial-response argument to the AUTH command is used to save a round trip when using authentication mechanisms that are defined to send no data in the initial challenge." But the LOGIN mechanism sends data in the initial challenges. Although much server implementations allow the initial-response argument we shouldn't depend on it.
Attached patch proposed patch (obsolete) — Splinter Review
This patch changes Mozillas behaviour not to use the initial-response argument with LOGIN mechanism. I also commented out the (anyway not used) old LoginResponse(). Basically to use the name for one of the new functions needed.
Attachment #134136 - Flags: review?(bienvenu)
+ if (m_responseCode/100 != 3) + m_nextState = SMTP_AUTH_LOGIN_RESPONSE; + else + m_nextState = SMTP_SEND_AUTH_LOGIN_USERNAME; can be simply: m_nextState = (m_responseCode/100 == 3) ? SMTP_SEND_AUTH_LOGIN_USERNAME : SMTP_AUTH_LOGIN_RESPONSE; can you remove the commented out code instead of just commenting it out? Other than that, it looks OK.
Attachment #134136 - Flags: review?(bienvenu)
Attached patch patch v2Splinter Review
Replaced the if from v1 (seems I'm a sucker for this kind of if). I also removed the commented out code. I let it in just in case.
Attachment #134136 - Attachment is obsolete: true
Attachment #135130 - Flags: review?(bienvenu)
Comment on attachment 135130 [details] [diff] [review] patch v2 looks good - I'll fix the tabs before I check in.
Attachment #135130 - Flags: review?(bienvenu) → review+
fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: MailNews → Core
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: