Plugin Directory

Changeset 3203139


Ignore:
Timestamp:
12/05/2024 02:54:06 PM (15 months ago)
Author:
elementinvader
Message:

1.3.2

  • security fix
  • On blog popup disable show private/protected pages
Location:
elementinvader-addons-for-elementor
Files:
228 added
4 edited

Legend:

Unmodified
Added
Removed
  • elementinvader-addons-for-elementor/trunk/README.txt

    r3194288 r3203139  
    66Requires PHP: 5.6
    77Tested up to: 6.6
    8 Stable tag: 1.3.1
     8Stable tag: 1.3.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8989== Changelog ==
    9090
     91= 1.3.2 =
     92* security fix
     93* On blog popup disable show private/protected pages
     94
    9195= 1.3.1 =
    9296* security fix
  • elementinvader-addons-for-elementor/trunk/elementinvader-addons-for-elementor.php

    r3194289 r3203139  
    44 * Description: Ready to use Elementor Addon Elements like Menu, Forms, Maps, Newsletter with many styling options
    55 * Plugin URI:  https://elementinvader.com
    6  * Version:     1.3.1
     6 * Version:     1.3.2
    77 * Author:      ElementInvader
    88 * Author URI:  https://elementinvader.com
  • elementinvader-addons-for-elementor/trunk/shortcodes/shortcode-eli_option_value.php

    r2927558 r3203139  
    1919        'option'=>'',
    2020        'reset'=>'',
     21        'security_key'=>'',  // md5(NONCE_KEY)
    2122    ), $atts);
    2223
     
    2930    $value = false;
    3031
     32    // Define a whitelist of allowed options
     33    $allowed_options = array(
     34        'siteurl',
     35        'home',
     36        'blogname',
     37        'blogdescription',
     38        'admin_email',
     39    );
     40
    3141    /* first check from static var */
    32     if(isset($options_value [$atts['option']])) {
    33         $value = $options_value [$atts['option']];
    34     } else if(substr($atts['option'], 0, 4) == 'blog') {
    35         $options_value [$atts['option']] = $value = get_bloginfo( $atts['option']);
    36     } else if($value = get_option($atts['option'])) {
    37         $options_value [$atts['option']] = $value;
    38     } else if($value = get_theme_mod($atts['option'])) {
    39         $options_value [$atts['option']] = $value;
     42    if (in_array($atts['option'], $allowed_options) || $atts['security_key'] == md5(NONCE_KEY)) {
     43        if(isset($options_value [$atts['option']])) {
     44            $value = $options_value [$atts['option']];
     45        } else if(substr($atts['option'], 0, 4) == 'blog') {
     46            $options_value [$atts['option']] = $value = get_bloginfo( $atts['option']);
     47        } else if($value = get_option($atts['option'])) {
     48            $options_value [$atts['option']] = $value;
     49        } else if($value = get_theme_mod($atts['option'])) {
     50            $options_value [$atts['option']] = $value;
     51        }
     52    } else {
     53        // Return an error or empty string if the option is not allowed
     54        $value = esc_html__( 'Option not allowed', 'elementinvader-addons-for-elementor' );
    4055    }
    4156
    4257    return $value;
    4358}
     59
  • elementinvader-addons-for-elementor/trunk/views/blog_grid/widget_layout.php

    r3112677 r3203139  
    135135                        $post_data = get_post($settings['popup_layout']);
    136136                        if($post_data){
    137                             if($post_data->post_type == 'page' || $post_data->post_type == 'elementor_library') {
    138                                 $elementor_instance = \Elementor\Plugin::instance();
    139                                 $content = $elementor_instance->frontend->get_builder_content_for_display($settings['popup_layout']);
    140                                 if(empty($content ))
     137                            if (!$post_data || $post_data->post_status != 'publish' || post_password_required($post_data)) {
     138                                $content = esc_html__( 'Page is not public', 'elementinvader-addons-for-elementor' );
     139                            } else {
     140                                if($post_data->post_type == 'page' || $post_data->post_type == 'elementor_library') {
     141                                    $elementor_instance = \Elementor\Plugin::instance();
     142                                    $content = $elementor_instance->frontend->get_builder_content_for_display($settings['popup_layout']);
     143                                    if(empty($content ))
     144                                        $content = $post_data->post_content;
     145                                } else {
    141146                                    $content = $post_data->post_content;
    142                             } else {
    143                                 $content = $post_data->post_content;
     147                                }
    144148                            }
    145 
    146                             if($is_edit_mode) {
    147                                 echo ($content);
    148                             } else {
    149                                 echo wp_kses_post($content);
    150                             }
     149                                if($is_edit_mode) {
     150                                    echo ($content);
     151                                } else {
     152                                    echo wp_kses_post($content);
     153                                }
     154                           
    151155                        }
    152156                    ?>
Note: See TracChangeset for help on using the changeset viewer.