Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make starttls actually work, don't output debug for LOGON send

  • Loading branch information...
commit 050b59be3b83e799adf7d5b5146bc6a5bb8bf02a 1 parent 16f07bf
@asutherland asutherland authored
Showing with 12 additions and 3 deletions.
  1. +11 −2 data/lib/imap.js
  2. +1 −1  xpi-template/install.rdf
View
13 data/lib/imap.js
@@ -80,6 +80,11 @@ exports.ImapConnection = ImapConnection;
ImapConnection.prototype.connect = function(loginCb) {
var self = this,
fnInit = function() {
+ if (self._options.crypto === "starttls") {
+ self._send('STARTTLS', function() {
+ self._state.conn.startTLS();
+ });
+ }
// First get pre-auth capabilities, including server-supported auth
// mechanisms
self._send('CAPABILITY', function() {
@@ -1027,8 +1032,12 @@ ImapConnection.prototype._send = function(cmdstr, cb, bypass) {
this._state.conn.send(prefix);
this._state.conn.send(cmd);
this._state.conn.send(CRLF);
- if (debug)
- debug('sent', prefix + cmd);
+ if (debug) {
+ if (/^LOGIN /.test(cmd))
+ debug('sent', '***BLEEPING OUT LOGON***');
+ else
+ debug('sent', prefix + cmd);
+ }
}
};
View
2  xpi-template/install.rdf
@@ -17,7 +17,7 @@
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
- <em:minVersion>13.0</em:minVersion>
+ <em:minVersion>11.0</em:minVersion>
<em:maxVersion>15.0</em:maxVersion>
</Description>
</em:targetApplication>
Please sign in to comment.
Something went wrong with that request. Please try again.