Plugin Directory

Changeset 1059828

Timestamp:
01/04/2015 10:04:44 PM (10 years ago)
Author:
tollmanz
Message:

Port updates from Github.

Location:
https-mixed-content-detector/trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • https-mixed-content-detector/trunk/beacon.php

    r1058126 r1059828  
    155155
    156156            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' );
    159159                break;
    160160        }
     
    229229        }
    230230
     231
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
     242
     243
     244
     245
     246
     247
    231248        exit();
    232249    }
  • https-mixed-content-detector/trunk/config.php

    r1058132 r1059828  
    66 */
    77define( '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 }
    178
    189/**
  • https-mixed-content-detector/trunk/https-mixed-content-detector.php

    r1058132 r1059828  
    44 * Plugin URI:     https://github.com/tollmanz/wordpress-https-mixed-content-detector
    55 * Description:    A tool for proactively detecting mixed content issues in TLS enabled WordPress websites.
    6  * Version:        1.0.2
     6 * Version:        1.
    77 * Author:         Zack Tollman
    88 * Author URI:     https://www.tollmanz.com
     
    2525     * @var   string    The semantically versioned plugin version number.
    2626     */
    27     var $version = '1.0.1';
     27    var $version = '1.';
    2828
    2929    /**
     
    9393        // Include dependent files
    9494        include $this->root_dir . '/config.php';
     95
    9596        include $this->root_dir . '/beacon.php';
    9697        include $this->root_dir . '/policy.php';
     98
     99
     100
     101
    97102    }
    98103}
  • https-mixed-content-detector/trunk/policy.php

    r1044680 r1059828  
    8383     *
    8484     * @since  1.0.0.
     85
    8586     *
    8687     * @return string    The full policy
    8788     */
    8889    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() );
    90121    }
    91122
     
    94125     *
    95126     * @since  1.0.0.
     127
    96128     *
    97129     * @return array    Array of CSP policies.
    98130     */
    99     public function get_policies() {
    100         return explode( '; ', MCD_POLICY );
     131    public function ) {
     132        return );
    101133    }
    102134
     
    110142    public function get_report_url() {
    111143        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
    112197    }
    113198}
  • https-mixed-content-detector/trunk/readme.txt

    r1058132 r1059828  
    44Requires at least: 4.0.1
    55Tested up to: trunk
    6 Stable tag: 1.0.2
     6Stable tag: 1.
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838== Changelog ==
    3939
     40
     41
     42
     43
     44
    4045= 1.0.2 =
    4146* Remove false positives from the log
     
    4954== Upgrade Notice ==
    5055
     56
     57
     58
    5159= 1.0.2 =
    5260Remove false positives from the log
Note: See TracChangeset for help on using the changeset viewer.