Bug 1115668 - Fix inappropriate mixed content warning messages. r=tanvi

This commit is contained in:
Masatoshi Kimura 2014-12-30 23:09:33 +09:00
parent 891a2d4911
commit 28adad3ff7
4 changed files with 12 additions and 10 deletions

View File

@ -24,14 +24,14 @@ let test = asyncTest(function* () {
messages: [
{
name: "Logged mixed active content",
text: "Loading mixed (insecure) active content on a secure page \"http://example.com/\"",
text: "Loading mixed (insecure) active content \"http://example.com/\" on a secure page",
category: CATEGORY_SECURITY,
severity: SEVERITY_WARNING,
objects: true,
},
{
name: "Logged mixed passive content - image",
text: "Loading mixed (insecure) display content on a secure page \"http://example.com/tests/image/test/mochitest/blue.png\"",
text: "Loading mixed (insecure) display content \"http://example.com/tests/image/test/mochitest/blue.png\" on a secure page",
category: CATEGORY_SECURITY,
severity: SEVERITY_WARNING,
objects: true,

View File

@ -95,16 +95,17 @@ function afterNotificationShown(hud, notification, deferred)
messages: [
{
name: "Logged blocking mixed active content",
text: "Loading mixed (insecure) active content on a secure"+
" page \"http://example.com/\"",
text: "Loading mixed (insecure) active content \"http://example.com/\"" +
" on a secure page",
category: CATEGORY_SECURITY,
severity: SEVERITY_WARNING,
objects: true,
},
{
name: "Logged blocking mixed passive content - image",
text: "Loading mixed (insecure) display content on a secure page"+
" \"http://example.com/tests/image/test/mochitest/blue.png\"",
text: "Loading mixed (insecure) display content" +
" \"http://example.com/tests/image/test/mochitest/blue.png\"" +
" on a secure page",
category: CATEGORY_SECURITY,
severity: SEVERITY_WARNING,
objects: true,

View File

@ -15,8 +15,9 @@ SHA1Sig=This site makes use of a SHA-1 Certificate; it's recommended you use cer
InsecurePasswordsPresentOnPage=Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.
InsecureFormActionPasswordsPresent=Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen.
InsecurePasswordsPresentOnIframe=Password fields present on an insecure (http://) iframe. This is a security risk that allows user login credentials to be stolen.
LoadingMixedActiveContent=Loading mixed (insecure) active content on a secure page "%1$S"
LoadingMixedDisplayContent=Loading mixed (insecure) display content on a secure page "%1$S"
# LOCALIZATION NOTE: "%1$S" is the URI of the insecure mixed content resource
LoadingMixedActiveContent2=Loading mixed (insecure) active content "%1$S" on a secure page
LoadingMixedDisplayContent2=Loading mixed (insecure) display content "%1$S" on a secure page
# LOCALIZATION NOTE: Do not translate "allow-scripts", "allow-same-origin", "sandbox" or "iframe"
BothAllowScriptsAndSameOriginPresent=An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can remove its sandboxing.

View File

@ -178,9 +178,9 @@ LogMixedContentMessage(MixedContentTypes aClassification,
severityFlag = nsIScriptError::warningFlag;
messageCategory.AssignLiteral("Mixed Content Message");
if (aClassification == eMixedDisplay) {
messageLookupKey.AssignLiteral("LoadingMixedDisplayContent");
messageLookupKey.AssignLiteral("LoadingMixedDisplayContent2");
} else {
messageLookupKey.AssignLiteral("LoadingMixedActiveContent");
messageLookupKey.AssignLiteral("LoadingMixedActiveContent2");
}
}