Plugin Directory

Changeset 1389536


Ignore:
Timestamp:
04/07/2016 04:46:04 PM (10 years ago)
Author:
Embedly
Message:

merges @rinatkhaziev's security changes, fixes checkbox

Location:
embedly/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • embedly/trunk/embedly.php

    r1383580 r1389536  
    55Description: The Embedly Plugin extends Wordpress's automatic embed feature, allowing bloggers to Embed from 300+ services and counting.
    66Author: Embed.ly Inc
    7 Version: 4.0.8
     7Version: 4.0.9
    88Author URI: http://embed.ly
    99License: GPL2
     
    311311    function add_embedly_providers()
    312312    {
    313         # if user entered valid key, override providers, else, do nothing
     313        // if user entered valid key, override providers, else, do nothing
    314314        if ($this->valid_key()) {
    315315            // delete all current oembed providers
    316             add_filter('oembed_providers', create_function('', 'return array();'));
     316            add_filter('oembed_providers', '__return_empty_array');
    317317            // add embedly provider
    318318            $provider_uri = $this->build_uri_with_options();
     
    396396    function embedly_save_option($key, $value)
    397397    {
     398        // Ideally we should run this through sanitize_key
     399        // But some options keys have "?" in them which sanitize_key strips out
     400        // Resort to sanitize_text_field instead
     401       $key = sanitize_text_field( $key );
     402       $value = sanitize_text_field( $value );
     403
    398404       $this->embedly_options[$key] = $value;
    399405       update_option('embedly_settings', $this->embedly_options);
     
    639645                                <li>
    640646                                  <h3><?php _e('DESIGN', 'embedly');?></h3>
    641                                   <input class='chrome-card-checkbox' type='checkbox' value='checked' name='minimal' <?php
    642                                     checked( $this->embedly_options['card_chrome'], !1); // ¯\_(ツ)_/¯ -php
     647                                  <input class='chrome-card-checkbox' type='checkbox' name='minimal'
     648                                    <?php checked( $this->embedly_options['card_chrome'], 0);
    643649                                    // checked( @$this->embedly_options["card_chrome"] ?: false, false); does not work below PHP v5.3
    644650                                    ?> /> <?php _e('MINIMAL', 'embedly'); ?>
  • embedly/trunk/readme.txt

    r1383580 r1389536  
    66Requires at least: 3.8
    77Tested up to: 4.5
    8 Stable tag: 4.0.8
     8Stable tag: 4.0.9
    99License: GPLv2
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    184184
    185185== Changelog ==
     186
     187= 4.0.9 =
     188
     189* Improved plugin security.
    186190
    187191= 4.0.6 =
Note: See TracChangeset for help on using the changeset viewer.