Changeset 1059828
- Timestamp:
- 01/04/2015 10:04:44 PM (10 years ago)
- Location:
- https-mixed-content-detector/trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
https-mixed-content-detector/trunk/beacon.php
r1058126 r1059828 155 155 156 156 case 'original-policy' : 157 $ v_directive= get_post_meta( $post_id , 'original-policy' , true );158 echo ( ! empty( $ v_directive ) ) ? esc_html( wp_strip_all_tags( $v_directive) ) : __( 'N/A', 'zdt-mcd' );157 $ = get_post_meta( $post_id , 'original-policy' , true ); 158 echo ( ! empty( $ ) ) : __( 'N/A', 'zdt-mcd' ); 159 159 break; 160 160 } … … 229 229 } 230 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 231 248 exit(); 232 249 } -
https-mixed-content-detector/trunk/config.php
r1058132 r1059828 6 6 */ 7 7 define( 'MCD_REPORT_URI', site_url( '/?mcd=report&nonce=' . wp_create_nonce( 'mcd-report-uri' ) ) ); 8 9 /**10 * Define the policies to monitor for.11 *12 * @since 1.0.0.13 */14 if ( ! defined( 'MCD_POLICY' ) ) {15 define( 'MCD_POLICY', "default-src 'unsafe-inline' 'unsafe-eval' data: https:; report-uri " . MCD_REPORT_URI );16 }17 8 18 9 /** -
https-mixed-content-detector/trunk/https-mixed-content-detector.php
r1058132 r1059828 4 4 * Plugin URI: https://github.com/tollmanz/wordpress-https-mixed-content-detector 5 5 * Description: A tool for proactively detecting mixed content issues in TLS enabled WordPress websites. 6 * Version: 1. 0.26 * Version: 1. 7 7 * Author: Zack Tollman 8 8 * Author URI: https://www.tollmanz.com … … 25 25 * @var string The semantically versioned plugin version number. 26 26 */ 27 var $version = '1. 0.1';27 var $version = '1.'; 28 28 29 29 /** … … 93 93 // Include dependent files 94 94 include $this->root_dir . '/config.php'; 95 95 96 include $this->root_dir . '/beacon.php'; 96 97 include $this->root_dir . '/policy.php'; 98 99 100 101 97 102 } 98 103 } -
https-mixed-content-detector/trunk/policy.php
r1044680 r1059828 83 83 * 84 84 * @since 1.0.0. 85 85 86 * 86 87 * @return string The full policy 87 88 */ 88 89 public function get_full_policy() { 89 return MCD_POLICY; 90 global $mcd_policies; 91 92 // Respect the global array of policies in version 1.1.x+ 93 if ( isset( $mcd_policies ) ) { 94 $policy = $this->build_policy( $mcd_policies ); 95 96 // Respect the MCD_POLICY constant used in version 1.0.x 97 } elseif ( defined( 'MCD_POLICY' ) ) { 98 $policy = MCD_POLICY; 99 100 // Default to the core list of policies 101 } else { 102 $policy = $this->build_policy( $this->get_default_policies() ); 103 } 104 105 return $policy; 106 } 107 108 /** 109 * Get a list of policies set for the page load. 110 * 111 * Note that this function is intended to be used for breaking a CSP string into an array. It is primarily used for 112 * whitelisting policies sent to the beacon. 113 * 114 * @since 1.0.0. 115 * @since 1.1.0 Generate the list from the new default policies. 116 * 117 * @return array A list of full policies. 118 */ 119 public function get_policies() { 120 return explode( '; ', $this->get_full_policy() ); 90 121 } 91 122 … … 94 125 * 95 126 * @since 1.0.0. 127 96 128 * 97 129 * @return array Array of CSP policies. 98 130 */ 99 public function get_policies() {100 return explode( '; ', MCD_POLICY);131 public function ) { 132 return ); 101 133 } 102 134 … … 110 142 public function get_report_url() { 111 143 return MCD_REPORT_URI; 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 112 197 } 113 198 } -
https-mixed-content-detector/trunk/readme.txt
r1058132 r1059828 4 4 Requires at least: 4.0.1 5 5 Tested up to: trunk 6 Stable tag: 1. 0.26 Stable tag: 1. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 38 38 == Changelog == 39 39 40 41 42 43 44 40 45 = 1.0.2 = 41 46 * Remove false positives from the log … … 49 54 == Upgrade Notice == 50 55 56 57 58 51 59 = 1.0.2 = 52 60 Remove false positives from the log
Note: See TracChangeset
for help on using the changeset viewer.