зеркало из https://github.com/mozilla/gecko-dev.git
don't allow post-to-insecure-from-secure warning to be turned off: bug 50168 r=javi sr=blizzard
This commit is contained in:
Родитель
54c7bc2961
Коммит
796fc57294
|
@ -88,10 +88,6 @@
|
|||
<checkbox id="warnInsecurePost" label="&warn.insecurepost;"
|
||||
pref="true" preftype="bool" prefstring="security.warn_submit_insecure"
|
||||
prefattribute="checked"/>
|
||||
<checkbox id="warnInsecurePostFromSecure"
|
||||
label="&warn.insecurepostfromsecure;"
|
||||
pref="true" preftype="bool" prefstring="security.warn_insecure_post_from_secure"
|
||||
prefattribute="checked" checked="true" disabled="true"/>
|
||||
<checkbox id="warnSecureRedirect" label="&warn.secureredirect;"
|
||||
pref="true" preftype="bool" prefstring="security.warn_secure_redirect"
|
||||
prefattribute="checked"/>
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
<!ENTITY warn.enteringweak "Entering a site that uses weak encryption">
|
||||
<!ENTITY warn.insecurepost
|
||||
"Sending form data from an insecure page to an insecure page">
|
||||
<!ENTITY warn.insecurepostfromsecure
|
||||
"Sending form data from a secure page to an insecure page">
|
||||
<!ENTITY warn.secureredirect "Redirection from one secure site to another">
|
||||
<!ENTITY warn.secureredirecttoinsecure
|
||||
"Redirection from a secure site to an insecure site">
|
||||
|
|
|
@ -496,7 +496,7 @@ nsNSSDialogs::ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx, PRBool
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
rv = ConfirmDialog(ctx, INSECURE_SUBMIT_PREF,
|
||||
rv = ConfirmDialog(ctx, nsnull,
|
||||
NS_LITERAL_STRING("PostToInsecure").get(), _result);
|
||||
|
||||
return rv;
|
||||
|
@ -509,9 +509,11 @@ nsNSSDialogs::ConfirmDialog(nsIInterfaceRequestor *ctx, const char *prefName,
|
|||
nsresult rv;
|
||||
|
||||
// Get user's preference for this alert
|
||||
PRBool prefValue;
|
||||
rv = mPref->GetBoolPref(prefName, &prefValue);
|
||||
if (NS_FAILED(rv)) prefValue = PR_TRUE;
|
||||
PRBool prefValue = PR_TRUE;
|
||||
if (prefName) {
|
||||
rv = mPref->GetBoolPref(prefName, &prefValue);
|
||||
if (NS_FAILED(rv)) prefValue = PR_TRUE;
|
||||
}
|
||||
|
||||
// Stop if confirm is not requested
|
||||
if (!prefValue) {
|
||||
|
@ -530,14 +532,20 @@ nsNSSDialogs::ConfirmDialog(nsIInterfaceRequestor *ctx, const char *prefName,
|
|||
getter_Copies(windowTitle));
|
||||
mStringBundle->GetStringFromName(messageName,
|
||||
getter_Copies(message));
|
||||
mStringBundle->GetStringFromName(NS_LITERAL_STRING("DontShowAgain").get(),
|
||||
getter_Copies(dontShowAgain));
|
||||
if (!windowTitle || !message || !dontShowAgain) return NS_ERROR_FAILURE;
|
||||
if (!windowTitle || !message) return NS_ERROR_FAILURE;
|
||||
|
||||
if (prefName) {
|
||||
mStringBundle->GetStringFromName(NS_LITERAL_STRING("DontShowAgain").get(),
|
||||
getter_Copies(dontShowAgain));
|
||||
if (!dontShowAgain) return NS_ERROR_FAILURE;
|
||||
|
||||
rv = prompt->ConfirmCheck(windowTitle, message, dontShowAgain, &prefValue, _result);
|
||||
rv = prompt->ConfirmCheck(windowTitle, message, dontShowAgain, &prefValue, _result);
|
||||
} else {
|
||||
rv = prompt->Confirm(windowTitle, message, _result);
|
||||
}
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (!prefValue) {
|
||||
if (prefName && !prefValue) {
|
||||
mPref->SetBoolPref(prefName, PR_FALSE);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче