Merge pull request #435 from nodiscc/update-tbb-diff
[user-js.git] / user.js
blobb21d196a2062113d8874a8525c334a7d46d2feb3
1 //
2 /******************************************************************************
3  * user.js                                                                    *
4  * https://github.com/pyllyukko/user.js                                       *
5  ******************************************************************************/
7 /******************************************************************************
8  * SECTION: HTML5 / APIs / DOM                                                *
9  ******************************************************************************/
11 // PREF: Disable Service Workers
12 // https://developer.mozilla.org/en-US/docs/Web/API/Worker
13 // https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker_API
14 // https://wiki.mozilla.org/Firefox/Push_Notifications#Service_Workers
15 // NOTICE: Disabling ServiceWorkers breaks functionality on some sites (Google Street View...)
16 // Unknown security implications
17 // CVE-2016-5259, CVE-2016-2812, CVE-2016-1949, CVE-2016-5287 (fixed)
18 user_pref("dom.serviceWorkers.enabled",                         false);
20 // PREF: Disable web notifications
21 // https://support.mozilla.org/en-US/questions/1140439
22 user_pref("dom.webnotifications.enabled",                       false);
24 // PREF: Disable DOM timing API
25 // https://wiki.mozilla.org/Security/Reviews/Firefox/NavigationTimingAPI
26 // https://www.w3.org/TR/navigation-timing/#privacy
27 user_pref("dom.enable_performance",                             false);
29 // PREF: Make sure the User Timing API does not provide a new high resolution timestamp
30 // https://trac.torproject.org/projects/tor/ticket/16336
31 // https://www.w3.org/TR/2013/REC-user-timing-20131212/#privacy-security
32 user_pref("dom.enable_user_timing",                             false);
34 // PREF: Disable Web Audio API
35 // https://bugzilla.mozilla.org/show_bug.cgi?id=1288359
36 user_pref("dom.webaudio.enabled",                               false);
38 // PREF: Disable Location-Aware Browsing (geolocation)
39 // https://www.mozilla.org/en-US/firefox/geolocation/
40 user_pref("geo.enabled",                                        false);
42 // PREF: When geolocation is enabled, use Mozilla geolocation service instead of Google
43 // https://bugzilla.mozilla.org/show_bug.cgi?id=689252
44 user_pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
46 // PREF: When geolocation is enabled, don't log geolocation requests to the console
47 user_pref("geo.wifi.logging.enabled", false);
49 // PREF: Disable raw TCP socket support (mozTCPSocket)
50 // https://trac.torproject.org/projects/tor/ticket/18863
51 // https://www.mozilla.org/en-US/security/advisories/mfsa2015-97/
52 // https://developer.mozilla.org/docs/Mozilla/B2G_OS/API/TCPSocket
53 user_pref("dom.mozTCPSocket.enabled",                           false);
55 // PREF: Disable DOM storage (disabled)
56 // http://kb.mozillazine.org/Dom.storage.enabled
57 // https://html.spec.whatwg.org/multipage/webstorage.html
58 // NOTICE-DISABLED: Disabling DOM storage is known to cause`TypeError: localStorage is null` errors
59 //user_pref("dom.storage.enabled",              false);
61 // PREF: Disable leaking network/browser connection information via Javascript
62 // Network Information API provides general information about the system's connection type (WiFi, cellular, etc.)
63 // https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API
64 // https://wicg.github.io/netinfo/#privacy-considerations
65 // https://bugzilla.mozilla.org/show_bug.cgi?id=960426
66 user_pref("dom.netinfo.enabled",                                false);
68 // PREF: Disable network API (Firefox < 32)
69 // https://developer.mozilla.org/en-US/docs/Web/API/Connection/onchange
70 // https://www.torproject.org/projects/torbrowser/design/#fingerprinting-defenses
71 user_pref("dom.network.enabled",                                false);
73 // PREF: Disable WebRTC entirely to prevent leaking internal IP addresses (Firefox < 42)
74 // NOTICE: Disabling WebRTC breaks peer-to-peer file sharing tools (reep.io ...)
75 user_pref("media.peerconnection.enabled",                       false);
77 // PREF: Don't reveal your internal IP when WebRTC is enabled (Firefox >= 42)
78 // https://wiki.mozilla.org/Media/WebRTC/Privacy
79 // https://github.com/beefproject/beef/wiki/Module%3A-Get-Internal-IP-WebRTC
80 user_pref("media.peerconnection.ice.default_address_only",      true); // Firefox 42-51
81 user_pref("media.peerconnection.ice.no_host",                   true); // Firefox >= 52
83 // PREF: Disable WebRTC getUserMedia, screen sharing, audio capture, video capture
84 // https://wiki.mozilla.org/Media/getUserMedia
85 // https://blog.mozilla.org/futurereleases/2013/01/12/capture-local-camera-and-microphone-streams-with-getusermedia-now-enabled-in-firefox/
86 // https://developer.mozilla.org/en-US/docs/Web/API/Navigator
87 user_pref("media.navigator.enabled",                            false);
88 user_pref("media.navigator.video.enabled",                      false);
89 user_pref("media.getusermedia.screensharing.enabled",           false);
90 user_pref("media.getusermedia.audiocapture.enabled",            false);
92 // PREF: Disable battery API (Firefox < 52)
93 // https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager
94 // https://bugzilla.mozilla.org/show_bug.cgi?id=1313580
95 user_pref("dom.battery.enabled",                                false);
97 // PREF: Disable telephony API
98 // https://wiki.mozilla.org/WebAPI/Security/WebTelephony
99 user_pref("dom.telephony.enabled",                              false);
101 // PREF: Disable "beacon" asynchronous HTTP transfers (used for analytics)
102 // https://developer.mozilla.org/en-US/docs/Web/API/navigator.sendBeacon
103 user_pref("beacon.enabled",                                     false);
105 // PREF: Disable clipboard event detection (onCut/onCopy/onPaste) via Javascript
106 // NOTICE: Disabling clipboard events breaks Ctrl+C/X/V copy/cut/paste functionaility in JS-based web applications (Google Docs...)
107 // https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/Preference_reference/dom.event.clipboardevents.enabled
108 user_pref("dom.event.clipboardevents.enabled",                  false);
110 // PREF: Disable "copy to clipboard" functionality via Javascript (Firefox >= 41)
111 // NOTICE: Disabling clipboard operations will break legitimate JS-based "copy to clipboard" functionality
112 // https://hg.mozilla.org/mozilla-central/rev/2f9f8ea4b9c3
113 user_pref("dom.allow_cut_copy", false);
115 // PREF: Disable speech recognition
116 // https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
117 // https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition
118 // https://wiki.mozilla.org/HTML5_Speech_API
119 user_pref("media.webspeech.recognition.enable",                 false);
121 // PREF: Disable speech synthesis
122 // https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis
123 user_pref("media.webspeech.synth.enabled",                      false);
125 // PREF: Disable sensor API
126 // https://wiki.mozilla.org/Sensor_API
127 user_pref("device.sensors.enabled",                             false);
129 // PREF: Disable pinging URIs specified in HTML <a> ping= attributes
130 // http://kb.mozillazine.org/Browser.send_pings
131 user_pref("browser.send_pings",                                 false);
133 // PREF: When browser pings are enabled, only allow pinging the same host as the origin page
134 // http://kb.mozillazine.org/Browser.send_pings.require_same_host
135 user_pref("browser.send_pings.require_same_host",               true);
137 // PREF: Disable IndexedDB (disabled)
138 // https://developer.mozilla.org/en-US/docs/IndexedDB
139 // https://en.wikipedia.org/wiki/Indexed_Database_API
140 // https://wiki.mozilla.org/Security/Reviews/Firefox4/IndexedDB_Security_Review
141 // http://forums.mozillazine.org/viewtopic.php?p=13842047
142 // https://github.com/pyllyukko/user.js/issues/8
143 // NOTICE-DISABLED: IndexedDB could be used for tracking purposes, but is required for some add-ons to work (notably uBlock), so is left enabled
144 //user_pref("dom.indexedDB.enabled",            false);
146 // TODO: "Access Your Location" "Maintain Offline Storage" "Show Notifications"
148 // PREF: Disable gamepad API to prevent USB device enumeration
149 // https://www.w3.org/TR/gamepad/
150 // https://trac.torproject.org/projects/tor/ticket/13023
151 user_pref("dom.gamepad.enabled",                                false);
153 // PREF: Disable virtual reality devices APIs
154 // https://developer.mozilla.org/en-US/Firefox/Releases/36#Interfaces.2FAPIs.2FDOM
155 // https://developer.mozilla.org/en-US/docs/Web/API/WebVR_API
156 user_pref("dom.vr.enabled",                                     false);
158 // PREF: Disable vibrator API
159 user_pref("dom.vibrator.enabled",           false);
161 // PREF: Disable resource timing API
162 // https://www.w3.org/TR/resource-timing/#privacy-security
163 user_pref("dom.enable_resource_timing",                         false);
165 // PREF: Disable Archive API (Firefox < 54)
166 // https://wiki.mozilla.org/WebAPI/ArchiveAPI
167 // https://bugzilla.mozilla.org/show_bug.cgi?id=1342361
168 user_pref("dom.archivereader.enabled",                          false);
170 // PREF: Disable webGL
171 // https://en.wikipedia.org/wiki/WebGL
172 // https://www.contextis.com/resources/blog/webgl-new-dimension-browser-exploitation/
173 user_pref("webgl.disabled",                                     true);
174 // PREF: When webGL is enabled, use the minimum capability mode
175 user_pref("webgl.min_capability_mode",                          true);
176 // PREF: When webGL is enabled, disable webGL extensions
177 // https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API#WebGL_debugging_and_testing
178 user_pref("webgl.disable-extensions",                           true);
179 // PREF: When webGL is enabled, force enabling it even when layer acceleration is not supported
180 // https://trac.torproject.org/projects/tor/ticket/18603
181 user_pref("webgl.disable-fail-if-major-performance-caveat",     true);
182 // PREF: When webGL is enabled, do not expose information about the graphics driver
183 // https://bugzilla.mozilla.org/show_bug.cgi?id=1171228
184 // https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info
185 user_pref("webgl.enable-debug-renderer-info",                   false);
186 // somewhat related...
187 //user_pref("pdfjs.enableWebGL",                                        false);
189 // PREF: Spoof dual-core CPU
190 // https://trac.torproject.org/projects/tor/ticket/21675
191 // https://bugzilla.mozilla.org/show_bug.cgi?id=1360039
192 user_pref("dom.maxHardwareConcurrency",                         2);
194 // PREF: Disable WebAssembly
195 // https://webassembly.org/
196 // https://en.wikipedia.org/wiki/WebAssembly
197 // https://trac.torproject.org/projects/tor/ticket/21549
198 user_pref("javascript.options.wasm",                            false);
200 /******************************************************************************
201  * SECTION: Misc                                                              *
202  ******************************************************************************/
204 // PREF: Disable face detection
205 user_pref("camera.control.face_detection.enabled",              false);
207 // PREF: Disable GeoIP lookup on your address to set default search engine region
208 // https://trac.torproject.org/projects/tor/ticket/16254
209 // https://support.mozilla.org/en-US/kb/how-stop-firefox-making-automatic-connections#w_geolocation-for-default-search-engine
210 user_pref("browser.search.countryCode",                         "US");
211 user_pref("browser.search.region",                              "US");
212 user_pref("browser.search.geoip.url",                           "");
214 // PREF: Set Accept-Language HTTP header to en-US regardless of Firefox localization
215 // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language
216 user_pref("intl.accept_languages",                              "en-US, en");
218 // PREF: Don't use OS values to determine locale, force using Firefox locale setting
219 // http://kb.mozillazine.org/Intl.locale.matchOS
220 user_pref("intl.locale.matchOS",                                false);
222 // PREF: Don't use Mozilla-provided location-specific search engines
223 user_pref("browser.search.geoSpecificDefaults",                 false);
225 // PREF: Do not automatically send selection to clipboard on some Linux platforms
226 // http://kb.mozillazine.org/Clipboard.autocopy
227 user_pref("clipboard.autocopy",                                 false);
229 // PREF: Prevent leaking application locale/date format using JavaScript
230 // https://bugzilla.mozilla.org/show_bug.cgi?id=867501
231 // https://hg.mozilla.org/mozilla-central/rev/52d635f2b33d
232 user_pref("javascript.use_us_english_locale",                   true);
234 // PREF: Do not submit invalid URIs entered in the address bar to the default search engine
235 // http://kb.mozillazine.org/Keyword.enabled
236 user_pref("keyword.enabled",                                    false);
238 // PREF: Don't trim HTTP off of URLs in the address bar.
239 // https://bugzilla.mozilla.org/show_bug.cgi?id=665580
240 user_pref("browser.urlbar.trimURLs",                            false);
242 // PREF: Don't try to guess domain names when entering an invalid domain name in URL bar
243 // http://www-archive.mozilla.org/docs/end-user/domain-guessing.html
244 user_pref("browser.fixup.alternate.enabled",                    false);
246 // PREF: When browser.fixup.alternate.enabled is enabled, strip password from 'user:password@...' URLs
247 // https://github.com/pyllyukko/user.js/issues/290#issuecomment-303560851
248 user_pref("browser.fixup.hide_user_pass", true);
250 // PREF: Send DNS request through SOCKS when SOCKS proxying is in use
251 // https://trac.torproject.org/projects/tor/wiki/doc/TorifyHOWTO/WebBrowsers
252 user_pref("network.proxy.socks_remote_dns",                     true);
254 // PREF: Don't monitor OS online/offline connection state
255 // https://trac.torproject.org/projects/tor/ticket/18945
256 user_pref("network.manage-offline-status",                      false);
258 // PREF: Enforce Mixed Active Content Blocking
259 // https://support.mozilla.org/t5/Protect-your-privacy/Mixed-content-blocking-in-Firefox/ta-p/10990
260 // https://developer.mozilla.org/en-US/docs/Site_Compatibility_for_Firefox_23#Non-SSL_contents_on_SSL_pages_are_blocked_by_default
261 // https://blog.mozilla.org/tanvi/2013/04/10/mixed-content-blocking-enabled-in-firefox-23/
262 user_pref("security.mixed_content.block_active_content",        true);
264 // PREF: Enforce Mixed Passive Content blocking (a.k.a. Mixed Display Content)
265 // NOTICE: Enabling Mixed Display Content blocking can prevent images/styles... from loading properly when connection to the website is only partially secured
266 user_pref("security.mixed_content.block_display_content",       true);
268 // PREF: Disable JAR from opening Unsafe File Types
269 // http://kb.mozillazine.org/Network.jar.open-unsafe-types
270 // CIS Mozilla Firefox 24 ESR v1.0.0 - 3.7 
271 user_pref("network.jar.open-unsafe-types",                      false);
273 // CIS 2.7.4 Disable Scripting of Plugins by JavaScript
274 // http://forums.mozillazine.org/viewtopic.php?f=7&t=153889
275 user_pref("security.xpconnect.plugin.unrestricted",             false);
277 // PREF: Set File URI Origin Policy
278 // http://kb.mozillazine.org/Security.fileuri.strict_origin_policy
279 // CIS Mozilla Firefox 24 ESR v1.0.0 - 3.8
280 user_pref("security.fileuri.strict_origin_policy",              true);
282 // PREF: Disable Displaying Javascript in History URLs
283 // http://kb.mozillazine.org/Browser.urlbar.filter.javascript
284 // CIS 2.3.6 
285 user_pref("browser.urlbar.filter.javascript",                   true);
287 // PREF: Disable asm.js
288 // http://asmjs.org/
289 // https://www.mozilla.org/en-US/security/advisories/mfsa2015-29/
290 // https://www.mozilla.org/en-US/security/advisories/mfsa2015-50/
291 // https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-2712
292 user_pref("javascript.options.asmjs",                           false);
294 // PREF: Disable SVG in OpenType fonts
295 // https://wiki.mozilla.org/SVGOpenTypeFonts
296 // https://github.com/iSECPartners/publications/tree/master/reports/Tor%20Browser%20Bundle
297 user_pref("gfx.font_rendering.opentype_svg.enabled",            false);
299 // PREF: Disable in-content SVG rendering (Firefox >= 53) (disabled)
300 // NOTICE-DISABLED: Disabling SVG support breaks many UI elements on many sites
301 // https://bugzilla.mozilla.org/show_bug.cgi?id=1216893
302 // https://github.com/iSECPartners/publications/raw/master/reports/Tor%20Browser%20Bundle/Tor%20Browser%20Bundle%20-%20iSEC%20Deliverable%201.3.pdf#16
303 //user_pref("svg.disabled", true);
306 // PREF: Disable video stats to reduce fingerprinting threat
307 // https://bugzilla.mozilla.org/show_bug.cgi?id=654550
308 // https://github.com/pyllyukko/user.js/issues/9#issuecomment-100468785
309 // https://github.com/pyllyukko/user.js/issues/9#issuecomment-148922065
310 user_pref("media.video_stats.enabled",                          false);
312 // PREF: Don't reveal build ID
313 // Value taken from Tor Browser
314 // https://bugzilla.mozilla.org/show_bug.cgi?id=583181
315 user_pref("general.buildID.override",                           "20100101");
316 user_pref("browser.startup.homepage_override.buildID",          "20100101");
318 // PREF: Prevent font fingerprinting
319 // https://browserleaks.com/fonts
320 // https://github.com/pyllyukko/user.js/issues/120
321 user_pref("browser.display.use_document_fonts",                 0);
323 // PREF: Enable only whitelisted URL protocol handlers
324 // http://kb.mozillazine.org/Network.protocol-handler.external-default
325 // http://kb.mozillazine.org/Network.protocol-handler.warn-external-default
326 // http://kb.mozillazine.org/Network.protocol-handler.expose.%28protocol%29
327 // https://news.ycombinator.com/item?id=13047883
328 // https://bugzilla.mozilla.org/show_bug.cgi?id=167475
329 // https://github.com/pyllyukko/user.js/pull/285#issuecomment-298124005
330 // NOTICE: Disabling nonessential protocols breaks all interaction with custom protocols such as mailto:, irc:, magnet: ... and breaks opening third-party mail/messaging/torrent/... clients when clicking on links with these protocols
331 // TODO: Add externally-handled protocols from Windows 8.1 and Windows 10 (currently contains protocols only from Linux and Windows 7) that might pose a similar threat (see e.g. https://news.ycombinator.com/item?id=13044991)
332 // TODO: Add externally-handled protocols from Mac OS X that might pose a similar threat (see e.g. https://news.ycombinator.com/item?id=13044991)
333 // If you want to enable a protocol, set network.protocol-handler.expose.(protocol) to true and network.protocol-handler.external.(protocol) to:
334 //   * true, if the protocol should be handled by an external application
335 //   * false, if the protocol should be handled internally by Firefox
336 user_pref("network.protocol-handler.warn-external-default",     true);
337 user_pref("network.protocol-handler.external.http",             false);
338 user_pref("network.protocol-handler.external.https",            false);
339 user_pref("network.protocol-handler.external.javascript",       false);
340 user_pref("network.protocol-handler.external.moz-extension",    false);
341 user_pref("network.protocol-handler.external.ftp",              false);
342 user_pref("network.protocol-handler.external.file",             false);
343 user_pref("network.protocol-handler.external.about",            false);
344 user_pref("network.protocol-handler.external.chrome",           false);
345 user_pref("network.protocol-handler.external.blob",             false);
346 user_pref("network.protocol-handler.external.data",             false);
347 user_pref("network.protocol-handler.expose-all",                false);
348 user_pref("network.protocol-handler.expose.http",               true);
349 user_pref("network.protocol-handler.expose.https",              true);
350 user_pref("network.protocol-handler.expose.javascript",         true);
351 user_pref("network.protocol-handler.expose.moz-extension",      true);
352 user_pref("network.protocol-handler.expose.ftp",                true);
353 user_pref("network.protocol-handler.expose.file",               true);
354 user_pref("network.protocol-handler.expose.about",              true);
355 user_pref("network.protocol-handler.expose.chrome",             true);
356 user_pref("network.protocol-handler.expose.blob",               true);
357 user_pref("network.protocol-handler.expose.data",               true);
359 /******************************************************************************
360  * SECTION: Extensions / plugins                                                       *
361  ******************************************************************************/
363 // PREF: Ensure you have a security delay when installing add-ons (milliseconds)
364 // http://kb.mozillazine.org/Disable_extension_install_delay_-_Firefox
365 // http://www.squarefree.com/2004/07/01/race-conditions-in-security-dialogs/
366 user_pref("security.dialog_enable_delay",                       1000);
368 // PREF: Require signatures
369 // https://wiki.mozilla.org/Addons/Extension_Signing
370 //user_pref("xpinstall.signatures.required",            true);
372 // PREF: Opt-out of add-on metadata updates
373 // https://blog.mozilla.org/addons/how-to-opt-out-of-add-on-metadata-updates/
374 user_pref("extensions.getAddons.cache.enabled",                 false);
376 // PREF: Opt-out of themes (Persona) updates
377 // https://support.mozilla.org/t5/Firefox/how-do-I-prevent-autoamtic-updates-in-a-50-user-environment/td-p/144287
378 user_pref("lightweightThemes.update.enabled",                   false);
380 // PREF: Disable Flash Player NPAPI plugin
381 // http://kb.mozillazine.org/Flash_plugin
382 user_pref("plugin.state.flash",                                 0);
384 // PREF: Disable Java NPAPI plugin
385 user_pref("plugin.state.java",                                  0);
387 // PREF: Disable sending Flash Player crash reports
388 user_pref("dom.ipc.plugins.flash.subprocess.crashreporter.enabled",     false);
390 // PREF: When Flash crash reports are enabled, don't send the visited URL in the crash report
391 user_pref("dom.ipc.plugins.reportCrashURL",                     false);
393 // PREF: When Flash is enabled, download and use Mozilla SWF URIs blocklist
394 // https://bugzilla.mozilla.org/show_bug.cgi?id=1237198
395 // https://github.com/mozilla-services/shavar-plugin-blocklist
396 user_pref("browser.safebrowsing.blockedURIs.enabled", true);
398 // PREF: Disable Shumway (Mozilla Flash renderer)
399 // https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Shumway
400 user_pref("shumway.disabled", true);
402 // PREF: Disable Gnome Shell Integration NPAPI plugin
403 user_pref("plugin.state.libgnome-shell-browser-plugin",         0);
405 // PREF: Disable the bundled OpenH264 video codec (disabled)
406 // http://forums.mozillazine.org/viewtopic.php?p=13845077&sid=28af2622e8bd8497b9113851676846b1#p13845077
407 //user_pref("media.gmp-provider.enabled",               false);
409 // PREF: Enable plugins click-to-play
410 // https://wiki.mozilla.org/Firefox/Click_To_Play
411 // https://blog.mozilla.org/security/2012/10/11/click-to-play-plugins-blocklist-style/
412 user_pref("plugins.click_to_play",                              true);
414 // PREF: Updates addons automatically
415 // https://blog.mozilla.org/addons/how-to-turn-off-add-on-updates/
416 user_pref("extensions.update.enabled",                          true);
418 // PREF: Enable add-on and certificate blocklists (OneCRL) from Mozilla
419 // https://wiki.mozilla.org/Blocklisting
420 // https://blocked.cdn.mozilla.net/
421 // http://kb.mozillazine.org/Extensions.blocklist.enabled
422 // http://kb.mozillazine.org/Extensions.blocklist.url
423 // https://blog.mozilla.org/security/2015/03/03/revoking-intermediate-certificates-introducing-onecrl/
424 // Updated at interval defined in extensions.blocklist.interval (default: 86400)
425 user_pref("extensions.blocklist.enabled",                       true);
426 user_pref("services.blocklist.update_enabled",                  true);
428 // PREF: Decrease system information leakage to Mozilla blocklist update servers
429 // https://trac.torproject.org/projects/tor/ticket/16931
430 user_pref("extensions.blocklist.url",                           "https://blocklist.addons.mozilla.org/blocklist/3/%APP_ID%/%APP_VERSION%/");
432 // PREF: Disable system add-on updates (hidden & always-enabled add-ons from Mozilla)
433 // https://firefox-source-docs.mozilla.org/toolkit/mozapps/extensions/addon-manager/SystemAddons.html
434 // https://blog.mozilla.org/data/2018/08/20/effectively-measuring-search-in-firefox/
435 // https://github.com/pyllyukko/user.js/issues/419
436 // https://dxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/AddonManager.jsm#1248-1257
437 // NOTICE: Disabling system add-on updates prevents Mozilla from "hotfixing" your browser to patch critical problems (one possible use case from the documentation)
438 user_pref("extensions.systemAddon.update.enabled",              false);
440 /******************************************************************************
441  * SECTION: Firefox (anti-)features / components                              *                            *
442  ******************************************************************************/
444 // PREF: Disable WebIDE
445 // https://trac.torproject.org/projects/tor/ticket/16222
446 // https://developer.mozilla.org/docs/Tools/WebIDE
447 user_pref("devtools.webide.enabled",                            false);
448 user_pref("devtools.webide.autoinstallADBHelper",               false);
449 user_pref("devtools.webide.autoinstallFxdtAdapters",            false);
451 // PREF: Disable remote debugging
452 // https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_Desktop
453 // https://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox#Advanced_settings
454 user_pref("devtools.debugger.remote-enabled",                   false);
455 user_pref("devtools.chrome.enabled",                            false);
456 user_pref("devtools.debugger.force-local",                      true);
458 // PREF: Disable Mozilla telemetry/experiments
459 // https://wiki.mozilla.org/Platform/Features/Telemetry
460 // https://wiki.mozilla.org/Privacy/Reviews/Telemetry
461 // https://wiki.mozilla.org/Telemetry
462 // https://www.mozilla.org/en-US/legal/privacy/firefox.html#telemetry
463 // https://support.mozilla.org/t5/Firefox-crashes/Mozilla-Crash-Reporter/ta-p/1715
464 // https://wiki.mozilla.org/Security/Reviews/Firefox6/ReviewNotes/telemetry
465 // https://gecko.readthedocs.io/en/latest/browser/experiments/experiments/manifest.html
466 // https://wiki.mozilla.org/Telemetry/Experiments
467 // https://support.mozilla.org/en-US/questions/1197144
468 user_pref("toolkit.telemetry.enabled",                          false);
469 user_pref("toolkit.telemetry.unified",                          false);
470 user_pref("toolkit.telemetry.archive.enabled",                  false);
471 user_pref("experiments.supported",                              false);
472 user_pref("experiments.enabled",                                false);
473 user_pref("experiments.manifest.uri",                           "");
475 // PREF: Disallow Necko to do A/B testing
476 // https://trac.torproject.org/projects/tor/ticket/13170
477 user_pref("network.allow-experiments",                          false);
479 // PREF: Disable sending Firefox crash reports to Mozilla servers
480 // https://wiki.mozilla.org/Breakpad
481 // http://kb.mozillazine.org/Breakpad
482 // https://dxr.mozilla.org/mozilla-central/source/toolkit/crashreporter
483 // https://bugzilla.mozilla.org/show_bug.cgi?id=411490
484 // A list of submitted crash reports can be found at about:crashes
485 user_pref("breakpad.reportURL",                                 "");
487 // PREF: Disable sending reports of tab crashes to Mozilla (about:tabcrashed), don't nag user about unsent crash reports
488 // https://hg.mozilla.org/mozilla-central/file/tip/browser/app/profile/firefox.js
489 user_pref("browser.tabs.crashReporting.sendReport",             false);
490 user_pref("browser.crashReports.unsubmittedCheck.enabled",      false);
492 // PREF: Disable FlyWeb (discovery of LAN/proximity IoT devices that expose a Web interface)
493 // https://wiki.mozilla.org/FlyWeb
494 // https://wiki.mozilla.org/FlyWeb/Security_scenarios
495 // https://docs.google.com/document/d/1eqLb6cGjDL9XooSYEEo7mE-zKQ-o-AuDTcEyNhfBMBM/edit
496 // http://www.ghacks.net/2016/07/26/firefox-flyweb
497 user_pref("dom.flyweb.enabled",                                 false);
499 // PREF: Disable the UITour backend
500 // https://trac.torproject.org/projects/tor/ticket/19047#comment:3
501 user_pref("browser.uitour.enabled",                             false);
503 // PREF: Enable Firefox Tracking Protection
504 // https://wiki.mozilla.org/Security/Tracking_protection
505 // https://support.mozilla.org/en-US/kb/tracking-protection-firefox
506 // https://support.mozilla.org/en-US/kb/tracking-protection-pbm
507 // https://kontaxis.github.io/trackingprotectionfirefox/
508 // https://feeding.cloud.geek.nz/posts/how-tracking-protection-works-in-firefox/
509 user_pref("privacy.trackingprotection.enabled",                 true);
510 user_pref("privacy.trackingprotection.pbmode.enabled",          true);
512 // PREF: Enable contextual identity Containers feature (Firefox >= 52)
513 // NOTICE: Containers are not available in Private Browsing mode
514 // https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers
515 user_pref("privacy.userContext.enabled",                        true);
517 // PREF: Enable hardening against various fingerprinting vectors (Tor Uplift project)
518 // https://wiki.mozilla.org/Security/Tor_Uplift/Tracking
519 // https://bugzilla.mozilla.org/show_bug.cgi?id=1333933
520 user_pref("privacy.resistFingerprinting",                       true);
522 // PREF: Disable the built-in PDF viewer
523 // https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-2743
524 // https://blog.mozilla.org/security/2015/08/06/firefox-exploit-found-in-the-wild/
525 // https://www.mozilla.org/en-US/security/advisories/mfsa2015-69/
526 user_pref("pdfjs.disabled",                                     true);
528 // PREF: Disable collection/sending of the health report (healthreport.sqlite*)
529 // https://support.mozilla.org/en-US/kb/firefox-health-report-understand-your-browser-perf
530 // https://gecko.readthedocs.org/en/latest/toolkit/components/telemetry/telemetry/preferences.html
531 user_pref("datareporting.healthreport.uploadEnabled",           false);
532 user_pref("datareporting.healthreport.service.enabled",         false);
533 user_pref("datareporting.policy.dataSubmissionEnabled",         false);
535 // PREF: Disable Heartbeat  (Mozilla user rating telemetry)
536 // https://wiki.mozilla.org/Advocacy/heartbeat
537 // https://trac.torproject.org/projects/tor/ticket/19047
538 user_pref("browser.selfsupport.url",                            "");
540 // PREF: Disable Firefox Hello (disabled) (Firefox < 49)
541 // https://wiki.mozilla.org/Loop
542 // https://support.mozilla.org/t5/Chat-and-share/Support-for-Hello-discontinued-in-Firefox-49/ta-p/37946
543 // NOTICE-DISABLED: Firefox Hello requires setting `media.peerconnection.enabled` and `media.getusermedia.screensharing.enabled` to true, `security.OCSP.require` to false to work.
544 //user_pref("loop.enabled",             false);
546 // PREF: Disable Firefox Hello metrics collection
547 // https://groups.google.com/d/topic/mozilla.dev.platform/nyVkCx-_sFw/discussion
548 user_pref("loop.logDomains",                                    false);
550 // PREF: Enable Auto Update (disabled)
551 // NOTICE: Fully automatic updates are disabled and left to package management systems on Linux. Windows users may want to change this setting.
552 // CIS 2.1.1
553 //user_pref("app.update.auto",                                  true);
555 // PREF: Enforce checking for Firefox updates
556 // http://kb.mozillazine.org/App.update.enabled
557 // NOTICE: Update check page might incorrectly report Firefox ESR as out-of-date
558 user_pref("app.update.enabled",                 true);
560 // PREF: Enable blocking reported web forgeries
561 // https://wiki.mozilla.org/Security/Safe_Browsing
562 // http://kb.mozillazine.org/Safe_browsing
563 // https://support.mozilla.org/en-US/kb/how-does-phishing-and-malware-protection-work
564 // http://forums.mozillazine.org/viewtopic.php?f=39&t=2711237&p=12896849#p12896849
565 // CIS 2.3.4
566 user_pref("browser.safebrowsing.enabled",                       true); // Firefox < 50
567 user_pref("browser.safebrowsing.phishing.enabled",              true); // firefox >= 50
569 // PREF: Enable blocking reported attack sites
570 // http://kb.mozillazine.org/Browser.safebrowsing.malware.enabled
571 // CIS 2.3.5
572 user_pref("browser.safebrowsing.malware.enabled",               true);
574 // PREF: Disable querying Google Application Reputation database for downloaded binary files
575 // https://www.mozilla.org/en-US/firefox/39.0/releasenotes/
576 // https://wiki.mozilla.org/Security/Application_Reputation
577 user_pref("browser.safebrowsing.downloads.remote.enabled",      false);
579 // PREF: Disable Pocket
580 // https://support.mozilla.org/en-US/kb/save-web-pages-later-pocket-firefox
581 // https://github.com/pyllyukko/user.js/issues/143
582 user_pref("browser.pocket.enabled",                             false);
583 user_pref("extensions.pocket.enabled",                          false);
585 // PREF: Disable SHIELD
586 // https://support.mozilla.org/en-US/kb/shield
587 // https://bugzilla.mozilla.org/show_bug.cgi?id=1370801
588 user_pref("extensions.shield-recipe-client.enabled",            false);
589 user_pref("app.shield.optoutstudies.enabled",                   false);
591 // PREF: Disable "Recommended by Pocket" in Firefox Quantum
592 user_pref("browser.newtabpage.activity-stream.feeds.section.topstories",        false);
594 /******************************************************************************
595  * SECTION: Automatic connections                                             *
596  ******************************************************************************/
598 // PREF: Limit the connection keep-alive timeout to 15 seconds (disabled)
599 // https://github.com/pyllyukko/user.js/issues/387
600 // http://kb.mozillazine.org/Network.http.keep-alive.timeout
601 // https://httpd.apache.org/docs/current/mod/core.html#keepalivetimeout
602 //user_pref("network.http.keep-alive.timeout",                  15);
604 // PREF: Disable prefetching of <link rel="next"> URLs
605 // http://kb.mozillazine.org/Network.prefetch-next
606 // https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ#Is_there_a_preference_to_disable_link_prefetching.3F
607 user_pref("network.prefetch-next",                              false);
609 // PREF: Disable DNS prefetching
610 // http://kb.mozillazine.org/Network.dns.disablePrefetch
611 // https://developer.mozilla.org/en-US/docs/Web/HTTP/Controlling_DNS_prefetching
612 user_pref("network.dns.disablePrefetch",                        true);
613 user_pref("network.dns.disablePrefetchFromHTTPS",               true);
615 // PREF: Disable the predictive service (Necko)
616 // https://wiki.mozilla.org/Privacy/Reviews/Necko
617 user_pref("network.predictor.enabled",                          false);
619 // PREF: Reject .onion hostnames before passing the to DNS
620 // https://bugzilla.mozilla.org/show_bug.cgi?id=1228457
621 // RFC 7686
622 user_pref("network.dns.blockDotOnion",                          true);
624 // PREF: Disable search suggestions in the search bar
625 // http://kb.mozillazine.org/Browser.search.suggest.enabled
626 user_pref("browser.search.suggest.enabled",                     false);
628 // PREF: Disable "Show search suggestions in location bar results"
629 user_pref("browser.urlbar.suggest.searches",                    false);
630 // PREF: When using the location bar, don't suggest URLs from browsing history
631 user_pref("browser.urlbar.suggest.history",                     false);
633 // PREF: Disable SSDP
634 // https://bugzilla.mozilla.org/show_bug.cgi?id=1111967
635 user_pref("browser.casting.enabled",                            false);
637 // PREF: Disable automatic downloading of OpenH264 codec
638 // https://support.mozilla.org/en-US/kb/how-stop-firefox-making-automatic-connections#w_media-capabilities
639 // https://andreasgal.com/2014/10/14/openh264-now-in-firefox/
640 user_pref("media.gmp-gmpopenh264.enabled",                      false);
641 user_pref("media.gmp-manager.url",                              "");
643 // PREF: Disable speculative pre-connections
644 // https://support.mozilla.org/en-US/kb/how-stop-firefox-making-automatic-connections#w_speculative-pre-connections
645 // https://bugzilla.mozilla.org/show_bug.cgi?id=814169
646 user_pref("network.http.speculative-parallel-limit",            0);
648 // PREF: Disable downloading homepage snippets/messages from Mozilla
649 // https://support.mozilla.org/en-US/kb/how-stop-firefox-making-automatic-connections#w_mozilla-content
650 // https://wiki.mozilla.org/Firefox/Projects/Firefox_Start/Snippet_Service
651 user_pref("browser.aboutHomeSnippets.updateUrl",                "");
653 // PREF: Never check updates for search engines
654 // https://support.mozilla.org/en-US/kb/how-stop-firefox-making-automatic-connections#w_auto-update-checking
655 user_pref("browser.search.update",                              false);
657 // PREF: Disable automatic captive portal detection (Firefox >= 52.0)
658 // https://support.mozilla.org/en-US/questions/1157121
659 user_pref("network.captive-portal-service.enabled",             false);
661 /******************************************************************************
662  * SECTION: HTTP                                                              *
663  ******************************************************************************/
665 // PREF: Disallow NTLMv1
666 // https://bugzilla.mozilla.org/show_bug.cgi?id=828183
667 user_pref("network.negotiate-auth.allow-insecure-ntlm-v1",      false);
668 // it is still allowed through HTTPS. uncomment the following to disable it completely.
669 //user_pref("network.negotiate-auth.allow-insecure-ntlm-v1-https",              false);
671 // PREF: Enable CSP 1.1 script-nonce directive support
672 // https://bugzilla.mozilla.org/show_bug.cgi?id=855326
673 user_pref("security.csp.experimentalEnabled",                   true);
675 // PREF: Enable Content Security Policy (CSP)
676 // https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Introducing_Content_Security_Policy
677 // https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
678 user_pref("security.csp.enable",                                true);
680 // PREF: Enable Subresource Integrity
681 // https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
682 // https://wiki.mozilla.org/Security/Subresource_Integrity
683 user_pref("security.sri.enable",                                true);
685 // PREF: DNT HTTP header (disabled)
686 // https://www.mozilla.org/en-US/firefox/dnt/
687 // https://en.wikipedia.org/wiki/Do_not_track_header
688 // https://dnt-dashboard.mozilla.org
689 // https://github.com/pyllyukko/user.js/issues/11
690 // NOTICE: Do No Track must be enabled manually
691 //user_pref("privacy.donottrackheader.enabled",         true);
693 // PREF: Send a referer header with the target URI as the source
694 // https://bugzilla.mozilla.org/show_bug.cgi?id=822869
695 // https://github.com/pyllyukko/user.js/issues/227
696 // NOTICE: Spoofing referers breaks functionality on websites relying on authentic referer headers
697 // NOTICE: Spoofing referers breaks visualisation of 3rd-party sites on the Lightbeam addon
698 // NOTICE: Spoofing referers disables CSRF protection on some login pages not implementing origin-header/cookie+token based CSRF protection
699 // TODO: https://github.com/pyllyukko/user.js/issues/94, commented-out XOriginPolicy/XOriginTrimmingPolicy = 2 prefs
700 user_pref("network.http.referer.spoofSource",                   true);
702 // PREF: Don't send referer headers when following links across different domains (disabled)
703 // https://github.com/pyllyukko/user.js/issues/227
704 // user_pref("network.http.referer.XOriginPolicy",              2);
706 // PREF: Accept Only 1st Party Cookies
707 // http://kb.mozillazine.org/Network.cookie.cookieBehavior#1
708 // NOTICE: Blocking 3rd-party cookies breaks a number of payment gateways
709 // CIS 2.5.1
710 user_pref("network.cookie.cookieBehavior",                      1);
712 // PREF: Enable first-party isolation
713 // https://bugzilla.mozilla.org/show_bug.cgi?id=1299996
714 // https://bugzilla.mozilla.org/show_bug.cgi?id=1260931
715 // https://wiki.mozilla.org/Security/FirstPartyIsolation
716 // NOTICE: First-party isolation breaks Microsoft Teams
717 // NOTICE: First-party isolation causes HTTP basic auth to ask for credentials for every new tab (see #425)
718 user_pref("privacy.firstparty.isolate",                         true);
720 // PREF: Make sure that third-party cookies (if enabled) never persist beyond the session.
721 // https://feeding.cloud.geek.nz/posts/tweaking-cookies-for-privacy-in-firefox/
722 // http://kb.mozillazine.org/Network.cookie.thirdparty.sessionOnly
723 // https://developer.mozilla.org/en-US/docs/Cookies_Preferences_in_Mozilla#network.cookie.thirdparty.sessionOnly
724 user_pref("network.cookie.thirdparty.sessionOnly",              true);
726 // PREF: Spoof User-agent (disabled)
727 //user_pref("general.useragent.override",                               "Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0");
728 //user_pref("general.appname.override",                         "Netscape");
729 //user_pref("general.appversion.override",                      "5.0 (Windows)");
730 //user_pref("general.platform.override",                                "Win32");
731 //user_pref("general.oscpu.override",                           "Windows NT 6.1");
733 /*******************************************************************************
734  * SECTION: Caching                                                            *
735  ******************************************************************************/
737 // PREF: Permanently enable private browsing mode
738 // https://support.mozilla.org/en-US/kb/Private-Browsing
739 // https://wiki.mozilla.org/PrivateBrowsing
740 // NOTICE: You can not view or inspect cookies when in private browsing: https://bugzilla.mozilla.org/show_bug.cgi?id=823941
741 // NOTICE: When Javascript is enabled, Websites can detect use of Private Browsing mode
742 // NOTICE: Private browsing breaks Kerberos authentication
743 // NOTICE: Disables "Containers" functionality (see below)
744 // NOTICE: "Always use private browsing mode" (browser.privatebrowsing.autostart) disables the possibility to use password manager: https://support.mozilla.org/en-US/kb/usernames-and-passwords-are-not-saved#w_private-browsing
745 user_pref("browser.privatebrowsing.autostart",                  true);
747 // PREF: Do not download URLs for the offline cache
748 // http://kb.mozillazine.org/Browser.cache.offline.enable
749 user_pref("browser.cache.offline.enable",                       false);
751 // PREF: Clear history when Firefox closes
752 // https://support.mozilla.org/en-US/kb/Clear%20Recent%20History#w_how-do-i-make-firefox-clear-my-history-automatically
753 // NOTICE: Installing user.js will remove your browsing history, caches and local storage.
754 // NOTICE: Installing user.js **will remove your saved passwords** (https://github.com/pyllyukko/user.js/issues/27)
755 // NOTICE: Clearing open windows on Firefox exit causes 2 windows to open when Firefox starts https://bugzilla.mozilla.org/show_bug.cgi?id=1334945
756 user_pref("privacy.sanitize.sanitizeOnShutdown",                true);
757 user_pref("privacy.clearOnShutdown.cache",                      true);
758 user_pref("privacy.clearOnShutdown.cookies",                    true);
759 user_pref("privacy.clearOnShutdown.downloads",                  true);
760 user_pref("privacy.clearOnShutdown.formdata",                   true);
761 user_pref("privacy.clearOnShutdown.history",                    true);
762 user_pref("privacy.clearOnShutdown.offlineApps",                true);
763 user_pref("privacy.clearOnShutdown.sessions",                   true);
764 user_pref("privacy.clearOnShutdown.openWindows",                true);
766 // PREF: Set time range to "Everything" as default in "Clear Recent History"
767 user_pref("privacy.sanitize.timeSpan",                          0);
769 // PREF: Clear everything but "Site Preferences" in "Clear Recent History"
770 user_pref("privacy.cpd.offlineApps",                            true);
771 user_pref("privacy.cpd.cache",                                  true);
772 user_pref("privacy.cpd.cookies",                                true);
773 user_pref("privacy.cpd.downloads",                              true);
774 user_pref("privacy.cpd.formdata",                               true);
775 user_pref("privacy.cpd.history",                                true);
776 user_pref("privacy.cpd.sessions",                               true);
778 // PREF: Don't remember browsing history
779 user_pref("places.history.enabled",                             false);
781 // PREF: Disable disk cache
782 // http://kb.mozillazine.org/Browser.cache.disk.enable
783 user_pref("browser.cache.disk.enable",                          false);
785 // PREF: Disable memory cache (disabled)
786 // http://kb.mozillazine.org/Browser.cache.memory.enable
787 //user_pref("browser.cache.memory.enable",              false);
789 // PREF: Disable Caching of SSL Pages
790 // CIS Version 1.2.0 October 21st, 2011 2.5.8
791 // http://kb.mozillazine.org/Browser.cache.disk_cache_ssl
792 user_pref("browser.cache.disk_cache_ssl",                       false);
794 // PREF: Disable download history
795 // CIS Version 1.2.0 October 21st, 2011 2.5.5
796 user_pref("browser.download.manager.retention",                 0);
798 // PREF: Disable password manager
799 // CIS Version 1.2.0 October 21st, 2011 2.5.2
800 user_pref("signon.rememberSignons",                             false);
802 // PREF: Disable form autofill, don't save information entered in web page forms and the Search Bar
803 user_pref("browser.formfill.enable",                            false);
805 // PREF: Cookies expires at the end of the session (when the browser closes)
806 // http://kb.mozillazine.org/Network.cookie.lifetimePolicy#2
807 user_pref("network.cookie.lifetimePolicy",                      2);
809 // PREF: Require manual intervention to autofill known username/passwords sign-in forms
810 // http://kb.mozillazine.org/Signon.autofillForms
811 // https://www.torproject.org/projects/torbrowser/design/#identifier-linkability
812 user_pref("signon.autofillForms",                               false);
814 // PREF: Disable formless login capture
815 // https://bugzilla.mozilla.org/show_bug.cgi?id=1166947
816 user_pref("signon.formlessCapture.enabled",                     false);
818 // PREF: When username/password autofill is enabled, still disable it on non-HTTPS sites
819 // https://hg.mozilla.org/integration/mozilla-inbound/rev/f0d146fe7317
820 user_pref("signon.autofillForms.http",                          false);
822 // PREF: Show in-content login form warning UI for insecure login fields
823 // https://hg.mozilla.org/integration/mozilla-inbound/rev/f0d146fe7317
824 user_pref("security.insecure_field_warning.contextual.enabled", true);
826 // PREF: Disable the password manager for pages with autocomplete=off (disabled)
827 // https://bugzilla.mozilla.org/show_bug.cgi?id=956906
828 // OWASP ASVS V9.1
829 // Does not prevent any kind of auto-completion (see browser.formfill.enable, signon.autofillForms)
830 //user_pref("signon.storeWhenAutocompleteOff",                  false);
832 // PREF: Delete Search and Form History
833 // CIS Version 1.2.0 October 21st, 2011 2.5.6
834 user_pref("browser.formfill.expire_days",                       0);
836 // PREF: Clear SSL Form Session Data
837 // http://kb.mozillazine.org/Browser.sessionstore.privacy_level#2
838 // Store extra session data for unencrypted (non-HTTPS) sites only.
839 // CIS Version 1.2.0 October 21st, 2011 2.5.7
840 // NOTE: CIS says 1, we use 2
841 user_pref("browser.sessionstore.privacy_level",                 2);
843 // PREF: Delete temporary files on exit
844 // https://bugzilla.mozilla.org/show_bug.cgi?id=238789
845 user_pref("browser.helperApps.deleteTempFileOnExit",            true);
847 // PREF: Do not create screenshots of visited pages (relates to the "new tab page" feature)
848 // https://support.mozilla.org/en-US/questions/973320
849 // https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/Preference_reference/browser.pagethumbnails.capturing_disabled
850 user_pref("browser.pagethumbnails.capturing_disabled",          true);
852 // PREF: Don't fetch and permanently store favicons for Windows .URL shortcuts created by drag and drop
853 // NOTICE: .URL shortcut files will be created with a generic icon
854 // Favicons are stored as .ico files in $profile_dir\shortcutCache
855 user_pref("browser.shell.shortcutFavicons",                                     false);
857 // PREF: Disable bookmarks backups (default: 15)
858 // http://kb.mozillazine.org/Browser.bookmarks.max_backups
859 user_pref("browser.bookmarks.max_backups", 0);
861 /*******************************************************************************
862  * SECTION: UI related                                                         *
863  *******************************************************************************/
865 // PREF: Enable insecure password warnings (login forms in non-HTTPS pages)
866 // https://blog.mozilla.org/tanvi/2016/01/28/no-more-passwords-over-http-please/
867 // https://bugzilla.mozilla.org/show_bug.cgi?id=1319119
868 // https://bugzilla.mozilla.org/show_bug.cgi?id=1217156
869 user_pref("security.insecure_password.ui.enabled",              true);
871 // PREF: Disable right-click menu manipulation via JavaScript (disabled)
872 //user_pref("dom.event.contextmenu.enabled",            false);
874 // PREF: Disable "Are you sure you want to leave this page?" popups on page close
875 // https://support.mozilla.org/en-US/questions/1043508
876 // Does not prevent JS leaks of the page close event.
877 // https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload
878 //user_pref("dom.disable_beforeunload",    true);
880 // PREF: Disable Downloading on Desktop
881 // CIS 2.3.2
882 user_pref("browser.download.folderList",                        2);
884 // PREF: Always ask the user where to download
885 // https://developer.mozilla.org/en/Download_Manager_preferences (obsolete)
886 user_pref("browser.download.useDownloadDir",                    false);
888 // PREF: Disable the "new tab page" feature and show a blank tab instead
889 // https://wiki.mozilla.org/Privacy/Reviews/New_Tab
890 // https://support.mozilla.org/en-US/kb/new-tab-page-show-hide-and-customize-top-sites#w_how-do-i-turn-the-new-tab-page-off
891 user_pref("browser.newtabpage.enabled",                         false);
892 user_pref("browser.newtab.url",                                 "about:blank");
894 // PREF: Disable Activity Stream
895 // https://wiki.mozilla.org/Firefox/Activity_Stream
896 user_pref("browser.newtabpage.activity-stream.enabled",         false);
898 // PREF: Disable new tab tile ads & preload
899 // http://www.thewindowsclub.com/disable-remove-ad-tiles-from-firefox
900 // http://forums.mozillazine.org/viewtopic.php?p=13876331#p13876331
901 // https://wiki.mozilla.org/Tiles/Technical_Documentation#Ping
902 // https://gecko.readthedocs.org/en/latest/browser/browser/DirectoryLinksProvider.html#browser-newtabpage-directory-source
903 // https://gecko.readthedocs.org/en/latest/browser/browser/DirectoryLinksProvider.html#browser-newtabpage-directory-ping
904 // TODO: deprecated? not in DXR, some dead links
905 user_pref("browser.newtabpage.enhanced",                        false);
906 user_pref("browser.newtab.preload",                             false);
907 user_pref("browser.newtabpage.directory.ping",                  "");
908 user_pref("browser.newtabpage.directory.source",                "data:text/plain,{}");
910 // PREF: Enable Auto Notification of Outdated Plugins (Firefox < 50)
911 // https://wiki.mozilla.org/Firefox3.6/Plugin_Update_Awareness_Security_Review
912 // CIS Version 1.2.0 October 21st, 2011 2.1.2
913 // https://hg.mozilla.org/mozilla-central/rev/304560
914 user_pref("plugins.update.notifyUser",                          true);
916 // PREF: Force Punycode for Internationalized Domain Names
917 // http://kb.mozillazine.org/Network.IDN_show_punycode
918 // https://www.xudongz.com/blog/2017/idn-phishing/
919 // https://wiki.mozilla.org/IDN_Display_Algorithm
920 // https://en.wikipedia.org/wiki/IDN_homograph_attack
921 // https://www.mozilla.org/en-US/security/advisories/mfsa2017-02/
922 // CIS Mozilla Firefox 24 ESR v1.0.0 - 3.6
923 user_pref("network.IDN_show_punycode",                          true);
925 // PREF: Disable inline autocomplete in URL bar
926 // http://kb.mozillazine.org/Inline_autocomplete
927 user_pref("browser.urlbar.autoFill",                            false);
928 user_pref("browser.urlbar.autoFill.typed",                      false);
930 // PREF: Disable CSS :visited selectors
931 // https://blog.mozilla.org/security/2010/03/31/plugging-the-css-history-leak/
932 // https://dbaron.org/mozilla/visited-privacy
933 user_pref("layout.css.visited_links_enabled",                   false);
935 // PREF: Disable URL bar autocomplete and history/bookmarks suggestions dropdown
936 // http://kb.mozillazine.org/Disabling_autocomplete_-_Firefox#Firefox_3.5
937 user_pref("browser.urlbar.autocomplete.enabled",                false);
939 // PREF: Do not check if Firefox is the default browser
940 user_pref("browser.shell.checkDefaultBrowser",                  false);
942 // PREF: When password manager is enabled, lock the password storage periodically
943 // CIS Version 1.2.0 October 21st, 2011 2.5.3 Disable Prompting for Credential Storage
944 user_pref("security.ask_for_password",                          2);
946 // PREF: Lock the password storage every 1 minutes (default: 30)
947 user_pref("security.password_lifetime",                         1);
949 // PREF: Display a notification bar when websites offer data for offline use
950 // http://kb.mozillazine.org/Browser.offline-apps.notify
951 user_pref("browser.offline-apps.notify",                        true);
953 /******************************************************************************
954  * SECTION: Cryptography                                                      *
955  ******************************************************************************/
957 // PREF: Enable HSTS preload list (pre-set HSTS sites list provided by Mozilla)
958 // https://blog.mozilla.org/security/2012/11/01/preloading-hsts/
959 // https://wiki.mozilla.org/Privacy/Features/HSTS_Preload_List
960 // https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
961 user_pref("network.stricttransportsecurity.preloadlist",        true);
963 // PREF: Enable Online Certificate Status Protocol
964 // https://en.wikipedia.org/wiki/Online_Certificate_Status_Protocol
965 // https://www.imperialviolet.org/2014/04/19/revchecking.html
966 // https://www.maikel.pro/blog/current-state-certificate-revocation-crls-ocsp/
967 // https://wiki.mozilla.org/CA:RevocationPlan
968 // https://wiki.mozilla.org/CA:ImprovingRevocation
969 // https://wiki.mozilla.org/CA:OCSP-HardFail
970 // https://news.netcraft.com/archives/2014/04/24/certificate-revocation-why-browsers-remain-affected-by-heartbleed.html
971 // https://news.netcraft.com/archives/2013/04/16/certificate-revocation-and-the-performance-of-ocsp.html
972 // NOTICE: OCSP leaks your IP and domains you visit to the CA when OCSP Stapling is not available on visited host
973 // NOTICE: OCSP is vulnerable to replay attacks when nonce is not configured on the OCSP responder
974 // NOTICE: OCSP adds latency (performance)
975 // NOTICE: Short-lived certificates are not checked for revocation (security.pki.cert_short_lifetime_in_days, default:10)
976 // CIS Version 1.2.0 October 21st, 2011 2.2.4
977 user_pref("security.OCSP.enabled",                              1);
979 // PREF: Enable OCSP Stapling support
980 // https://en.wikipedia.org/wiki/OCSP_stapling
981 // https://blog.mozilla.org/security/2013/07/29/ocsp-stapling-in-firefox/
982 // https://www.digitalocean.com/community/tutorials/how-to-configure-ocsp-stapling-on-apache-and-nginx
983 user_pref("security.ssl.enable_ocsp_stapling",                  true);
985 // PREF: Enable OCSP Must-Staple support (Firefox >= 45)
986 // https://blog.mozilla.org/security/2015/11/23/improving-revocation-ocsp-must-staple-and-short-lived-certificates/
987 // https://www.entrust.com/ocsp-must-staple/
988 // https://github.com/schomery/privacy-settings/issues/40
989 // NOTICE: Firefox falls back on plain OCSP when must-staple is not configured on the host certificate
990 user_pref("security.ssl.enable_ocsp_must_staple",               true);
992 // PREF: Require a valid OCSP response for OCSP enabled certificates
993 // https://groups.google.com/forum/#!topic/mozilla.dev.security/n1G-N2-HTVA
994 // Disabling this will make OCSP bypassable by MitM attacks suppressing OCSP responses
995 // NOTICE: `security.OCSP.require` will make the connection fail when the OCSP responder is unavailable
996 // NOTICE: `security.OCSP.require` is known to break browsing on some [captive portals](https://en.wikipedia.org/wiki/Captive_portal)
997 user_pref("security.OCSP.require",                              true);
999 // PREF: Disable TLS Session Tickets
1000 // https://www.blackhat.com/us-13/briefings.html#NextGen
1001 // https://media.blackhat.com/us-13/US-13-Daigniere-TLS-Secrets-Slides.pdf
1002 // https://media.blackhat.com/us-13/US-13-Daigniere-TLS-Secrets-WP.pdf
1003 // https://bugzilla.mozilla.org/show_bug.cgi?id=917049
1004 // https://bugzilla.mozilla.org/show_bug.cgi?id=967977
1005 user_pref("security.ssl.disable_session_identifiers",           true);
1007 // PREF: Only allow TLS 1.[0-3]
1008 // http://kb.mozillazine.org/Security.tls.version.*
1009 // 1 = TLS 1.0 is the minimum required / maximum supported encryption protocol. (This is the current default for the maximum supported version.)
1010 // 2 = TLS 1.1 is the minimum required / maximum supported encryption protocol.
1011 // 3 = TLS 1.2 is the minimum required / maximum supported encryption protocol.
1012 // 4 = TLS 1.3 is the minimum required / maximum supported encryption protocol.
1013 user_pref("security.tls.version.min",                           1);
1014 user_pref("security.tls.version.max",                           4);
1016 // PREF: Disable insecure TLS version fallback
1017 // https://bugzilla.mozilla.org/show_bug.cgi?id=1084025
1018 // https://github.com/pyllyukko/user.js/pull/206#issuecomment-280229645
1019 user_pref("security.tls.version.fallback-limit",                3);
1021 // PREF: Enfore Public Key Pinning
1022 // https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning
1023 // https://wiki.mozilla.org/SecurityEngineering/Public_Key_Pinning
1024 // "2. Strict. Pinning is always enforced."
1025 user_pref("security.cert_pinning.enforcement_level",            2);
1027 // PREF: Disallow SHA-1
1028 // https://bugzilla.mozilla.org/show_bug.cgi?id=1302140
1029 // https://shattered.io/
1030 user_pref("security.pki.sha1_enforcement_level",                1);
1032 // PREF: Warn the user when server doesn't support RFC 5746 ("safe" renegotiation)
1033 // https://wiki.mozilla.org/Security:Renegotiation#security.ssl.treat_unsafe_negotiation_as_broken
1034 // https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-3555
1035 user_pref("security.ssl.treat_unsafe_negotiation_as_broken",    true);
1037 // PREF: Disallow connection to servers not supporting safe renegotiation (disabled)
1038 // https://wiki.mozilla.org/Security:Renegotiation#security.ssl.require_safe_negotiation
1039 // https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-3555
1040 // TODO: `security.ssl.require_safe_negotiation` is more secure but makes browsing next to impossible (2012-2014-... - `ssl_error_unsafe_negotiation` errors), so is left disabled
1041 //user_pref("security.ssl.require_safe_negotiation",            true);
1043 // PREF: Disable automatic reporting of TLS connection errors
1044 // https://support.mozilla.org/en-US/kb/certificate-pinning-reports
1045 // we could also disable security.ssl.errorReporting.enabled, but I think it's
1046 // good to leave the option to report potentially malicious sites if the user
1047 // chooses to do so.
1048 // you can test this at https://pinningtest.appspot.com/
1049 user_pref("security.ssl.errorReporting.automatic",              false);
1051 // PREF: Pre-populate the current URL but do not pre-fetch the certificate in the "Add Security Exception" dialog
1052 // http://kb.mozillazine.org/Browser.ssl_override_behavior
1053 // https://github.com/pyllyukko/user.js/issues/210
1054 user_pref("browser.ssl_override_behavior",                      1);
1056 /******************************************************************************
1057  * SECTION: Cipher suites                                                     *
1058  ******************************************************************************/
1060 // PREF: Disable null ciphers
1061 user_pref("security.ssl3.rsa_null_sha",                         false);
1062 user_pref("security.ssl3.rsa_null_md5",                         false);
1063 user_pref("security.ssl3.ecdhe_rsa_null_sha",                   false);
1064 user_pref("security.ssl3.ecdhe_ecdsa_null_sha",                 false);
1065 user_pref("security.ssl3.ecdh_rsa_null_sha",                    false);
1066 user_pref("security.ssl3.ecdh_ecdsa_null_sha",                  false);
1068 // PREF: Disable SEED cipher
1069 // https://en.wikipedia.org/wiki/SEED
1070 user_pref("security.ssl3.rsa_seed_sha",                         false);
1072 // PREF: Disable 40/56/128-bit ciphers
1073 // 40-bit ciphers
1074 user_pref("security.ssl3.rsa_rc4_40_md5",                       false);
1075 user_pref("security.ssl3.rsa_rc2_40_md5",                       false);
1076 // 56-bit ciphers
1077 user_pref("security.ssl3.rsa_1024_rc4_56_sha",                  false);
1078 // 128-bit ciphers
1079 user_pref("security.ssl3.rsa_camellia_128_sha",                 false);
1080 user_pref("security.ssl3.ecdhe_rsa_aes_128_sha",                false);
1081 user_pref("security.ssl3.ecdhe_ecdsa_aes_128_sha",              false);
1082 user_pref("security.ssl3.ecdh_rsa_aes_128_sha",                 false);
1083 user_pref("security.ssl3.ecdh_ecdsa_aes_128_sha",               false);
1084 user_pref("security.ssl3.dhe_rsa_camellia_128_sha",             false);
1085 user_pref("security.ssl3.dhe_rsa_aes_128_sha",                  false);
1087 // PREF: Disable RC4
1088 // https://developer.mozilla.org/en-US/Firefox/Releases/38#Security
1089 // https://bugzilla.mozilla.org/show_bug.cgi?id=1138882
1090 // https://rc4.io/
1091 // https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-2566
1092 user_pref("security.ssl3.ecdh_ecdsa_rc4_128_sha",               false);
1093 user_pref("security.ssl3.ecdh_rsa_rc4_128_sha",                 false);
1094 user_pref("security.ssl3.ecdhe_ecdsa_rc4_128_sha",              false);
1095 user_pref("security.ssl3.ecdhe_rsa_rc4_128_sha",                false);
1096 user_pref("security.ssl3.rsa_rc4_128_md5",                      false);
1097 user_pref("security.ssl3.rsa_rc4_128_sha",                      false);
1098 user_pref("security.tls.unrestricted_rc4_fallback",             false);
1100 // PREF: Disable 3DES (effective key size is < 128)
1101 // https://en.wikipedia.org/wiki/3des#Security
1102 // http://en.citizendium.org/wiki/Meet-in-the-middle_attack
1103 // http://www-archive.mozilla.org/projects/security/pki/nss/ssl/fips-ssl-ciphersuites.html
1104 user_pref("security.ssl3.dhe_dss_des_ede3_sha",                 false);
1105 user_pref("security.ssl3.dhe_rsa_des_ede3_sha",                 false);
1106 user_pref("security.ssl3.ecdh_ecdsa_des_ede3_sha",              false);
1107 user_pref("security.ssl3.ecdh_rsa_des_ede3_sha",                false);
1108 user_pref("security.ssl3.ecdhe_ecdsa_des_ede3_sha",             false);
1109 user_pref("security.ssl3.ecdhe_rsa_des_ede3_sha",               false);
1110 user_pref("security.ssl3.rsa_des_ede3_sha",                     false);
1111 user_pref("security.ssl3.rsa_fips_des_ede3_sha",                false);
1113 // PREF: Disable ciphers with ECDH (non-ephemeral)
1114 user_pref("security.ssl3.ecdh_rsa_aes_256_sha",                 false);
1115 user_pref("security.ssl3.ecdh_ecdsa_aes_256_sha",               false);
1117 // PREF: Disable 256 bits ciphers without PFS
1118 user_pref("security.ssl3.rsa_camellia_256_sha",                 false);
1120 // PREF: Enable ciphers with ECDHE and key size > 128bits
1121 user_pref("security.ssl3.ecdhe_rsa_aes_256_sha",                true); // 0xc014
1122 user_pref("security.ssl3.ecdhe_ecdsa_aes_256_sha",              true); // 0xc00a
1124 // PREF: Enable GCM ciphers (TLSv1.2 only)
1125 // https://en.wikipedia.org/wiki/Galois/Counter_Mode
1126 user_pref("security.ssl3.ecdhe_ecdsa_aes_128_gcm_sha256",       true); // 0xc02b
1127 user_pref("security.ssl3.ecdhe_rsa_aes_128_gcm_sha256",         true); // 0xc02f
1129 // PREF: Enable ChaCha20 and Poly1305 (Firefox >= 47)
1130 // https://www.mozilla.org/en-US/firefox/47.0/releasenotes/
1131 // https://tools.ietf.org/html/rfc7905
1132 // https://bugzilla.mozilla.org/show_bug.cgi?id=917571
1133 // https://bugzilla.mozilla.org/show_bug.cgi?id=1247860
1134 // https://cr.yp.to/chacha.html
1135 user_pref("security.ssl3.ecdhe_ecdsa_chacha20_poly1305_sha256", true);
1136 user_pref("security.ssl3.ecdhe_rsa_chacha20_poly1305_sha256",   true);
1138 // PREF: Disable ciphers susceptible to the logjam attack
1139 // https://weakdh.org/
1140 user_pref("security.ssl3.dhe_rsa_camellia_256_sha",             false);
1141 user_pref("security.ssl3.dhe_rsa_aes_256_sha",                  false);
1143 // PREF: Disable ciphers with DSA (max 1024 bits)
1144 user_pref("security.ssl3.dhe_dss_aes_128_sha",                  false);
1145 user_pref("security.ssl3.dhe_dss_aes_256_sha",                  false);
1146 user_pref("security.ssl3.dhe_dss_camellia_128_sha",             false);
1147 user_pref("security.ssl3.dhe_dss_camellia_256_sha",             false);
1149 // PREF: Fallbacks due compatibility reasons
1150 user_pref("security.ssl3.rsa_aes_256_sha",                      true); // 0x35
1151 user_pref("security.ssl3.rsa_aes_128_sha",                      true); // 0x2f