forked from intika/Librefox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmozilla.cfg
3233 lines (2691 loc) · 153 KB
/
mozilla.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// ============================================================================================================================================
// Privafox-Firefox Version : 2.1
// ==============================
//
// Privafox-Firefox : Firefox settings for a better security, privacy and performance
//
// Mozilla.cfg : Locking firefox settings for security, privacy & prevent settings changes
//
// Autor : Intika - intikadev (at) gmail.com
//
// Donation : Paypal : intikadev (at) gmail.com
//
// Site : https://github.com/intika/privafox-firefox
//
// Based on : Ghacks-user.js (https://github.com/ghacksuserjs/ghacks-user.js)
// User.js (https://github.com/pyllyukko/user.js/)
// PrivaConf (https://addons.mozilla.org/en-US/firefox/addon/privaconf/)
// Big thanks to all of them
//
// ============================================================================================================================================
// Documentation .............. :
// ==============================
//
// "Section" : Description of the settings section separated by "----"
// "Bench Diff" : Impact on the performance of firefox can be a gain or loss of performance
// +100/5000 stand for 2% gained performance and -1500/5000 stand for -30% performance loss
// Performance can be tested here : https://intika.github.io/octane/
// "Pref" : Preference/Settings name and or description followed by links or documentations
// and some time explanation why the setting is commented and ignored.
// "lockPref" : Locked preference can not be changed on firefox, nor by extensions, can only be changed here
// lockPref is used to lock preferences so they cannot be changed through the GUI or about:config.
// In many cases the GUI will change to reflect this, graying out or removing options. Appears
// in about:config as "locked". Some config items require lockPref to be set, such as app.update.enabled.
// It will not work if it set with just pref.
// "pref" : Sets the preference as if a user had set it, every time you start the browser. So users can make changes,
// but they will be erased on restart. If you set a particular preference this way,
// it shows up in about:config as "user set".
// "defaultPref" : Defaulting : Is used to alter the default value, though users can set it normally and their changes will
// be saved between sessions. If preferences are reset to default through the GUI or some other method,
// this is what they will go back to. Appears in about:config as "default".
// "clearPref" : Can be used to "blank" certain preferences. This can be useful e.g. to disable functions
// that rely on comparing version numbers.
//
// ============================================================================================================================================
// Protection ................. :
// ==============================
//
// Pref : Locking mozilla.cfg itself
lockPref("general.config.filename", "mozilla.cfg");
//
// ============================================================================================================================================
// Index mozilla.cfg .......... :
// ==============================
//
// -----------------------------------------------------------------------
// Section : User settings // Bench Diff : +0 / 5000
// Section : Defaulting Settings // Bench Diff : +0 / 5000
// -------------------------------------------
// Section : Controversial // Bench Diff : +0 / 5000
// Section : Firefox Fingerprint // Bench Diff : +0 / 5000
// Section : Locale/Time // Bench Diff : +0 / 5000
// Section : Ghacks-user Selection // Bench Diff : +100 / 5000
// Section : Extensions Manager // Bench Diff : +0 / 5000
// Section : IJWY To Shut Up // Bench Diff : +0 / 5000
// Section : Microsoft Windows // Bench Diff : +0 / 5000
// Section : Firefox ESR60.x // Bench Diff : +0 / 5000
// -------------------------------------------
// Section : Security 1/3 // Bench Diff : +0 / 5000
// Section : Security 2/3 // Bench Diff : +0 / 5000
// Section : Security 3/3 (Cipher) // Bench Diff : +0 / 5000
// -------------------------------------------
// Section : Performance 1/5 // Bench Diff : +650 / 5000
// Section : Performance 2/5 // Bench Diff : -800 / 5000
// Section : Performance 3/5 // Bench Diff : -1720 / 5000
// Section : Performance 4/5 // Bench Diff : -200 / 5000
// Section : Performance 5/5 // Bench Diff : -50 / 5000
// -------------------------------------------
// Section : General Settings 1/3 // Bench Diff : +100 / 5000
// Section : General Settings 2/3 // Bench Diff : +0 / 5000
// Section : General Settings 3/3 // Bench Diff : -40 / 5000
// -------------------------------------------
// Section : Disabled - ON/OFF // Bench Diff : +0 / 5000
// Section : Disabled - Deprecated Active // Bench Diff : +0 / 5000
// Section : Disabled - Deprecated Inactive // Bench Diff : +0 / 5000
// -----------------------------------------------------------------------
//
// ============================================================================================================================================
// Index local-settings.js .... :
// ==============================
//
// -----------------------------------------------------------------------
// Section : General Settings // Bench Diff : ++ / 5000
// -----------------------------------------------------------------------
//
// ============================================================================================================================================
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// Section : User Settings
// Bench Diff : +0/5000
// >>>>>>>>>>>>>>>>>>>>
// ----------------------------------------------------------------------------------------------------
// User Settings : Cookies settings
// ----------------------------------------------------------------------------------------------------
// Pref : Accept Only 1st Party Cookies
// http://kb.mozillazine.org/Network.cookie.cookieBehavior#1
// Blocking 3rd-party cookies breaks a number of payment gateways
// CIS 2.5.1
lockPref("network.cookie.cookieBehavior", 1);
// Pref : Cookies expires at the end of the session (when the browser closes)
// http://kb.mozillazine.org/Network.cookie.lifetimePolicy#2
// 0=until they expire (default)
// 2=until you close Firefox
// 3=for n days
lockPref("network.cookie.lifetimePolicy", 2);
// Pref : Disable Cookie Exception Button
// WARNING Bug !!! This lock the button whether its false or true
//lockPref("pref.privacy.disable_button.cookie_exceptions", false);
// Pref : 2706: enable support for same-site cookies (FF60+)
// [1] https://bugzilla.mozilla.org/795346
// [2] https://blog.mozilla.org/security/2018/04/24/same-site-cookies-in-firefox-60/
// [3] https://www.sjoerdlangkemper.nl/2016/04/14/preventing-csrf-with-samesite-cookie-attribute/
lockPref("network.cookie.same-site.enabled", true); // default: true
// Pref : 2705: disable HTTP sites setting cookies with the "secure" directive (FF52+)
// [1] https://developer.mozilla.org/Firefox/Releases/52#HTTP
lockPref("network.cookie.leave-secure-alone", true); // default: true
// Pref : 2702: set third-party cookies (i.e ALL) (if enabled, see above pref) to session-only
// and (FF58+) set third-party non-secure (i.e HTTP) cookies to session-only
// [NOTE] .sessionOnly overrides .nonsecureSessionOnly except when .sessionOnly=false and
// nonsecureSessionOnly=true. This allows you to keep HTTPS cookies, but session-only HTTP ones
// [1] https://feeding.cloud.geek.nz/posts/tweaking-cookies-for-privacy-in-firefox/
// [2] http://kb.mozillazine.org/Network.cookie.thirdparty.sessionOnly
lockPref("network.cookie.thirdparty.sessionOnly", true); // default : false
lockPref("network.cookie.thirdparty.nonsecureSessionOnly", true); // (FF58+) // default false
// Also check "User Settings : Track Protection" for other cookies settings
// ----------------------------------------------------------------------------------------------------
// User Settings : Track Protection (Integrated disconnect.me settings like uBlock)
// ----------------------------------------------------------------------------------------------------
// Pref : Track Protection
// Firefox now integrate a tracking protection feature (based on disconnect.me)
// it's a light list content blocking, listing can not be edited, this feature
// is disabled in Librefox. it's recommended to use ublock instead.
// This feature is disabled :
// - Until it evolve and integrate at least list editing
// - Because double filtering (this + ublock) is not suitable for performance.
// Pref : Track Protection
lockPref("privacy.trackingprotection.enabled", false);
// Pref : 0425: disable passive Tracking Protection (FF53+)
// Passive TP annotates channels to lower the priority of network loads for resources
// on the tracking protection list
// [NOTE] It has no effect if TP is enabled, but keep in mind that by default TP is
// only enabled in Private Windows
// This is included for people who want to completely disable Tracking Protection.
// [1] https://bugzilla.mozilla.org/buglist.cgi?bug_id=1170190,1141814
lockPref("privacy.trackingprotection.annotate_channels", false);
lockPref("privacy.trackingprotection.lower_network_priority", false);
lockPref("privacy.trackingprotection.pbmode.enabled", false);
// Pref : Changing block list (Tracking protection)
// Default value "test-track-simple,base-track-digest256"
lockPref("urlclassifier.trackingTable", "");
// As tracking protection is disabled the button is disabled as well
lockPref("pref.privacy.disable_button.change_blocklist", true);
// Pref : contentblocking reportBreakage
lockPref("browser.contentblocking.reportBreakage.enabled", false);
lockPref("browser.contentblocking.reportBreakage.url", "");
lockPref("browser.contentblocking.rejecttrackers.reportBreakage.enabled", false);
// Pref : Third-party cookie ui under preferences
lockPref("browser.contentblocking.rejecttrackers.ui.enabled", false); //This hide third-party cookie ui
// Needed to lock third-party cookie ui (third-party cookies are blocked tho)
// Pref : Disable tracking protection ui list editing under url bar popup
lockPref("browser.contentblocking.trackingprotection.control-center.ui.enabled", false);
// Pref : Disable tracking protection ui list editing under preferences
lockPref("browser.contentblocking.trackingprotection.ui.enabled", false);
// Pref : Other CB/TP UI not needed
//lockPref("browser.contentblocking.global-toggle.enabled", false);
//lockPref("browser.contentblocking.rejecttrackers.ui.recommended", false);
//lockPref("browser.contentblocking.fastblock.ui.enabled", false);
//lockPref("browser.contentblocking.fastblock.control-center.ui.enabled", false);
// Pref : Tracking Protection Exception List
//lockPref("browser.contentblocking.allowlist.annotations.enabled", false);
//lockPref("browser.contentblocking.allowlist.storage.enabled", false);
// Pref : Disable exception button but does not work as expected.
//lockPref("pref.privacy.disable_button.tracking_protection_exceptions", false);
// This seems to only disable the button, not suitable
// Pref : Third-party cookie ui under url bar
//lockPref("browser.contentblocking.rejecttrackers.control-center.ui.enabled", false);
// This disable third-party cookie ui under url bar
// This is disabled to leave icon on url
// Pref : Disable TP UI
//lockPref("browser.contentblocking.ui.enabled", false);
// Fully disable CB/TP ui, this is disabled to leave icon on url
// Pref : 0426 : Enforce Content Blocking (required to block cookies) (FF63+)
// Master switch for all content blocking features (includes tracking protection,
// but excludes tracking annotations annotate_channels).
//lockPref("browser.contentblocking.enabled", false); // default: true
// Other settings already regulate this section sub settings (this master switch
// is not suitable).
// Disabled this because it is needed for blocking third party cookies
// ----------------------------------------------------------------------------------------------------
// User Settings : Auto play settings
// ----------------------------------------------------------------------------------------------------
// Pref : 2030: disable auto-play of HTML5 media (FF63+)
// 0=Allowed (default), 1=Blocked, 2=Prompt
// [SETUP-WEB] This may break video playback on various sites
lockPref("media.autoplay.default", 2);
// ----------------------------------------------------------------------------------------------------
// User Settings : Password manager settings
// ----------------------------------------------------------------------------------------------------
// Pref : Disable password manager
// CIS Version 1.2.0 October 21st, 2011 2.5.2
lockPref("signon.rememberSignons", false); // policies "OfferToSaveLogins": false,
lockPref("services.sync.prefs.sync.signon.rememberSignons", false);
// Pref : Disable websites autocomplete (FF30+)
// Don't let sites dictate use of saved logins and passwords.
lockPref("signon.storeWhenAutocompleteOff", false); // default: true
// Also check policies.json for DisableMasterPasswordCreation
// Pref : When password manager is enabled, lock the password storage periodically
// CIS Version 1.2.0 October 21st, 2011 2.5.3 Disable Prompting for Credential Storage
// Advanced user settings when password manager is enabled
//lockPref("security.ask_for_password", 2);
// Pref : Lock the password storage every 1 minutes (default: 30)
// Advanced user settings when password manager is enabled
//lockPref("security.password_lifetime", 5);
// ----------------------------------------------------------------------------------------------------
// User Settings : History settings
// ----------------------------------------------------------------------------------------------------
// Pref : 0804 : limit history leaks via enumeration (PER TAB: back/forward) - PRIVACY
// This is a PER TAB session history. You still have a full history stored under all history
// default=50, minimum=1=currentpage, 2 is the recommended minimum as some pages
// use it as a means of referral (e.g. hotlinking), 4 or 6 or 10 may be more practical
lockPref("browser.sessionhistory.max_entries", 20);
// Pref : Disable Displaying Javascript in History URLs
// http://kb.mozillazine.org/Browser.urlbar.filter.javascript
// CIS 2.3.6
lockPref("browser.urlbar.filter.javascript", true);
// Defaulting --------------------------
// Pref : Clear offline site data on shutdown
defaultPref("privacy.clearOnShutdown.offlineApps", true);
// Pref : Clear offline site data on clear dialog (History/Clear...)
defaultPref("privacy.cpd.offlineApps", true); // Offline Website Data
// Pref : Set time range to "Everything" as default in "Clear Recent History"
// This should not be enforced
defaultPref("privacy.sanitize.timeSpan", 0);
// Pref : Disable form autofill, don't save information
// entered in web page forms and the Search Bar
// remember search and form history setting
defaultPref("browser.formfill.enable", false);
// Pref : Defaulting Settings : Clear history when closing
defaultPref("privacy.sanitize.sanitizeOnShutdown", true);
// Pref : Defaulting Settings : Does not remember history
defaultPref("places.history.enabled", false);
// Pref : Settings history settings to custum by default
defaultPref("privacy.history.custom", true);
// -------------------------------------
// Pref : Clear session data on clear dialog (History/Clear...)
//defaultPref("privacy.cpd.openWindows", true); // Clear session data
// Same as 2805, session storage is cleared anyway... check with storage inspector
// Pref : 2805: privacy.*.openWindows (clear session restore data) (FF34+)
// [NOTE] There is a years-old bug that these cause two windows when Firefox restarts.
// You do not need these anyway if session restore is disabled (see 1020)
//defaultPref("privacy.clearOnShutdown.openWindows", true);
// Break session restore on crash & some theming extensions
// Also this have a bug causing two windows when Firefox restarts.
// The session is deleted anyway on restart so its not useful
// Mitigated with other settings
// Pref : Defaulting Settings : Clear history when closing - Pref : 2803 : Duplicate ?
// "sessions" removed from cleaning list as its an important data to keep...
// user may add it back in the gui
// This settings work only as string not as bool (This seems to be a bug in ffox)
// Also this settings seems to kill following settings so it should be the last
//defaultPref("privacy.sanitize.pending", '[{"id":"shutdown","itemsToClear":["cache","cookies","history","formdata","downloads"],"options":{}}]');
// Its erased if not enforced... and default does not differ a lot (session included in default...)
// This erase the settings no matter what ! so carefull here
// -------------------------------------
// Pref : 1006: disable permissions manager from writing to disk [RESTART]
// [NOTE] This means any permission changes are session only
// [1] https://bugzilla.mozilla.org/967812
//lockPref("permissions.memory_only", true); // (hidden pref)
// This does not keep sites permission and exceptions its then disabled
// This is managed by sanitize settings
// Pref : Delete Search and Form History
// Disabled - Deprecated Active - This is not deprecated
// Only used in a single test ? does not harm to have it
// CIS Version 1.2.0 October 21st, 2011 2.5.6
// Default value is 180 day
// Disabled because its managed by sanitize settings
//lockPref("browser.formfill.expire_days", 0);
// Also check "User Settings : Session"
// Also check "User Settings : Autofill settings"
// ----------------------------------------------------------------------------------------------------
// User Settings : Session : Other session settings on disabled section : Also Pref : 2805
// ----------------------------------------------------------------------------------------------------
// Pref : 1021 : disable storing extra session data
// extra session data contains contents of forms, scrollbar positions, cookies and POST data
// define on which sites to save extra session data:
// Pref : 0=everywhere, 1=unencrypted sites, 2=nowhere
lockPref("browser.sessionstore.privacy_level", 2);
// Pref : 1023 : set the minimum interval between session save operations
// Default is 15000 (15 secs). Try 30000 (30sec), 60000 (1min) etc
// [WARNING] This can also affect entries in the "Recently Closed Tabs" feature
// i.e. the longer the interval the more chance a quick tab open/close won't be captured.
// This longer interval *may* affect history but we cannot replicate any history not recorded
// [1] https://bugzilla.mozilla.org/1304389
lockPref("browser.sessionstore.interval", 60000);
// ----------------------------------------------------------------------------------------------------
// User Settings : Autofill settings
// ----------------------------------------------------------------------------------------------------
// Pref : Forms auto fill
lockPref("extensions.formautofill.addresses.enabled", false);
lockPref("extensions.formautofill.available", "off");
lockPref("extensions.formautofill.creditCards.enabled", false);
lockPref("extensions.formautofill.heuristics.enabled", false);
// Pref : Require manual intervention to autofill known username/passwords sign-in forms
// http://kb.mozillazine.org/Signon.autofillForms
// https://www.torproject.org/projects/torbrowser/design/#identifier-linkability
lockPref("signon.autofillForms", false);
// Pref : When username/password autofill is enabled, still disable it on non-HTTPS sites
// https://hg.mozilla.org/integration/mozilla-inbound/rev/f0d146fe7317
lockPref("signon.autofillForms.http", false);
// Pref : Disable inline autocomplete in URL bar
// http://kb.mozillazine.org/Inline_autocomplete
//lockPref("browser.urlbar.autoFill", false);
//lockPref("browser.urlbar.autoFill.typed", false);
// This does not cause privacy/leaking issue
// ----------------------------------------------------------------------------------------------------
// User Settings : Check default browser Settings
// ----------------------------------------------------------------------------------------------------
// Pref : 0101 : disable default browser check
// [SETTING] General>Startup>Always check if Firefox is your default browser
lockPref("browser.shell.checkDefaultBrowser", false);
// ----------------------------------------------------------------------------------------------------
// User Settings : DRM/CDM - Main
// ----------------------------------------------------------------------------------------------------
// Pref : DRM/CDM
// This is disabled because it's a closed source blob
// Encrypted Media Extensions
lockPref("media.eme.enabled", false);
lockPref("media.gmp-provider.enabled", false);
lockPref("media.gmp-manager.url", "data:text/plain,");
lockPref("media.gmp-manager.url.override", "data:text/plain,");
lockPref("media.gmp-manager.updateEnabled", false);
// Windows 10
lockPref("media.gmp.trial-create.enabled", false);
// ----------------------------------------------------------------------------------------------------
// User Settings : DRM/CDM - Widevine
// ----------------------------------------------------------------------------------------------------
// Pref : 1825 : disable widevine CDM (Content Decryption Module)
lockPref("media.gmp-widevinecdm.visible", false);
lockPref("media.gmp-widevinecdm.enabled", false);
lockPref("media.gmp-widevinecdm.autoupdate", false);
// ----------------------------------------------------------------------------------------------------
// User Settings : DRM/CDM - OpenH264
// ----------------------------------------------------------------------------------------------------
// Pref : Disable automatic downloading of OpenH264 codec
// Why is there OpenH264 ? hhttps://support.mozilla.org/en-US/kb/open-h264-plugin-firefox
// How to manually install OpenH264 ? https://support.mozilla.org/en-US/questions/1029174
// https://support.mozilla.org/en-US/kb/how-stop-firefox-making-automatic-connections#w_media-capabilities
// https://andreasgal.com/2014/10/14/openh264-now-in-firefox/
// If you want to enable this webrtc need to be enabled too
lockPref("media.gmp-gmpopenh264.enabled", false);
lockPref("media.gmp-gmpopenh264.autoupdate", false);
lockPref("media.peerconnection.video.enabled", false); //Deprecated Active
// Pref : Force OpenH264 On (Not necessary)
//lockPref("media.peerconnection.video.h264", true);
// ----------------------------------------------------------------------------------------------------
// User Settings : DRM/CDM - Adobe Primetime
// ----------------------------------------------------------------------------------------------------
// Pref :
lockPref("media.gmp-eme-adobe.enabled", false);
// ----------------------------------------------------------------------------------------------------
// User Settings : DRM/CDM - IJWY To Shut Up
// ----------------------------------------------------------------------------------------------------
// Pref :
lockPref("media.gmp-manager.certs.2.commonName", "");
// Default Value
// aus5.mozilla.org
// Pref :
lockPref("media.gmp-manager.certs.1.commonName", "");
// Default Value
// aus5.mozilla.org
// ----------------------------------------------------------------------------------------------------
// User Settings : WebRTC (Very efficient for fingerprinting this is why its disabled)
// ----------------------------------------------------------------------------------------------------
// Pref : Disable WebRTC getUserMedia, screen sharing, audio capture, video capture
// https://wiki.mozilla.org/Media/getUserMedia
// https://blog.mozilla.org/futurereleases/2013/01/12/capture-local-camera-and-microphone-streams-with-getusermedia-now-enabled-in-firefox/
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator
lockPref("media.navigator.enabled", false);
lockPref("media.navigator.video.enabled", false); //Deprecated Active
lockPref("media.getusermedia.browser.enabled", false);
lockPref("media.getusermedia.screensharing.enabled", false);
lockPref("media.getusermedia.audiocapture.enabled", false);
// Pref : 2001 : disable WebRTC (Web Real-Time Communication)
// [1] https://www.privacytools.io/#webrtc
lockPref("media.peerconnection.use_document_iceservers", false); //Deprecated Active
lockPref("media.peerconnection.identity.enabled", false); //Deprecated Active
lockPref("media.peerconnection.identity.timeout", 1); //Deprecated Active
lockPref("media.peerconnection.turn.disable", true); //Deprecated Active
lockPref("media.peerconnection.ice.tcp", false); //Deprecated Active
// Pref : 2002: limit WebRTC IP leaks if using WebRTC
// [1] https://bugzilla.mozilla.org/buglist.cgi?bug_id=1189041,1297416
// [2] https://wiki.mozilla.org/Media/WebRTC/Privacy
lockPref("media.peerconnection.ice.default_address_only", true); // (FF42-FF50)
lockPref("media.peerconnection.ice.no_host", true); // (FF51+)
// ----------------------------------------------------------------------------------------------------
// User Settings : Proxy settings
// ----------------------------------------------------------------------------------------------------
// Pref : 0706 : remove paths when sending URLs to PAC scripts (FF51+)
// CVE-2017-5384 : Information disclosure via Proxy Auto-Config (PAC)
// [1] https://bugzilla.mozilla.org/1255474
// Does not need to be set as its false by default
// BUG : This lock proxy settings from the panel
// BUG-Fix : Fixed in defaulting section
// MIGRATED : To defaulting section
// WARNING : Do not change this settings here or proxy settings will be locked
//lockPref("network.proxy.autoconfig_url.include_path", false);
// Pref : Send DNS request through SOCKS when SOCKS proxying is in use
// https://trac.torproject.org/projects/tor/wiki/doc/TorifyHOWTO/WebBrowsers
// BUG : This lock proxy settings from the panel
// BUG-Fix : Fixed with defaulting section
// MIGRATED : To defaulting section
// WARNING : Do not change this settings here or proxy settings will be locked
//lockPref("network.proxy.socks_remote_dns", true);
// ----------------------------------------------------------------------------------------------------
// User Settings : DNS settings
// ----------------------------------------------------------------------------------------------------
// Pref : 0707 : disable (or setup) DNS-over-HTTPS (DoH) (FF60+)
// TRR = Trusted Recursive Resolver
// .mode: 0=off, 1=race, 2=TRR first, 3=TRR only, 4=race for stats, but always use native result, 5=explicitly turn it off
// [WARNING] DoH bypasses hosts and gives info to yet another party (e.g. Cloudflare)
// [1] https://www.ghacks.net/2018/04/02/configure-dns-over-https-in-firefox/
// [2] https://hacks.mozilla.org/2018/05/a-cartoon-intro-to-dns-over-https/
// BUG : This seem to disable socks_remote_dns ?! need to check with wireshark
// If true, just settings urls to null should be enough to disable
// Without impacting socks_remote_dns
// -------
// Mode 0 is only off because right now that's the default, the default can change.
// Mode 5 means explicitly off, regardless of default.
// https://wiki.mozilla.org/Trusted_Recursive_Resolver
// https://nakedsecurity.sophos.com/2018/08/07/mozilla-faces-resistance-over-dns-privacy-test/#comment-5193521
// -------
lockPref("network.trr.mode", 5);
lockPref("network.trr.bootstrapAddress", "");
lockPref("network.trr.uri", "");
// If your OS or ISP does not support IPv6, there is no reason to have this preference set to false.
lockPref("network.dns.disableIPv6", true);
// Pref : Disable DNS prefetching
// http://kb.mozillazine.org/Network.dns.disablePrefetch
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Controlling_DNS_prefetching
lockPref("network.dns.disablePrefetch", true);
lockPref("network.dns.disablePrefetchFromHTTPS", true);
// ----------------------------------------------------------------------------------------------------
// User Settings : Start page highlight
// ----------------------------------------------------------------------------------------------------
// Pref : Defaulting Settings : Start page highlight settings
// This does not seems to work with defaultPref
lockPref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
lockPref("browser.newtabpage.activity-stream.section.highlights.includeBookmarks", false);
lockPref("browser.newtabpage.activity-stream.section.highlights.includeDownloads", false);
lockPref("browser.newtabpage.activity-stream.section.highlights.includeVisited", false);
lockPref("browser.newtabpage.activity-stream.prerender", false);
// ----------------------------------------------------------------------------------------------------
// Defaulting Settings : Do not track settings
// ----------------------------------------------------------------------------------------------------
// Set to enforce, choice was left to the user in previous version
lockPref("privacy.donottrackheader.enabled", true);
// Pref : 1610: (36+) set DNT "value" to "not be tracked" (FF21+)
// [1] http://kb.mozillazine.org/Privacy.donottrackheader.value
// [-] https://bugzilla.mozilla.org/1042135#c101
lockPref("privacy.donottrackheader.value", 1);
// ----------------------------------------------------------------------------------------------------
// User Settings : Other theming settings
// ----------------------------------------------------------------------------------------------------
// Pref : Fix white text on white background for linux
// fixed with lockPref("ui.use_standins_for_native_colors", true);
//lockPref("widget.content.gtk-theme-override", "Adwaita:light");
// Pref :
//lockPref("browser.devedition.theme.enabled", true);
// Pref :
//lockPref("devtools.theme", "dark");
// Pref :
//lockPref("browser.devedition.theme.showCustomizeButton", true);
// ----------------------------------------------------------------------------------------------------
// User Settings : Miscellaneous settings
// ----------------------------------------------------------------------------------------------------
// Pref : Disable "Are you sure you want to leave this page?" popups on page close
// https://support.mozilla.org/en-US/questions/1043508
// Does not prevent JS leaks of the page close event.
// https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload
// Disabled by default could be useful on important site like banking
//lockPref("dom.disable_beforeunload", true);
// Pref : Disable geo localisation
lockPref("permissions.default.geo", 2);
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// Section : Defaulting Settings
// Those settings are not locked this section purpose is to change default setting...
// Modifications can still be done within firefox
// Bench Diff : +0/5000
// >>>>>>>>>>>>>>>>>>>>
// ----------------------------------------------------------------------------------------------------
// Defaulting Settings : Other Defaulting
// ----------------------------------------------------------------------------------------------------
// Pref : Preferred language for displaying websites...
// The first settings overflow the second one
defaultPref("privacy.spoof_english", 2);
//defaultPref("intl.accept_languages", "en-US, en"); //This make lang windows unusable
// Pref : 1606: ALL: set the default Referrer Policy
// 0=no-referer, 1=same-origin, 2=strict-origin-when-cross-origin, 3=no-referrer-when-downgrade
// [NOTE] This is only a default, it can be overridden by a site-controlled Referrer Policy
// [1] https://www.w3.org/TR/referrer-policy/
// [2] https://developer.mozilla.org/docs/Web/HTTP/Headers/Referrer-Policy
// [3] https://blog.mozilla.org/security/2018/01/31/preventing-data-leaks-by-stripping-path-information-in-http-referrers/
defaultPref("network.http.referer.defaultPolicy", 3); // (FF59+) default: 3
defaultPref("network.http.referer.defaultPolicy.pbmode", 2); // (FF59+) default: 2
// Pref : 1701: enable Container Tabs setting in preferences (see 1702) (FF50+)
// [1] https://bugzilla.mozilla.org/1279029
defaultPref("privacy.userContext.ui.enabled", true);
// Pref : 1702: enable Container Tabs (FF50+)
// [SETTING] General>Tabs>Enable Container Tabs
defaultPref("privacy.userContext.enabled", true);
// Pref : 1703: enable a private container for thumbnail loads (FF51+)
defaultPref("privacy.usercontext.about_newtab_segregation.enabled", true); // default: true in FF61+
// Pref : 1704: set long press behaviour on "+ Tab" button to display container menu (FF53+)
// 0=disables long press, 1=when clicked, the menu is shown
// 2=the menu is shown after X milliseconds
// [NOTE] The menu does not contain a non-container tab option
// [1] https://bugzilla.mozilla.org/1328756
defaultPref("privacy.userContext.longPressBehavior", 2);
// Pref : (FF57+)
defaultPref("browser.download.autohideButton", false);
// Pref : enable "Find As You Type"
defaultPref("accessibility.typeaheadfind", true);
// Pref : disable autocopy default [LINUX]
defaultPref("clipboard.autocopy", false);
// Pref : 0=none, 1-multi-line, 2=multi-line & single-line
defaultPref("layout.spellcheckDefault", 2);
// Pref : closeWindowWithLastTab
defaultPref("browser.tabs.closeWindowWithLastTab", false);
// Pref : middle-click enabling auto-scrolling [WINDOWS] [MAC]
defaultPref("general.autoScroll", false);
// Pref : 1601: ALL: control when images/links send a referer
// 0=never, 1=send only when links are clicked, 2=for links and images (default)
//defaultPref("network.http.sendRefererHeader", 1);
// This break a lot of sites.. mitigating by extension
// Pref : 2620: enable Firefox's built-in PDF reader
// [SETTING] General>Applications>Portable Document Format (PDF)
// This setting controls if the option "Display in Firefox" in the above setting is available
// and by effect controls whether PDFs are handled in-browser or externally ("Ask" or "Open With")
// PROS: pdfjs is lightweight, open source, and as secure/vetted as any pdf reader out there (more than most)
// Exploits are rare (1 serious case in 4 yrs), treated seriously and patched quickly.
// It doesn't break "state separation" of browser content (by not sharing with OS, independent apps).
// It maintains disk avoidance and application data isolation. It's convenient. You can still save to disk.
// CONS: You may prefer a different pdf reader for security reasons
// CAVEAT: JS can still force a pdf to open in-browser by bundling its own code (rare)
defaultPref("pdfjs.disabled", false);
// Pref : 2210: block popup windows
// [SETTING] Privacy & Security>Permissions>Block pop-up windows
defaultPref("dom.disable_open_during_load", true);
// Pref : 2203 : open links targeting new windows in a new tab instead
// User Settings : Migrated to Defaulting : Links pop-up open in new tab
// This stops malicious window sizes and some screen resolution leaks.
// You can still right-click a link and open in a new window.
// [TEST] https://people.torproject.org/~gk/misc/entire_desktop.html
// [1] https://trac.torproject.org/projects/tor/ticket/9881
defaultPref("browser.link.open_newwindow", 3);
defaultPref("browser.link.open_newwindow.restriction", 0);
// Pref : Defaulting Settings : Proxy
defaultPref("network.proxy.autoconfig_url", "");
defaultPref("network.proxy.autoconfig_url.include_path", false);
defaultPref("network.proxy.socks_remote_dns", true);
defaultPref("network.proxy.socks_version", 5);
// Pref : Defaulting Settings : Bookmark should by default open in newtab instead of
// replacing the current page
defaultPref("browser.tabs.loadBookmarksInTabs", true);
// Pref : Debugging settings
defaultPref("devtools.debugger.remote-enabled", false);
defaultPref("devtools.chrome.enabled", false);
// Pref : site_specific_overrides useragent
defaultPref("general.useragent.site_specific_overrides", false);
// Pref : Display all sections by default
defaultPref("extensions.ui.experiment.hidden", false);
// Those two are not needed (they are set to true automatically when their list is empty )
//defaultPref("extensions.ui.dictionary.hidden", false);
//defaultPref("extensions.ui.locale.hidden", false);
// Pref : Pref tied to librefox, displaying small density by default
// Small icons...
defaultPref("browser.uidensity", 1);
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// Section : Controversial
// Bench Diff : +0/5000
// >>>>>>>>>>>>>>>>>>>>
// Pref : Disable IndexedDB (disabled)
// Pref : 2720: enforce IndexedDB (IDB)
// IDB is required for extensions and Firefox internals (even before FF63)
// To control *website* IDB data, control allowing cookies and service workers, or use
// Temporary Containers. To mitigate *website* IDB, FPI helps (4001), and/or sanitize
// on close (Offline Website Data, see User Settings : History settings) or on-demand (Ctrl-Shift-Del),
// or automatically via an extension. Note that IDB currently cannot be sanitized by host.
// IndexedDB could be used for tracking purposes, but is required for :
// twitter and many sites, some addons, old version of uBlock, session manager in certain cases
// This is mitigated with addons and sanitize settings
// IndexedDB is a low-level API for client-side storage of significant amounts of structured data,
// including files/blobs. This API uses indexes to enable high-performance searches of this data.
// While Web Storage is useful for storing smaller amounts of data, it is less useful for storing
// larger amounts of structured data. IndexedDB provides a solution. This is the main landing page
// for MDN's IndexedDB coverage — here we provide links to the full API reference and usage guides,
// browser support details, and some explanation of key concepts
// Also this is cleaned by privacy.clearOnShutdown.offlineApps"
// https://blog.mozilla.org/addons/2018/08/03/new-backend-for-storage-local-api/
// https://developer.mozilla.org/en-US/docs/IndexedDB
// https://en.wikipedia.org/wiki/Indexed_Database_API
// https://wiki.mozilla.org/Security/Reviews/Firefox4/IndexedDB_Security_Review
// http://forums.mozillazine.org/viewtopic.php?p=13842047
// https://github.com/pyllyukko/user.js/issues/8
lockPref("dom.indexedDB.enabled", true); //default true
// Pref : indexedDB Loggingq - disabled for performance
//lockPref("dom.indexedDB.logging.details", false); //default true
//lockPref("dom.indexedDB.logging.enabled", false); //default true
// Pref : 2516 : disable PointerEvents
// [1] https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent
lockPref("dom.w3c_pointer_events.enabled", false);
// Pref : 0702 : disable HTTP2 (which was based on SPDY which is now deprecated)
// HTTP2 raises concerns with "multiplexing" and "server push", does nothing to enhance
// privacy, and in fact opens up a number of server-side fingerprinting opportunities
// [1] https://http2.github.io/faq/
// [2] https://blog.scottlogic.com/2014/11/07/http-2-a-quick-look.html
// [3] https://queue.acm.org/detail.cfm?id=2716278
// [4] https://github.com/ghacksuserjs/ghacks-user.js/issues/107
// Disabled because of [4]
//lockPref("network.http.spdy.enabled", false);
//lockPref("network.http.spdy.enabled.deps", false);
//lockPref("network.http.spdy.enabled.http2", false);
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// Section : Firefox Fingerprint
// ResistFingerprinting : Overrided by 'privacy.resistFingerprinting'
// This need to be kept disabled to make resistFingerprinting efficient
// https://wiki.mozilla.org/Security/Fingerprinting
// Bench Diff : +0/5000
// >>>>>>>>>>>>>>>>>>>>
// Pref : Enable hardening against various fingerprinting vectors (Tor Uplift project)
// https://wiki.mozilla.org/Security/Tor_Uplift/Tracking
// https://bugzilla.mozilla.org/show_bug.cgi?id=1333933
lockPref("privacy.resistFingerprinting", true);
// Pref : 4503 : disable mozAddonManager Web API (FF57+)
// [NOTE] As a side-effect in FF57-59 this allowed extensions to work on AMO. In FF60+ you also need
// to sanitize or clear extensions.webextensions.restrictedDomains (see 2662) to keep that side-effect
// [1] https://bugzilla.mozilla.org/buglist.cgi?bug_id=1384330,1406795,1415644,1453988
lockPref("privacy.resistFingerprinting.block_mozAddonManager", true);
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// Section : Locale/Time/UserAgent
// Bench Diff : +0/5000
// >>>>>>>>>>>>>>>>>>>>
// Pref : 0864 : disable date/time picker (FF57+ default true)
// This can leak your locale if not en-US
// [1] https://trac.torproject.org/projects/tor/ticket/21787
// How does this work with resistFingerprinting efficient ??
lockPref("dom.forms.datetime", false);
// Pref : Prevent leaking application locale/date format using JavaScript
// https://bugzilla.mozilla.org/show_bug.cgi?id=867501
// https://hg.mozilla.org/mozilla-central/rev/52d635f2b33d
// Already applied by resistFingerprinting ?
lockPref("javascript.use_us_english_locale", true);
// Pref : Set Accept-Language HTTP header to en-US regardless of Firefox localization
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language
// Already applied by resistFingerprinting ?
lockPref("intl.regional_prefs.use_os_locales", false);
// Pref : Local and useragent...
// Already applied by resistFingerprinting ?
lockPref("intl.locale.requested", "en-US");
// Pref : Spoof User-agent (disabled)
// Disabled to make resistFingerprinting efficient
//lockPref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0, 45");
// Pref : This does not work with resistFingerprinting... (Still needed for ESR)
lockPref("general.appname.override", "Netscape");
lockPref("general.appversion.override", "5.0 (Windows)");
lockPref("general.platform.override", "Win32");
lockPref("general.oscpu.override", "Windows NT 6.1");
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// Section : Ghacks-user Selection
// Bench Diff : +100/5000
// >>>>>>>>>>>>>>>>>>>>>>
// Pref : 0335 : disable Telemetry Coverage [FF64+]
// [1] https://blog.mozilla.org/data/2018/08/20/effectively-measuring-search-in-firefox/
lockPref("toolkit.coverage.endpoint.base", "");
lockPref("toolkit.coverage.opt-out", true); // [HIDDEN PREF]
// DOWNLOADS
// Pref : 2652: disable adding downloads to the system's "recent documents" list
lockPref("browser.download.manager.addToRecentDocs", false); //do not disabled
// Pref : 2653: disable hiding mime types (Options>General>Applications) not associated with a plugin
lockPref("browser.download.hide_plugins_without_extensions", false); //do not disabled
// Pref : 2617: remove webchannel whitelist
// Default value
// "https://content.cdn.mozilla.net https://input.mozilla.org https://support.mozilla.org https://install.mozilla.org"
lockPref("webchannel.allowObject.urlWhitelist", "");
// Pref : 2730b: disable offline cache on insecure sites (FF60+)
// [1] https://blog.mozilla.org/security/2018/02/12/restricting-appcache-secure-contexts/
lockPref("browser.cache.offline.insecure.enable", false); // default: false in FF62+
// Pref : 2614: limit HTTP redirects (this does not control redirects with HTML meta tags or JS)
// [NOTE] A low setting of 5 or under will probably break some sites (e.g. gmail logins)
// To control HTML Meta tag and JS redirects, use an extension. Default is 20
lockPref("network.http.redirection-limit", 10);
// Pref : 2731: enforce websites to ask to store data for offline use
// [1] https://support.mozilla.org/questions/1098540
// [2] https://bugzilla.mozilla.org/959985
lockPref("offline-apps.allow_by_default", false);
// EXTENSIONS
// Pref : 2660: lock down allowed extension directories
// [SETUP-CHROME] This will break extensions that do not use the default XPI directories
// [1] https://mike.kaply.com/2012/02/21/understanding-add-on-scopes/
// [1] archived: https://archive.is/DYjAM
lockPref("extensions.enabledScopes", 1); // (hidden pref)
// Tor-compatibility-patch
lockPref("extensions.autoDisableScopes", 15); //Tor value must be 0
// Pref : 2663: enable warning when websites try to install add-ons
// [SETTING] Privacy & Security>Permissions>Warn you when websites try to install add-ons
lockPref("xpinstall.whitelist.required", true); // default: true
// Pref : 2306: disable push notifications (FF44+)
// web apps can receive messages pushed to them from a server, whether or
// not the web app is in the foreground, or even currently loaded
// [1] https://developer.mozilla.org/docs/Web/API/Push_API
lockPref("dom.push.enabled", false);
lockPref("dom.push.connection.enabled", false);
lockPref("dom.push.serverURL", ""); //default "wss://push.services.mozilla.com/"
lockPref("dom.push.userAgentID", "");
// Pref : 2683: block top level window data: URIs (FF56+)
// [1] https://bugzilla.mozilla.org/1331351
// [2] https://www.wordfence.com/blog/2017/01/gmail-phishing-data-uri/
// [3] https://www.fxsitecompat.com/en-CA/docs/2017/data-url-navigations-on-top-level-window-will-be-blocked/
lockPref("security.data_uri.block_toplevel_data_uri_navigations", true); // default: true in FF59+
// Pref : 2618: disable exposure of system colors to CSS or canvas (FF44+)
// [NOTE] see second listed bug: may cause black on black for elements with undefined colors
// [1] https://bugzilla.mozilla.org/buglist.cgi?bug_id=232227,1330876
lockPref("ui.use_standins_for_native_colors", true); // (hidden pref)
// Fix for widget.content.gtk-theme-override;Adwaita:light
// Pref : 0403: disable individual unwanted/unneeded parts of the Kinto blocklists
// What is Kinto?: https://wiki.mozilla.org/Firefox/Kinto#Specifications
// As Firefox transitions to Kinto, the blocklists have been broken down into entries for certs to be
// revoked, extensions and plugins to be disabled, and gfx environments that cause problems or crashes
lockPref("services.blocklist.onecrl.collection", ""); // revoked certificates
lockPref("services.blocklist.addons.collection", "");
lockPref("services.blocklist.plugins.collection", "");
lockPref("services.blocklist.gfx.collection", "");
// Pref : disable showing about:blank as soon as possible during startup (FF60+)
// When default true (FF62+) this no longer masks the RFP resizing activity
// [1] https://bugzilla.mozilla.org/1448423
lockPref("browser.startup.blankWindow", false);
// Pref : 2428: enforce DOMHighResTimeStamp API
// [WARNING] Required for normalization of timestamps and any timer resolution mitigations
lockPref("dom.event.highrestimestamp.enabled", true); // default: true
// Pref : 0516 : disable Onboarding (FF55+)
// Onboarding is an interactive tour/setup for new installs/profiles and features. Every time
// about:home or about:newtab is opened, the onboarding overlay is injected into that page
// [NOTE] Onboarding uses Google Analytics [2], and leaks resource://URIs [3]
// [1] https://wiki.mozilla.org/Firefox/Onboarding
// [2] https://github.com/mozilla/onboard/commit/db4d6c8726c89a5d6a241c1b1065827b525c5baf
// [3] https://bugzilla.mozilla.org/863246#c154
// Pref : URL that kicks off the UI tour
lockPref("privacy.trackingprotection.introURL", "");
// Pref : 0703 : disable HTTP Alternative Services (FF37+)
// [1] https://www.ghacks.net/2015/08/18/a-comprehensive-list-of-firefox-privacy-and-security-settings/#comment-3970881
// [2] https://www.mnot.net/blog/2016/03/09/alt-svc
lockPref("network.http.altsvc.enabled", false);
lockPref("network.http.altsvc.oe", false);
// Pref : 0709 : disable using UNC (Uniform Naming Convention) paths (FF61+)
// [1] https://trac.torproject.org/projects/tor/ticket/26424
lockPref("network.file.disable_unc_paths", true); // (hidden pref)
// Pref : 0710 : disable GIO as a potential proxy bypass vector
// Gvfs/GIO has a set of supported protocols like obex, network, archive, computer, dav, cdda,
// gphoto2, trash, etc. By default only smb and sftp protocols are accepted so far (as of FF64)
// [1] https://bugzilla.mozilla.org/1433507
// [2] https://trac.torproject.org/23044
// [3] https://en.wikipedia.org/wiki/GVfs
// [4] https://en.wikipedia.org/wiki/GIO_(software)
lockPref("network.gio.supported-protocols", ""); // (hidden pref)
// Pref : 0809 : disable location bar suggesting "preloaded" top websites (FF54+)
// [1] https://bugzilla.mozilla.org/1211726
lockPref("browser.urlbar.usepreloadedtopurls.enabled", false);
// Pref : 0810 : disable location bar making speculative connections (FF56+)
// [1] https://bugzilla.mozilla.org/1348275
lockPref("browser.urlbar.speculativeConnect.enabled", false);
// Pref : 0850e: disable location bar one-off searches (FF51+)
// [1] https://www.ghacks.net/2016/08/09/firefox-one-off-searches-address-bar/
lockPref("browser.urlbar.oneOffSearches", false);
// Pref : 0911 : prevent cross-origin images from triggering an HTTP-Authentication prompt (FF55+)
// [1] https://bugzilla.mozilla.org/1357835
lockPref("network.auth.subresource-img-cross-origin-http-auth-allow", false); //Deprecated Active
// Pref : 1030 : disable favicons in shortcuts
// URL shortcuts use a cached randomly named .ico file which is stored in your
// profile/shortcutCache directory. The .ico remains after the shortcut is deleted.
// If set to false then the shortcuts use a generic Firefox icon
lockPref("browser.shell.shortcutFavicons", false);
// Pref : 1032 : disable favicons in web notifications
lockPref("alerts.showFavicons", false); // default: false
// Pref : 1201 : disable old SSL/TLS "insecure" renegotiation (vulnerable to a MiTM attack)
// [WARNING] <2% of secure sites do NOT support the newer "secure" renegotiation, see [2]
// [1] https://wiki.mozilla.org/Security:Renegotiation
// [2] https://www.ssllabs.com/ssl-pulse/
lockPref("security.ssl.require_safe_negotiation", true);
// Pref : 1205 : disable TLS1.3 0-RTT (round-trip time) (FF51+)
// [1] https://github.com/tlswg/tls13-spec/issues/1001
// [2] https://blog.cloudflare.com/tls-1-3-overview-and-q-and-a/
lockPref("security.tls.enable_0rtt_data", false); // (FF55+ default true)
// Pref : 1272 : display advanced information on Insecure Connection warning pages
// only works when it's possible to add an exception
// i.e. it doesn't work for HSTS discrepancies (https://subdomain.preloaded-hsts.badssl.com/)
// [TEST] https://expired.badssl.com/
lockPref("browser.xul.error_pages.expert_bad_cert", true);
// Pref : 1407 : disable special underline handling for a few fonts which you will probably never use [RESTART]
// Any of these fonts on your system can be enumerated for fingerprinting.
// [1] http://kb.mozillazine.org/Font.blacklist.underline_offset
lockPref("font.blacklist.underline_offset", "");
// Pref : 1408 : disable graphite which FF49 turned back on by default
// In the past it had security issues. Update: This continues to be the case, see [1]
// [1] https://www.mozilla.org/security/advisories/mfsa2017-15/#CVE-2017-7778
lockPref("gfx.font_rendering.graphite.enabled", false);
// Pref : 1604 : CROSS ORIGIN: control the amount of information to send (FF52+)
// Pref : 0=send full URI (default), 1=scheme+host+port+path, 2=scheme+host+port
lockPref("network.http.referer.XOriginTrimmingPolicy", 0);
// Pref : 1605 : ALL: disable spoofing a referer
// [WARNING] Spoofing effectively disables the anti-CSRF (Cross-Site Request Forgery) protections that some sites may rely on
// Default false
lockPref("network.http.referer.spoofSource", false);
// Pref : 1801 : set default plugin state (i.e. new plugins on discovery) to never activate
// Pref : 0=disabled, 1=ask to activate, 2=active - you can override individual plugins
lockPref("plugin.default.state", 1);
lockPref("plugin.defaultXpi.state", 1);
// Pref : 2026 : disable canvas capture stream (FF41+)
// [1] https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/captureStream
lockPref("canvas.capturestream.enabled", false);
// Pref : 2027 : disable camera image capture (FF35+)
// [1] https://trac.torproject.org/projects/tor/ticket/16339
lockPref("dom.imagecapture.enabled", false); // default: false