Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.108.1

Version Description

November 8 2018 = * Fix: Errors with integration class.

Download this release

Release Info

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

Code changes from version 5.108 to 5.108.1

Files changed (4) hide show
  1. cleantalk.php +1 -1
  2. inc/cleantalk-ajax.php +2 -1
  3. inc/cleantalk-public.php +12 -77
  4. readme.txt +10 -1
cleantalk.php CHANGED
@@ -3,7 +3,7 @@
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.108
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
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.108.1
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
inc/cleantalk-ajax.php CHANGED
@@ -265,7 +265,8 @@ function ct_ajax_hook($message_obj = false, $additional = false)
265
  $skip_post = array(
266
  'gmaps_display_info_window', // Geo My WP pop-up windows.
267
  'gmw_ps_display_info_window', // Geo My WP pop-up windows.
268
- 'the_champ_user_auth', // Super Socializer
 
269
  );
270
 
271
  $checkjs = apbct_js_test('ct_checkjs', $_COOKIE, true);
265
  $skip_post = array(
266
  'gmaps_display_info_window', // Geo My WP pop-up windows.
267
  'gmw_ps_display_info_window', // Geo My WP pop-up windows.
268
+ 'the_champ_user_auth', // Super Socializer
269
+ 'simbatfa-init-otp', //Two-Factor Auth
270
  );
271
 
272
  $checkjs = apbct_js_test('ct_checkjs', $_COOKIE, true);
inc/cleantalk-public.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  // File with integrations
4
- require_once('cleantalk-integrations.php');
5
 
6
  /**
7
  * Init functions
@@ -214,45 +214,12 @@ function apbct_init() {
214
  }
215
 
216
  // WPForms
217
- $apbct->integrations[] = new CleantalkIntegration(
218
- 'wpforms',
219
- 'form',
220
- array(
221
- 'ajax' => false,
222
- 'identify' => array('wpforms' => array('submit' => 'wpforms-submit')),
223
- 'response' => null,
224
- 'actions' => array(
225
- 'add_filed' => array(
226
- 'hook_function' => 'add_action',
227
- 'hook' => 'wpforms_frontend_output',
228
- 'function' => 'apbct_form__WPForms__addField',
229
- 'priority' => 100,
230
- 'arguments_num' => 5,
231
- ),
232
- 'gather_data' => array(
233
- 'hook_function' => 'add_filter',
234
- 'hook' => 'wpforms_process_before_filter',
235
- 'function' => 'apbct_from__WPForms__gatherData',
236
- 'priority' => 100,
237
- 'arguments_num' => 2,
238
- ),
239
- 'spam_check' => array(
240
- 'hook_function' => 'add_filter',
241
- 'hook' => 'wpforms_process_initial_errors',
242
- 'function' => 'apbct_form__WPForms__showResponse',
243
- 'priority' => 100,
244
- 'arguments_num' => 2,
245
- ),
246
- )
247
- )
248
- );
249
-
250
- // Set hooks
251
- foreach ($apbct->integrations as $integration) {
252
- foreach ($integration->actions as $action) {
253
- call_user_func_array($action['hook_function'], array($action['hook'], $action['function'], $action['priority'], $action['arguments_num']));
254
- }
255
- }
256
 
257
  //
258
  // Load JS code to website footer
@@ -293,7 +260,7 @@ add_filter( 'mc4wp_form_messages', 'ct_add_mc4wp_error_message' );
293
 
294
  /*
295
  * Function to set validate fucntion for CCF form
296
- * Input - onsistently each form field
297
  * Returns - String. Validate function
298
  */
