Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
Tor Browser
Commits
43429bce
Verified
Commit
43429bce
authored
Mar 11, 2022
by
Pier Angelo Vendrame
Committed by
Richard Pospesel
Apr 27, 2022
Browse files
fixup! Bug 21952: Implement Onion-Location
Keep fragments in redirects, to fix
#34366
parent
3dc963cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/components/onionservices/OnionLocationChild.jsm
View file @
43429bce
...
...
@@ -4,6 +4,8 @@
var EXPORTED_SYMBOLS = ["OnionLocationChild"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
class OnionLocationChild extends JSWindowActorChild {
handleEvent(event) {
this.onPageShow(event);
...
...
@@ -23,9 +25,16 @@ class OnionLocationChild extends JSWindowActorChild {
if (aMessage.name == "OnionLocation:Refresh") {
const doc = this.document;
const docShell = this.docShell;
cons
t onionLocationURI = doc.onionLocationURI;
le
t onionLocationURI = doc.onionLocationURI;
const refreshURI = docShell.QueryInterface(Ci.nsIRefreshURI);
if (onionLocationURI && refreshURI) {
const docUrl = new URL(doc.URL);
let onionUrl = new URL(onionLocationURI.asciiSpec);
// Keep consistent with Location
if (!onionUrl.hash && docUrl.hash) {
onionUrl.hash = docUrl.hash;
onionLocationURI = Services.io.newURI(onionUrl.toString());
}
refreshURI.refreshURI(
onionLocationURI,
doc.nodePrincipal,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment