[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-68.8.0esr-9.5-1] fixup! Bug 34196: Update site info URL with the onion name
commit 052d8a452a92a97b77130e60e28c1c02076d9db3
Author: Alex Catarineu <acat@xxxxxxxxxxxxxx>
Date: Fri May 15 10:46:58 2020 +0200
fixup! Bug 34196: Update site info URL with the onion name
---
browser/base/content/pageinfo/pageInfo.js | 2 +-
browser/base/content/pageinfo/pageInfo.xul | 6 ++++++
browser/base/content/pageinfo/security.js | 17 ++++++++++++++++-
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/browser/base/content/pageinfo/pageInfo.js b/browser/base/content/pageinfo/pageInfo.js
index ae228fb9bd61..c30c74dab752 100644
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -412,7 +412,7 @@ function loadPageInfo(frameOuterWindowID, imageElement, browser) {
);
}
onLoadPermission(uri, principal);
- securityOnLoad(uri, windowInfo);
+ securityOnLoad(uri, windowInfo, browser.currentOnionAliasURI);
});
// Get the media elements from content script to setup the media tab.
diff --git a/browser/base/content/pageinfo/pageInfo.xul b/browser/base/content/pageinfo/pageInfo.xul
index c7de71c23048..9fbd8e54379a 100644
--- a/browser/base/content/pageinfo/pageInfo.xul
+++ b/browser/base/content/pageinfo/pageInfo.xul
@@ -294,6 +294,12 @@
control="security-identity-domain-value"/>
<textbox id="security-identity-domain-value" readonly="true"/>
</row>
+ <!-- Onion Alias -->
+ <row id="security-view-identity-onionalias-row">
+ <label id="security-view-identity-onionalias"
+ control="security-view-identity-onionalias-value"/>
+ <textbox id="security-view-identity-onionalias-value" readonly="true"/>
+ </row>
<!-- Owner -->
<row>
<label id="security-identity-owner-label"
diff --git a/browser/base/content/pageinfo/security.js b/browser/base/content/pageinfo/security.js
index a0336a67ee42..555fd538d3a2 100644
--- a/browser/base/content/pageinfo/security.js
+++ b/browser/base/content/pageinfo/security.js
@@ -227,7 +227,7 @@ var security = {
_cert: null,
};
-function securityOnLoad(uri, windowInfo) {
+function securityOnLoad(uri, windowInfo, onionAliasURI) {
security.init(uri, windowInfo);
var info = security._getSecurityInfo();
@@ -240,6 +240,21 @@ function securityOnLoad(uri, windowInfo) {
}
document.getElementById("securityTab").hidden = false;
+ if (onionAliasURI) {
+ setText(
+ "security-view-identity-onionalias",
+ gTorButtonBundle.GetStringFromName("pageInfo_OnionName")
+ );
+ setText("security-view-identity-onionalias-value", onionAliasURI.host);
+ document.getElementById(
+ "security-view-identity-onionalias-row"
+ ).hidden = false;
+ } else {
+ document.getElementById(
+ "security-view-identity-onionalias-row"
+ ).hidden = true;
+ }
+
/* Set Identity section text */
setText("security-identity-domain-value", info.hostName);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits