Commit 8701cc74 authored by henry's avatar henry Committed by Pier Angelo Vendrame
Browse files

fixup! TB 23247: Communicating security expectations for .onion

TB 45249: Hide verifier information when it is empty.

Special thanks to @soni.
parent e30c9556
Loading
Loading
Loading
Loading
+11 −2
Changes for browser/base/content/browser-siteIdentity.js: 11 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1203,14 +1203,17 @@ var gIdentityHandler = {
    let owner = "";

    // Fill in the CA name if we have a valid TLS certificate.
    if (this._isSecureConnection || this._isCertUserOverridden) {
    if (
      this._secInfo &&
      (this._isSecureConnection || this._isCertUserOverridden)
    ) {
      // Remove "Verified by " from the verifier string. tor-browser#45249.
      verifier = this.getIdentityData().caOrg;
    }

    // Fill in organization information if we have a valid EV certificate or
    // QWAC.
    if (this._isEV || this._qwac) {
    if (this._secInfo && (this._isEV || this._qwac)) {
      let iData = this.getIdentityData(this._qwac || this._secInfo.serverCert);
      owner = iData.subjectOrg;
      // Remove "Verified by " from the verifier string. tor-browser#45249.
@@ -1265,6 +1268,12 @@ var gIdentityHandler = {
    this._identityPopupContentOwner.textContent = owner;
    this._identityPopupContentSupp.textContent = supplemental;
    this._identityPopupContentVerif.textContent = verifier;

    // Hide "Verified by" section if this is empty for an onion host.
    // tor-browser#45249.
    document
      .getElementById("identity-popup-securityView-extended-info")
      .toggleAttribute("noverifier", this._uriIsOnionHost && verifier === "");
  },

  setURI(uri) {
+2 −0
Changes for browser/components/controlcenter/content/securityInformation.inc.xhtml: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -36,9 +36,11 @@
                           when-connection="secure-ev secure-etsi"/>
              <description id="identity-popup-content-verifier-label"
                           when-connection="secure secure-ev secure-etsi"
                           when-verifier="true"
                           data-l10n-id="identity-verifier-label"/>
              <description id="identity-popup-content-verifier"
                           when-connection="secure secure-ev secure-etsi"
                           when-verifier="true"
                           class="header"/>
              <description id="identity-popup-content-etsi"
                           when-connection="secure-etsi"
+5 −0
Changes for browser/themes/shared/controlcenter/panel.css: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -109,6 +109,11 @@
  display: none;
}

/* Hide verifier information. tor-browser#45249. */
#identity-popup-securityView-extended-info[noverifier] description[when-verifier] {
  display: none !important;
}

/* Make sure hidden elements don't accidentally become visible from one of the
   above selectors (see Bug 1194258) */
#identity-popup [hidden] {