richard pushed to branch tor-browser-115.2.1esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
a4ff8505
by Pier Angelo Vendrame at 2023-09-15T18:31:31+00:00
2 changed files:
- toolkit/components/tor-launcher/TorLauncherUtil.sys.mjs
- toolkit/components/tor-launcher/TorProcess.sys.mjs
Changes:
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | const lazy = {};
|
9 | 9 | |
10 | 10 | ChromeUtils.defineESModuleGetters(lazy, {
|
11 | - FileUtils: "resource://gre/modules/FileUtils.sys.jsm",
|
|
11 | + FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
|
|
12 | 12 | });
|
13 | 13 | |
14 | 14 | const kPropBundleURI = "chrome://torbutton/locale/torlauncher.properties";
|
... | ... | @@ -565,7 +565,7 @@ export const TorLauncherUtil = Object.freeze({ |
565 | 565 | }
|
566 | 566 | |
567 | 567 | if (useIPC === undefined) {
|
568 | - socksPortInfo.useIPC =
|
|
568 | + useIPC =
|
|
569 | 569 | !this.isWindows &&
|
570 | 570 | Services.prefs.getBoolPref(
|
571 | 571 | "extensions.torlauncher.socks_port_use_ipc",
|
... | ... | @@ -574,7 +574,7 @@ export const TorLauncherUtil = Object.freeze({ |
574 | 574 | }
|
575 | 575 | |
576 | 576 | // Fill in missing SOCKS info from prefs.
|
577 | - if (socksPortInfo.useIPC) {
|
|
577 | + if (useIPC) {
|
|
578 | 578 | if (!socksPortInfo.ipcFile) {
|
579 | 579 | socksPortInfo.ipcFile = TorLauncherUtil.getTorFile("socks_ipc", false);
|
580 | 580 | }
|
... | ... | @@ -611,7 +611,7 @@ export const TorLauncherUtil = Object.freeze({ |
611 | 611 | return;
|
612 | 612 | }
|
613 | 613 | |
614 | - if (socksPortInfo.useIPC) {
|
|
614 | + if (socksPortInfo.ipcFile) {
|
|
615 | 615 | const fph = Services.io
|
616 | 616 | .getProtocolHandler("file")
|
617 | 617 | .QueryInterface(Ci.nsIFileProtocolHandler);
|
... | ... | @@ -49,9 +49,7 @@ export class TorProcess { |
49 | 49 | |
50 | 50 | const checkPort = port =>
|
51 | 51 | port === undefined ||
|
52 | - (Number.isInteger(controlSettings.port) &&
|
|
53 | - controlSettings.port > 0 &&
|
|
54 | - controlSettings.port < 65535);
|
|
52 | + (Number.isInteger(port) && port > 0 && port < 65535);
|
|
55 | 53 | if (!checkPort(controlSettings?.port)) {
|
56 | 54 | throw new Error("Invalid control port");
|
57 | 55 | }
|