Verified Commit b651ef39 authored by cypherpunks1's avatar cypherpunks1 Committed by Pier Angelo Vendrame
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 1b620170
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -886,8 +886,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;