Skip to content
Snippets Groups Projects
Verified Commit f79cd6d4 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

Bug 42773: Replace ~ with the original home.

In Bug 93141, Mozilla started sending users to their home when they type
~ in the URL bar.
On Linux, we change $HOME for various reason, therefore you would be
redirected to the spoofed home directory when typing ~.
So, we check if the original home directory is known, and use that,
instead.
parent 1448e4e3
No related branches found
No related tags found
1 merge request!1293Bug 43306: Rebased stable onto 128.5.0esr
......@@ -934,6 +934,10 @@ function fileURIFixup(uriString) {
} else {
// UNIX: Check if it starts with "/" or "~".
attemptFixup = /^[~/]/.test(uriString);
const originalHome = Services.env.get("BB_ORIGINAL_HOME");
if (originalHome && (uriString === "~" || uriString.startsWith("~/"))) {
path = originalHome + path.substring(1);
}
}
if (attemptFixup) {
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment