-
Notifications
You must be signed in to change notification settings - Fork 86
/
BrowserCache_Page_View_SectionSecurity.php
1236 lines (1227 loc) · 61.6 KB
/
BrowserCache_Page_View_SectionSecurity.php
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
<?php
/**
* File: BrowserCache_Page_View_SectionSecurity.php
*
* @package W3TC
*
* phpcs:disable WordPress.Security.EscapeOutput
* phpcs:disable WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
*/
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
$c = Dispatcher::config();
$fp_values = $c->get_array( 'browsercache.security.fp.values' );
$feature_policies = array(
array(
'label' => 'accelerometer',
'description' => esc_html__( 'Controls whether the current document is allowed to gather information about the acceleration of the device through the Accelerometer interface.', 'w3-total-cache' ),
),
array(
'label' => 'ambient-light-sensor',
'description' => esc_html__( 'Controls whether the current document is allowed to gather information about the amount of light in the environment around the device through the AmbientLightSensor interface.', 'w3-total-cache' ),
),
array(
'label' => 'autoplay',
'description' => esc_html__( 'Controls whether the current document is allowed to auto-play media requested through the HTMLMediaElement interface.', 'w3-total-cache' ),
),
array(
'label' => 'battery',
'description' => esc_html__( 'Controls whether the use of the Battery Status API is allowed. When this policy is disabled, the Promise returned by Navigator.getBattery() will reject with a NotAllowedError DOMException.', 'w3-total-cache' ),
),
array(
'label' => 'camera',
'description' => esc_html__( 'Controls whether the current document is allowed to use video input devices.', 'w3-total-cache' ),
),
array(
'label' => 'display-capture',
'description' => esc_html__( 'Controls whether or not the document is permitted to use Screen Capture API.', 'w3-total-cache' ),
),
array(
'label' => 'document-domain',
'description' => esc_html__( 'Controls whether the current document is allowed to set document.domain.', 'w3-total-cache' ),
),
array(
'label' => 'encrypted-media',
'description' => esc_html__( 'Controls whether the current document is allowed to use the Encrypted Media Extensions API (EME).', 'w3-total-cache' ),
),
array(
'label' => 'execution-while-not-rendered',
'description' => esc_html__( 'Controls whether tasks should execute in frames while they\'re not being rendered (e.g. if an iframe is hidden or display: none).', 'w3-total-cache' ),
),
array(
'label' => 'execution-while-out-of-viewport',
'description' => esc_html__( 'Controls whether tasks should execute in frames while they\'re outside of the visible viewport.', 'w3-total-cache' ),
),
array(
'label' => 'fullscreen',
'description' => esc_html__( 'Controls whether the current document is allowed to use Element.requestFullScreen().', 'w3-total-cache' ),
),
array(
'label' => 'gamepad',
'description' => esc_html__( 'Controls whether the current document is allowed to use the Gamepad API. When this policy is disabled, calls to Navigator.getGamepads() will throw a SecurityError DOMException, and the gamepadconnected and gamepaddisconnected events will not fire.', 'w3-total-cache' ),
),
array(
'label' => 'geolocation',
'description' => esc_html__( 'Controls whether the current document is allowed to use the Geolocation Interface.', 'w3-total-cache' ),
),
array(
'label' => 'gyroscope',
'description' => esc_html__( 'Controls whether the current document is allowed to gather information about the orientation of the device through the Gyroscope interface.', 'w3-total-cache' ),
),
array(
'label' => 'layout-animations',
'description' => esc_html__( 'Controls whether the current document is allowed to show layout animations.', 'w3-total-cache' ),
),
array(
'label' => 'legacy-image-formats',
'description' => esc_html__( 'Controls whether the current document is allowed to display images in legacy formats.', 'w3-total-cache' ),
),
array(
'label' => 'magnetometer',
'description' => esc_html__( 'Controls whether the current document is allowed to gather information about the orientation of the device through the Magnetometer interface.', 'w3-total-cache' ),
),
array(
'label' => 'microphone',
'description' => esc_html__( 'Controls whether the current document is allowed to use audio input devices.', 'w3-total-cache' ),
),
array(
'label' => 'midi',
'description' => esc_html__( 'Controls whether the current document is allowed to use the Web MIDI API.', 'w3-total-cache' ),
),
array(
'label' => 'navigation-override',
'description' => esc_html__( 'Controls the availability of mechanisms that enables the page author to take control over the behavior of spatial navigation, or to cancel it outright.', 'w3-total-cache' ),
),
array(
'label' => 'oversized-images',
'description' => esc_html__( 'Controls whether the current document is allowed to download and display large images.', 'w3-total-cache' ),
),
array(
'label' => 'payment',
'description' => esc_html__( 'Controls whether the current document is allowed to use the Payment Request API.', 'w3-total-cache' ),
),
array(
'label' => 'picture-in-picture',
'description' => esc_html__( 'Controls whether the current document is allowed to play a video in a Picture-in-Picture mode via the corresponding API.', 'w3-total-cache' ),
),
array(
'label' => 'publickey-credentials-get',
'description' => esc_html__( 'Controls whether the current document is allowed to use the Web Authentication API to retrieve already stored public-key credentials, i.e. via navigator.credentials.get({publicKey: ..., ...}).', 'w3-total-cache' ),
),
array(
'label' => 'screen-wake-lock',
'description' => esc_html__( 'Controls whether the current document is allowed to use Screen Wake Lock API to indicate that device should not turn off or dim the screen.', 'w3-total-cache' ),
),
array(
'label' => 'speaker',
'description' => esc_html__( 'Controls whether the current document is allowed to play audio via any methods.', 'w3-total-cache' ),
),
array(
'label' => 'sync-xhr',
'description' => esc_html__( 'Controls whether the current document is allowed to make synchronous XMLHttpRequest requests.', 'w3-total-cache' ),
),
array(
'label' => 'unoptimized-images',
'description' => esc_html__( 'Controls whether the current document is allowed to download and display unoptimized images.', 'w3-total-cache' ),
),
array(
'label' => 'unsized-media',
'description' => esc_html__( 'Controls whether the current document is allowed to change the size of media elements after the initial layout is complete.', 'w3-total-cache' ),
),
array(
'label' => 'usb',
'description' => esc_html__( 'Controls whether the current document is allowed to use the WebUSB API.', 'w3-total-cache' ),
),
array(
'label' => 'vibrate',
'description' => esc_html__( 'Controls whether the current document is allowed to trigger device vibrations via Navigator.vibrate() method of Vibration API.', 'w3-total-cache' ),
),
array(
'label' => 'vr',
'description' => esc_html__( 'Controls whether the current document is allowed to use the WebVR API. When this policy is disabled, the Promise returned by Navigator.getVRDisplays() will reject with a DOMException. Keep in mind that the WebVR standard is in the process of being replaced with WebXR.', 'w3-total-cache' ),
),
array(
'label' => 'wake-lock',
'description' => esc_html__( 'Controls whether the current document is allowed to use Wake Lock API to indicate that device should not enter power-saving mode.', 'w3-total-cache' ),
),
array(
'label' => 'web-share',
'description' => esc_html__( 'Controls whether or not the current document is allowed to use the Navigator.share() of Web Share API to share text, links, images, and other content to arbitrary destinations of user\'s choice, e.g. mobile apps.', 'w3-total-cache' ),
),
array(
'label' => 'xr-spatial-tracking',
'description' => esc_html__( 'Controls whether the current document is allowed to use the WebXR Device API.', 'w3-total-cache' ),
),
);
?>
<?php Util_Ui::postbox_header( esc_html__( 'Security Headers', 'w3-total-cache' ), '', 'security' ); ?>
<p>
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sHTTP%2$s security headers provide another layer of protection for your website by helping to mitigate attacks and security vulnerabilities.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
<p><a onclick="w3tc_csp_reference()" href="javascript:void(0);"><?php esc_html_e( 'Quick Reference Chart', 'w3-total-cache' ); ?></a></p>
<table class="form-table">
<?php
Util_Ui::config_item(
array(
'key' => 'browsercache.security.session.use_only_cookies',
'control' => 'selectbox',
'selectbox_values' => $security_session_values,
'description' => wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'This setting prevents attacks that are caused by passing session IDs in %1$sURL%2$ss.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
),
)
);
?>
<?php
Util_Ui::config_item(
array(
'key' => 'browsercache.security.session.cookie_httponly',
'control' => 'selectbox',
'selectbox_values' => $security_session_values,
'description' => esc_html__( 'This tells the user\'s browser not to make the session cookie accessible to client side scripting such as JavaScript. This makes it harder for an attacker to hijack the session ID and masquerade as the effected user.', 'w3-total-cache' ),
)
);
?>
<?php
Util_Ui::config_item(
array(
'key' => 'browsercache.security.session.cookie_secure',
'control' => 'selectbox',
'selectbox_values' => $security_session_values,
'description' => esc_html__( 'This will prevent the user\'s session ID from being transmitted in plain text, making it much harder to hijack the user\'s session.', 'w3-total-cache' ),
)
);
?>
<tr>
<th colspan="2">
<?php $this->checkbox( 'browsercache.hsts' ); ?> <?php Util_Ui::e_config_label( 'browsercache.hsts' ); ?></label>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acornym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acornym tag,
// translators: 5 opening HTML acronym tag, 6 closing HTML acornym tag,
// translators: 7 opening HTML acronym tag, 8 closing HTML acornym tag,
// translators: 9 opening HTML acronym tag, 10 closing HTML acornym tag,
// translators: 11 opening HTML acronym tag, 12 closing HTML acornym tag.
__(
'%1$sHTTP%2$s Strict-Transport-Security (%3$sHSTS%4$s) enforces secure (%5$sHTTP%6$s over %7$sSSL%8$s/%9$sTLS%10$s) connections to the server. This can help mitigate adverse effects caused by bugs and session leaks through cookies and links. It also helps defend against man-in-the-middle attacks. If there are %11$sSSL%12$s negotiation warnings then users will not be permitted to ignore them.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'HTTP Strict Transport Security', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'Transport Layer Security', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</th>
</tr>
<tr>
<th>
<label for="browsercache_security_hsts_directive"><?php Util_Ui::e_config_label( 'browsercache.security.hsts.directive' ); ?></label>
</th>
<td>
<select id="browsercache_security_hsts_directive"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
name="browsercache__security__hsts__directive">
<?php $value = $this->_config->get_string( 'browsercache.security.hsts.directive' ); ?>
<option value="maxage"<?php selected( $value, 'maxage' ); ?>><?php echo esc_html( 'max-age=EXPIRES_SECONDS' ); ?></option>
<option value="maxagepre"<?php selected( $value, 'maxagepre' ); ?>><?php echo esc_html( 'max-age=EXPIRES_SECONDS; preload' ); ?></option>
<option value="maxageinc"<?php selected( $value, 'maxageinc' ); ?>><?php echo esc_html( 'max-age=EXPIRES_SECONDS; includeSubDomains' ); ?></option>
<option value="maxageincpre"<?php selected( $value, 'maxageincpre' ); ?>><?php echo esc_html( 'max-age=EXPIRES_SECONDS; includeSubDomains; preload' ); ?></option>
</select>
<div id="browsercache_security_hsts_directive_description"></div>
</td>
</tr>
<tr>
<th colspan="2">
<?php $this->checkbox( 'browsercache.security.xfo' ); ?> <?php Util_Ui::e_config_label( 'browsercache.security.xfo' ); ?></label>
<p class="description">
<?php esc_html_e( 'This tells the browser if it is permitted to render a page within a frame-like tag (i.e., <frame>, <iframe> or <object>). This is useful for preventing clickjacking attacks.', 'w3-total-cache' ); ?>
</p>
</th>
</tr>
<tr>
<th>
<label for="browsercache_security_xfo_directive"><?php Util_Ui::e_config_label( 'browsercache.security.xfo.directive' ); ?></label>
</th>
<td>
<select id="browsercache_security_xfo_directive"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
name="browsercache__security__xfo__directive">
<?php $value = $this->_config->get_string( 'browsercache.security.xfo.directive' ); ?>
<option value="same"<?php selected( $value, 'same' ); ?>><?php echo esc_html( 'SameOrigin' ); ?></option>
<option value="deny"<?php selected( $value, 'deny' ); ?>><?php echo esc_html( 'Deny' ); ?></option>
<option value="allow"<?php selected( $value, 'allow' ); ?>><?php echo esc_html( 'Allow-From' ); ?></option>
</select>
<input id="browsercache_security_xfo_allow" type="text" name="browsercache__security__xfo__allow"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.xfo.allow' ) ); ?>" size="50" placeholder="Enter URL" />
<div id="browsercache_security_xfo_directive_description"></div>
</td>
</tr>
<tr>
<th colspan="2">
<?php $this->checkbox( 'browsercache.security.xss' ); ?> <?php Util_Ui::e_config_label( 'browsercache.security.xss' ); ?></label>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acornym tag.
__(
'This header enables the %1$sXSS%2$s filter. It helps to stop malicious scripts from being injected into your website. Although this is already built into and enabled by default in most browsers today it is made available here to enforce its reactivation if it was disabled within the user\'s browser.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Cross-Site Scripting', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</th>
</tr>
<tr>
<th>
<label for="browsercache_security_xss_directive"><?php Util_Ui::e_config_label( 'browsercache.security.xss.directive' ); ?></label>
</th>
<td>
<select id="browsercache_security_xss_directive"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
name="browsercache__security__xss__directive">
<?php $value = $this->_config->get_string( 'browsercache.security.xss.directive' ); ?>
<option value="0"<?php selected( $value, '0' ); ?>><?php echo esc_html( '0' ); ?></option>
<option value="1"<?php selected( $value, '1' ); ?>><?php echo esc_html( '1' ); ?></option>
<option value="block"<?php selected( $value, 'block' ); ?>><?php echo esc_html( '1; mode=block' ); ?></option>
</select>
<div id="browsercache_security_xss_directive_description"></div>
</td>
</tr>
<tr>
<th colspan="2">
<?php $this->checkbox( 'browsercache.security.xcto' ); ?> <?php Util_Ui::e_config_label( 'browsercache.security.xcto' ); ?></label>
<p class="description">
<?php esc_html_e( 'This instructs the browser to not MIME-sniff a response outside its declared content-type. It helps to reduce drive-by download attacks and stops sites from serving malevolent content that could masquerade as an executable or dynamic HTML file.', 'w3-total-cache' ); ?>
</p>
</th>
</tr>
<tr>
<th colspan="2">
<?php $this->checkbox( 'browsercache.security.pkp' ); ?> <?php Util_Ui::e_config_label( 'browsercache.security.pkp' ); ?></label>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acornym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acornym tag,
// translators: 5 opening HTML acronym tag, 6 closing HTML acornym tag.
__(
'%1$sHTTP%2$s Public Key Pinning (%3$sHPKP%4$s) is a security feature for %5$sHTTP%6$sS websites that can prevent fraudulently issued certificates from being used to impersonate existing secure websites.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'HTTP Public Key Pinning', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</th>
</tr>
<tr>
<th>
<label for="browsercache_security_pkp_pin"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.pin' ); ?></label>
</th>
<td>
<input id="browsercache_security_pkp_pin" type="text" name="browsercache__security__pkp__pin"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.pkp.pin' ) ); ?>" size="50" placeholder="Enter the Base64-Encode of the SHA256 Hash" />
<div>
<i>
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML b tag, 2 closing HTML b tag,
// translators: 1 opening HTML acronym tag, 2 closing HTML acornym tag.
__(
'This field is %1$srequired%2$s and represents a %3$sSPKI%4$s fingerprint. This pin is any public key within your current certificate chain.',
'w3-total-cache'
),
'<b>',
'</b>',
'<acronym title="' . esc_attr__( 'Subject Public Key Information', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'b' => array(),
'acronym' => array(
'title' => array(),
),
)
);
?>
</i>
</div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_pkp_pin_backup"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.pin.backup' ); ?></label>
</th>
<td>
<input id="browsercache_security_pkp_pin_backup" type="text" name="browsercache__security__pkp__pin__backup"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.pkp.pin.backup' ) ); ?>" size="50" placeholder="Enter the Base64-Encode of the SHA256 Hash" />
<div>
<i>
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML b tag, 2 closing HTML b tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'This field is %1$salso required%2$s and represents your backup %3$sSPKI%4$s fingerprint. This pin is any public key not in your current certificate chain and serves as a backup in case your certificate expires or has to be revoked.',
'w3-total-cache'
),
'<b>',
'</b>',
'<acronym title="' . esc_attr__( 'Subject Public Key Information', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'b' => array(),
'acronym' => array(
'title' => array(),
),
)
);
?>
</i>
</div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_pkp_extra"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.extra' ); ?></label>
</th>
<td>
<select id="browsercache_security_pkp_extra"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
name="browsercache__security__pkp__extra">
<?php $value = $this->_config->get_string( 'browsercache.security.pkp.extra' ); ?>
<option value="maxage"<?php selected( $value, 'maxage' ); ?>><?php echo esc_html( 'max-age=EXPIRES_SECONDS' ); ?></option>
<option value="maxageinc"<?php selected( $value, 'maxageinc' ); ?>><?php echo esc_html( 'max-age=EXPIRES_SECONDS; includeSubDomains' ); ?></option>
</select>
<div id="browsercache_security_pkp_extra_description"></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_pkp_report_url"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.report.url' ); ?></label>
</th>
<td>
<input id="browsercache_security_pkp_report_url" type="text" name="browsercache__security__pkp__report__url"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.pkp.report.url' ) ); ?>" size="50" placeholder="Enter URL" />
<div>
<i>
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'This optional field can be used to specify a %1$sURL%2$s that clients will send reports to if pin validation failures occur. The report is sent as a POST request with a JSON body.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</i>
</div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_pkp_report_only"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.report.only' ); ?></label>
</th>
<td>
<select id="browsercache_security_pkp_report_only"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
name="browsercache__security__pkp__report__only">
<?php $value = $this->_config->get_string( 'browsercache.security.pkp.report.only' ); ?>
<option value="0"<?php selected( $value, '0' ); ?>><?php esc_html_e( 'No = Enforce HPKP', 'w3-total-cache' ); ?></option>
<option value="1"<?php selected( $value, '1' ); ?>><?php esc_html_e( 'Yes = Don\'t Enforce HPKP', 'w3-total-cache' ); ?></option>
</select>
<div id="browsercache_security_pkp_report_only_description"></div>
</td>
</tr>
<tr>
<th colspan="2">
<?php $this->checkbox( 'browsercache.security.referrer.policy' ); ?> <?php Util_Ui::e_config_label( 'browsercache.security.referrer.policy' ); ?></label>
<p class="description">
<?php esc_html_e( 'This header restricts the values of the Referer header in outbound links.', 'w3-total-cache' ); ?>
</p>
</th>
</tr>
<tr>
<th>
<label for="browsercache_security_referrer_policy_directive"><?php Util_Ui::e_config_label( 'browsercache.security.referrer.policy.directive' ); ?></label>
</th>
<td>
<select id="browsercache_security_referrer_policy_directive"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
name="browsercache__security__referrer__policy__directive">
<?php $value = $this->_config->get_string( 'browsercache.security.referrer.policy.directive' ); ?>
<option value="0"<?php selected( $value, '0' ); ?>><?php esc_html_e( 'Not Set', 'w3-total-cache' ); ?></option>
<option value="no-referrer"<?php selected( $value, 'no-referrer' ); ?>><?php echo esc_html( 'no-referrer' ); ?></option>
<option value="no-referrer-when-downgrade"<?php selected( $value, 'no-referrer-when-downgrade' ); ?>><?php echo esc_html( 'no-referrer-when-downgrade' ); ?></option>
<option value="same-origin"<?php selected( $value, 'same-origin' ); ?>><?php echo esc_html( 'same-origin' ); ?></option>
<option value="origin"<?php selected( $value, 'origin' ); ?>><?php echo esc_html( 'origin' ); ?></option>
<option value="strict-origin"<?php selected( $value, 'strict-origin' ); ?>><?php echo esc_html( 'strict-origin' ); ?></option>
<option value="origin-when-cross-origin"<?php selected( $value, 'origin-when-cross-origin' ); ?>><?php echo esc_html( 'origin-when-cross-origin' ); ?></option>
<option value="strict-origin-when-cross-origin"<?php selected( $value, 'strict-origin-when-cross-origin' ); ?>><?php echo esc_html( 'strict-origin-when-cross-origin' ); ?></option>
<option value="unsafe-url"<?php selected( $value, 'unsafe-url' ); ?>><?php echo esc_html( 'unsafe-url' ); ?></option>
</select>
<div id="browsercache_security_referrer_policy_directive_description"></div>
</td>
</tr>
<tr>
<th colspan="2">
<?php $this->checkbox( 'browsercache.security.csp' ); ?> <?php Util_Ui::e_config_label( 'browsercache.security.csp' ); ?></label>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'The Content Security Policy (%1$sCSP%2$s) header reduces the risk of %3$sXSS%4$s attacks by allowing you to define where resources can be retrieved from, preventing browsers from loading data from any other locations. This makes it harder for an attacker to inject malicious code into your site.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Content Security Policy', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'Cross-Site Scripting', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</th>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_reporturi"><?php Util_Ui::e_config_label( 'browsercache.security.csp.reporturi' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_reporturi" type="text" name="browsercache__security__csp__reporturi"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.reporturi' ) ); ?>" size="50" placeholder="Example: https://endpoint.com" />
<div><i><?php esc_html_e( 'Instructs the user agent to report attempts to violate the Content Security Policy. These violation reports consist of JSON documents sent via an HTTP POST request to the specified URI.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_reportto"><?php Util_Ui::e_config_label( 'browsercache.security.csp.reportto' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_reportto" type="text" name="browsercache__security__csp__reportto"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.reportto' ) ); ?>" size="50" placeholder="Example: csp-endpoint" />
<div>
<i><?php esc_html_e( 'Defines a reporting endpoint "group" to which violation reports should to be sent.', 'w3-total-cache' ); ?></i>
<br/><br/>
<i><?php esc_html_e( 'The referenced "group" should be defined in either the Report-To or Reporting-Endpoints HTTP headers. These will need to be manually defined either via .htaccess or another method of modifying HTTP headers.', 'w3-total-cache' ); ?></i>
</div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_base"><?php Util_Ui::e_config_label( 'browsercache.security.csp.base' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_base" type="text" name="browsercache__security__csp__base"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.base' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div>
<i>
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'Restricts the %1$sURL%2$ss which can be used in a document\'s <base> element.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</i>
</div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_connect"><?php Util_Ui::e_config_label( 'browsercache.security.csp.connect' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_connect" type="text" name="browsercache__security__csp__connect"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.connect' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Limits the origins to which you can connect via XMLHttpRequest, WebSockets, and EventSource.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_font"><?php Util_Ui::e_config_label( 'browsercache.security.csp.font' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_font" type="text" name="browsercache__security__csp__font"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.font' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies the origins that can serve web fonts.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_frame"><?php Util_Ui::e_config_label( 'browsercache.security.csp.frame' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_frame" type="text" name="browsercache__security__csp__frame"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.frame' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Restricts from where the protected resource can embed frames.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_img"><?php Util_Ui::e_config_label( 'browsercache.security.csp.img' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_img" type="text" name="browsercache__security__csp__img"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.img' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies valid sources for images and favicons.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_media"><?php Util_Ui::e_config_label( 'browsercache.security.csp.media' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_media" type="text" name="browsercache__security__csp__media"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.media' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies valid sources for loading media using the <audio> and <video> elements.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_object"><?php Util_Ui::e_config_label( 'browsercache.security.csp.object' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_object" type="text" name="browsercache__security__csp__object"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.object' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Allows control over the <object>, <embed>, and <applet> elements used by Flash and other plugins.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_script"><?php Util_Ui::e_config_label( 'browsercache.security.csp.script' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_script" type="text" name="browsercache__security__csp__script"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.script' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies valid sources for JavaScript.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_style"><?php Util_Ui::e_config_label( 'browsercache.security.csp.style' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_style" type="text" name="browsercache__security__csp__style"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.style' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div>
<i>
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'Specifies valid sources for %1$sCSS%2$s stylesheets.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Cascading Style Sheet', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</i>
</div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_form"><?php Util_Ui::e_config_label( 'browsercache.security.csp.form' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_form" type="text" name="browsercache__security__csp__form"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.form' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div>
<i>
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'Restricts the %1$sURL%2$ss which can be used as the target of form submissions from a given context.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</i>
</div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_frame_ancestors"><?php Util_Ui::e_config_label( 'browsercache.security.csp.frame.ancestors' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_frame_ancestors" type="text" name="browsercache__security__csp__frame__ancestors"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.frame.ancestors' ) ); ?>" size="50" placeholder="Example: 'none'" />
<div><i><?php esc_html_e( 'Specifies valid parents that may embed a page using <frame>, <iframe>, <object>, <embed>, or <applet>.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_plugin"><?php Util_Ui::e_config_label( 'browsercache.security.csp.plugin' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_plugin" type="text" name="browsercache__security__csp__plugin"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.plugin' ) ); ?>" size="50" placeholder="Example: application/x-shockwave-flash" />
<div><i><?php esc_html_e( 'Restricts the set of plugins that can be embedded into a document by limiting the types of resources which can be loaded.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_sandbox"><?php Util_Ui::e_config_label( 'browsercache.security.csp.sandbox' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_sandbox" type="text" name="browsercache__security__csp__sandbox"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.sandbox' ) ); ?>" size="50" placeholder="Example: allow-popups" />
<div><i><?php esc_html_e( 'This directive operates similarly to the <iframe> sandbox attribute by applying restrictions to a page\'s actions, including preventing popups, preventing the execution of plugins and scripts, and enforcing a same-origin policy.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_child"><?php Util_Ui::e_config_label( 'browsercache.security.csp.child' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_child" type="text" name="browsercache__security__csp__child"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.child' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Defines the valid sources for web workers and nested browsing contexts loaded using elements such as <frame> and <iframe>. For workers, non-compliant requests are treated as fatal network errors by the user agent.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_manifest"><?php Util_Ui::e_config_label( 'browsercache.security.csp.manifest' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_manifest" type="text" name="browsercache__security__csp__manifest"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.manifest' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies which manifest can be applied to the resource.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_scriptelem"><?php Util_Ui::e_config_label( 'browsercache.security.csp.scriptelem' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_scriptelem" type="text" name="browsercache__security__csp__scriptelem"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.scriptelem' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies valid sources for JavaScript <script> elements.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_scriptattr"><?php Util_Ui::e_config_label( 'browsercache.security.csp.scriptattr' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_scriptattr" type="text" name="browsercache__security__csp__scriptattr"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.scriptattr' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies valid sources for JavaScript inline event handlers.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_styleelem"><?php Util_Ui::e_config_label( 'browsercache.security.csp.styleelem' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_styleelem" type="text" name="browsercache__security__csp__styleelem"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.styleelem' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies valid sources for stylesheet <style> elements and <link> elements with rel="stylesheet".', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_styleattr"><?php Util_Ui::e_config_label( 'browsercache.security.csp.styleattr' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_styleattr" type="text" name="browsercache__security__csp__styleattr"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.styleattr' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies valid sources for inline styles applied to individual DOM elements.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_worker"><?php Util_Ui::e_config_label( 'browsercache.security.csp.worker' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_worker" type="text" name="browsercache__security__csp__worker"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.worker' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies valid sources for Worker, SharedWorker, or ServiceWorker scripts.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_csp_default"><?php Util_Ui::e_config_label( 'browsercache.security.csp.default' ); ?></label>
</th>
<td>
<input id="browsercache_security_csp_default" type="text" name="browsercache__security__csp__default"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.default' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Defines the defaults for directives you leave unspecified. Generally, this applies to any directive that ends with -src.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th colspan="2">
<?php $this->checkbox( 'browsercache.security.cspro' ); ?> <?php Util_Ui::e_config_label( 'browsercache.security.cspro' ); ?></label>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'The Content Security Policy Report Only (%1$sCSPRO%2$s) header allows web developers to experiment with policies by monitoring (but not enforcing) their effects. These violation reports consist of JSON documents sent via an HTTP POST request to the specified URI. This header is applied separately from the Content-Security-Policy and is useful for testing alternative configurations.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Content Security Policy Report Only', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</th>
</tr>
<tr>
<th>
<label for="browsercache_security_cspro_reporturi"><?php Util_Ui::e_config_label( 'browsercache.security.cspro.reporturi' ); ?></label>
</th>
<td>
<input id="browsercache_security_cspro_reporturi" type="text" name="browsercache__security__cspro__reporturi"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.cspro.reporturi' ) ); ?>" size="50" placeholder="Example: https://endpoint.com" />
<div><i><?php esc_html_e( 'Instructs the user agent to report attempts to violate the Content Security Policy. These violation reports consist of JSON documents sent via an HTTP POST request to the specified URI.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_cspro_reportto"><?php Util_Ui::e_config_label( 'browsercache.security.cspro.reportto' ); ?></label>
</th>
<td>
<input id="browsercache_security_cspro_reportto" type="text" name="browsercache__security__cspro__reportto"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.cspro.reportto' ) ); ?>" size="50" placeholder="Example: report-to csp-endpoint" />
<div>
<i><?php esc_html_e( 'Defines a reporting endpoint "group" to which violation reports should to be sent.', 'w3-total-cache' ); ?></i>
<br/><br/>
<i><?php esc_html_e( 'The referenced "group" should be defined in either the Report-To or Reporting-Endpoints HTTP headers. These will need to be manually defined either via .htaccess or another method of modifying HTTP headers.', 'w3-total-cache' ); ?></i>
</div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_cspro_base"><?php Util_Ui::e_config_label( 'browsercache.security.cspro.base' ); ?></label>
</th>
<td>
<input id="browsercache_security_cspro_base" type="text" name="browsercache__security__cspro__base"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.cspro.base' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div>
<i>
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'Restricts the %1$sURL%2$ss which can be used in a document\'s <base> element.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</i>
</div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_cspro_connect"><?php Util_Ui::e_config_label( 'browsercache.security.cspro.connect' ); ?></label>
</th>
<td>
<input id="browsercache_security_cspro_connect" type="text" name="browsercache__security__cspro__connect"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.cspro.connect' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Limits the origins to which you can connect via XMLHttpRequest, WebSockets, and EventSource.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_cspro_font"><?php Util_Ui::e_config_label( 'browsercache.security.cspro.font' ); ?></label>
</th>
<td>
<input id="browsercache_security_cspro_font" type="text" name="browsercache__security__cspro__font"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.cspro.font' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies the origins that can serve web fonts.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_cspro_frame"><?php Util_Ui::e_config_label( 'browsercache.security.cspro.frame' ); ?></label>
</th>
<td>
<input id="browsercache_security_cspro_frame" type="text" name="browsercache__security__cspro__frame"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.cspro.frame' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Restricts from where the protected resource can embed frames.', 'w3-total-cache' ); ?></i></div>
</td>
</tr>
<tr>
<th>
<label for="browsercache_security_cspro_img"><?php Util_Ui::e_config_label( 'browsercache.security.cspro.img' ); ?></label>
</th>
<td>
<input id="browsercache_security_cspro_img" type="text" name="browsercache__security__cspro__img"
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.cspro.img' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
<div><i><?php esc_html_e( 'Specifies valid sources for images and favicons.', 'w3-total-cache' ); ?></i></div>