Bug 1735803 - Convert server hostname to lowercase before connecting. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D158179
This commit is contained in:
Родитель
eb8fa81497
Коммит
cc536d6dc2
|
@ -41,12 +41,13 @@ class LDAPClient {
|
|||
}
|
||||
|
||||
connect() {
|
||||
let hostname = this._host.toLowerCase();
|
||||
this._logger.debug(
|
||||
`Connecting to ${this._useSecureTransport ? "ldaps" : "ldap"}://${
|
||||
this._host
|
||||
}:${this._port}`
|
||||
`Connecting to ${
|
||||
this._useSecureTransport ? "ldaps" : "ldap"
|
||||
}://${hostname}:${this._port}`
|
||||
);
|
||||
this._socket = new TCPSocket(this._host, this._port, {
|
||||
this._socket = new TCPSocket(hostname, this._port, {
|
||||
binaryType: "arraybuffer",
|
||||
useSecureTransport: this._useSecureTransport,
|
||||
});
|
||||
|
|
|
@ -113,10 +113,11 @@ class SmtpClient {
|
|||
* Initiate a connection to the server
|
||||
*/
|
||||
connect() {
|
||||
let hostname = this._server.hostname.toLowerCase();
|
||||
let port = this._server.port || (this.options.requireTLS ? 465 : 587);
|
||||
this.logger.debug(`Connecting to smtp://${this._server.hostname}:${port}`);
|
||||
this.logger.debug(`Connecting to smtp://${hostname}:${port}`);
|
||||
this._secureTransport = this.options.requireTLS;
|
||||
this.socket = new TCPSocket(this._server.hostname, port, {
|
||||
this.socket = new TCPSocket(hostname, port, {
|
||||
binaryType: "arraybuffer",
|
||||
useSecureTransport: this._secureTransport,
|
||||
});
|
||||
|
|
|
@ -99,12 +99,11 @@ class ImapClient {
|
|||
// Reuse the connection.
|
||||
this.onReady();
|
||||
} else {
|
||||
this._logger.debug(
|
||||
`Connecting to ${this._server.hostName}:${this._server.port}`
|
||||
);
|
||||
let hostname = this._server.hostName.toLowerCase();
|
||||
this._logger.debug(`Connecting to ${hostname}:${this._server.port}`);
|
||||
this._capabilities = null;
|
||||
this._secureTransport = this._server.socketType == Ci.nsMsgSocketType.SSL;
|
||||
this._socket = new TCPSocket(this._server.hostName, this._server.port, {
|
||||
this._socket = new TCPSocket(hostname, this._server.port, {
|
||||
binaryType: "arraybuffer",
|
||||
useSecureTransport: this._secureTransport,
|
||||
});
|
||||
|
|
|
@ -130,15 +130,14 @@ class Pop3Client {
|
|||
* Initiate a connection to the server
|
||||
*/
|
||||
connect() {
|
||||
this._logger.debug(
|
||||
`Connecting to pop://${this._server.hostName}:${this._server.port}`
|
||||
);
|
||||
let hostname = this._server.hostName.toLowerCase();
|
||||
this._logger.debug(`Connecting to pop://${hostname}:${this._server.port}`);
|
||||
this.runningUri
|
||||
.QueryInterface(Ci.nsIMsgMailNewsUrl)
|
||||
.SetUrlState(true, Cr.NS_OK);
|
||||
this._server.serverBusy = true;
|
||||
this._secureTransport = this._server.socketType == Ci.nsMsgSocketType.SSL;
|
||||
this._socket = new TCPSocket(this._server.hostName, this._server.port, {
|
||||
this._socket = new TCPSocket(hostname, this._server.port, {
|
||||
binaryType: "arraybuffer",
|
||||
useSecureTransport: this._secureTransport,
|
||||
});
|
||||
|
|
|
@ -93,13 +93,14 @@ class NntpClient {
|
|||
this.onOpen();
|
||||
} else {
|
||||
// Start a new connection.
|
||||
let hostname = this._server.hostName.toLowerCase();
|
||||
let useSecureTransport = this._server.isSecure;
|
||||
this._logger.debug(
|
||||
`Connecting to ${useSecureTransport ? "snews" : "news"}://${
|
||||
this._server.hostName
|
||||
}:${this._server.port}`
|
||||
`Connecting to ${useSecureTransport ? "snews" : "news"}://${hostname}:${
|
||||
this._server.port
|
||||
}`
|
||||
);
|
||||
this._socket = new TCPSocket(this._server.hostName, this._server.port, {
|
||||
this._socket = new TCPSocket(hostname, this._server.port, {
|
||||
binaryType: "arraybuffer",
|
||||
useSecureTransport,
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче