Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.87

Version Description

February 2 2018 = * Filtration quality improved. * Fix: WP Foto Vote downloading images. * Fix: Fatal error for unsupported PHP 5.2. * Fix: Formidable Forms improved spam filtration.

Download this release

Release Info

Developer Safronik
Plugin Icon 128x128 Spam protection, AntiSpam, FireWall by CleanTalk
Version 5.87
Comparing to
See all releases

Code changes from version 5.86 to 5.87

cleantalk.php CHANGED
@@ -2,18 +2,18 @@
2
  /*
3
  Plugin Name: Anti-Spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
- Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms. Formerly Anti-Spam by CleanTalk.
6
- Version: 5.86
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
- $cleantalk_plugin_version='5.86';
12
- $ct_agent_version = 'wordpress-586';
13
  $cleantalk_executed = false;
14
 
15
- define('APBCT_VERSION', '5.86');
16
- define('APBCT_AGENT', 'wordpress-586');
17
 
18
  define('CLEANTALK_REMOTE_CALL_SLEEP', 10); // Minimum time between remote call
19
 
2
  /*
3
  Plugin Name: Anti-Spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
+ Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
6
+ Version: 5.87
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
+ $cleantalk_plugin_version='5.87';
12
+ $ct_agent_version = 'wordpress-587';
13
  $cleantalk_executed = false;
14
 
15
+ define('APBCT_VERSION', '5.87');
16
+ define('APBCT_AGENT', 'wordpress-587');
17
 
18
  define('CLEANTALK_REMOTE_CALL_SLEEP', 10); // Minimum time between remote call
19
 
inc/cleantalk-ajax.php CHANGED
@@ -350,6 +350,14 @@ function ct_ajax_hook($message_obj = false, $additional = false)
350
  if (isset($message['wysijaData'], $message['wysijaplugin'], $message['task'], $message['controller']) && $message['wysijaplugin'] == 'wysija-newsletters' && $message['controller'] == 'campaigns')
351
  return false;
352
 
 
 
 
 
 
 
 
 
353
  $base_call_result = apbct_base_call(
354
  array(
355
  'message' => $message,
350
  if (isset($message['wysijaData'], $message['wysijaplugin'], $message['task'], $message['controller']) && $message['wysijaplugin'] == 'wysija-newsletters' && $message['controller'] == 'campaigns')
351
  return false;
352
 
353
+ // WP Foto Vote Fix
354
+ if (!empty($_FILES)){
355
+ foreach($message as $key => $value){
356
+ if(strpos($key, 'oje') !== false)
357
+ return;
358
+ } unset($key ,$value);
359
+ }
360
+
361
  $base_call_result = apbct_base_call(
362
  array(
363
  'message' => $message,
inc/cleantalk-common.php CHANGED
@@ -131,7 +131,7 @@ function apbct_base_call($params = array(), $reg_flag = false){
131
  $ct_request = new CleantalkRequest();
132
 
133
  // IPs
134
- $ct_request->sender_ip = isset($params['sender_ip']) ? $params['sender_ip'] : CleantalkHelper::get_ip_real();
135
  $ct_request->x_forwarded_for = CleantalkHelper::get_ip_x_forwarded_for();
136
  $ct_request->x_real_ip = CleantalkHelper::get_ip_x_real_ip();
137
 
131
  $ct_request = new CleantalkRequest();
132
 
133
  // IPs
134
+ $ct_request->sender_ip = defined('CT_TEST_IP') ? CT_TEST_IP : (isset($params['sender_ip']) ? $params['sender_ip'] : CleantalkHelper::get_ip_real());
135
  $ct_request->x_forwarded_for = CleantalkHelper::get_ip_x_forwarded_for();
136
  $ct_request->x_real_ip = CleantalkHelper::get_ip_x_real_ip();
137
 
inc/cleantalk-public.php CHANGED
@@ -687,6 +687,13 @@ function ct_frm_validate_entry ($errors, $values) {
687
  $contact_form = ($ct_temp_msg_data['contact'] ? $ct_temp_msg_data['contact'] : true);
688
  $message = ($ct_temp_msg_data['message'] ? $ct_temp_msg_data['message'] : array());
689
 
 
 
 
 
 
 
 
690
  $checkjs = !js_test('ct_checkjs', $_COOKIE, true)
691
  ? js_test('ct_checkjs', $_COOKIE, true)
692
  : js_test('ct_checkjs', $_POST, true);
@@ -1894,9 +1901,9 @@ function ct_gforms_spam_test ($is_spam, $form, $entry) {
1894
 
1895
  // Adding 'input_' to every field /Gravity Forms fix/
1896
  $message = array_flip($message);
1897
- array_walk($message, function(&$value, $key){
1898
  $value = 'input_'.$value;
1899
- });
1900
  $message = array_flip($message);
1901
 
1902
  if($subject != '') {
687
  $contact_form = ($ct_temp_msg_data['contact'] ? $ct_temp_msg_data['contact'] : true);
688
  $message = ($ct_temp_msg_data['message'] ? $ct_temp_msg_data['message'] : array());
689
 
690
+ // Adding 'input_meta[]' to every field /Formidable fix/
691
+ $message = array_flip($message);
692
+ foreach($message as &$value){
693
+ $value = 'item_meta['.$value.']';
694
+ } unset($value);
695
+ $message = array_flip($message);
696
+
697
  $checkjs = !js_test('ct_checkjs', $_COOKIE, true)
698
  ? js_test('ct_checkjs', $_COOKIE, true)
699
  : js_test('ct_checkjs', $_POST, true);
1901
 
1902
  // Adding 'input_' to every field /Gravity Forms fix/
1903
  $message = array_flip($message);
1904
+ foreach($message as &$value){
1905
  $value = 'input_'.$value;
1906
+ } unset($value);
1907
  $message = array_flip($message);
1908
 
1909
  if($subject != '') {
js/apbct-public.js CHANGED
@@ -87,7 +87,7 @@ function apbct_ready(){
87
  for(var i=0; i < document.forms.length; i++){
88
  var form = document.forms[i];
89
  form.onsubmit = function(){
90
- var apbct_vf = {apbct_visible_fields: ""};
91
  for(var j=0, elem_count=form.elements.length; j < form.elements.length; j++){
92
  var elem = form.elements[j];
93
  if( getComputedStyle(elem).display == "none" ||
@@ -100,10 +100,10 @@ function apbct_ready(){
100
  ){
101
  elem_count--;
102
  }else{
103
- apbct_vf.apbct_visible_fields += elem.getAttribute("name") + (j+1 == form.elements.length ? "" : " ");
104
  }
105
  }
106
- ctSetCookieSec("apbct_visible_fields", JSON.stringify(apbct_vf));
107
  ctSetCookieSec("apbct_visible_fields_count", elem_count);
108
  }
109
  }
87
  for(var i=0; i < document.forms.length; i++){
88
  var form = document.forms[i];
89
  form.onsubmit = function(){
90
+ var apbct_visible_fields = "";
91
  for(var j=0, elem_count=form.elements.length; j < form.elements.length; j++){
92
  var elem = form.elements[j];
93
  if( getComputedStyle(elem).display == "none" ||
100
  ){
101
  elem_count--;
102
  }else{
103
+ apbct_visible_fields += elem.getAttribute("name") + (typeof form.elements[j+1] === "undefined" ? "" : " ");
104
  }
105
  }
106
+ ctSetCookieSec("apbct_visible_fields", apbct_visible_fields);
107
  ctSetCookieSec("apbct_visible_fields_count", elem_count);
108
  }
109
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: znaeff, shagimuratov, sartemd174
3
  Tags: spam, antispam, protection, comments, firewall
4
  Requires at least: 3.0
5
  Tested up to: 4.9.1
6
- Stable tag: 5.86
7
  License: GPLv2
8
 
9
  Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce spam. Forget spam.
@@ -504,6 +504,12 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
504
  1. The plugin deletes/removes the existing spam comments and users accounts.
505
 
506
  == Changelog ==
 
 
 
 
 
 
507
  = 5.86 January 25 2018 =
508
  * Fix: High CPU load with wp-ajax.php.
509
  * Fix: Mailpoet: Newsletter.
@@ -1504,6 +1510,12 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
1504
  * First version
1505
 
1506
  == Upgrade Notice ==
 
 
 
 
 
 
1507
  = 5.86 January 25 2018 =
1508
  * Fix: High CPU load with wp-ajax.php.
1509
  * Fix: Mailpoet: Newsletter.
3
  Tags: spam, antispam, protection, comments, firewall
4
  Requires at least: 3.0
5
  Tested up to: 4.9.1
6
+ Stable tag: 5.87
7
  License: GPLv2
8
 
9
  Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce spam. Forget spam.
504
  1. The plugin deletes/removes the existing spam comments and users accounts.
505
 
506
  == Changelog ==
507
+ = 5.87 February 2 2018 =
508
+ * Filtration quality improved.
509
+ * Fix: WP Foto Vote downloading images.
510
+ * Fix: Fatal error for unsupported PHP 5.2.
511
+ * Fix: Formidable Forms improved spam filtration.
512
+
513
  = 5.86 January 25 2018 =
514
  * Fix: High CPU load with wp-ajax.php.
515
  * Fix: Mailpoet: Newsletter.
1510
  * First version
1511
 
1512
  == Upgrade Notice ==
1513
+ = 5.87 February 2 2018 =
1514
+ * Filtration quality improved.
1515
+ * Fix: WP Foto Vote downloading images.
1516
+ * Fix: Fatal error for unsupported PHP 5.2.
1517
+ * Fix: Formidable Forms improved spam filtration.
1518
+
1519
  = 5.86 January 25 2018 =
1520
  * Fix: High CPU load with wp-ajax.php.
1521
  * Fix: Mailpoet: Newsletter.