Bug 1358227 - Removed the MOZ_ALLOW_WEAKER_SANDBOX environment variable; r?jimm draft
authorAlex Gaynor <agaynor@mozilla.com>
Wed, 31 May 2017 12:28:06 -0400
changeset 587157 9344bd8b37c3f16fcb3a1dc546ec00115cded966
parent 586973 7b8937970f9ca85db88cb2496f2112175fd847c8
child 631204 7c1916402ba222d6687b9c2b59813228fda73b56
push id61635
push userbmo:agaynor@mozilla.com
push dateWed, 31 May 2017 16:32:07 +0000
reviewersjimm
bugs1358227
milestone55.0a1
Bug 1358227 - Removed the MOZ_ALLOW_WEAKER_SANDBOX environment variable; r?jimm The Flash sandbox (which is the only thing this variable is used for) is stable at this point, and for testing purposes we still have MOZ_DISABLE_NPAPI_SANDBOX. MozReview-Commit-ID: 6sxb1tx7oA9
dom/plugins/base/nsPluginTags.cpp
--- a/dom/plugins/base/nsPluginTags.cpp
+++ b/dom/plugins/base/nsPluginTags.cpp
@@ -430,20 +430,19 @@ nsPluginTag::InitSandboxLevel()
   sandboxPref.Append(GetNiceFileName());
   if (NS_FAILED(Preferences::GetInt(sandboxPref.get(), &mSandboxLevel))) {
     mSandboxLevel = Preferences::GetInt("dom.ipc.plugins.sandbox-level.default"
 );
   }
 
 #if defined(_AMD64_)
   // As level 2 is now the default NPAPI sandbox level for 64-bit flash, we
-  // don't want to allow a lower setting unless this environment variable is
-  // set. This should be changed if the firefox.js pref file is changed.
-  if (mIsFlashPlugin &&
-      !PR_GetEnv("MOZ_ALLOW_WEAKER_SANDBOX") && mSandboxLevel < 2) {
+  // don't want to allow a lower setting. This should be changed if the
+  // firefox.js pref file is changed.
+  if (mIsFlashPlugin && mSandboxLevel < 2) {
     mSandboxLevel = 2;
   }
 #endif
 #endif
 }
 
 #if !defined(XP_WIN) && !defined(XP_MACOSX)
 static nsresult ConvertToUTF8(nsIUnicodeDecoder *aUnicodeDecoder,
@@ -482,17 +481,17 @@ nsresult nsPluginTag::EnsureMembersAreUT
   nsAutoCString charset;
   rv = pcs->GetCharset(kPlatformCharsetSel_FileName, charset);
   NS_ENSURE_SUCCESS(rv, rv);
   if (!charset.LowerCaseEqualsLiteral("utf-8")) {
     decoder = EncodingUtils::DecoderForEncoding(charset);
     ConvertToUTF8(decoder, mFileName);
     ConvertToUTF8(decoder, mFullPath);
   }
-  
+
   // The description of the plug-in and the various MIME type descriptions
   // should be encoded in the standard plain text file encoding for this system.
   // XXX should we add kPlatformCharsetSel_PluginResource?
   rv = pcs->GetCharset(kPlatformCharsetSel_PlainTextInFile, charset);
   NS_ENSURE_SUCCESS(rv, rv);
   if (!charset.LowerCaseEqualsLiteral("utf-8")) {
     decoder = EncodingUtils::DecoderForEncoding(charset);
     ConvertToUTF8(decoder, mName);