Changeset 3394838
- Timestamp:
- 11/13/2025 08:32:07 AM (4 weeks ago)
- Location:
- email-subscribers/trunk
- Files:
-
- 7 edited
-
email-subscribers.php (modified) (2 diffs)
-
lite/includes/classes/class-es-queue.php (modified) (1 diff)
-
lite/includes/classes/class-ig-es-background-process-helper.php (modified) (2 diffs)
-
lite/includes/controllers/class-es-campaign-controller.php (modified) (2 diffs)
-
lite/includes/controllers/class-es-form-controller.php (modified) (1 diff)
-
lite/includes/db/class-es-db.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
email-subscribers/trunk/email-subscribers.php
r3393565 r3394838 4 4 * Plugin URI: https://www.icegram.com/ 5 5 * Description: Add subscription forms on website, send HTML newsletters & automatically notify subscribers about new blog posts once it is published. 6 * Version: 5.9.1 06 * Version: 5.9.11 7 7 * Author: Icegram 8 8 * Author URI: https://www.icegram.com/ … … 188 188 189 189 if ( ! defined( 'ES_PLUGIN_VERSION' ) ) { 190 define( 'ES_PLUGIN_VERSION', '5.9.1 0' );190 define( 'ES_PLUGIN_VERSION', '5.9.11' ); 191 191 } 192 192 -
email-subscribers/trunk/lite/includes/classes/class-es-queue.php
r3246944 r3394838 1132 1132 public function trigger_mailing_queue_sending() { 1133 1133 1134 $can_access_campaign = ES_Common::ig_es_can_access( 'campaigns' ); 1135 $nonce = ig_es_get_request_data( 'nonce' ); 1136 1137 if ( ! $can_access_campaign ) { 1138 return; 1139 } 1140 1141 if ( empty( $nonce ) || ! wp_verify_nonce( $nonce, 'ig-es-trigger-mailing-queue-sending-nonce' ) ) { 1142 return; 1143 } 1144 1134 1145 // Call cron action only when it is not locked. 1135 if ( ! ES()->cron->is_locked() ) { 1136 1146 if ( ! ES()->cron->is_locked() ) { 1137 1147 // Start processing of campaigns which are scheduled for current date time. 1138 1148 do_action( 'ig_es_cron_worker' ); -
email-subscribers/trunk/lite/includes/classes/class-ig-es-background-process-helper.php
r2602749 r3394838 172 172 $action_id = as_schedule_single_action( $time, $action, array( $action_args ), 'email-subscribers' ); 173 173 174 if ( ! empty( $action_id ) ) { 174 if ( ! empty( $action_id ) ) { 175 175 if ( $process_asynchronously ) { 176 176 $request_args = array( 177 177 'action' => 'ig_es_run_action_scheduler_task', 178 178 'action_id' => $action_id, 179 'guid' => ES()->cron->get_cron_guid(), 179 180 ); 180 181 self::send_async_ajax_request( $request_args, $should_wait ); 181 182 } 182 return $action_id; 183 return $action_id; 183 184 } 184 185 } … … 195 196 196 197 $action_id = ig_es_get_request_data( 'action_id' ); 197 198 if ( ! empty( $action_id ) ) { 199 if ( class_exists( 'ActionScheduler_QueueRunner' ) ) { 200 $queue_runner = ActionScheduler_QueueRunner::instance(); 201 $queue_runner->process_action( $action_id, 'email-subscribers' ); 202 } 203 } 198 $guid = ig_es_get_request_data( 'guid' ); 199 200 if ( empty( $action_id ) ) { 201 return; 202 } 203 204 if ( empty( $guid ) || ! ES()->cron->is_valid_request( $guid ) ) { 205 return; 206 } 207 208 if ( class_exists( 'ActionScheduler_QueueRunner' ) ) { 209 $queue_runner = ActionScheduler_QueueRunner::instance(); 210 $queue_runner->process_action( $action_id, 'email-subscribers' ); 211 } 212 213 214 215 204 216 } 205 217 -
email-subscribers/trunk/lite/includes/controllers/class-es-campaign-controller.php
r3393565 r3394838 104 104 'action' => 'ig_es_trigger_mailing_queue_sending', 105 105 'campaign_hash' => $mailing_queue_hash, 106 'nonce' => wp_create_nonce( 'ig-es-trigger-mailing-queue-sending-nonce' ), 106 107 ); 107 108 // Send an asynchronous request to trigger sending of campaign emails. … … 562 563 'action' => 'ig_es_trigger_mailing_queue_sending', 563 564 'campaign_hash' => $mailing_queue_hash, 565 'nonce' => wp_create_nonce( 'ig-es-trigger-mailing-queue-sending-nonce' ), 564 566 ); 565 567 // Send an asynchronous request to trigger sending of campaign emails. -
email-subscribers/trunk/lite/includes/controllers/class-es-form-controller.php
r3379210 r3394838 720 720 if ( isset( $form_data['settings'] ) && is_string( $form_data['settings'] ) ) { 721 721 // Try to unserialize settings if it's a string 722 $unserialized_settings = @unserialize( $form_data['settings'] );722 $unserialized_settings = ig_es_maybe_unserialize( $form_data['settings'] ); 723 723 if ( $unserialized_settings !== false ) { 724 724 $form_data['settings'] = $unserialized_settings; -
email-subscribers/trunk/lite/includes/db/class-es-db.php
r3393565 r3394838 664 664 } 665 665 666 // Get the first value from an array to check data structure667 $first_value = array_slice( $values, 0, 1 );668 669 $data = array_shift( $first_value );670 671 // Set default values672 $data = wp_parse_args( $data, $this->get_column_defaults() );673 674 666 // Initialise column format array 675 667 $column_formats = $this->get_columns(); … … 678 670 unset( $column_formats[ $this->primary_key ] ); 679 671 680 // Force fields to lower case 681 $data = array_change_key_case( $data ); 682 683 // White list columns 684 $data = array_intersect_key( $data, $column_formats ); 685 686 // Reorder $column_formats to match the order of columns given in $data 687 $data = wp_parse_args( $data, $this->get_column_defaults() ); 688 689 // Collect ALL possible fields from ALL records in the batch to ensure consistent field list 672 // Get proper default values for columns 673 $column_defaults = $this->get_column_defaults(); 674 675 // Normalize all records and collect all possible fields 690 676 $all_fields = array(); 677 $normalized_values = array(); 678 691 679 foreach ( $values as $single_value ) { 680 // Force fields to lower case 692 681 $single_value = array_change_key_case( $single_value ); 682 // White list columns - only keep valid database columns 693 683 $single_value = array_intersect_key( $single_value, $column_formats ); 684 $normalized_values[] = $single_value; 694 685 $all_fields = array_merge( $all_fields, array_keys( $single_value ) ); 695 686 } 696 687 $all_fields = array_unique( $all_fields ); 697 688 698 // Update column_formats to include only the fields present across all records 689 // If no fields found, nothing to insert 690 if ( empty( $all_fields ) ) { 691 return false; 692 } 693 694 // Update column_formats to include only the fields present in the data 699 695 $column_formats = array_intersect_key( $column_formats, array_flip( $all_fields ) ); 700 696 701 // Update data defaults to include all fields 702 $data = array_merge( array_fill_keys( $all_fields, null ), $data ); 703 $data = array_intersect_key( $data, $column_formats ); 704 705 $data_keys = array_keys( $data ); 706 707 $fields = array_keys( array_merge( array_flip( $data_keys ), $column_formats ) ); // Convert Batches into smaller chunk 708 $batches = array_chunk( $values, $length ); 697 // Create default values for all fields using proper column defaults 698 $default_values = array(); 699 foreach ( $all_fields as $field ) { 700 $default_values[ $field ] = isset( $column_defaults[ $field ] ) ? $column_defaults[ $field ] : null; 701 } 702 703 // Get field names for SQL query 704 $fields = array_keys( $column_formats ); // Convert Batches into smaller chunk 705 $batches = array_chunk( $normalized_values, $length ); 709 706 710 707 $error_flag = false; … … 722 719 723 720 $formats = array(); 721 // Merge default NULL values with actual record values 722 $value_with_defaults = array_merge( $default_values, $value ); 723 724 724 foreach ( $column_formats as $column => $format ) { 725 $final_values[] = isset( $value [ $column ] ) ? $value[ $column ] : $data[ $column ]; // set default if we don't have725 $final_values[] = isset( $value_with_defaults[ $column ] ) ? $value_with_defaults[ $column ] : null; 726 726 $formats[] = $format; 727 727 } -
email-subscribers/trunk/readme.txt
r3393565 r3394838 7 7 Tested up to: 6.8 8 8 Requires PHP: 7.0 9 Stable tag: 5.9.1 09 Stable tag: 5.9.11 10 10 License: GPLv3 11 11 … … 342 342 == Upgrade Notice == 343 343 344 = 5.9.10 = 345 346 * New: Revamped campaign edit interface for a smoother user experience 347 * Improvement: Enhanced audience dashboard UI for better usability 348 * Fix: Fixed broken links on the main dashboard page 344 = 5.9.11 = 345 346 * Improvements: Enhanced security for campaign sending and background task processing 347 * Fix: Resolved a fatal error occurring during CSV import 349 348 350 349 == Changelog == 350 351 **5.9.11 (13.11.2025)** 352 353 * Fix: Fixed missing auth and nonce check vulnerability in background task processing library [Thanks to WordFence team] 354 * Fix: Fixed PHP Object injection vulnerability in forms [Thanks to Patchstack team] 351 355 352 356 **5.9.10 (11.11.2025)**
Note: See TracChangeset
for help on using the changeset viewer.