Verified Commit 1aa54fd3 authored by cypherpunks1's avatar cypherpunks1 Committed by Pier Angelo Vendrame
Browse files

fixup! Bug 23247: Communicating security expectations for .onion

Bug 41785: Show http onion resources as secure in network monitor
parent b651ef39
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -596,6 +596,9 @@ export var NetworkHelper = {

    // The request did not contain any security info.
    if (!securityInfo) {
      if (httpActivity.hostname && httpActivity.hostname.endsWith(".onion")) {
        info.state = "secure";
      }
      return info;
    }

@@ -647,7 +650,11 @@ export var NetworkHelper = {
        // schemes other than https and wss are subject to
        // downgrade/etc at the scheme level and should always be
        // considered insecure
        if (httpActivity.hostname && httpActivity.hostname.endsWith(".onion")) {
          info.state = "secure";
        } else {
          info.state = "insecure";
        }
      } else if (state & wpl.STATE_IS_SECURE) {
        // The connection is secure if the scheme is sufficient
        info.state = "secure";