ma1 pushed to branch tor-browser-153.2.0esr-16.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
1f8e95ba
by hackademix at 2026-09-01T16:39:51+02:00
2 changed files:
- browser/components/torconnect/TorConnectChild.sys.mjs
- browser/components/torconnect/TorConnectParent.sys.mjs
Changes:
| ... | ... | @@ -60,12 +60,7 @@ export class TorConnectChild extends RemotePageChild { |
| 60 | 60 | console.error(`Invalid redirect URL "${redirect}"`);
|
| 61 | 61 | }
|
| 62 | 62 | |
| 63 | - // Replace the destination to prevent "about:torconnect" entering the
|
|
| 64 | - // history.
|
|
| 65 | - // NOTE: This is done here, in the window actor, rather than in content
|
|
| 66 | - // because we have the privilege to redirect to a "chrome:" uri here (for
|
|
| 67 | - // when the HomePage is set to be blank).
|
|
| 68 | - this.contentWindow.location.replace(replaceURI);
|
|
| 63 | + this.sendQuery("torconnect:redirect", replaceURI);
|
|
| 69 | 64 | }
|
| 70 | 65 | |
| 71 | 66 | actorCreated() {
|
| ... | ... | @@ -112,6 +112,16 @@ export class TorConnectParent extends JSWindowActorParent { |
| 112 | 112 | return Promise.resolve(
|
| 113 | 113 | TorConnectParent.fixupURIs(lazy.HomePage.get())[0]
|
| 114 | 114 | );
|
| 115 | + case "torconnect:redirect":
|
|
| 116 | + this.browsingContext.top.embedderElement.loadURI(
|
|
| 117 | + Services.io.newURI(message.data),
|
|
| 118 | + {
|
|
| 119 | + triggeringPrincipal:
|
|
| 120 | + Services.scriptSecurityManager.getSystemPrincipal(),
|
|
| 121 | + loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY,
|
|
| 122 | + }
|
|
| 123 | + );
|
|
| 124 | + break;
|
|
| 115 | 125 | case "torconnect:set-quickstart":
|
| 116 | 126 | TorConnect.quickstart = message.data;
|
| 117 | 127 | break;
|