Plugin Directory

Changeset 2659749


Ignore:
Timestamp:
01/19/2022 03:14:24 AM (4 years ago)
Author:
allurewebsolutions
Message:

Release 3.7.0: security fixes

Location:
wp-post-modal
Files:
3 edited
5 copied

Legend:

Unmodified
Added
Removed
  • wp-post-modal/tags/3.7.0/README.md

    r2448293 r2659749  
    8989## Changelog
    9090
     91- 3.7.0: Security fixes
    9192- 3.6.3: Minor fix
    9293- 3.6.2: Namespaced modal class
  • wp-post-modal/tags/3.7.0/public/class-wp-post-modal-public.php

    r2448293 r2659749  
    5656        $this->plugin_name = $plugin_name;
    5757        $this->version = $version;
    58 
    5958    }
    6059
     
    8079
    8180        wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wp-post-modal-public.css', array(), $this->version, 'all');
    82 
    8381    }
    8482
     
    142140
    143141        echo $HTML;
    144 
    145142    }
    146143
     
    161158            ),
    162159        ));
    163 
    164160    }
    165161
     
    184180
    185181        // get title by slug
    186         $return = get_page_by_path($slug, ARRAY_A, get_post_types());
    187 
    188         if ($return['post_content']) {
     182        $post = get_page_by_path($slug, ARRAY_A, get_post_types());
     183
     184        if (!empty($post['post_password'])) {
     185            $response = new WP_Error('post_password_protected', 'Post is password protected', array('status' => 403));
     186        } elseif ($post['post_status'] === "private") {
     187            $response = new WP_Error('post_private', 'Post is private', array('status' => 403));
     188        } elseif ($post['post_content']) {
    189189            // render shortcodes from Visual Composer
    190             $return['post_content'] = apply_filters('the_content', $return['post_content']);
    191             $response = new WP_REST_Response($return);
     190            $post['post_content'] = apply_filters('the_content', $post['post_content']);
     191            $response = new WP_REST_Response($post);
    192192        } else {
    193193            $response = new WP_Error('post_empty', 'Post is empty', array('status' => 404));
  • wp-post-modal/tags/3.7.0/readme.txt

    r2567796 r2659749  
    44Donate link: https://allurewebsolutions.com/product/donation
    55Requires at least: 3.0
    6 Tested up to: 5.8
     6Tested up to: 5.8.2
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8989
    9090== Changelog ==
     915.7.0: Security fixes
    91923.6.3: Minor fix
    92933.6.2: Namespaced modal class
  • wp-post-modal/trunk/README.md

    r2448293 r2659749  
    8989## Changelog
    9090
     91- 3.7.0: Security fixes
    9192- 3.6.3: Minor fix
    9293- 3.6.2: Namespaced modal class
  • wp-post-modal/trunk/public/class-wp-post-modal-public.php

    r2448293 r2659749  
    5656        $this->plugin_name = $plugin_name;
    5757        $this->version = $version;
    58 
    5958    }
    6059
     
    8079
    8180        wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wp-post-modal-public.css', array(), $this->version, 'all');
    82 
    8381    }
    8482
     
    142140
    143141        echo $HTML;
    144 
    145142    }
    146143
     
    161158            ),
    162159        ));
    163 
    164160    }
    165161
     
    184180
    185181        // get title by slug
    186         $return = get_page_by_path($slug, ARRAY_A, get_post_types());
    187 
    188         if ($return['post_content']) {
     182        $post = get_page_by_path($slug, ARRAY_A, get_post_types());
     183
     184        if (!empty($post['post_password'])) {
     185            $response = new WP_Error('post_password_protected', 'Post is password protected', array('status' => 403));
     186        } elseif ($post['post_status'] === "private") {
     187            $response = new WP_Error('post_private', 'Post is private', array('status' => 403));
     188        } elseif ($post['post_content']) {
    189189            // render shortcodes from Visual Composer
    190             $return['post_content'] = apply_filters('the_content', $return['post_content']);
    191             $response = new WP_REST_Response($return);
     190            $post['post_content'] = apply_filters('the_content', $post['post_content']);
     191            $response = new WP_REST_Response($post);
    192192        } else {
    193193            $response = new WP_Error('post_empty', 'Post is empty', array('status' => 404));
  • wp-post-modal/trunk/readme.txt

    r2567796 r2659749  
    44Donate link: https://allurewebsolutions.com/product/donation
    55Requires at least: 3.0
    6 Tested up to: 5.8
     6Tested up to: 5.8.2
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8989
    9090== Changelog ==
     915.7.0: Security fixes
    91923.6.3: Minor fix
    92933.6.2: Namespaced modal class
Note: See TracChangeset for help on using the changeset viewer.