Bug 436200 - Add a pref to turn off warning submitting secure to insecure. r=dveditz,pbz

Differential Revision: https://phabricator.services.mozilla.com/D83863
This commit is contained in:
Michael Kaply
2020-07-21 22:12:40 +00:00
parent 18816e1c8e
commit 947414714d
5 changed files with 85 additions and 0 deletions

View File

@@ -868,6 +868,10 @@ nsresult HTMLFormElement::DoSecureToInsecureSubmitCheck(nsIURI* aActionURL,
bool* aCancelSubmit) {
*aCancelSubmit = false;
if (!StaticPrefs::security_warn_submit_secure_to_insecure()) {
return NS_OK;
}
// Only ask the user about posting from a secure URI to an insecure URI if
// this element is in the root document. When this is not the case, the mixed
// content blocker will take care of security for us.