Commit 4c0986cb authored by cypherpunks1's avatar cypherpunks1
Browse files

fixup! Bug 23247: Communicating security expectations for .onion

Bug 33298: Warn when submitting form data from http onion sites over an insecure connection
parent d9327485
Loading
Loading
Loading
Loading
+3 −0
Changes for dom/html/HTMLFormElement.cpp: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -893,8 +893,11 @@ nsresult HTMLFormElement::DoSecureToInsecureSubmitCheck(nsIURI* aActionURL,
    formIsHTTPS = OwnerDoc()->GetDocumentURI()->SchemeIs("https");
  }
  if (!formIsHTTPS) {
    bool formIsOnion = nsMixedContentBlocker::IsPotentiallyTrustworthyOnion(OwnerDoc()->GetDocumentURI());
    if (!formIsOnion) {
      return NS_OK;
    }
  }

  if (nsMixedContentBlocker::IsPotentiallyTrustworthyLoopbackURL(aActionURL)) {
    return NS_OK;