FireFox Configuration - Disable Active Mixed Content Blocking - Windows
0 Votes |
Versioning - This is the latest version.
1 | FireFox Configuration - Disable Active Mixed Content Blocking | 8/27/2013 2:39:10 PM |
2 | FireFox Configuration - Disable Active Mixed Content Blocking | 8/27/2013 2:47:01 PM |
3 | FireFox Configuration - Disable Active Mixed Content Blocking | 8/28/2013 12:32:23 PM |
4 | FireFox Configuration - Disable Active Mixed Content Blocking - Windows | 8/29/2013 7:25:31 AM |
Description
This task will change the security.mixed_content.block_active_content setting to false. This setting is now default "true" in Firefox version 23 or greater.
Find the latest version of this Task here: http://bigfix.me/fixlet/details/2571
Find an Analysis for FireFox config here: http://bigfix.me/analysis/details/2994571
References:
https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences
https://developer.mozilla.org/en-US/docs/Automatic_Mozilla_Configurator/Locked_config_settings
http://kb.mozillazine.org/Locking_preferences
Property Details
2575 | |
Beta - Preliminary testing ready for more | |
FireFox Configuration - Disable Active Mixed Content Blocking - Windows | |
BESC | |
Configuration | |
0 | |
Internal | |
jgs194 | |
8/27/2013 12:00:00 AM | |
jgstew on 8/29/2013 7:25:31 AM | |
jgstew on 8/29/2013 7:25:31 AM | |
7871 Views / 10 Downloads | |
![]() ![]() ![]() ![]() ![]() |
Relevance
Used in 9 fixlets | * Results in a true/false |

exists folder (location of regapp "firefox.exe")
Used in 4 fixlets | * Results in a true/false |

/*This relevance checks for a .js file in the firefox\defaults\pref folder that contains a general.config.filename setting, and if it exists, checks the cfg file it points to for the setting, which in this case is security.mixed_content.block_active_content*/not ((exists files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")) AND (exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")) AND (exists file ((it as string) of preceding texts of firsts "%22" of following texts of firsts "%22" of following texts of firsts "," of preceding texts of first ")" of lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")) of folder (location of regapp "firefox.exe")) AND (exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "security.mixed_content.block_active_content" AND it as lowercase contains "false") of file ((it as string) of preceding texts of firsts "%22" of following texts of firsts "%22" of following texts of firsts "," of preceding texts of first ")" of lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")) of folder (location of regapp "firefox.exe")))
Windows Only (Relevance 2997197)

/* Windows Only */ windows of operating system

/* Windows XP or Higher */ version of operating system >= "5.1"
Actions
Action 1 (default)
Action Link Click
here to deploy this action.
Script Type
BigFix Action Script
// NOTE: {"%0d%0a"} is CR+LF (newline) http://bigfix.me/relevance/details/2997195Success Criteria
// NOTE: "%22" is the escape sequence for double quote "
// Parameters - parameters are initialized before execution and cannot be change, even if they appear later in the script.
// http://bigfix.me/relevance/details/2997194
parameter "yyyymmdd" = "{(current year as string) & (current month as two digits) & (current day_of_month as string)}"
// the Firefox folder location
parameter "folderFirefox" = "{location of regapp "firefox.exe"}"
// The .js settings file that contains the location of the .cfg file. If it does not exist, then "local-settings.js" is used
parameter "fileNameSettingsJS" = "{(if (not exists files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")) then ("local-settings.js") else (name of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")))}"
parameter "filePathSettingsJS" = "{(location of regapp "firefox.exe") & "\defaults\pref\" & (if (not exists files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")) then ("local-settings.js") else (name of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")))}"
// The .cfg file that contains the settings. If it does not exist, then "firefox_bigfix.cfg" is used as the default
parameter "fileNameCFG" = "{(if(not ((exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")) AND (exists ((it as string) whose(it as lowercase contains ".cfg") of unique value of preceding texts of firsts "%22" of following texts of firsts "%22" of following texts of firsts "," of preceding texts of first ")" of lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe"))))) then ("firefox_bigfix.cfg") else ((it as string) whose(it as lowercase contains ".cfg") of unique value of preceding texts of firsts "%22" of following texts of firsts "%22" of following texts of firsts "," of preceding texts of first ")" of lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")))}"
parameter "filePathCFG" = "{(location of regapp "firefox.exe")&"\"&(if(not ((exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")) AND (exists ((it as string) whose(it as lowercase contains ".cfg") of unique value of preceding texts of firsts "%22" of following texts of firsts "%22" of following texts of firsts "," of preceding texts of first ")" of lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe"))))) then ("firefox_bigfix.cfg") else ((it as string) whose(it as lowercase contains ".cfg") of unique value of preceding texts of firsts "%22" of following texts of firsts "%22" of following texts of firsts "," of preceding texts of first ")" of lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of files whose(name of it as lowercase ends with ".js" AND exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND it as lowercase contains "general.config.filename") of it) of folder "defaults\pref" of folder (location of regapp "firefox.exe")))}"
// if it does not exist, then create folder "defaults\pref" of folder (parameter "folderFirefox")
// NOT IMPLEMENTED YET
// waithidden mkdir ?
// waithidden mkdir ?
// Probably not needed (defaults/pref folder should always exist)
// edit the JS Settings file if it does not include "general.config.filename" setting or "general.config.obscure_value" (this code does not detect if an obscure_value other than 0 is used, which would be an issue)
if{exists file (parameter "filePathSettingsJS") AND not exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND (it as lowercase contains "general.config.obscure_value" OR it as lowercase contains "general.config.filename")) of file (parameter "filePathSettingsJS")}
delete __appendfile
// Add settings to file (parameter "filePathSettingsJS")
appendfile {concatenation "%0d%0a" of lines whose(not (it does not start with "//" AND (it as lowercase contains "general.config.obscure_value" OR it as lowercase contains "general.config.filename"))) of file (parameter "filePathSettingsJS")}
appendfile pref("general.config.obscure_value", 0);
appendfile pref("general.config.filename", "{parameter "fileNameCFG"}");
// backup original file (parameter "filePathSettingsJS")
delete "{preceding text of last "." of parameter "filePathSettingsJS"}.backup{parameter "yyyymmdd"}"
move "{parameter "filePathSettingsJS"}" "{preceding text of last "." of parameter "filePathSettingsJS"}.backup{parameter "yyyymmdd"}"
// put new file in place
move __appendfile "{parameter "filePathSettingsJS"}"
endif // end of if{exists file (parameter "filePathSettingsJS") AND not exists lines whose((it as lowercase starts with "pref" OR it as lowercase starts with "lockpref") AND (it as lowercase contains "general.config.obscure_value" OR it as lowercase contains "general.config.filename")) of file (parameter "filePathSettingsJS")}
// if it does not exist, then create JS Settings file
if{not exists file (parameter "filePathSettingsJS")}
delete __createfile
createfile until END_OF_FILE
// Firefox settings file
pref("general.config.obscure_value", 0);
pref("general.config.filename", "{parameter "fileNameCFG"}");
END_OF_FILE
move __createfile "{parameter "filePathSettingsJS"}"
endif // end of if{not exists file (parameter "filePathSettingsJS")}
// edit the CFG file if it does not include the desired setting
if{exists file (parameter "filePathCFG")}
delete __appendfile
// Add settings to file (parameter "filePathCFG")
appendfile {concatenation "%0d%0a" of lines whose(not (it does not start with "//" AND (it as lowercase contains "security.mixed_content.block_active_content"))) of file (parameter "filePathCFG")}
appendfile lockPref("security.mixed_content.block_active_content", false);
// backup original file (parameter "filePathCFG")
delete "{preceding text of last "." of parameter "filePathCFG"}.backup{parameter "yyyymmdd"}"
move "{parameter "filePathCFG"}" "{preceding text of last "." of parameter "filePathCFG"}.backup{parameter "yyyymmdd"}"
// put new file in place
move __appendfile "{parameter "filePathCFG"}"
endif // end of if{exists file (parameter "filePathCFG")}
// if it does not exist, then create CFG file
if{not exists file (parameter "filePathCFG")}
delete __createfile
createfile until END_OF_FILE
// Firefox config file
lockPref("security.mixed_content.block_active_content", false);
END_OF_FILE
move __createfile "{parameter "filePathCFG"}"
endif // end of if{not exists file (parameter "filePathCFG")}
This action will be considered successful when the applicability relevance evaluates to false.
Sharing
Social Media: |