Loading toolkit/components/tor-launcher/TorControlPort.sys.mjs +7 −1 Original line number Diff line number Diff line Loading @@ -672,6 +672,8 @@ export class TorController { /** * Authenticate to the tor daemon. * Notice that a failure in the authentication makes the connection close. * This function tolerates empty and false-ish passwords because a client * needs to authenticate even when all authentication methods are disabled. * * @param {Uint8Array} password The password for the control port, as an array * of bytes Loading @@ -680,7 +682,11 @@ export class TorController { const passwordString = Array.from(password ?? [], b => b.toString(16).padStart(2, "0") ).join(""); await this.#sendCommandSimple(`authenticate ${passwordString}`); let command = "AUTHENTICATE"; if (passwordString) { command += ` ${passwordString}`; } await this.#sendCommandSimple(command); } // Information Loading toolkit/components/tor-launcher/TorProvider.sys.mjs +3 −0 Original line number Diff line number Diff line Loading @@ -834,6 +834,9 @@ export class TorProvider extends TorProviderBase { this.#controlPortSettings.cookieFilePath ); } // As per the spec, we must always authenticate to the control port, even // when all authentication methods are disabled. // https://spec.torproject.org/control-spec/commands.html#authenticate await controlPort.authenticate(password); } catch (e) { try { Loading Loading
toolkit/components/tor-launcher/TorControlPort.sys.mjs +7 −1 Original line number Diff line number Diff line Loading @@ -672,6 +672,8 @@ export class TorController { /** * Authenticate to the tor daemon. * Notice that a failure in the authentication makes the connection close. * This function tolerates empty and false-ish passwords because a client * needs to authenticate even when all authentication methods are disabled. * * @param {Uint8Array} password The password for the control port, as an array * of bytes Loading @@ -680,7 +682,11 @@ export class TorController { const passwordString = Array.from(password ?? [], b => b.toString(16).padStart(2, "0") ).join(""); await this.#sendCommandSimple(`authenticate ${passwordString}`); let command = "AUTHENTICATE"; if (passwordString) { command += ` ${passwordString}`; } await this.#sendCommandSimple(command); } // Information Loading
toolkit/components/tor-launcher/TorProvider.sys.mjs +3 −0 Original line number Diff line number Diff line Loading @@ -834,6 +834,9 @@ export class TorProvider extends TorProviderBase { this.#controlPortSettings.cookieFilePath ); } // As per the spec, we must always authenticate to the control port, even // when all authentication methods are disabled. // https://spec.torproject.org/control-spec/commands.html#authenticate await controlPort.authenticate(password); } catch (e) { try { Loading