
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 fixup! Bug 40933: Add tor-launcher functionality Bug 42102: Fix checkPort in TorProcess - - - - - 2 changed files: - toolkit/components/tor-launcher/TorLauncherUtil.sys.mjs - toolkit/components/tor-launcher/TorProcess.sys.mjs Changes: ===================================== toolkit/components/tor-launcher/TorLauncherUtil.sys.mjs ===================================== @@ -8,7 +8,7 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { - FileUtils: "resource://gre/modules/FileUtils.sys.jsm", + FileUtils: "resource://gre/modules/FileUtils.sys.mjs", }); const kPropBundleURI = "chrome://torbutton/locale/torlauncher.properties"; @@ -565,7 +565,7 @@ export const TorLauncherUtil = Object.freeze({ } if (useIPC === undefined) { - socksPortInfo.useIPC = + useIPC = !this.isWindows && Services.prefs.getBoolPref( "extensions.torlauncher.socks_port_use_ipc", @@ -574,7 +574,7 @@ export const TorLauncherUtil = Object.freeze({ } // Fill in missing SOCKS info from prefs. - if (socksPortInfo.useIPC) { + if (useIPC) { if (!socksPortInfo.ipcFile) { socksPortInfo.ipcFile = TorLauncherUtil.getTorFile("socks_ipc", false); } @@ -611,7 +611,7 @@ export const TorLauncherUtil = Object.freeze({ return; } - if (socksPortInfo.useIPC) { + if (socksPortInfo.ipcFile) { const fph = Services.io .getProtocolHandler("file") .QueryInterface(Ci.nsIFileProtocolHandler); ===================================== toolkit/components/tor-launcher/TorProcess.sys.mjs ===================================== @@ -49,9 +49,7 @@ export class TorProcess { const checkPort = port => port === undefined || - (Number.isInteger(controlSettings.port) && - controlSettings.port > 0 && - controlSettings.port < 65535); + (Number.isInteger(port) && port > 0 && port < 65535); if (!checkPort(controlSettings?.port)) { throw new Error("Invalid control port"); } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/a4ff8505... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/a4ff8505... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
richard (@richard)