Closed Bug 338243 Opened 18 years ago Closed 18 years ago

Enabling TLS for new IMAP connections doesn't close old connections

Categories

(Thunderbird :: Security, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: Bienvenu)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060205 Debian/1.7.12-1.1
Build Identifier: Thunderbird 1.5.0.2 (20060501) from Debian

Due to IMAP connection caching, enabling TLS does not take effect until you restart thunderbird.   This leads you to believe you're using an encrypted connection when in fact you are not, and no warning is given to this status.

I used tcpflow to watch the transaction, after setting TLS and hitting OK, I clicked on a new message in my inbox.  It showed up in my sniffer logs in plaintext.


Reproducible: Always

Steps to Reproduce:
Trivially reproducable.  
1 Start with TLS disabled.
2 click on Get Mail
3 Click on Edit/Account Settings
4 set security settings to "Use Secure connection: TLS"
5 OK out of Account Settings
6 Click on an email in your inbox.  


Actual Results:  
Messages are fetched in plaintext.

Expected Results:  
Issued STARTTLS and negotiated a secure connection.
Assignee: dveditz → bienvenu
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-thunderbird2?
We could close cached connections when this setting is changed - 4.x might have even done that.
Should do it for any setting change, as that would alleviate a lot of mysterious failures due to WYS != WYG.   TLS, secure auth, username off the top of my head.  I think only changing the server name/port causes a new connection to be established now, but I could be wrong.
Flags: blocking1.8.0.6?

*** This bug has been marked as a duplicate of 325379 ***
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: blocking1.8.0.7?
Flags: blocking-thunderbird2?
Resolution: --- → DUPLICATE
this is _NOT_ a duplicate of 325379. I read it before openening a seperate issue, and they are quite different.  325379 involved issuing a CAPABILITY before STARTTLS.   This is a seperate issue where a configuration change does not close current unencrypted connections and continues to transfer mail unencrypted until you close thunderbird and re-open.

I can't confirm that the patch fixes 338243 as well, please verify that it does indeed stop transmitting in cleartext when the settings are changed to TLS
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
changing summary to be clearer.
Summary: Enable TLS for IMAP but Thunderbird still uses unencrypted connections. → Enabling TLS for new IMAP connections doesn't close old connections
Attachment #237619 - Flags: superreview?(mscott)
Attachment #237619 - Flags: superreview?(mscott)
Attachment #237619 - Flags: superreview+
Attachment #237619 - Flags: approval-thunderbird2?
fixed on trunk and branch.
Status: REOPENED → RESOLVED
Closed: 18 years ago18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Comment on attachment 237619 [details] [diff] [review]
close cached connections when socket type changes

>+      // don't call virtual method in case overrides call GetSocketType
>+      nsMsgIncomingServer::SetSocketType(*aSocketType);

>+  nsCAutoString fullPrefName;
>+  getPrefName(m_serverKey.get(), "socketType", fullPrefName);
>+  return m_prefBranch->SetIntPref(fullPrefName.get(), aSocketType);
It's better to forward this to nsMsgIncomingServer than copying code. It also avoid breaking my nsMsgIncomingServer cleanup patch ;-)
(In reply to comment #9)
>It also avoids breaking my nsMsgIncomingServer cleanup patch ;-)
Hmm, it looks as if my cleanup touches nsImapIncomingServer.cpp anyway.
Is the approval-thunderbird2? request now obsolete?
Comment on attachment 237619 [details] [diff] [review]
close cached connections when socket type changes

yes, I guess this request is obsolete...
Attachment #237619 - Flags: approval-thunderbird2?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: