Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gk/tor-browser
  • peterstory/tor-browser
  • sanketh/tor-browser
  • acat/tor-browser
  • sysrqb/tor-browser
  • boklm/tor-browser
  • dan/tor-browser
  • fabrizio/tor-browser
  • victorvw/tor-browser
  • aguestuser/tor-browser
  • WofWca/tor-browser
  • p13dz/tor-browser
  • mwolfe/tor-browser
  • tpo/applications/tor-browser
  • brade/tor-browser
  • pierov/tor-browser
  • ma1/tor-browser
  • JeremyRand/tor-browser
  • henry/tor-browser
  • msimonelli/tor-browser
  • cypherpunks1/tor-browser
  • blackZwork/tor-browser
  • starlingroot/tor-browser
  • cohosh/tor-browser
  • t-m-w/tor-browser
  • trinity-1686a/tor-browser
  • HHN/tor-browser
  • emmapeel/tor-browser
  • Achintya_Sharma/tor-browser
  • guest475646844/tor-browser
  • Mima/tor-browser
  • morgan/tor-browser
  • clairehurst/tor-browser
  • NoisyCoil/tor-browser
  • gus/tor-browser
  • Francewhoa/tor-browser
  • novialriptide/tor-browser
  • jwilde/tor-browser
  • brizental/tor-browser
  • ourhopeforfreedom/tor-browser
  • onyinyang/tor-browser
  • Noino/tor-browser
  • murmelurmel/tor-browser
43 results
Show changes
Showing
with 367 additions and 98 deletions
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html [
<!ENTITY % htmlDTD
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
%htmlDTD;
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
<!ENTITY % tbUpdateDTD SYSTEM "chrome://browser/locale/aboutTBUpdate.dtd">
%tbUpdateDTD;
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Security-Policy" content="default-src chrome:; object-src 'none'" />
<title>&aboutTBUpdate.changelogTitle;</title>
<link rel="stylesheet" type="text/css"
href="chrome://browser/content/abouttbupdate/aboutTBUpdate.css"/>
<script src="chrome://browser/content/abouttbupdate/aboutTBUpdate.js"
type="text/javascript"/>
</head>
<body dir="&locale.dir;">
<!-- NOTE: We don't use the <dl>, <dt> and <dd> elements to form name-value
- pairs because this semantics is relatively new, whilst firefox
- currently still maps these to the more limited "definitionlist", "term"
- and "definition" roles. -->
<div id="version-row">
<span class="label-column">&aboutTBUpdate.version;</span>
<span class="content"></span>
</div>
<div id="releasedate-row">
<span class="label-column">&aboutTBUpdate.releaseDate;</span>
<span class="content"></span>
</div>
<div id="fullinfo">
<p class="content">
&aboutTBUpdate.linkPrefix;<a id="infolink">&aboutTBUpdate.linkLabel;</a>&aboutTBUpdate.linkSuffix;
</p>
</div>
<section id="releasenotes">
<h2 class="label-column">&aboutTBUpdate.releaseNotes;</h2>
<div class="content"></div>
</section>
</body>
</html>
...@@ -55,11 +55,17 @@ ...@@ -55,11 +55,17 @@
class="subviewbutton" class="subviewbutton"
data-l10n-id="appmenuitem-new-private-window" data-l10n-id="appmenuitem-new-private-window"
key="key_privatebrowsing" key="key_privatebrowsing"
command="Tools:PrivateBrowsing"/> command="Tools:PrivateBrowsing"
hidden="true"/>
<toolbarseparator/> <toolbarseparator/>
<toolbarbutton id="appMenu-new-identity" <toolbarbutton id="appMenu-new-identity"
class="subviewbutton" class="subviewbutton"
key="new-identity-key"/> key="new-identity-key"/>
<toolbarbutton id="appMenuNewCircuit"
class="subviewbutton"
key="torbutton-new-circuit-key"
label="&torbutton.context_menu.new_circuit_sentence_case;"
oncommand="torbutton_new_circuit();"/>
<toolbarseparator/> <toolbarseparator/>
<toolbarbutton id="appMenu-bookmarks-button" <toolbarbutton id="appMenu-bookmarks-button"
class="subviewbutton subviewbutton-nav" class="subviewbutton subviewbutton-nav"
...@@ -179,7 +185,8 @@ ...@@ -179,7 +185,8 @@
<toolbarbutton id="appMenu-restoreSession" <toolbarbutton id="appMenu-restoreSession"
data-l10n-id="appmenu-restore-session" data-l10n-id="appmenu-restore-session"
class="subviewbutton" class="subviewbutton"
command="Browser:RestoreLastSession"/> command="Browser:RestoreLastSession"
hidden="true"/>
<toolbarseparator/> <toolbarseparator/>
<toolbarbutton id="appMenuClearRecentHistory" <toolbarbutton id="appMenuClearRecentHistory"
data-l10n-id="appmenu-clear-history" data-l10n-id="appmenu-clear-history"
......
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % torbuttonDTD SYSTEM "chrome://torbutton/locale/torbutton.dtd">
%torbuttonDTD;
<!ENTITY % aboutTorDTD SYSTEM "chrome://torbutton/locale/aboutTor.dtd">
%aboutTorDTD;
<!ENTITY % aboutDialogDTD SYSTEM "chrome://torbutton/locale/aboutDialog.dtd">
%aboutDialogDTD;
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
<menuseparator/> <menuseparator/>
<menuitem id="menu_newIdentity" <menuitem id="menu_newIdentity"
key="new-identity-key"/> key="new-identity-key"/>
<menuitem id="menu_newCircuit"
accesskey="&torbutton.context_menu.new_circuit_key;"
key="torbutton-new-circuit-key"
label="&torbutton.context_menu.new_circuit;"
oncommand="torbutton_new_circuit();"/>
<menuseparator/> <menuseparator/>
<menuitem id="menu_openLocation" <menuitem id="menu_openLocation"
hidden="true" hidden="true"
...@@ -456,8 +461,20 @@ ...@@ -456,8 +461,20 @@
<menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();"> <menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();">
<!-- Note: Items under here are cloned to the AppMenu Help submenu. The cloned items <!-- Note: Items under here are cloned to the AppMenu Help submenu. The cloned items
have their strings defined by appmenu-data-l10n-id. --> have their strings defined by appmenu-data-l10n-id. -->
<!-- dummy elements to avoid 'getElementById' errors -->
<box id="feedbackPage"/>
<box id="helpSafeMode"/>
<box id="menu_HelpPopup_reportPhishingtoolmenu"/>
<box id="menu_HelpPopup_reportPhishingErrortoolmenu"/>
<!-- Add Tor Browser manual link -->
<menuitem id="torBrowserUserManual"
oncommand="gBrowser.selectedTab = gBrowser.addTab('about:manual', {triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()});"
label="&aboutTor.torbrowser_user_manual.label;"
accesskey="&aboutTor.torbrowser_user_manual.accesskey;"/>
<!-- Bug 18905: Hide unused help menu items -->
<menuitem id="menu_openHelp" <menuitem id="menu_openHelp"
oncommand="openHelpLink('firefox-help')" oncommand="openHelpLink('firefox-help')"
hidden="true"
data-l10n-id="menu-get-help" data-l10n-id="menu-get-help"
appmenu-data-l10n-id="appmenu-get-help" appmenu-data-l10n-id="appmenu-get-help"
#ifdef XP_MACOSX #ifdef XP_MACOSX
...@@ -467,14 +484,17 @@ ...@@ -467,14 +484,17 @@
#endif #endif
<menuitem id="feedbackPage" <menuitem id="feedbackPage"
oncommand="openFeedbackPage()" oncommand="openFeedbackPage()"
data-l10n-id="menu-help-share-ideas" hidden="true"
appmenu-data-l10n-id="appmenu-help-share-ideas"/> data-l10n-id="menu-help-feedback-page"
appmenu-data-l10n-id="appmenu-help-feedback-page"/>
<menuitem id="helpSafeMode" <menuitem id="helpSafeMode"
oncommand="safeModeRestart();" oncommand="safeModeRestart();"
hidden="true"
data-l10n-id="menu-help-enter-troubleshoot-mode2" data-l10n-id="menu-help-enter-troubleshoot-mode2"
appmenu-data-l10n-id="appmenu-help-enter-troubleshoot-mode2"/> appmenu-data-l10n-id="appmenu-help-enter-troubleshoot-mode2"/>
<menuitem id="troubleShooting" <menuitem id="troubleShooting"
oncommand="openTroubleshootingPage()" oncommand="openTroubleshootingPage()"
hidden="true"
data-l10n-id="menu-help-more-troubleshooting-info" data-l10n-id="menu-help-more-troubleshooting-info"
appmenu-data-l10n-id="appmenu-help-more-troubleshooting-info"/> appmenu-data-l10n-id="appmenu-help-more-troubleshooting-info"/>
<menuitem id="help_reportSiteIssue" <menuitem id="help_reportSiteIssue"
......
...@@ -389,4 +389,5 @@ ...@@ -389,4 +389,5 @@
internal="true"/> internal="true"/>
#endif #endif
<key id="new-identity-key" modifiers="accel shift" key="U" oncommand="NewIdentityButton.onCommand(event)"/> <key id="new-identity-key" modifiers="accel shift" key="U" oncommand="NewIdentityButton.onCommand(event)"/>
<key id="torbutton-new-circuit-key" modifiers="accel shift" key="L" oncommand="torbutton_new_circuit()"/>
</keyset> </keyset>
...@@ -139,6 +139,12 @@ var gIdentityHandler = { ...@@ -139,6 +139,12 @@ var gIdentityHandler = {
); );
}, },
get _uriIsOnionHost() {
return this._uriHasHost
? this._uri.host.toLowerCase().endsWith(".onion")
: false;
},
get _isAboutNetErrorPage() { get _isAboutNetErrorPage() {
let { documentURI } = gBrowser.selectedBrowser; let { documentURI } = gBrowser.selectedBrowser;
return documentURI?.scheme == "about" && documentURI.filePath == "neterror"; return documentURI?.scheme == "about" && documentURI.filePath == "neterror";
...@@ -737,9 +743,9 @@ var gIdentityHandler = { ...@@ -737,9 +743,9 @@ var gIdentityHandler = {
get pointerlockFsWarningClassName() { get pointerlockFsWarningClassName() {
// Note that the fullscreen warning does not handle _isSecureInternalUI. // Note that the fullscreen warning does not handle _isSecureInternalUI.
if (this._uriHasHost && this._isSecureConnection) { if (this._uriHasHost && this._isSecureConnection) {
return "verifiedDomain"; return this._uriIsOnionHost ? "onionVerifiedDomain" : "verifiedDomain";
} }
return "unknownIdentity"; return this._uriIsOnionHost ? "onionUnknownIdentity" : "unknownIdentity";
}, },
/** /**
...@@ -747,12 +753,18 @@ var gIdentityHandler = { ...@@ -747,12 +753,18 @@ var gIdentityHandler = {
* built-in (returns false) or imported (returns true). * built-in (returns false) or imported (returns true).
*/ */
_hasCustomRoot() { _hasCustomRoot() {
if (!this._secInfo) {
return false;
}
let issuerCert = null; let issuerCert = null;
issuerCert = this._secInfo.succeededCertChain[ issuerCert = this._secInfo.succeededCertChain[
this._secInfo.succeededCertChain.length - 1 this._secInfo.succeededCertChain.length - 1
]; ];
if (issuerCert) {
return !issuerCert.isBuiltInRoot; return !issuerCert.isBuiltInRoot;
}
return false;
}, },
/** /**
...@@ -789,11 +801,17 @@ var gIdentityHandler = { ...@@ -789,11 +801,17 @@ var gIdentityHandler = {
"identity.extension.label", "identity.extension.label",
[extensionName] [extensionName]
); );
} else if (this._uriHasHost && this._isSecureConnection) { } else if (this._uriHasHost && this._isSecureConnection && this._secInfo) {
// This is a secure connection. // This is a secure connection.
this._identityBox.className = "verifiedDomain"; // _isSecureConnection implicitly includes onion services, which may not have an SSL certificate
const uriIsOnionHost = this._uriIsOnionHost;
this._identityBox.className = uriIsOnionHost
? "onionVerifiedDomain"
: "verifiedDomain";
if (this._isMixedActiveContentBlocked) { if (this._isMixedActiveContentBlocked) {
this._identityBox.classList.add("mixedActiveBlocked"); this._identityBox.classList.add(
uriIsOnionHost ? "onionMixedActiveBlocked" : "mixedActiveBlocked"
);
} }
if (!this._isCertUserOverridden) { if (!this._isCertUserOverridden) {
// It's a normal cert, verifier is the CA Org. // It's a normal cert, verifier is the CA Org.
...@@ -804,17 +822,27 @@ var gIdentityHandler = { ...@@ -804,17 +822,27 @@ var gIdentityHandler = {
} }
} else if (this._isBrokenConnection) { } else if (this._isBrokenConnection) {
// This is a secure connection, but something is wrong. // This is a secure connection, but something is wrong.
this._identityBox.className = "unknownIdentity"; const uriIsOnionHost = this._uriIsOnionHost;
this._identityBox.className = uriIsOnionHost
? "onionUnknownIdentity"
: "unknownIdentity";
if (this._isMixedActiveContentLoaded) { if (this._isMixedActiveContentLoaded) {
this._identityBox.classList.add("mixedActiveContent"); this._identityBox.classList.add(
uriIsOnionHost ? "onionMixedActiveContent" : "mixedActiveContent"
);
} else if (this._isMixedActiveContentBlocked) { } else if (this._isMixedActiveContentBlocked) {
this._identityBox.classList.add( this._identityBox.classList.add(
"mixedDisplayContentLoadedActiveBlocked" uriIsOnionHost
? "onionMixedDisplayContentLoadedActiveBlocked"
: "mixedDisplayContentLoadedActiveBlocked"
); );
} else if (this._isMixedPassiveContentLoaded) { } else if (this._isMixedPassiveContentLoaded) {
this._identityBox.classList.add("mixedDisplayContent"); this._identityBox.classList.add(
uriIsOnionHost ? "onionMixedDisplayContent" : "mixedDisplayContent"
);
} else { } else {
// TODO: ignore weak https cipher for onionsites?
this._identityBox.classList.add("weakCipher"); this._identityBox.classList.add("weakCipher");
} }
} else if (this._isCertErrorPage) { } else if (this._isCertErrorPage) {
...@@ -830,8 +858,10 @@ var gIdentityHandler = { ...@@ -830,8 +858,10 @@ var gIdentityHandler = {
// Network errors and blocked pages get a more neutral icon // Network errors and blocked pages get a more neutral icon
this._identityBox.className = "unknownIdentity"; this._identityBox.className = "unknownIdentity";
} else if (this._isPotentiallyTrustworthy) { } else if (this._isPotentiallyTrustworthy) {
// This is a local resource (and shouldn't be marked insecure). // This is a local resource or an onion site (and shouldn't be marked insecure).
this._identityBox.className = "localResource"; this._identityBox.className = this._uriIsOnionHost
? "onionUnknownIdentity"
: "localResource";
} else { } else {
// This is an insecure connection. // This is an insecure connection.
let warnOnInsecure = let warnOnInsecure =
...@@ -855,7 +885,10 @@ var gIdentityHandler = { ...@@ -855,7 +885,10 @@ var gIdentityHandler = {
} }
if (this._isCertUserOverridden) { if (this._isCertUserOverridden) {
this._identityBox.classList.add("certUserOverridden"); const uriIsOnionHost = this._uriIsOnionHost;
this._identityBox.classList.add(
uriIsOnionHost ? "onionCertUserOverridden" : "certUserOverridden"
);
// Cert is trusted because of a security exception, verifier is a special string. // Cert is trusted because of a security exception, verifier is a special string.
tooltip = gNavigatorBundle.getString( tooltip = gNavigatorBundle.getString(
"identity.identified.verified_by_you" "identity.identified.verified_by_you"
......
...@@ -48,6 +48,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { ...@@ -48,6 +48,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
NetUtil: "resource://gre/modules/NetUtil.jsm", NetUtil: "resource://gre/modules/NetUtil.jsm",
NewTabUtils: "resource://gre/modules/NewTabUtils.jsm", NewTabUtils: "resource://gre/modules/NewTabUtils.jsm",
OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.jsm", OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.jsm",
OnionLocationParent: "resource:///modules/OnionLocationParent.jsm",
PageActions: "resource:///modules/PageActions.jsm", PageActions: "resource:///modules/PageActions.jsm",
PageThumbs: "resource://gre/modules/PageThumbs.jsm", PageThumbs: "resource://gre/modules/PageThumbs.jsm",
PanelMultiView: "resource:///modules/PanelMultiView.jsm", PanelMultiView: "resource:///modules/PanelMultiView.jsm",
...@@ -79,6 +80,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { ...@@ -79,6 +80,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
TabModalPrompt: "chrome://global/content/tabprompts.jsm", TabModalPrompt: "chrome://global/content/tabprompts.jsm",
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm", TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.jsm", TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.jsm",
TorConnect: "resource:///modules/TorConnect.jsm",
Translation: "resource:///modules/translation/TranslationParent.jsm", Translation: "resource:///modules/translation/TranslationParent.jsm",
UITour: "resource:///modules/UITour.jsm", UITour: "resource:///modules/UITour.jsm",
UpdateUtils: "resource://gre/modules/UpdateUtils.jsm", UpdateUtils: "resource://gre/modules/UpdateUtils.jsm",
...@@ -233,6 +235,11 @@ XPCOMUtils.defineLazyScriptGetter( ...@@ -233,6 +235,11 @@ XPCOMUtils.defineLazyScriptGetter(
["NewIdentityButton"], ["NewIdentityButton"],
"chrome://browser/content/newidentity.js" "chrome://browser/content/newidentity.js"
); );
XPCOMUtils.defineLazyScriptGetter(
this,
["OnionAuthPrompt"],
"chrome://browser/content/onionservices/authPrompt.js"
);
XPCOMUtils.defineLazyScriptGetter( XPCOMUtils.defineLazyScriptGetter(
this, this,
"gEditItemOverlay", "gEditItemOverlay",
...@@ -645,6 +652,8 @@ var gPageIcons = { ...@@ -645,6 +652,8 @@ var gPageIcons = {
}; };
var gInitialPages = [ var gInitialPages = [
"about:tor",
"about:torconnect",
"about:blank", "about:blank",
"about:home", "about:home",
...(AppConstants.NIGHTLY_BUILD ? ["about:firefoxview"] : []), ...(AppConstants.NIGHTLY_BUILD ? ["about:firefoxview"] : []),
...@@ -655,6 +664,10 @@ var gInitialPages = [ ...@@ -655,6 +664,10 @@ var gInitialPages = [
"about:welcomeback", "about:welcomeback",
]; ];
if (AppConstants.TOR_BROWSER_UPDATE) {
gInitialPages.push("about:tbupdate");
}
function isInitialPage(url) { function isInitialPage(url) {
if (!(url instanceof Ci.nsIURI)) { if (!(url instanceof Ci.nsIURI)) {
try { try {
...@@ -1788,6 +1801,9 @@ var gBrowserInit = { ...@@ -1788,6 +1801,9 @@ var gBrowserInit = {
// Init the NewIdentityButton // Init the NewIdentityButton
NewIdentityButton.init(); NewIdentityButton.init();
// Init the OnionAuthPrompt
OnionAuthPrompt.init();
// Certain kinds of automigration rely on this notification to complete // Certain kinds of automigration rely on this notification to complete
// their tasks BEFORE the browser window is shown. SessionStore uses it to // their tasks BEFORE the browser window is shown. SessionStore uses it to
// restore tabs into windows AFTER important parts like gMultiProcessBrowser // restore tabs into windows AFTER important parts like gMultiProcessBrowser
...@@ -1873,6 +1889,8 @@ var gBrowserInit = { ...@@ -1873,6 +1889,8 @@ var gBrowserInit = {
} }
this._loadHandled = true; this._loadHandled = true;
TorBootstrapUrlbar.init();
}, },
_cancelDelayedStartup() { _cancelDelayedStartup() {
...@@ -2420,32 +2438,48 @@ var gBrowserInit = { ...@@ -2420,32 +2438,48 @@ var gBrowserInit = {
let defaultArgs = BrowserHandler.defaultArgs; let defaultArgs = BrowserHandler.defaultArgs;
// If the given URI is different from the homepage, we want to load it. // figure out which URI to actually load (or a Promise to get the uri)
if (uri != defaultArgs) { uri = (aUri => {
AboutNewTab.noteNonDefaultStartup(); // If the given URI is different from the homepage, we want to load it.
if (aUri != defaultArgs) {
AboutNewTab.noteNonDefaultStartup();
if (aUri instanceof Ci.nsIArray) {
// Transform the nsIArray of nsISupportsString's into a JS Array of
// JS strings.
return Array.from(
aUri.enumerate(Ci.nsISupportsString),
supportStr => supportStr.data
);
} else if (aUri instanceof Ci.nsISupportsString) {
return aUri.data;
}
return aUri;
}
if (uri instanceof Ci.nsIArray) { // The URI appears to be the the homepage. We want to load it only if
// Transform the nsIArray of nsISupportsString's into a JS Array of // session restore isn't about to override the homepage.
// JS strings. let willOverride = SessionStartup.willOverrideHomepage;
return Array.from( if (typeof willOverride == "boolean") {
uri.enumerate(Ci.nsISupportsString), return willOverride ? null : uri;
supportStr => supportStr.data
);
} else if (uri instanceof Ci.nsISupportsString) {
return uri.data;
} }
return uri; return willOverride.then(willOverrideHomepage =>
} willOverrideHomepage ? null : uri
);
})(uri);
// if using TorConnect, convert these uris to redirects
if (TorConnect.shouldShowTorConnect) {
return Promise.resolve(uri).then(aUri => {
if (aUri == null) {
aUri = [];
}
// The URI appears to be the the homepage. We want to load it only if aUri = TorConnect.getURIsToLoad(aUri);
// session restore isn't about to override the homepage. return aUri;
let willOverride = SessionStartup.willOverrideHomepage; });
if (typeof willOverride == "boolean") {
return willOverride ? null : uri;
} }
return willOverride.then(willOverrideHomepage => return uri;
willOverrideHomepage ? null : uri
);
})()); })());
}, },
...@@ -2512,6 +2546,10 @@ var gBrowserInit = { ...@@ -2512,6 +2546,10 @@ var gBrowserInit = {
NewIdentityButton.uninit(); NewIdentityButton.uninit();
OnionAuthPrompt.uninit();
TorBootstrapUrlbar.uninit();
gAccessibilityServiceIndicator.uninit(); gAccessibilityServiceIndicator.uninit();
if (gToolbarKeyNavEnabled) { if (gToolbarKeyNavEnabled) {
...@@ -5483,6 +5521,7 @@ var XULBrowserWindow = { ...@@ -5483,6 +5521,7 @@ var XULBrowserWindow = {
CFRPageActions.updatePageActions(gBrowser.selectedBrowser); CFRPageActions.updatePageActions(gBrowser.selectedBrowser);
AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser); AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser);
OnionLocationParent.updateOnionLocationBadge(gBrowser.selectedBrowser);
if (!gMultiProcessBrowser) { if (!gMultiProcessBrowser) {
// Bug 1108553 - Cannot rotate images with e10s // Bug 1108553 - Cannot rotate images with e10s
...@@ -6002,6 +6041,16 @@ var CombinedStopReload = { ...@@ -6002,6 +6041,16 @@ var CombinedStopReload = {
var TabsProgressListener = { var TabsProgressListener = {
onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
// Clear OnionLocation UI
if (
aStateFlags & Ci.nsIWebProgressListener.STATE_START &&
aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK &&
aRequest &&
aWebProgress.isTopLevel
) {
OnionLocationParent.onStateChange(aBrowser);
}
// Collect telemetry data about tab load times. // Collect telemetry data about tab load times.
if ( if (
aWebProgress.isTopLevel && aWebProgress.isTopLevel &&
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
override rules using selectors with the same specificity. This applies to override rules using selectors with the same specificity. This applies to
both "content" and "skin" packages, which bug 1385444 will unify later. --> both "content" and "skin" packages, which bug 1385444 will unify later. -->
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://branding/content/tor-styles.css" type="text/css"?>
<!-- While these stylesheets are defined in Toolkit, they are only used in the <!-- While these stylesheets are defined in Toolkit, they are only used in the
main browser window, so we can load them here. Bug 1474241 is on file to main browser window, so we can load them here. Bug 1474241 is on file to
...@@ -35,6 +36,13 @@ ...@@ -35,6 +36,13 @@
<?xml-stylesheet href="chrome://browser/skin/searchbar.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/skin/searchbar.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css" type="text/css"?>
<?xml-stylesheet href="chrome://torbutton/skin/tor-circuit-display.css" type="text/css"?>
<?xml-stylesheet href="chrome://torbutton/skin/torbutton.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/onionservices/onionservices.css" type="text/css"?>
<!DOCTYPE window [
#include browser-doctype.inc
]>
<html id="main-window" <html id="main-window"
xmlns:html="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"
...@@ -116,11 +124,19 @@ ...@@ -116,11 +124,19 @@
Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this); Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this); Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this); Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this);
Services.scriptloader.loadSubScript("chrome://torbutton/content/tor-circuit-display.js", this);
Services.scriptloader.loadSubScript("chrome://torbutton/content/torbutton.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/torconnect/torBootstrapUrlbar.js", this);
window.onload = gBrowserInit.onLoad.bind(gBrowserInit); window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
window.onunload = gBrowserInit.onUnload.bind(gBrowserInit); window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);
window.onclose = WindowIsClosing; window.onclose = WindowIsClosing;
//onLoad Handler
try {
window.addEventListener("load", torbutton_init, false);
} catch (e) {}
window.addEventListener("MozBeforeInitialXULLayout", window.addEventListener("MozBeforeInitialXULLayout",
gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true }); gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true });
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */ * You can obtain one at http://mozilla.org/MPL/2.0/. */
/* eslint-env mozilla/frame-script */ /* eslint-env mozilla/frame-script */
/* import-globals-from ../../components/onionservices/content/netError/onionNetError.js */
import "chrome://global/content/certviewer/pvutils_bundle.js"; import "chrome://global/content/certviewer/pvutils_bundle.js";
import "chrome://global/content/certviewer/asn1js_bundle.js"; import "chrome://global/content/certviewer/asn1js_bundle.js";
...@@ -230,7 +231,7 @@ function setErrorPageStrings(err) { ...@@ -230,7 +231,7 @@ function setErrorPageStrings(err) {
document.l10n.setAttributes(titleElement, title); document.l10n.setAttributes(titleElement, title);
} }
function initPage() { async function initPage() {
// We show an offline support page in case of a system-wide error, // We show an offline support page in case of a system-wide error,
// when a user cannot connect to the internet and access the SUMO website. // when a user cannot connect to the internet and access the SUMO website.
// For example, clock error, which causes certerrors across the web or // For example, clock error, which causes certerrors across the web or
...@@ -253,6 +254,16 @@ function initPage() { ...@@ -253,6 +254,16 @@ function initPage() {
document.body.classList.add("blocked"); document.body.classList.add("blocked");
} }
// proxyConnectFailure because no-tor running daemon would return this error
if (
err === "proxyConnectFailure" &&
(await RPMSendQuery("ShouldShowTorConnect"))
) {
// pass orginal destination as redirect param
const encodedRedirect = encodeURIComponent(document.location.href);
document.location.replace(`about:torconnect?redirect=${encodedRedirect}`);
}
// Only worry about captive portals if this is a cert error. // Only worry about captive portals if this is a cert error.
let showCaptivePortalUI = isCaptive() && gIsCertError; let showCaptivePortalUI = isCaptive() && gIsCertError;
if (showCaptivePortalUI) { if (showCaptivePortalUI) {
...@@ -281,7 +292,10 @@ function initPage() { ...@@ -281,7 +292,10 @@ function initPage() {
errDesc = document.getElementById("ed_generic"); errDesc = document.getElementById("ed_generic");
} }
setErrorPageStrings(err); const isOnionError = err.startsWith("onionServices.");
if (!isOnionError) {
setErrorPageStrings(err);
}
var sd = document.getElementById("errorShortDescText"); var sd = document.getElementById("errorShortDescText");
if (sd) { if (sd) {
...@@ -408,6 +422,10 @@ function initPage() { ...@@ -408,6 +422,10 @@ function initPage() {
span.textContent = HOST_NAME; span.textContent = HOST_NAME;
} }
} }
if (isOnionError) {
OnionServicesAboutNetError.initPage(document);
}
} }
function setupBlockingReportingUI() { function setupBlockingReportingUI() {
......
...@@ -203,5 +203,6 @@ ...@@ -203,5 +203,6 @@
</div> </div>
</body> </body>
<script src="chrome://browser/content/certerror/aboutNetErrorCodes.js"/> <script src="chrome://browser/content/certerror/aboutNetErrorCodes.js"/>
<script src="chrome://browser/content/onionservices/netError/onionNetError.js"/>
<script type="module" src="chrome://browser/content/certerror/aboutNetError.js"/> <script type="module" src="chrome://browser/content/certerror/aboutNetError.js"/>
</html> </html>
#filter substitution #filter substitution
#define mozilla_icon data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E %3Cpath d='M0 0h16v16H0z'/%3E %3Cpath d='M13.994 10.356H15V12h-3.171V7.741c0-1.308-.435-1.81-1.29-1.81-1.04 0-1.46.737-1.46 1.8v2.63h1.006V12H6.918V7.741c0-1.308-.435-1.81-1.291-1.81-1.039 0-1.459.737-1.459 1.8v2.63h1.441V12H1v-1.644h1.006V6.079H1V4.435h3.168v1.139a2.507 2.507 0 0 1 2.3-1.29A2.452 2.452 0 0 1 8.931 5.91 2.535 2.535 0 0 1 11.4 4.284 2.448 2.448 0 0 1 14 6.9v3.458z' fill='%23fff'/%3E %3C/svg%3E #define onion_icon data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8AOwAUDSQAD2QRAA2ZDQAFyw4ABssjAAuQKAAPZAAcAAn///8A////AP///wD///8A////AP///wD///8AIwAMFmtcZP89NDr/TkRJ/ykhJ/8kIij/KAUV/yoAD/9CHy3/EwAMKf///wD///8A////AP///wD///8AHAAACUw4Qf98cnn//Pz8/9TM1/9dPl3/IBYg/y0fKf9bCzT/NQAX/zoeKP8AAAAE////AP///wD///8A////ACgADSYvJSv/2d/h/+Hd4v9sP17/xsHN/1A3Tf8lGSD/YxM9/2sVRP80DB7/Ty44bv///wD///8A////AP///wAwAAUwSERJ/+jx8v/Xx9P/YDVS/7y+zP9BKEH/LiUs/2ceRf91JFT/Ngke/yYACVj///8A////AP///wD///8ANwAJHFNNUv/h6+z/9PD0/31Zev+GeJL/Rj5X/zAjK/9zL1f/ezFd/y0NGv8mAA42////AP///wD///8A////AFUAAAMVAAqge4GF//v8/P/x7/L/hHCN/1NVbf87KDP/g0Fq/14pSP9PLz3/AAAABP///wD///8A////AP///wD///8AOQAcCQcACpWcoqX/+/39/7PJ0v9oeYn/Ry89/5BVff8+IC//IAANKP///wD///8A////AP///wD///8A////AP///wBGABcLCgAHmXFucv/G4eb/SUhS/109UP9WOkf/WEJIhf///wD///8A////AP///wD///8A////AP///wD///8A////AFUAKgYZAAiGRkNJ/0IyO/9XQkj/KQAIHzMAAAX///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AMwANFFxMU/9WQEr/PgAMKf///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AD4AFyFWUln/OW5Y/wCobmQAqnEJ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wCZAGYFQpF3hQteOv8AiVGpGb2BbP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAD//wMAjF2oB35N8gClYpcAuHEk////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AANOEHQCvdn8ArGipALJshwC4ezb///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAA/78IANmXNgDFgyMAv4AM////AP///wD///8A//8AAPAPAADgBwAA4AcAAOAHAADgBwAA8AcAAPgPAAD8HwAA/j8AAP5/AAD+fwAA/38AAP//AAD//wAA//8AAA==
#define firefox_icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAHY0lEQVR4Aa3VA5RrSdfG8f+uOidJp/umczm2ffFhbNvG9722bdv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rcFqQMG+ngIK6oKyykLwqAyMjeXZwiUjgtKD+yGMIwyGzmoGBTAs4hcXrgObgi4OiVkpCiUtYov7YU5wW1B194t0ww69ldvjktYouwWRYIGdkQ1Q+iJ28hp2Xn7B5zKzIPAlNw6S52wlbkL3mJJecOq+CBqeIJC6TjUJTMlcdz9lwLmriSuPgJBVbj/D+5SSXRequQVhNN4nIoEJhV77jKgs7B6bprJw85XtuU8GCpNlbSS3gSA4ii4QiTAvElDWpWeH41kxg5eZDSypUrtFKd1zTcA1EpHRDS5rUyQEts+VN7JjYOGR0TWhY6RdsOhc/Y9NoswUJjVoAAE+h555Rgcg2AAAAAElFTkSuQmCC
#define addon_icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABOFBMVEUAAAAAzdwAydcAyNgA//8AzOYAydcAyNgAyNgA2NgAytoAzNkAytgAydgA29sA0egAyNgAyNgA//8AyNgAydgA//8Ay9cAydcAytkAz90Ay9gA1eoAydgAytsAyNgAytgAydkAydgAydgAyNgAydgAyNcAy9oAydgA//8AytsAy9kAytkAyNgAydgAydkAy9kAzP8AydgAydgAydgAz98AzN0AyNcAyNsAydcAydgAydgAydcAytgAytcAydcAydcAytcAydcAyNcAydcAy9gAztgAydcAydgAzOAAydcAyNgAyNgAytwAyNcAyNgAy9wAyNcAyNcAyNgAydgAyNcAydcAydgA0uEAydkAyNgAyeQA4+MAyNgAydkAzN0AyNsA1f8AyNgAydgAydcA1eMAydgAydcAyNdj6PGJAAAAZ3RSTlMAJFpBAQqm8qwNPiiPygcLv8QEw5cDQMA1JU4MwiuDbl/+6+m4+0XLAj9KePz9cjYFvervEA/IDsfFr+xcgeaOYIDo+ica1OMZ9bXlHe73LM3M35itxs8Rf5ATCbFeHjgGttC5ErzO3WvwaAAAAWxJREFUOMt9kudCwkAQhFcITQWCoaggiBqxoaixYUVsYMMGCmLXff838LIXCJAL84fvmCHsTg4AYMDhlIDkcnu8Po4w6BjiIA0joj+gY1BmGKLEiMIwHNFR9xGjuh8jpMQoYZjRGBGOA8QTHDEUB4hynABwcEqCT8GW2DNSnCYBnJzSoSk0NT2jcphlM/rRXpk5NkRgfmFxSWBml6MrOWNlWBUEEmDKtyYIrGttP66gSP4Nww8mUKzNLd5/zHaJbb1Tl9xnzR2WcGM/5QE8BLvJvf0Dc4HDo8IxUVECL5Vywv7s9Mzwz/WLcFHSsWy8w0sa9+qa/JtbOlUY3mnGLbjnCz9Q4JEfnhCrNb5nXi3w754p8MIPKVWpt6psGJ+vFJBbBUO3GlozzYdsSmCV1NlntiTnegNvPQ29Wx7h7fKrEUvg47PD/6oLpgh8m7//AZEav4b/J/bbb75SAzvR3crY+6y8fLGsQV9ZSvwHF4LQIhDjT+8AAAAASUVORK5CYII=
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this - License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE NETSCAPE-Bookmark-file-1> <!DOCTYPE NETSCAPE-Bookmark-file-1>
<html> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<head> <TITLE>Bookmarks</TITLE>
<meta charset="UTF-8"> <H1>Bookmarks</H1>
<!-- These localization links are not automatically applied to any XHR
response body and must be applied manually as well. They are included
so that viewing the file directly shows the results. -->
<link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/profile/default-bookmarks.ftl"/>
<title data-l10n-id="default-bookmarks-title">default-bookmarks-title</title>
</head>
<body>
<h1 data-l10n-id="default-bookmarks-heading">default-bookmarks-heading</h1>
<dl><p> <DL><p>
<dt><h3 personal_toolbar_folder="true" data-l10n-id="default-bookmarks-toolbarfolder">default-bookmarks-toolbarfolder</h3></dt> <DT><H3>Tor Project Bookmarks</H3>
<dd data-l10n-id="default-bookmarks-toolbarfolder-description">default-bookmarks-toolbarfolder-description</dd> <DD>Helpful bookmarks from the Tor Project
#ifndef NIGHTLY_BUILD <DL><p>
<dl><p> <DT><A HREF="http://2gzyxa5ihm7nsggfxnu52rck2vv4rvmdlkiu3zzui5du4xyclen53wid.onion/" ICON="@onion_icon@">Learn more about Tor</A>
<dt><a href="https://www.mozilla.org/firefox/central/" icon="@firefox_icon@" data-l10n-id="default-bookmarks-getting-started">default-bookmarks-getting-started</a></dt> <DT><A HREF="http://pzhdfe7jraknpj2qgu5cz2u3i4deuyfwmonvzu5i3nyw4t4bmg7o5pad.onion/" ICON="@onion_icon@">The Tor Blog</A>
</dl><p> <DT><A HREF="http://rzuwtpc4wb3xdzrj3yeajsvm3fkq4vbeubm2tdxaqruzzzgs5dwemlad.onion/" ICON="@onion_icon@">Tor Support portal - Get help</A>
<dt><h3 data-l10n-id="default-bookmarks-firefox-heading">default-bookmarks-firefox-heading</h3></dt> <DT><A HREF="about:manual" ICON="@onion_icon@">Tor Browser Manual</A>
<dl><p> <DT><A HREF="http://xmrhfasfg5suueegrnc4gsgyi2tyclcy5oz7f5drnrodmdtob6t2ioyd.onion/" ICON="@onion_icon@">Tor Community - Get Involved</A>
<dt><a href="https://support.mozilla.org/products/firefox" icon="@firefox_icon@" data-l10n-id="default-bookmarks-firefox-get-help">default-bookmarks-firefox-get-help</a></dt> <DT><A HREF="https://donate.torproject.org/" ICON="@onion_icon@">Donate - Keep Tor Strong</A>
<dt><a href="https://support.mozilla.org/kb/customize-firefox-controls-buttons-and-toolbars?utm_source=firefox-browser&utm_medium=default-bookmarks&utm_campaign=customize" icon="@firefox_icon@" data-l10n-id="default-bookmarks-firefox-customize">default-bookmarks-firefox-customize</a></dt> <DT><A HREF="http://yq5jjvr7drkjrelzhut7kgclfuro65jjlivyzfmxiq2kyv5lickrl4qd.onion/" ICON="@onion_icon@">Circumvent Censorship, Get Bridges</A>
<dt><a href="https://www.mozilla.org/contribute/" icon="@mozilla_icon@" data-l10n-id="default-bookmarks-firefox-community">default-bookmarks-firefox-community</a></dt> </DL><p>
<dt><a href="https://www.mozilla.org/about/" icon="@mozilla_icon@" data-l10n-id="default-bookmarks-firefox-about">default-bookmarks-firefox-about</a></dt> <HR>
</dl><p> </DL><p>
#else
<dl><p>
<dt><a href="https://www.mozilla.org/contribute/" icon="@mozilla_icon@" data-l10n-id="default-bookmarks-firefox-community">default-bookmarks-firefox-community</a></dt>
</dl><p>
<dt><h3 data-l10n-id="default-bookmarks-nightly-heading">default-bookmarks-nightly-heading</h3></dt>
<dl><p>
<dt><a href="https://blog.nightly.mozilla.org/" icon="@mozilla_icon@" data-l10n-id="default-bookmarks-nightly-blog">default-bookmarks-nightly-blog</a></dt>
<dt><a href="https://bugzilla.mozilla.org/" icon="@bugzilla_icon@" shortcuturl="bz" data-l10n-id="default-bookmarks-bugzilla">default-bookmarks-bugzilla</a></dt>
<dt><a href="https://developer.mozilla.org/" icon="@mdn_icon@" shortcuturl="mdn" data-l10n-id="default-bookmarks-mdn">default-bookmarks-mdn</a></dt>
<dt><a href="https://addons.mozilla.org/firefox/addon/nightly-tester-tools/" icon="@addon_icon@" data-l10n-id="default-bookmarks-nightly-tester-tools">default-bookmarks-nightly-tester-tools</a></dt>
<dt><a href="about:crashes" icon="@mozilla_icon@" data-l10n-id="default-bookmarks-crashes">default-bookmarks-crashes</a></dt>
<dt><a href="https://planet.mozilla.org/" icon="@mozilla_icon@" data-l10n-id="default-bookmarks-planet">default-bookmarks-planet</a></dt>
</dl><p>
#endif
</dl>
</body>
</html>
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
<?xml-stylesheet href="chrome://browser/skin/webRTC-menubar-indicator.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/skin/webRTC-menubar-indicator.css" type="text/css"?>
<!DOCTYPE window [
#include browser-doctype.inc
]>
<window id="main-window" <window id="main-window"
xmlns:html="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
......
...@@ -253,6 +253,7 @@ ...@@ -253,6 +253,7 @@
<toolbarbutton id="UITourTooltipClose" class="close-icon" <toolbarbutton id="UITourTooltipClose" class="close-icon"
data-l10n-id="ui-tour-info-panel-close"/> data-l10n-id="ui-tour-info-panel-close"/>
</hbox> </hbox>
<toolbarseparator id="UITourTooltipToolbarSeparator"/>
<description id="UITourTooltipDescription" flex="1"/> <description id="UITourTooltipDescription" flex="1"/>
</vbox> </vbox>
</hbox> </hbox>
...@@ -535,6 +536,7 @@ ...@@ -535,6 +536,7 @@
#include ../../components/downloads/content/downloadsPanel.inc.xhtml #include ../../components/downloads/content/downloadsPanel.inc.xhtml
#include ../../../devtools/startup/enableDevToolsPopup.inc.xhtml #include ../../../devtools/startup/enableDevToolsPopup.inc.xhtml
#include ../../components/securitylevel/content/securityLevelPanel.inc.xhtml #include ../../components/securitylevel/content/securityLevelPanel.inc.xhtml
#include ../../components/onionservices/content/authPopup.inc.xhtml
#include browser-allTabsMenu.inc.xhtml #include browser-allTabsMenu.inc.xhtml
<tooltip id="dynamic-shortcut-tooltip" <tooltip id="dynamic-shortcut-tooltip"
......
...@@ -259,6 +259,7 @@ ...@@ -259,6 +259,7 @@
data-l10n-id="urlbar-indexed-db-notification-anchor"/> data-l10n-id="urlbar-indexed-db-notification-anchor"/>
<image id="password-notification-icon" class="notification-anchor-icon" role="button" <image id="password-notification-icon" class="notification-anchor-icon" role="button"
data-l10n-id="urlbar-password-notification-anchor"/> data-l10n-id="urlbar-password-notification-anchor"/>
#include ../../components/onionservices/content/authNotificationIcon.inc.xhtml
<stack id="plugins-notification-icon" class="notification-anchor-icon" role="button" align="center" data-l10n-id="urlbar-plugins-notification-anchor"> <stack id="plugins-notification-icon" class="notification-anchor-icon" role="button" align="center" data-l10n-id="urlbar-plugins-notification-anchor">
<image class="plugin-icon" /> <image class="plugin-icon" />
<image id="plugin-icon-badge" /> <image id="plugin-icon-badge" />
...@@ -323,6 +324,7 @@ ...@@ -323,6 +324,7 @@
data-l10n-id="urlbar-go-button"/> data-l10n-id="urlbar-go-button"/>
<hbox id="page-action-buttons" context="pageActionContextMenu"> <hbox id="page-action-buttons" context="pageActionContextMenu">
<toolbartabstop/> <toolbartabstop/>
#include ../../components/torconnect/content/torconnect-urlbar.inc.xhtml
<hbox id="contextual-feature-recommendation" role="button" hidden="true"> <hbox id="contextual-feature-recommendation" role="button" hidden="true">
<hbox id="cfr-label-container"> <hbox id="cfr-label-container">
<label id="cfr-label"/> <label id="cfr-label"/>
...@@ -350,6 +352,9 @@ ...@@ -350,6 +352,9 @@
onclick="FullZoom.reset(); FullZoom.resetScalingZoom();" onclick="FullZoom.reset(); FullZoom.resetScalingZoom();"
tooltip="dynamic-shortcut-tooltip" tooltip="dynamic-shortcut-tooltip"
hidden="true"/> hidden="true"/>
#include ../../components/onionservices/content/onionlocation-urlbar.inc.xhtml
<hbox id="pageActionButton" <hbox id="pageActionButton"
class="urlbar-page-action" class="urlbar-page-action"
role="button" role="button"
...@@ -539,6 +544,11 @@ ...@@ -539,6 +544,11 @@
<toolbarbutton id="new-identity-button" class="toolbarbutton-1 chromeclass-toolbar-additional"/> <toolbarbutton id="new-identity-button" class="toolbarbutton-1 chromeclass-toolbar-additional"/>
<toolbarbutton id="new-circuit-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&torbutton.context_menu.new_circuit;"
oncommand="torbutton_new_circuit();"
tooltiptext="&torbutton.context_menu.new_circuit;"/>
<toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional" <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
observes="View:FullScreen" observes="View:FullScreen"
type="checkbox" type="checkbox"
......
...@@ -6,6 +6,12 @@ ...@@ -6,6 +6,12 @@
<?xml-stylesheet href="chrome://browser/content/pageinfo/pageInfo.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/content/pageinfo/pageInfo.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/pageInfo.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/skin/pageInfo.css" type="text/css"?>
<!DOCTYPE window [
#ifdef XP_MACOSX
#include ../browser-doctype.inc
#endif
]>
<window id="main-window" <window id="main-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"
......
...@@ -22,6 +22,11 @@ ChromeUtils.defineModuleGetter( ...@@ -22,6 +22,11 @@ ChromeUtils.defineModuleGetter(
"PluralForm", "PluralForm",
"resource://gre/modules/PluralForm.jsm" "resource://gre/modules/PluralForm.jsm"
); );
XPCOMUtils.defineLazyGetter(this, "gTorButtonBundle", function() {
return Services.strings.createBundle(
"chrome://torbutton/locale/torbutton.properties"
);
});
var security = { var security = {
async init(uri, windowInfo) { async init(uri, windowInfo) {
...@@ -60,6 +65,11 @@ var security = { ...@@ -60,6 +65,11 @@ var security = {
(Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT | (Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT |
Ci.nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT); Ci.nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT);
var isEV = ui.state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL; var isEV = ui.state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL;
var isOnion = false;
const hostName = this.windowInfo.hostName;
if (hostName && hostName.endsWith(".onion")) {
isOnion = true;
}
let retval = { let retval = {
cAName: "", cAName: "",
...@@ -69,6 +79,7 @@ var security = { ...@@ -69,6 +79,7 @@ var security = {
isBroken, isBroken,
isMixed, isMixed,
isEV, isEV,
isOnion,
cert: null, cert: null,
certificateTransparency: null, certificateTransparency: null,
}; };
...@@ -107,6 +118,7 @@ var security = { ...@@ -107,6 +118,7 @@ var security = {
isBroken, isBroken,
isMixed, isMixed,
isEV, isEV,
isOnion,
cert, cert,
certChain: certChainArray, certChain: certChainArray,
certificateTransparency: undefined, certificateTransparency: undefined,
...@@ -348,13 +360,31 @@ async function securityOnLoad(uri, windowInfo) { ...@@ -348,13 +360,31 @@ async function securityOnLoad(uri, windowInfo) {
} }
msg2 = pkiBundle.getString("pageInfo_Privacy_None2"); msg2 = pkiBundle.getString("pageInfo_Privacy_None2");
} else if (info.encryptionStrength > 0) { } else if (info.encryptionStrength > 0) {
hdr = pkiBundle.getFormattedString( if (!info.isOnion) {
"pageInfo_EncryptionWithBitsAndProtocol", hdr = pkiBundle.getFormattedString(
[info.encryptionAlgorithm, info.encryptionStrength + "", info.version] "pageInfo_EncryptionWithBitsAndProtocol",
); [info.encryptionAlgorithm, info.encryptionStrength + "", info.version]
);
} else {
try {
hdr = gTorButtonBundle.formatStringFromName(
"pageInfo_OnionEncryptionWithBitsAndProtocol",
[info.encryptionAlgorithm, info.encryptionStrength + "", info.version]
);
} catch (err) {
hdr =
"Connection Encrypted (Onion Service, " +
info.encryptionAlgorithm +
", " +
info.encryptionStrength +
" bit keys, " +
info.version +
")";
}
}
msg1 = pkiBundle.getString("pageInfo_Privacy_Encrypted1"); msg1 = pkiBundle.getString("pageInfo_Privacy_Encrypted1");
msg2 = pkiBundle.getString("pageInfo_Privacy_Encrypted2"); msg2 = pkiBundle.getString("pageInfo_Privacy_Encrypted2");
} else { } else if (!info.isOnion) {
hdr = pkiBundle.getString("pageInfo_NoEncryption"); hdr = pkiBundle.getString("pageInfo_NoEncryption");
if (windowInfo.hostName != null) { if (windowInfo.hostName != null) {
msg1 = pkiBundle.getFormattedString("pageInfo_Privacy_None1", [ msg1 = pkiBundle.getFormattedString("pageInfo_Privacy_None1", [
...@@ -364,6 +394,15 @@ async function securityOnLoad(uri, windowInfo) { ...@@ -364,6 +394,15 @@ async function securityOnLoad(uri, windowInfo) {
msg1 = pkiBundle.getString("pageInfo_Privacy_None4"); msg1 = pkiBundle.getString("pageInfo_Privacy_None4");
} }
msg2 = pkiBundle.getString("pageInfo_Privacy_None2"); msg2 = pkiBundle.getString("pageInfo_Privacy_None2");
} else {
try {
hdr = gTorButtonBundle.GetStringFromName("pageInfo_OnionEncryption");
} catch (err) {
hdr = "Connection Encrypted (Onion Service)";
}
msg1 = pkiBundle.getString("pageInfo_Privacy_Encrypted1");
msg2 = pkiBundle.getString("pageInfo_Privacy_Encrypted2");
} }
setText("security-technical-shortform", hdr); setText("security-technical-shortform", hdr);
setText("security-technical-longform1", msg1); setText("security-technical-longform1", msg1);
......
...@@ -166,3 +166,17 @@ ...@@ -166,3 +166,17 @@
</vbox> </vbox>
</popupnotificationfooter> </popupnotificationfooter>
</popupnotification> </popupnotification>
<popupnotification id="crypto-safety-warning-notification" hidden="true">
<popupnotificationcontent orient="vertical">
<description id="crypto-safety-warning-notification-desc"/>
<html:div id="crypto-safety-warning-notification-what-can">
<html:strong id="crypto-safety-warning-notification-what-can-heading" />
<html:br/>
<html:span id="crypto-safety-warning-notification-what-can-body" />
</html:div>
<label id="crypto-safety-warning-notification-learnmore"
class="popup-notification-learnmore-link"
is="text-link"/>
</popupnotificationcontent>
</popupnotification>
...@@ -21,6 +21,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { ...@@ -21,6 +21,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
ExtensionSettingsStore: "resource://gre/modules/ExtensionSettingsStore.jsm", ExtensionSettingsStore: "resource://gre/modules/ExtensionSettingsStore.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
ShellService: "resource:///modules/ShellService.jsm", ShellService: "resource:///modules/ShellService.jsm",
TorConnect: "resource:///modules/TorConnect.jsm",
}); });
XPCOMUtils.defineLazyGetter(this, "ReferrerInfo", () => XPCOMUtils.defineLazyGetter(this, "ReferrerInfo", () =>
...@@ -259,6 +260,22 @@ function openUILinkIn( ...@@ -259,6 +260,22 @@ function openUILinkIn(
aPostData, aPostData,
aReferrerInfo aReferrerInfo
) { ) {
// make sure users are not faced with the scary red 'tor isn't working' screen
// if they navigate to about:tor before bootstrapped
//
// fixes tor-browser#40752
// new tabs also redirect to about:tor if browser.newtabpage.enabled is true
// otherwise they go to about:blank
if (TorConnect.shouldShowTorConnect) {
if (
url === "about:tor" ||
(url === "about:newtab" &&
Services.prefs.getBoolPref("browser.newtabpage.enabled", false))
) {
url = TorConnect.getRedirectURL(url);
}
}
var params; var params;
if (arguments.length == 3 && typeof arguments[2] == "object") { if (arguments.length == 3 && typeof arguments[2] == "object") {
...@@ -1119,6 +1136,9 @@ function makeURLAbsolute(aBase, aUrl) { ...@@ -1119,6 +1136,9 @@ function makeURLAbsolute(aBase, aUrl) {
} }
function getHelpLinkURL(aHelpTopic) { function getHelpLinkURL(aHelpTopic) {
if (aHelpTopic === "firefox-help" || aHelpTopic === "firefox-osxkey") {
return "about:manual";
}
var url = Services.urlFormatter.formatURLPref("app.support.baseURL"); var url = Services.urlFormatter.formatURLPref("app.support.baseURL");
return url + aHelpTopic; return url + aHelpTopic;
} }
......
...@@ -34,6 +34,11 @@ browser.jar: ...@@ -34,6 +34,11 @@ browser.jar:
content/browser/aboutTabCrashed.css (content/aboutTabCrashed.css) content/browser/aboutTabCrashed.css (content/aboutTabCrashed.css)
content/browser/aboutTabCrashed.js (content/aboutTabCrashed.js) content/browser/aboutTabCrashed.js (content/aboutTabCrashed.js)
content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml) content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml)
#ifdef TOR_BROWSER_UPDATE
content/browser/abouttbupdate/aboutTBUpdate.xhtml (content/abouttbupdate/aboutTBUpdate.xhtml)
content/browser/abouttbupdate/aboutTBUpdate.js (content/abouttbupdate/aboutTBUpdate.js)
content/browser/abouttbupdate/aboutTBUpdate.css (content/abouttbupdate/aboutTBUpdate.css)
#endif
content/browser/browser.css (content/browser.css) content/browser/browser.css (content/browser.css)
content/browser/browser.js (content/browser.js) content/browser/browser.js (content/browser.js)
* content/browser/browser.xhtml (content/browser.xhtml) * content/browser/browser.xhtml (content/browser.xhtml)
......
...@@ -87,6 +87,9 @@ if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["MOZ_DEFAULT_BROWSER_AGENT"]: ...@@ -87,6 +87,9 @@ if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["MOZ_DEFAULT_BROWSER_AGENT"]:
# Impacts `/toolkit/content/license.html`. # Impacts `/toolkit/content/license.html`.
DEFINES["MOZ_DEFAULT_BROWSER_AGENT"] = True DEFINES["MOZ_DEFAULT_BROWSER_AGENT"] = True
if CONFIG["TOR_BROWSER_UPDATE"]:
DEFINES["TOR_BROWSER_UPDATE"] = 1
JAR_MANIFESTS += ["jar.mn"] JAR_MANIFESTS += ["jar.mn"]
GeneratedFile( GeneratedFile(
......