Plugin Directory

Changeset 3261804


Ignore:
Timestamp:
03/25/2025 09:44:56 PM (12 months ago)
Author:
etruel
Message:

6.0 Mar 25, 2025. AJAX Security Fixes. Deleted all old tags

Location:
etruel-del-post-copies
Files:
13 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • etruel-del-post-copies/tags/6.0/edel-post-copies.php

    r3256732 r3261804  
    4646
    4747        private static $instance = null;
     48        public static $prorequired = '2.5';
    4849
    4950        public static function get_instance() {
  • etruel-del-post-copies/tags/6.0/includes/ajax-actions.php

    r3256732 r3261804  
    1818 *
    1919 * @since 5.0
    20  * @return logs in html format
     20 * @return in html format
    2121 */
    2222class wpedpc_ajax_actions {
     
    3434    }
    3535    static function show_logs_campaign() {
     36        if(!isset( $_POST['nonce'] ) || !wp_verify_nonce($_POST['nonce'], 'etruel-del-post-copies')){
     37            return false;
     38        }
     39
    3640        if ( isset( $_POST['post_id'] ) ) {
    3741            $post_id = $_POST['post_id'];
     
    8993    }
    9094    public static function run_campaign() {
     95        if(!isset( $_POST['nonce'] ) || !wp_verify_nonce($_POST['nonce'], 'etruel-del-post-copies')){
     96            return false;
     97        }
    9198        // Verify campaign_ID exists and sanitize input
    9299        if (!isset($_POST['campaign_ID'])) {
     
    112119    public static function erase_logs() {
    113120        // 1. Verify nonce for CSRF protection
    114         if (!isset($_REQUEST['_wpnonce']) || !wp_verify_nonce($_REQUEST['_wpnonce'], 'wpdpc_erase_logs')) {
     121        if (!isset($_REQUEST['nonce']) || !wp_verify_nonce($_REQUEST['nonce'], 'etruel-del-post-copies')) {
    115122            wp_send_json_error(array('message' => __('Security check failed', 'etruel-del-post-copies')));
    116123        }
     
    141148
    142149    public static function show() {
     150        if(!isset( $_POST['nonce'] ) || !wp_verify_nonce($_POST['nonce'], 'etruel-del-post-copies')){
     151            return false;
     152        }
    143153        // Verify and sanitize campaign_ID
    144154        if (!isset($_POST['campaign_ID'])) {
     
    157167   
    158168    public static function del_post() {
     169        if(!isset( $_POST['nonce'] ) || !wp_verify_nonce($_POST['nonce'], 'etruel-del-post-copies')){
     170            return false;
     171        }
    159172        // Verify nonce for security
    160173        if (!isset($_POST['url'], $_POST['post_id'], $_POST['campaign_ID'])) {
  • etruel-del-post-copies/tags/6.0/includes/js/meta-boxes-admin-head.js

    r3256732 r3261804  
    2525        c_ID = $('#post_ID').val();
    2626        var data = {
     27            nonce: wpedpc_object_meta_boxes.del_post_cp_nonce,
    2728            post_id: $('#post_ID').val(),
    2829            action: "wpedpc_show_logs_campaign"
     
    4950            action: jQuery('#quickdo').val(),
    5051            campaign_ID: jQuery('#post_ID').val(),
    51             _wpnonce: jQuery('#wpdpc_erase_logs').val()
     52            nonce: wpedpc_object_meta_boxes.del_post_cp_nonce,
    5253        };
    5354
     
    109110   
    110111        let data = {
     112            nonce: wpedpc_object_meta_boxes.del_post_cp_nonce,
    111113            url: url,
    112114            post_id: post_id,
  • etruel-del-post-copies/tags/6.0/includes/meta-boxes-campaign.php

    r3256732 r3261804  
    8989                        'msg_loading_campaign' => __('Running Campaign...', 'etruel-del-post-copies'),
    9090                        'msg_before_go' => __('You must Save Changes below before "Go"', 'etruel-del-post-copies' ),
    91                         'msg_before_del' => __('Are you sure you want to delete the post with ID:', 'etruel-del-post-copies' )
     91                        'msg_before_del' => __('Are you sure you want to delete the post with ID:', 'etruel-del-post-copies' ),
     92                        'del_post_cp_nonce' => wp_create_nonce('etruel-del-post-copies')
    9293                ) );
    9394   
  • etruel-del-post-copies/trunk/edel-post-copies.php

    r3256732 r3261804  
    4646
    4747        private static $instance = null;
     48        public static $prorequired = '2.5';
    4849
    4950        public static function get_instance() {
  • etruel-del-post-copies/trunk/includes/ajax-actions.php

    r3256732 r3261804  
    1818 *
    1919 * @since 5.0
    20  * @return logs in html format
     20 * @return in html format
    2121 */
    2222class wpedpc_ajax_actions {
     
    3434    }
    3535    static function show_logs_campaign() {
     36        if(!isset( $_POST['nonce'] ) || !wp_verify_nonce($_POST['nonce'], 'etruel-del-post-copies')){
     37            return false;
     38        }
     39
    3640        if ( isset( $_POST['post_id'] ) ) {
    3741            $post_id = $_POST['post_id'];
     
    8993    }
    9094    public static function run_campaign() {
     95        if(!isset( $_POST['nonce'] ) || !wp_verify_nonce($_POST['nonce'], 'etruel-del-post-copies')){
     96            return false;
     97        }
    9198        // Verify campaign_ID exists and sanitize input
    9299        if (!isset($_POST['campaign_ID'])) {
     
    112119    public static function erase_logs() {
    113120        // 1. Verify nonce for CSRF protection
    114         if (!isset($_REQUEST['_wpnonce']) || !wp_verify_nonce($_REQUEST['_wpnonce'], 'wpdpc_erase_logs')) {
     121        if (!isset($_REQUEST['nonce']) || !wp_verify_nonce($_REQUEST['nonce'], 'etruel-del-post-copies')) {
    115122            wp_send_json_error(array('message' => __('Security check failed', 'etruel-del-post-copies')));
    116123        }
     
    141148
    142149    public static function show() {
     150        if(!isset( $_POST['nonce'] ) || !wp_verify_nonce($_POST['nonce'], 'etruel-del-post-copies')){
     151            return false;
     152        }
    143153        // Verify and sanitize campaign_ID
    144154        if (!isset($_POST['campaign_ID'])) {
     
    157167   
    158168    public static function del_post() {
     169        if(!isset( $_POST['nonce'] ) || !wp_verify_nonce($_POST['nonce'], 'etruel-del-post-copies')){
     170            return false;
     171        }
    159172        // Verify nonce for security
    160173        if (!isset($_POST['url'], $_POST['post_id'], $_POST['campaign_ID'])) {
  • etruel-del-post-copies/trunk/includes/js/meta-boxes-admin-head.js

    r3256732 r3261804  
    2525        c_ID = $('#post_ID').val();
    2626        var data = {
     27            nonce: wpedpc_object_meta_boxes.del_post_cp_nonce,
    2728            post_id: $('#post_ID').val(),
    2829            action: "wpedpc_show_logs_campaign"
     
    4950            action: jQuery('#quickdo').val(),
    5051            campaign_ID: jQuery('#post_ID').val(),
    51             _wpnonce: jQuery('#wpdpc_erase_logs').val()
     52            nonce: wpedpc_object_meta_boxes.del_post_cp_nonce,
    5253        };
    5354
     
    109110   
    110111        let data = {
     112            nonce: wpedpc_object_meta_boxes.del_post_cp_nonce,
    111113            url: url,
    112114            post_id: post_id,
  • etruel-del-post-copies/trunk/includes/meta-boxes-campaign.php

    r3256732 r3261804  
    8989                        'msg_loading_campaign' => __('Running Campaign...', 'etruel-del-post-copies'),
    9090                        'msg_before_go' => __('You must Save Changes below before "Go"', 'etruel-del-post-copies' ),
    91                         'msg_before_del' => __('Are you sure you want to delete the post with ID:', 'etruel-del-post-copies' )
     91                        'msg_before_del' => __('Are you sure you want to delete the post with ID:', 'etruel-del-post-copies' ),
     92                        'del_post_cp_nonce' => wp_create_nonce('etruel-del-post-copies')
    9293                ) );
    9394   
  • etruel-del-post-copies/trunk/readme.txt

    r3256732 r3261804  
    5858
    5959== Changelog ==
    60 = 6.0 Mar 16, 2025 =
     60= 6.0 Mar 25, 2025 =
    6161* Major version. Important release & must update version.
    6262* **First use should be in a test environment.**
Note: See TracChangeset for help on using the changeset viewer.