299
  function ct_ccf($callback, $value, $field_id, $type){
@@ -2336,34 +2303,6 @@ function ct_s2member_registration_test($post_key) {
2336
  return true;
2337
  }
2338
 
2339
- /**
2340
- * Recursivly search for pair of key => value in array
2341
- *
2342
- * @param array $array_with_params
2343
- * @param array $array_to_search_in
2344
- * @return boolean Found or not
2345
- */
2346
- function apbct_search_array_in_array__reqursive($array_with_params, $array_to_search_in) {
2347
-
2348
- foreach($array_with_params as $key => $val){
2349
-
2350
- if(is_array($val)){
2351
- if(array_key_exists($key, $array_to_search_in)){
2352
- if(apbct_search_array_in_array__reqursive($val, $array_to_search_in[$key]) === true){
2353
- return true;
2354
- }
2355
- }
2356
- }else{
2357
- if(array_search($val, $array_to_search_in) == $key){
2358
- return true;
2359
- }
2360
- }
2361
-
2362
- }
2363
-
2364
- return false;
2365
- }
2366
-
2367
  /**
2368
  * General test for any contact form
2369
  */
@@ -2412,17 +2351,12 @@ function ct_contact_form_validate() {
2412
  (isset($_POST['contact_tags']) && strpos($_POST['contact_tags'], 'MBR:') !== false) ||
2413
  (strpos($_SERVER['REQUEST_URI'], 'bizuno.php') && !empty($_POST['bizPass'])) ||
2414
  (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'],'my-dashboard/') !== false) || // ticket_id=7885
2415
- isset($_POST['slm_action'], $_POST['license_key'], $_POST['secret_key'], $_POST['registered_domain']) // ticket_id=9122
 
2416
  ) {
2417
  return null;
2418
  }
2419
 
2420
- // Skip check if integration exists
2421
- foreach ($apbct->integrations as $integration) {
2422
- if(apbct_search_array_in_array__reqursive($integration->identify, $_POST)) return;
2423
- if(apbct_search_array_in_array__reqursive($integration->identify, $_GET)) return;
2424
- }
2425
-
2426
  // Do not execute anti-spam test for logged in users.
2427
  if (isset($_COOKIE[LOGGED_IN_COOKIE]) && $apbct->settings['protect_logged_in'] != 1)
2428
  return null;
@@ -2606,7 +2540,8 @@ function ct_contact_form_validate_postdata() {
2606
  strpos($_SERVER['REQUEST_URI'],'/wc-api/')!==false ||
2607
  (isset($_POST['wc_reset_password'], $_POST['_wpnonce'], $_POST['_wp_http_referer'])) || //WooCommerce recovery password form
2608
  (isset($_POST['woocommerce-login-nonce'], $_POST['login'], $_POST['password'], $_POST['_wp_http_referer'])) || //WooCommerce login form
2609
- (isset($_POST['provider'], $_POST['authcode']) && $_POST['provider'] == 'Two_Factor_Totp') //TwoFactor authorization
 
2610
  ) {
2611
  return null;
2612
  }
1
  <?php
2
 
3
  // File with integrations
4
+ //require_once('cleantalk-integrations.php');
5
 
6
  /**
7
  * Init functions
214
  }
215
 
216
  // WPForms
217
+ // Adding fields
218
+ add_action('wpforms_frontend_output', 'apbct_form__WPForms__addField', 1000, 5);
219
+ // Gathering data to validate
220
+ add_filter('wpforms_process_before_filter', 'apbct_from__WPForms__gatherData', 100, 2);
221
+ // Do spam check
222
+ add_filter('wpforms_process_initial_errors', 'apbct_form__WPForms__showResponse', 100, 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
 
224
  //
225
  // Load JS code to website footer
260
 
261
  /*
262
  * Function to set validate fucntion for CCF form
263
+ * Input - Сonsistently each form field
264
  * Returns - String. Validate function
265
  */
266
  function ct_ccf($callback, $value, $field_id, $type){
2303
  return true;
2304
  }
2305
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2306
  /**
2307
  * General test for any contact form
2308
  */
2351
  (isset($_POST['contact_tags']) && strpos($_POST['contact_tags'], 'MBR:') !== false) ||
2352
  (strpos($_SERVER['REQUEST_URI'], 'bizuno.php') && !empty($_POST['bizPass'])) ||
2353
  (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'],'my-dashboard/') !== false) || // ticket_id=7885
2354
+ isset($_POST['slm_action'], $_POST['license_key'], $_POST['secret_key'], $_POST['registered_domain']) || // ticket_id=9122
2355
+ (isset($_POST['wpforms']['submit']) && $_POST['wpforms']['submit'] == 'wpforms-submit') // WPForms
2356
  ) {
2357
  return null;
2358
  }
2359
 
 
 
 
 
 
 
2360
  // Do not execute anti-spam test for logged in users.
2361
  if (isset($_COOKIE[LOGGED_IN_COOKIE]) && $apbct->settings['protect_logged_in'] != 1)
2362
  return null;
2540
  strpos($_SERVER['REQUEST_URI'],'/wc-api/')!==false ||
2541
  (isset($_POST['wc_reset_password'], $_POST['_wpnonce'], $_POST['_wp_http_referer'])) || //WooCommerce recovery password form
2542
  (isset($_POST['woocommerce-login-nonce'], $_POST['login'], $_POST['password'], $_POST['_wp_http_referer'])) || //WooCommerce login form
2543
+ (isset($_POST['provider'], $_POST['authcode']) && $_POST['provider'] == 'Two_Factor_Totp') || //TwoFactor authorization
2544
+ (isset($_GET['wc-ajax']) && $_GET['wc-ajax'] == 'sa_wc_buy_now_get_ajax_buy_now_button') //BuyNow add to cart
2545
  ) {
2546
  return null;
2547
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: safronik
3
  Tags: spam, antispam, protection, comments, firewall
4
  Requires at least: 3.0
5
  Tested up to: 5.0
6
- Stable tag: 5.108
7
  License: GPLv2
8
 
9
  Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
@@ -29,6 +29,9 @@ No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bo
29
  1. Compatible with General Data Protection Regulation (GDPR) (EU).
30
 
31
  = Public reviews =
 
 
 
32
  > Using CleanTalk on WPLift was a great test as we receive huge amounts of spam.
33
  > *Oliver Dale, <a href="http://wplift.com/wordpress-anti-spam-plugin" target="_blank">WPLift.com</a>.*
34
 
@@ -527,6 +530,9 @@ Yes, it is. Please read this article,
527
  10. Website's options.
528
 
529
  == Changelog ==
 
 
 
530
  = 5.108 November 7 2018 =
531
  * Fix: White label mode.
532
  * Fix: SpamFireWall now can be disabled.
@@ -1699,6 +1705,9 @@ Yes, it is. Please read this article,
1699
  * First version
1700
 
1701
  == Upgrade Notice ==
 
 
 
1702
  = 5.108 November 7 2018 =
1703
  * Fix: White label mode.
1704
  * Fix: SpamFireWall now can be disabled.
3
  Tags: spam, antispam, protection, comments, firewall
4
  Requires at least: 3.0
5
  Tested up to: 5.0
6
+ Stable tag: 5.108.1
7
  License: GPLv2
8
 
9
  Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
29
  1. Compatible with General Data Protection Regulation (GDPR) (EU).
30
 
31
  = Public reviews =
32
+ > CleanTalk - Cloud-Based Anti-Spam Service to Keep Your Site Bot-Free.
33
+ > <a href="https://newswatchtv.com/2018/07/18/cleantalk-newswatch-review/" rarget="_blank">NewsWatch Review</a>.
34
+
35
  > Using CleanTalk on WPLift was a great test as we receive huge amounts of spam.
36
  > *Oliver Dale, <a href="http://wplift.com/wordpress-anti-spam-plugin" target="_blank">WPLift.com</a>.*
37
 
530
  10. Website's options.
531
 
532
  == Changelog ==
533
+ = 5.108.1 November 8 2018 =
534
+ * Fix: Errors with integration class.
535
+
536
  = 5.108 November 7 2018 =
537
  * Fix: White label mode.
538
  * Fix: SpamFireWall now can be disabled.
1705
  * First version
1706
 
1707
  == Upgrade Notice ==
1708
+ = 5.108.1 November 8 2018 =
1709
+ * Fix: Errors with integration class.
1710
+
1711
  = 5.108 November 7 2018 =
1712
  * Fix: White label mode.
1713
  * Fix: SpamFireWall now can be disabled.