Changeset 2852524
- Timestamp:
- 01/22/2023 11:46:31 AM (3 years ago)
- Location:
- http-headers/trunk
- Files:
-
- 11 edited
-
README.txt (modified) (3 diffs)
-
http-headers.php (modified) (5 diffs)
-
views/access-control-allow-origin.php (modified) (1 diff)
-
views/ajax-inspect.php (modified) (1 diff)
-
views/category.php (modified) (1 diff)
-
views/content-security-policy.php (modified) (1 diff)
-
views/dashboard.php (modified) (1 diff)
-
views/feature-policy.php (modified) (1 diff)
-
views/index.php (modified) (1 diff)
-
views/permissions-policy.php (modified) (1 diff)
-
views/report-to.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
http-headers/trunk/README.txt
r2524185 r2852524 1 1 === HTTP Headers === 2 2 Contributors: zinoui 3 Donate link: https:// zinoui.com/donation3 Donate link: https://paypal.me/Dimitar81 4 4 Tags: custom headers, http headers, headers, security, http header, header, cross domain, cors, xss, clickjacking, mitm, cross origin, cross site, privacy, p3p, hsts, referrer, csp, caching, compression, access control, authentication 5 5 Requires at least: 3.2 6 Tested up to: 5.7.16 Tested up to: 6.1.1 7 7 Requires PHP: 5.3 8 Stable tag: 1.18. 58 Stable tag: 1.18.6 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 58 58 - X-XSS-Protection 59 59 60 The [getting started tutorial](https://zinoui.com/blog/http-headers-for-wordpress) describes a typical configuration of this plugin.61 62 60 == Installation == 63 61 … … 88 86 89 87 == Changelog == 88 89 = 1.18.6 = 90 *Release Date - 22nd January, 2023* 91 92 * PHP 8 compatibility changes 90 93 91 94 = 1.18.5 = -
http-headers/trunk/http-headers.php
r2524185 r2852524 2 2 /* 3 3 Plugin Name: HTTP Headers 4 Plugin URI: https:// zinoui.com/blog/http-headers-for-wordpress4 Plugin URI: https://github.com/riverside/http-headers 5 5 Description: A plugin for HTTP headers management including security, access-control (CORS), caching, compression, and authentication. 6 Version: 1.18. 56 Version: 1.18.6 7 7 Author: Dimitar Ivanov 8 Author URI: https:// zinoui.com8 Author URI: https://github.com/riverside 9 9 License: GPLv2 or later 10 10 Text Domain: http-headers … … 25 25 along with this program. If not, see <http://www.gnu.org/copyleft/gpl.html>. 26 26 27 Copyright (c) 2017-202 1 Zino UI27 Copyright (c) 2017-2023 Dimitar Ivanov 28 28 */ 29 29 … … 40 40 41 41 function build_csp_value($value) { 42 if (!is_array($value)) 43 { 44 return NULL; 45 } 42 46 $csp = array(); 43 47 foreach ($value as $key => $val) … … 452 456 $nel = get_option('hh_nel_value', array()); 453 457 return sprintf('{"report_to": "%s", "max_age": %u%s%s%s%s%s}', 454 @$nel['report_to'], @$nel['max_age'], 458 isset($nel['report_to']) ? $nel['report_to'] : NULL, 459 isset($nel['max_age']) ? $nel['max_age'] : NULL, 455 460 isset($nel['include_subdomains']) ? ', "include_subdomains": true' : NULL, 456 461 array_key_exists('success_fraction', $nel) && is_numeric($nel['success_fraction']) ? ', "success_fraction": '. $nel['success_fraction'] : NULL, … … 1172 1177 $types = get_option('hh_expires_type', array()); 1173 1178 $values = get_option('hh_expires_value', array()); 1179 if (!is_array($types)) 1180 { 1181 $types = array(); 1182 } 1183 if (!is_array($values)) 1184 { 1185 $values = array(); 1186 } 1174 1187 1175 1188 $lines[] = '<IfModule mod_expires.c>'; -
http-headers/trunk/views/access-control-allow-origin.php
r2233507 r2852524 51 51 </select> 52 52 </td> 53 <td class="hh-acao<?php echo $access_control_allow_origin_value != 'origin' ? ' hh-hidden' : NULL; ?>"><input type="text" name="hh_access_control_allow_origin_url[]" class="http-header-value" placeholder="http://domain.com" size="35" value="<?php echo esc_attr(@$access_control_allow_origin_url[0]); ?>"<?php echo $access_control_allow_origin == 1 && $access_control_allow_origin_value == 'origin' ? NULL : ' readonly'; ?> /></td> 53 <td class="hh-acao<?php echo $access_control_allow_origin_value != 'origin' ? ' hh-hidden' : NULL; ?>"> 54 <input type="text" name="hh_access_control_allow_origin_url[]" class="http-header-value" 55 placeholder="http://domain.com" size="35" 56 value="<?php echo isset($access_control_allow_origin_url[0]) ? esc_attr($access_control_allow_origin_url[0]) : NULL; ?>"<?php echo $access_control_allow_origin == 1 && $access_control_allow_origin_value == 'origin' ? NULL : ' readonly'; ?> /> 57 </td> 54 58 <td class="hh-acao<?php echo $access_control_allow_origin_value != 'origin' ? ' hh-hidden' : NULL; ?>"> </td> 55 59 </tr> -
http-headers/trunk/views/ajax-inspect.php
r2408845 r2852524 98 98 && !(in_array($k, $special) && array_key_exists($k . '-report-only', $responseHeaders) )) 99 99 { 100 $missing[$k] = @$categories[$v[2]];100 $missing[$k] = isset($categories[$v[2]]) ? $categories[$v[2]] : 'Other'; 101 101 } 102 102 } -
http-headers/trunk/views/category.php
r2523948 r2852524 19 19 foreach ($headers as $index => $item) 20 20 { 21 if ( @$_GET['category'] != $item[2])21 if ($_GET['category'] != $item[2]) 22 22 { 23 23 continue; -
http-headers/trunk/views/content-security-policy.php
r2523948 r2852524 18 18 <p class="description">Useful tools:</p> 19 19 <p class="description"> 20 <a target="_blank" href="https:// zinoui.com/tools/sri-generator">SRI Hash Generator</a>20 <a target="_blank" href="https://report-uri.com/home/sri_hash">SRI Hash Generator</a> 21 21 - generates subresource integrity hashes using a cryptographic algorithm. 22 22 </p> 23 23 <p class="description"> 24 <a target="_blank" href="https:// zinoui.com/tools/csp-hash">CSP Hash Generator</a>24 <a target="_blank" href="https://report-uri.com/home/hash">CSP Hash Generator</a> 25 25 - generates CSP hashes to use in script-src and style-src directives. 26 26 </p> -
http-headers/trunk/views/dashboard.php
r1797246 r2852524 27 27 <i></i> 28 28 <span><?php echo $key[0]; ?></span> 29 <strong><?php echo $val; ?></strong>(<?php printf('%u/%u', @$tmp[$key]['on'], @$tmp[$key]['total']); ?>)</a> 29 <strong><?php echo $val; ?></strong><?php 30 if (isset($tmp[$key])) 31 { 32 printf('(%u/%u)', $tmp[$key]['on'], $tmp[$key]['total']); 33 } 34 ?></a> 30 35 <?php 31 36 } -
http-headers/trunk/views/feature-policy.php
r2233507 r2852524 87 87 foreach ($origins as $origin) 88 88 { 89 ?><option value="<?php echo $origin; ?>"<?php selected(@$feature_policy_value[$feature], $origin); ?>><?php echo $origin; ?></option><?php89 ?><option value="<?php echo $origin; ?>"<?php isset($feature_policy_value[$feature]) ? selected($feature_policy_value[$feature], $origin) : NULL; ?>><?php echo $origin; ?></option><?php 90 90 } 91 91 ?> 92 92 </select> 93 93 <input type="text" name="hh_feature_policy_origin[<?php echo $feature; ?>]" 94 value="<?php echo @$feature_policy_origin[$feature]; ?>" size="30"<?php echo isset($feature_policy_value[$feature]) && in_array($feature_policy_value[$feature], array('origin(s)', "'self'")) ? NULL : ' style="display: none"'; ?> 94 value="<?php echo isset($feature_policy_origin[$feature]) ? $feature_policy_origin[$feature] : NULL; ?>" 95 size="30"<?php echo isset($feature_policy_value[$feature]) && in_array($feature_policy_value[$feature], array('origin(s)', "'self'")) ? NULL : ' style="display: none"'; ?> 95 96 class="http-header-value"<?php echo $feature_policy == 1 ? NULL : ' readonly'; ?>> 96 97 </td> -
http-headers/trunk/views/index.php
r2520684 r2852524 39 39 ?> 40 40 <p><?php _e('Quick links', 'http-headers'); ?>: 41 <a href="https://zinoui.com/blog/http-headers-for-wordpress" target="_blank" title="HTTP Headers"><?php _e('Getting started', 'http-headers'); ?></a>,42 41 <a href="<?php echo get_admin_url(); ?>options-general.php?page=http-headers&tab=advanced"><?php _e('Advanced settings', 'http-headers'); ?></a>, 43 42 <a href="<?php echo get_admin_url(); ?>options-general.php?page=http-headers&tab=manual"><?php _e('Manual setup', 'http-headers'); ?></a>, -
http-headers/trunk/views/permissions-policy.php
r2523948 r2852524 97 97 foreach ($origins as $origin) 98 98 { 99 ?><option value="<?php echo $origin; ?>"<?php selected(@$permissions_policy_value[$feature], $origin); ?>><?php echo $origin; ?></option><?php99 ?><option value="<?php echo $origin; ?>"<?php isset($permissions_policy_value[$feature]) ? selected($permissions_policy_value[$feature], $origin) : NULL; ?>><?php echo $origin; ?></option><?php 100 100 } 101 101 ?> 102 102 </select> 103 103 <input type="text" name="hh_permissions_policy_origin[<?php echo $feature; ?>]" 104 value="<?php echo htmlspecialchars( @$permissions_policy_origin[$feature] ); ?>" size="30"<?php echo isset($permissions_policy_value[$feature]) && in_array($permissions_policy_value[$feature], array('origin(s)', 'self')) ? NULL : ' style="display: none"'; ?>104 value="<?php echo isset($permissions_policy_origin[$feature]) ? htmlspecialchars( $permissions_policy_origin[$feature] ) : NULL; ?>" size="30"<?php echo isset($permissions_policy_value[$feature]) && in_array($permissions_policy_value[$feature], array('origin(s)', 'self')) ? NULL : ' style="display: none"'; ?> 105 105 class="http-header-value"<?php echo $permissions_policy == 1 ? NULL : ' readonly'; ?>> 106 106 </td> -
http-headers/trunk/views/report-to.php
r2345633 r2852524 95 95 ?> 96 96 </select></td> 97 <td rowspan="<?php echo $cnt; ?>" class="hh-middle hh-center"><input type="checkbox" class="http-header-value" name="hh_report_to_value[<?php echo $i; ?>][include_subdomains]" value="1"<?php checked(@$item['include_subdomains'], 1, true); ?><?php echo $report_to == 1 ? NULL : ' readonly'; ?> /></td>97 <td rowspan="<?php echo $cnt; ?>" class="hh-middle hh-center"><input type="checkbox" class="http-header-value" name="hh_report_to_value[<?php echo $i; ?>][include_subdomains]" value="1"<?php array_key_exists('include_subdomains', $item) ? checked($item['include_subdomains'], 1, true) : NULL; ?><?php echo $report_to == 1 ? NULL : ' readonly'; ?> /></td> 98 98 <?php 99 99 } … … 146 146 ?> 147 147 </select></td> 148 <td class="hh-center"><input type="checkbox" class="http-header-value" name="hh_report_to_value[<?php echo $i; ?>][include_subdomains]" value="1"<?php checked(@$item['include_subdomains'], 1, true); ?><?php echo $report_to == 1 ? NULL : ' readonly'; ?> /></td>148 <td class="hh-center"><input type="checkbox" class="http-header-value" name="hh_report_to_value[<?php echo $i; ?>][include_subdomains]" value="1"<?php array_key_exists('include_subdomains', $item) ? checked($item['include_subdomains'], 1, true) : NULL; ?><?php echo $report_to == 1 ? NULL : ' readonly'; ?> /></td> 149 149 150 150 <td><input type="text" class="http-header-value" name="hh_report_to_value[<?php echo $i; ?>][endpoints][0][url]" placeholder="https://example.com/report/csp"<?php echo $report_to == 1 ? NULL : ' readonly'; ?> size="40"></td>
Note: See TracChangeset
for help on using the changeset viewer.