Product Feed PRO for WooCommerce - Version 11.5.8

Version Description

Fixed issues with regards to missing sanitazion and validation

Download this release

Release Info

Developer jorisverwater
Plugin Icon 128x128 Product Feed PRO for WooCommerce
Version 11.5.8
Comparing to
See all releases

Code changes from version 11.5.7 to 11.5.8

classes/class-attributes.php CHANGED
@@ -81,7 +81,7 @@ private function get_custom_attributes() {
81
 
82
  if ( ! function_exists( 'woosea_get_meta_keys_for_post_type' ) ) :
83
 
84
- function woosea_get_meta_keys_for_post_type( $post_type, $sample_size = 5 ) {
85
  $meta_keys = array();
86
  $posts = get_posts( array( 'post_type' => $post_type, 'limit' => $sample_size ) );
87
 
81
 
82
  if ( ! function_exists( 'woosea_get_meta_keys_for_post_type' ) ) :
83
 
84
+ function woosea_get_meta_keys_for_post_type( $post_type, $sample_size = 'modified' ) {
85
  $meta_keys = array();
86
  $posts = get_posts( array( 'post_type' => $post_type, 'limit' => $sample_size ) );
87
 
classes/class-get-products.php CHANGED
@@ -835,7 +835,7 @@ class WooSEA_Get_Products {
835
  WC()->customer->set_shipping_postcode(wc_clean( $zone_details['postal_code'] ));
836
  }
837
 
838
- if(is_numeric($prooduct_id)){
839
  WC()->cart->add_to_cart( $product_id, $quantity );
840
  }
841
 
835
  WC()->customer->set_shipping_postcode(wc_clean( $zone_details['postal_code'] ));
836
  }
837
 
838
+ if(is_numeric($product_id)){
839
  WC()->cart->add_to_cart( $product_id, $quantity );
840
  }
841
 
classes/class-update-channel.php CHANGED
@@ -53,7 +53,6 @@ class WooSEA_Update_Project {
53
  * Update individual project configuration
54
  */
55
  public static function update_project_data($project) {
56
-
57
  if(get_option( 'cron_projects' )){
58
  $cron_projects = get_option( 'cron_projects' );
59
 
@@ -69,16 +68,6 @@ class WooSEA_Update_Project {
69
  }
70
 
71
  public static function update_project($project_data){
72
-
73
- // Log some information to the WooCommerce logs
74
- $add_woosea_logging = get_option ('add_woosea_logging');
75
- if($add_woosea_logging == "yes"){
76
- $logger = new WC_Logger();
77
- $logger->add('Product Feed Pro by AdTribes.io','<!-- Start processing new product -->');
78
- $logger->add('Product Feed Pro by AdTribes.io','In update_project function');
79
- $logger->add('Product Feed Pro by AdTribes.io','<!-- End processing product -->');
80
- }
81
-
82
  if(!array_key_exists('project_hash', $project_data)){
83
  $upload_dir = wp_upload_dir();
84
  $external_base = $upload_dir['baseurl'];
@@ -100,15 +89,6 @@ class WooSEA_Update_Project {
100
  $pieces []= $keyspace[random_int(0, $max)];
101
  }
102
  $project_fill['project_hash'] = implode('', $pieces);
103
-
104
- //$project_fill['project_hash'] = bin2hex(openssl_random_pseudo_bytes(16));
105
-
106
- if($add_woosea_logging == "yes"){
107
- $logger = new WC_Logger();
108
- $logger->add('Product Feed Pro by AdTribes.io','<!-- Start processing new product -->');
109
- $logger->add('Product Feed Pro by AdTribes.io',$project_fill['project_hash']);
110
- $logger->add('Product Feed Pro by AdTribes.io','<!-- End processing product -->');
111
- }
112
  $project_fill['filename'] = $project_fill['project_hash'];
113
  $project_fill['external_file'] = $external_path . "/" . sanitize_file_name($project_fill['filename']) . "." . $project_fill['fileformat'];
114
  $project_fill['query_log'] = $external_base . "/woo-product-feed-pro/logs/query.log";
53
  * Update individual project configuration
54
  */
55
  public static function update_project_data($project) {
 
56
  if(get_option( 'cron_projects' )){
57
  $cron_projects = get_option( 'cron_projects' );
58
 
68
  }
69
 
70
  public static function update_project($project_data){
 
 
 
 
 
 
 
 
 
 
71
  if(!array_key_exists('project_hash', $project_data)){
72
  $upload_dir = wp_upload_dir();
73
  $external_base = $upload_dir['baseurl'];
89
  $pieces []= $keyspace[random_int(0, $max)];
90
  }
91
  $project_fill['project_hash'] = implode('', $pieces);
 
 
 
 
 
 
 
 
 
92
  $project_fill['filename'] = $project_fill['project_hash'];
93
  $project_fill['external_file'] = $external_path . "/" . sanitize_file_name($project_fill['filename']) . "." . $project_fill['fileformat'];
94
  $project_fill['query_log'] = $external_base . "/woo-product-feed-pro/logs/query.log";
js/woosea_key.js CHANGED
@@ -26,7 +26,7 @@ jQuery(document).ready(function($) {
26
  var license_key = $('#license-key').val();
27
 
28
  jQuery.ajax({
29
- url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.5.7',
30
  jsonp: 'callback',
31
  dataType: 'jsonp',
32
  type: 'GET',
26
  var license_key = $('#license-key').val();
27
 
28
  jQuery.ajax({
29
+ url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.5.8',
30
  jsonp: 'callback',
31
  dataType: 'jsonp',
32
  type: 'GET',
pages/admin/woosea-generate-feed-step-1.php CHANGED
@@ -8,7 +8,7 @@ function my_footer_text($default) {
8
  add_filter('admin_footer_text', 'my_footer_text');
9
  delete_option( 'woosea_cat_mapping' );
10
  $license_information = get_option( 'license_information' );
11
- $host = $_SERVER['HTTP_HOST'];
12
 
13
  /**
14
  * Create notification object
@@ -40,6 +40,24 @@ if (array_key_exists('project_hash', $_GET)){
40
  }
41
  }
42
  } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  $project = WooSEA_Update_Project::update_project($_POST);
44
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
45
 
8
  add_filter('admin_footer_text', 'my_footer_text');
9
  delete_option( 'woosea_cat_mapping' );
10
  $license_information = get_option( 'license_information' );
11
+ $host = sanitize_text_field($_SERVER['HTTP_HOST']);
12
 
13
  /**
14
  * Create notification object
40
  }
41
  }
42
  } else {
43
+ // Sanitize values in multi-dimensional POST array
44
+ if(is_array($_POST)){
45
+ foreach($_POST as $p_key => $p_value){
46
+ if(is_array($p_value)){
47
+ foreach($p_value as $pp_key => $pp_value){
48
+ if(is_array($pp_value)){
49
+ foreach($pp_value as $ppp_key => $ppp_value){
50
+ $_POST[$p_key][$pp_key][$ppp_key] = sanitize_text_field($ppp_value);
51
+ }
52
+ }
53
+ }
54
+ } else {
55
+ $_POST[$p_key] = sanitize_text_field($p_value);
56
+ }
57
+ }
58
+ } else {
59
+ $_POST = array();
60
+ }
61
  $project = WooSEA_Update_Project::update_project($_POST);
62
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
63
 
pages/admin/woosea-generate-feed-step-2.php CHANGED
@@ -33,7 +33,26 @@ if (array_key_exists('project_hash', $_GET)){
33
  $standard_attributes[$k] = $value;
34
  }
35
  } else {
36
- $project = WooSEA_Update_Project::update_project(sanitize_text_field($_POST));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
38
  $standard_attributes = $attributes_obj->get_standard_attributes($project);
39
 
33
  $standard_attributes[$k] = $value;
34
  }
35
  } else {
36
+ // Sanitize values in multi-dimensional POST array
37
+ if(is_array($_POST)){
38
+ foreach($_POST as $p_key => $p_value){
39
+ if(is_array($p_value)){
40
+ foreach($p_value as $pp_key => $pp_value){
41
+ if(is_array($pp_value)){
42
+ foreach($pp_value as $ppp_key => $ppp_value){
43
+ $_POST[$p_key][$pp_key][$ppp_key] = sanitize_text_field($ppp_value);
44
+ }
45
+ }
46
+ }
47
+ } else {
48
+ $_POST[$p_key] = sanitize_text_field($p_value);
49
+ }
50
+ }
51
+ } else {
52
+ $_POST = array();
53
+ }
54
+
55
+ $project = WooSEA_Update_Project::update_project($_POST);
56
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
57
  $standard_attributes = $attributes_obj->get_standard_attributes($project);
58
 
pages/admin/woosea-generate-feed-step-4.php CHANGED
@@ -41,7 +41,26 @@ if (array_key_exists('project_hash', $_GET)){
41
  }
42
  $manage_project = "yes";
43
  } else {
44
- $project = WooSEA_Update_Project::update_project($_POST);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
46
  $count_rules = 0;
47
  $count_rules2 = 0;
41
  }
42
  $manage_project = "yes";
43
  } else {
44
+ // Sanitize values in multi-dimensional POST array
45
+ if(is_array($_POST)){
46
+ foreach($_POST as $p_key => $p_value){
47
+ if(is_array($p_value)){
48
+ foreach($p_value as $pp_key => $pp_value){
49
+ if(is_array($pp_value)){
50
+ foreach($pp_value as $ppp_key => $ppp_value){
51
+ $_POST[$p_key][$pp_key][$ppp_key] = sanitize_text_field($ppp_value);
52
+ }
53
+ }
54
+ }
55
+ } else {
56
+ $_POST[$p_key] = sanitize_text_field($p_value);
57
+ }
58
+ }
59
+ } else {
60
+ $_POST = array();
61
+ }
62
+
63
+ $project = WooSEA_Update_Project::update_project($_POST);
64
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
65
  $count_rules = 0;
66
  $count_rules2 = 0;
pages/admin/woosea-generate-feed-step-5.php CHANGED
@@ -34,6 +34,24 @@ if (array_key_exists('project_hash', $_GET)){
34
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_GET['channel_hash']));
35
  $manage_project = "yes";
36
  } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  $project = WooSEA_Update_Project::update_project($_POST);
38
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
39
  $project['utm_source'] = $project['name'];
34
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_GET['channel_hash']));
35
  $manage_project = "yes";
36
  } else {
37
+ // Sanitize values in multi-dimensional POST array
38
+ if(is_array($_POST)){
39
+ foreach($_POST as $p_key => $p_value){
40
+ if(is_array($p_value)){
41
+ foreach($p_value as $pp_key => $pp_value){
42
+ if(is_array($pp_value)){
43
+ foreach($pp_value as $ppp_key => $ppp_value){
44
+ $_POST[$p_key][$pp_key][$ppp_key] = sanitize_text_field($ppp_value);
45
+ }
46
+ }
47
+ }
48
+ } else {
49
+ $_POST[$p_key] = sanitize_text_field($p_value);
50
+ }
51
+ }
52
+ } else {
53
+ $_POST = array();
54
+ }
55
  $project = WooSEA_Update_Project::update_project($_POST);
56
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
57
  $project['utm_source'] = $project['name'];
pages/admin/woosea-generate-feed-step-7.php CHANGED
@@ -44,7 +44,25 @@ if (array_key_exists('project_hash', $_GET)){
44
  }
45
  }
46
  } else {
47
- $project = WooSEA_Update_Project::update_project($_POST);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
49
 
50
  if(isset($project['WPML'])){
44
  }
45
  }
46
  } else {
47
+ // Sanitize values in multi-dimensional POST array
48
+ if(is_array($_POST)){
49
+ foreach($_POST as $p_key => $p_value){
50
+ if(is_array($p_value)){
51
+ foreach($p_value as $pp_key => $pp_value){
52
+ if(is_array($pp_value)){
53
+ foreach($pp_value as $ppp_key => $ppp_value){
54
+ $_POST[$p_key][$pp_key][$ppp_key] = sanitize_text_field($ppp_value);
55
+ }
56
+ }
57
+ }
58
+ } else {
59
+ $_POST[$p_key] = sanitize_text_field($p_value);
60
+ }
61
+ }
62
+ } else {
63
+ $_POST = array();
64
+ }
65
+ $project = WooSEA_Update_Project::update_project($_POST);
66
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
67
 
68
  if(isset($project['WPML'])){
pages/admin/woosea-generate-feed-step-9.php CHANGED
@@ -38,7 +38,25 @@ if (array_key_exists('project_hash', $_GET)){
38
  }
39
  $manage_project = "yes";
40
  } else {
41
- $project = WooSEA_Update_Project::update_project($_POST);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
43
  $count_rules = 0;
44
  }
38
  }
39
  $manage_project = "yes";
40
  } else {
41
+ // Sanitize values in multi-dimensional POST array
42
+ if(is_array($_POST)){
43
+ foreach($_POST as $p_key => $p_value){
44
+ if(is_array($p_value)){
45
+ foreach($p_value as $pp_key => $pp_value){
46
+ if(is_array($pp_value)){
47
+ foreach($pp_value as $ppp_key => $ppp_value){
48
+ $_POST[$p_key][$pp_key][$ppp_key] = sanitize_text_field($ppp_value);
49
+ }
50
+ }
51
+ }
52
+ } else {
53
+ $_POST[$p_key] = sanitize_text_field($p_value);
54
+ }
55
+ }
56
+ } else {
57
+ $_POST = array();
58
+ }
59
+ $project = WooSEA_Update_Project::update_project(sanitize_text_field($_POST));
60
  $channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
61
  $count_rules = 0;
62
  }
pages/admin/woosea-manage-feed.php CHANGED
@@ -6,7 +6,7 @@ $count_single = wp_count_posts('product');
6
  $published_single = $count_single->publish;
7
  $published_variation = $count_variation->publish;
8
  $published_products = $published_single+$published_variation;
9
- $host = $_SERVER['HTTP_HOST'];
10
  $add_manipulation_support = get_option ('add_manipulation_support');
11
 
12
  $product_numbers = array (
6
  $published_single = $count_single->publish;
7
  $published_variation = $count_variation->publish;
8
  $published_products = $published_single+$published_variation;
9
+ $host = sanitize_text_field($_SERVER['HTTP_HOST']);
10
  $add_manipulation_support = get_option ('add_manipulation_support');
11
 
12
  $product_numbers = array (
pages/admin/woosea-manage-settings.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
- $domain = $_SERVER['HTTP_HOST'];
3
  $plugin_settings = get_option( 'plugin_settings' );
4
  $license_information = get_option( 'license_information' );
5
- $host = $_SERVER['HTTP_HOST'];
6
  $directory_perm_xml = "";
7
  $directory_perm_csv = "";
8
  $directory_perm_txt = "";
1
  <?php
2
+ $domain = sanitize_text_field($_SERVER['HTTP_HOST']);
3
  $plugin_settings = get_option( 'plugin_settings' );
4
  $license_information = get_option( 'license_information' );
5
+ $host = sanitize_text_field($_SERVER['HTTP_HOST']);
6
  $directory_perm_xml = "";
7
  $directory_perm_csv = "";
8
  $directory_perm_txt = "";
pages/admin/woosea-upgrade-elite.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  $plugin_settings = get_option( 'plugin_settings' );
3
  $license_information = get_option( 'license_information' );
4
- $domain = $_SERVER['HTTP_HOST'];
5
  $error = "false";
6
  $plugin_data = get_plugin_data( __FILE__ );
7
 
1
  <?php
2
  $plugin_settings = get_option( 'plugin_settings' );
3
  $license_information = get_option( 'license_information' );
4
+ $domain = sanitize_text_field($_SERVER['HTTP_HOST']);
5
  $error = "false";
6
  $plugin_data = get_plugin_data( __FILE__ );
7
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
5
  Tags: Google Shopping Feed, Facebook feed, Facebook catalog feed, WooCommerce Product Feed, Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Pixels, Conversion API
6
  Requires at least: 4.5
7
  Tested up to: 5.9
8
- Stable tag: 11.5.7
9
 
10
  == Description ==
11
 
@@ -345,6 +345,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
345
 
346
  === Changelog ===
347
 
 
 
 
348
  = 11.5.7 (2022-05-29) =
349
  * Solved an issue with an undefined variable
350
 
@@ -3704,6 +3707,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
3704
 
3705
  == Upgrade Notice ==
3706
 
 
 
 
3707
  = 11.5.7 =
3708
  Solved an issue with an undefined variable
3709
 
5
  Tags: Google Shopping Feed, Facebook feed, Facebook catalog feed, WooCommerce Product Feed, Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Pixels, Conversion API
6
  Requires at least: 4.5
7
  Tested up to: 5.9
8
+ Stable tag: 11.5.8
9
 
10
  == Description ==
11
 
345
 
346
  === Changelog ===
347
 
348
+ = 11.5.8 (2022-05-31) =
349
+ * Fixed issues with regards to missing sanitazion and validation
350
+
351
  = 11.5.7 (2022-05-29) =
352
  * Solved an issue with an undefined variable
353
 
3707
 
3708
  == Upgrade Notice ==
3709
 
3710
+ = 11.5.8 =
3711
+ Fixed issues with regards to missing sanitazion and validation
3712
+
3713
  = 11.5.7 =
3714
  Solved an issue with an undefined variable
3715
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 11.5.7
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Catalog managers, Remarketing, Bing, Skroutz, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
- define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '11.5.7' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -4335,7 +4335,7 @@ function woosea_generate_pages(){
4335
  } elseif ($generate_step == 101){
4336
  /**
4337
  * Update project configuration
4338
- */
4339
  $project_data = WooSEA_Update_Project::update_project($from_post);
4340
 
4341
  /**
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 11.5.8
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Catalog managers, Remarketing, Bing, Skroutz, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
+ define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '11.5.8' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
4335
  } elseif ($generate_step == 101){
4336
  /**
4337
  * Update project configuration
4338
+ */
4339
  $project_data = WooSEA_Update_Project::update_project($from_post);
4340
 
4341
  /**