Bug 1704280 - Change Default Port for Internet Relay Chat (IRC) via TLS/SSL to 6697. r=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Sat, 10 Apr 2021 13:08:45 +0100
changeset 42460 6e08cc29492c9bf159de2d81015dbc4c979b60b0
parent 42459 fc9353d6627819bda8a2263d398368928956ed4b
child 42461 e7f99c40dabb574ad979dd5fd41f92809b18716e
push id3121
push usertbbld-merge
push dateMon, 31 May 2021 21:07:04 +0000
treeherdercomm-beta@a02c59e58d79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg
bugs1704280
Bug 1704280 - Change Default Port for Internet Relay Chat (IRC) via TLS/SSL to 6697. r=frg
suite/extensions/irc/js/lib/irc.js
suite/extensions/irc/js/lib/protocol-handlers.jsm
suite/extensions/irc/locales/en-US/chrome/chatzilla.properties
suite/extensions/irc/xul/content/commands.js
suite/extensions/irc/xul/content/static.js
--- a/suite/extensions/irc/js/lib/irc.js
+++ b/suite/extensions/irc/js/lib/irc.js
@@ -3590,17 +3590,17 @@ function parseIRCURL(url)
 {
     var specifiedHost = "";
 
     var rv = new Object();
     rv.spec = url;
     rv.scheme = url.split(":")[0];
     rv.host = null;
     rv.target = "";
-    rv.port = (rv.scheme == "ircs" ? 9999 : 6667);
+    rv.port = (rv.scheme == "ircs" ? 6697 : 6667);
     rv.msg = "";
     rv.pass = null;
     rv.key = null;
     rv.charset = null;
     rv.needpass = false;
     rv.needkey = false;
     rv.isnick = false;
     rv.isserver = false;
@@ -3767,17 +3767,17 @@ function constructIRCURL(obj)
     var flags = "";
     var scheme = ("scheme" in obj) ? obj.scheme : "irc";
     if (!("host" in obj) || !obj.host)
         return scheme + "://";
 
     var url = scheme + "://" + obj.host;
 
     // Add port if non-standard:
-    if (("port" in obj) && (((scheme == "ircs") && (obj.port != 9999)) ||
+    if (("port" in obj) && (((scheme == "ircs") && (obj.port != 6697)) ||
                             ((scheme == "irc")  && (obj.port != 6667))))
     {
         url += ":" + obj.port;
     }
     // Need to add ",isserver" if there's no port and no dots in the hostname:
     else if (("isserver" in obj) && obj.isserver &&
              (obj.host.indexOf(".") == -1))
     {
--- a/suite/extensions/irc/js/lib/protocol-handlers.jsm
+++ b/suite/extensions/irc/js/lib/protocol-handlers.jsm
@@ -74,17 +74,17 @@ IRCProtocolHandler.prototype =
     allowPort(port, scheme)
     {
         // Allow all ports to connect, so long as they are irc: or ircs:
         return (scheme === 'irc' || scheme === 'ircs');
     },
 
     newURI(spec, charset, baseURI)
     {
-        const port = this.isSecure ? 9999 : 6667;
+        const port = this.isSecure ? 6697 : 6667;
 
         if (!Cc.hasOwnProperty("@mozilla.org/network/standard-url-mutator;1")) {
             const cls = Cc[STANDARDURL_CONTRACTID];
             const url = cls.createInstance(Ci.nsIStandardURL);
 
             url.init(Ci.nsIStandardURL.URLTYPE_STANDARD, port, spec, charset, baseURI);
 
             return url.QueryInterface(Ci.nsIURI);
@@ -131,17 +131,17 @@ this.IRCSProtocolHandlerFactory =
         if (outer != null)
             throw Cr.NS_ERROR_NO_AGGREGATION;
 
         if (!iid.equals(Ci.nsIProtocolHandler) && !iid.equals(Ci.nsISupports))
             throw Cr.NS_ERROR_INVALID_ARG;
 
         const protHandler = new IRCProtocolHandler(true);
         protHandler.scheme = "ircs";
-        protHandler.defaultPort = 9999;
+        protHandler.defaultPort = 6697;
         return protHandler;
     },
 };
 
 
 /* Bogus IRC channel used by the IRCProtocolHandler */
 function BogusChannel(URI, isSecure)
 {
--- a/suite/extensions/irc/locales/en-US/chrome/chatzilla.properties
+++ b/suite/extensions/irc/locales/en-US/chrome/chatzilla.properties
@@ -645,17 +645,17 @@ cmd.rename.label  = Rename Tab…
 
 cmd.server.params = <hostname> [<port> [<password>]]
 cmd.server.help   = Connects to server <hostname> on <port>, or 6667 if <port> is not specified.  Provides the password <password> if specified. If you are already connected, the view for <hostname> is made current.  If that view has been deleted, it is recreated.
 
 cmd.set-current-view.params = <view>
 cmd.set-current-view.help   =
 
 cmd.sslserver.params = <hostname> [<port> [<password>]]
-cmd.sslserver.help   = Connects to server using SSL <hostname> on <port>, or 9999 if <port> is not specified.  Provides the password <password> if specified. If you are already connected, the view for <hostname> is made current.  If that view has been deleted, it is recreated.
+cmd.sslserver.help   = Connects to server using SSL <hostname> on <port>, or 6697 if <port> is not specified.  Provides the password <password> if specified. If you are already connected, the view for <hostname> is made current.  If that view has been deleted, it is recreated.
 
 cmd.ssl-exception.params = [<hostname> <port> [<connect>]]
 cmd.ssl-exception.help = Opens the dialog to add an SSL certificate exception for <hostname>. If <connect> is true then a connection to <hostname> will be initiated after the exception is added.
 
 cmd.squery.params = <service> [<commands>]
 cmd.squery.help   = Sends the commands <commands> to the service <service>.
 
 cmd.stalk.params = [<text>]
--- a/suite/extensions/irc/xul/content/commands.js
+++ b/suite/extensions/irc/xul/content/commands.js
@@ -1386,17 +1386,17 @@ function cmdSSLServer(e)
     if (ary)
     {
         // Foolish user obviously hasn't read the instructions, but we're nice.
         e.password = e.port;
         e.port = ary[2];
         e.hostname = ary[1];
     }
 
-    gotoIRCURL({scheme: "ircs", host: e.hostname, port: e.port || 9999,
+    gotoIRCURL({scheme: "ircs", host: e.hostname, port: e.port || 6697,
                 pass: e.password, isserver: true});
 }
 
 function cmdSSLException(e)
 {
     var opts = "chrome,centerscreen,modal";
     var location = e.hostname ? e.hostname + ':' + e.port : undefined;
     var args = {location: location, prefetchCert: true};
--- a/suite/extensions/irc/xul/content/static.js
+++ b/suite/extensions/irc/xul/content/static.js
@@ -1818,17 +1818,17 @@ var testIRCURLObjects = [
     [{host: "undernet"},                                    "irc://undernet/"],
     [{host: "irc.undernet.org"},                    "irc://irc.undernet.org/"],
     [{host: "irc.undernet.org", isserver: true},    "irc://irc.undernet.org/"],
     [{host: "undernet", isserver: true},           "irc://undernet/,isserver"],
     [{host: "irc.undernet.org", port: 6667},        "irc://irc.undernet.org/"],
     [{host: "irc.undernet.org", port: 1},         "irc://irc.undernet.org:1/"],
     [{host: "irc.undernet.org", port: 1, scheme: "ircs"},
                                                  "ircs://irc.undernet.org:1/"],
-    [{host: "irc.undernet.org", port: 9999, scheme: "ircs"},
+    [{host: "irc.undernet.org", port: 6697, scheme: "ircs"},
                                                    "ircs://irc.undernet.org/"],
     [{host: "undernet", needpass: true},           "irc://undernet/,needpass"],
     [{host: "undernet", pass: "cz"},                "irc://undernet/?pass=cz"],
     [{host: "undernet", charset: "utf-8"},    "irc://undernet/?charset=utf-8"],
     [{host: "undernet", target: "#foo"},              "irc://undernet/%23foo"],
     [{host: "undernet", target: "#foo", needkey: true},
                                               "irc://undernet/%23foo,needkey"],
     [{host: "undernet", target: "John", isnick: true},