Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.79

Version Description

October 26 2017 = * Spam protection improved. * Fixed issue with existing spam comments check. * Added posibility to exclude IP from check. * Minor fixes.

Download this release

Release Info

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

Code changes from version 5.78 to 5.79

assets/js/cleantalk-comments-checkspam.js CHANGED
@@ -133,9 +133,9 @@ function ct_send_comments(){
133
  new_href+='&from='+ct_date_from+'&till='+ct_date_till;
134
  location.href = new_href;
135
  }else if(parseInt(msg.end) == 0){
136
- ct_comments_checked += msg.checked;
137
- ct_comments_spam += msg.spam;
138
- ct_comments_bad += msg.bad;
139
  ct_unchecked = ct_comments_total - ct_comments_checked - ct_comments_bad;
140
  var status_string = String(ctCommentsCheck.ct_status_string);
141
  var status_string = status_string.printf(ct_comments_total, ct_comments_checked, ct_comments_spam, ct_comments_bad);
@@ -143,6 +143,12 @@ function ct_send_comments(){
143
  status_string += ctCommentsCheck.ct_status_string_warning;
144
  jQuery('#ct_checking_status').html(status_string);
145
  jQuery('#ct_error_message').hide();
 
 
 
 
 
 
146
  ct_send_comments();
147
  }
148
  }
@@ -516,4 +522,8 @@ jQuery(document).ready(function(){
516
  timeout: 5000
517
  });
518
  });
 
 
 
 
519
  });
133
  new_href+='&from='+ct_date_from+'&till='+ct_date_till;
134
  location.href = new_href;
135
  }else if(parseInt(msg.end) == 0){
136
+ ct_comments_checked = +ct_comments_checked + +msg.checked;
137
+ ct_comments_spam = +ct_comments_spam + +msg.spam;
138
+ ct_comments_bad = +ct_comments_bad + +msg.bad;
139
  ct_unchecked = ct_comments_total - ct_comments_checked - ct_comments_bad;
140
  var status_string = String(ctCommentsCheck.ct_status_string);
141
  var status_string = status_string.printf(ct_comments_total, ct_comments_checked, ct_comments_spam, ct_comments_bad);
143
  status_string += ctCommentsCheck.ct_status_string_warning;
144
  jQuery('#ct_checking_status').html(status_string);
145
  jQuery('#ct_error_message').hide();
146
+ // If DB woks not properly
147
+ if(+ct_comments_total < ct_comments_checked + ct_comments_bad){
148
+ document.cookie = 'ct_comments_start_check=1; path=/';
149
+ document.cookie = 'ct_comments_safe_check=1; path=/';
150
+ location.href = 'edit-comments.php?page=ct_check_spam';
151
+ }
152
  ct_send_comments();
153
  }
154
  }
522
  timeout: 5000
523
  });
524
  });
525
+ if(ctCommentsCheck.start === '1'){
526
+ document.cookie = 'ct_comments_start_check=0; expires=' + new Date(0).toUTCString() + '; path=/';
527
+ jQuery('#ct_check_spam_button').click();
528
+ }
529
  });
cleantalk.php CHANGED
@@ -3,13 +3,13 @@
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.78
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
- $cleantalk_plugin_version='5.78';
12
- $ct_agent_version = 'wordpress-578';
13
  $cleantalk_executed=false;
14
 
15
  define('CLEANTALK_REMOTE_CALL_SLEEP', 10); // Minimum time between remote call
@@ -549,20 +549,51 @@ function ct_send_daily_request(){
549
 
550
  /*
551
  * Set Cookies test for cookie test
 
 
552
  */
553
  function apbct_cookie(){
554
 
555
  global $ct_options;
556
  $ct_options=ct_get_options();
557
 
 
 
 
 
 
 
 
558
  $apbct_timestamp = time();
559
- setcookie('apbct_timestamp', $apbct_timestamp, 0, '/');
560
- setcookie('apbct_cookies_test', md5($ct_options['apikey'].$apbct_timestamp), 0, '/');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
561
  }
562
 
563
  /**
564
  * Cookies test for sender
565
- * Also checks for valid timestamp in $_COOKIE['apbct_timestamp']
566
  * @return null|0|1;
567
  */
568
  function apbct_cookies_test()
@@ -570,13 +601,23 @@ function apbct_cookies_test()
570
  global $ct_options;
571
  $ct_options=ct_get_options();
572
 
573
- if(isset($_COOKIE['apbct_cookies_test'], $_COOKIE['apbct_timestamp'])){
574
- if($_COOKIE['apbct_cookies_test'] == md5($ct_options['apikey'].$_COOKIE['apbct_timestamp']))
 
 
 
 
 
 
 
 
575
  return 1;
576
- else
577
  return 0;
578
- }else
 
579
  return null;
 
580
  }
581
 
582
  /**
@@ -604,5 +645,4 @@ function myplugin_init() {
604
  }
605
 
606
  add_action( 'init', 'myplugin_init' );
607
- */
608
- ?>
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.79
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
+ $cleantalk_plugin_version='5.79';
12
+ $ct_agent_version = 'wordpress-579';
13
  $cleantalk_executed=false;
14
 
15
  define('CLEANTALK_REMOTE_CALL_SLEEP', 10); // Minimum time between remote call
549
 
550
  /*
551
  * Set Cookies test for cookie test
552
+ * Sets cookies with pararms timestamp && landing_timestamp && pervious_referer
553
+ * Sets test cookie with all other cookies
554
  */
555
  function apbct_cookie(){
556
 
557
  global $ct_options;
558
  $ct_options=ct_get_options();
559
 
560
+ // Cookie names to validate
561
+ $cookie_test_value = array(
562
+ 'cookies_names' => array(),
563
+ 'check_value' => $ct_options['apikey'],
564
+ );
565
+
566
+ // Submit time
567
  $apbct_timestamp = time();
568
+ setcookie('apbct_timestamp', $apbct_timestamp, 0, '/');
569
+ $cookie_test_value['cookies_names'][] = 'apbct_timestamp';
570
+ $cookie_test_value['check_value'] .= $apbct_timestamp;
571
+
572
+ // Pervious referer
573
+ if(!empty($_SERVER['HTTP_REFERER'])){
574
+ setcookie('apbct_prev_referer', $_SERVER['HTTP_REFERER'], 0, '/');
575
+ $cookie_test_value['cookies_names'][] = 'apbct_prev_referer';
576
+ $cookie_test_value['check_value'] .= $_SERVER['HTTP_REFERER'];
577
+ }
578
+
579
+ // Landing time
580
+ if(isset($_COOKIE['apbct_site_landing_ts'])){
581
+ $site_landing_timestamp = $_COOKIE['apbct_site_landing_ts'];
582
+ }else{
583
+ $site_landing_timestamp = $apbct_timestamp;
584
+ setcookie('apbct_site_landing_ts', $apbct_timestamp, 0, '/');
585
+ }
586
+ $cookie_test_value['cookies_names'][] = 'apbct_site_landing_ts';
587
+ $cookie_test_value['check_value'] .= $site_landing_timestamp;
588
+
589
+ // Cookies test
590
+ $cookie_test_value['check_value'] = md5($cookie_test_value['check_value']);
591
+ setcookie('apbct_cookies_test', json_encode($cookie_test_value), 0, '/');
592
  }
593
 
594
  /**
595
  * Cookies test for sender
596
+ * Also checks for valid timestamp in $_COOKIE['apbct_timestamp'] and other apbct_ COOKIES
597
  * @return null|0|1;
598
  */
599
  function apbct_cookies_test()
601
  global $ct_options;
602
  $ct_options=ct_get_options();
603
 
604
+ if(isset($_COOKIE['apbct_cookies_test'])){
605
+
606
+ $cookie_test = json_decode(stripslashes($_COOKIE['apbct_cookies_test']), true);
607
+
608
+ $check_srting = $ct_options['apikey'];
609
+ foreach($cookie_test['cookies_names'] as $cookie_name){
610
+ $check_srting .= isset($_COOKIE[$cookie_name]) ? $_COOKIE[$cookie_name] : '';
611
+ } unset($cokie_name);
612
+
613
+ if($cookie_test['check_value'] == md5($check_srting)){
614
  return 1;
615
+ }else{
616
  return 0;
617
+ }
618
+ }else{
619
  return null;
620
+ }
621
  }
622
 
623
  /**
645
  }
646
 
647
  add_action( 'init', 'myplugin_init' );
648
+ */
 
inc/cleantalk-admin.php CHANGED
@@ -252,7 +252,8 @@ function apbct_enqueue_scripts($hook) {
252
  'ct_confirm_deletion_all' => __('Delete all spam comments?', 'cleantalk'),
253
  'ct_confirm_deletion_checked' => __('Delete checked comments?', 'cleantalk'),
254
  'ct_status_string' => __('Total comments %s. Checked %s. Found %s spam comments. %s bad comments (without IP or email).', 'cleantalk'),
255
- 'ct_status_string_warning' => '<p>'.__('Please do backup of WordPress database before delete any accounts!', 'cleantalk').'</p>'
 
256
  ));
257
  wp_localize_script( 'jquery', 'ctCommentsScreen', array(
258
  'ct_ajax_nonce' => $ajax_nonce,
252
  'ct_confirm_deletion_all' => __('Delete all spam comments?', 'cleantalk'),
253
  'ct_confirm_deletion_checked' => __('Delete checked comments?', 'cleantalk'),
254
  'ct_status_string' => __('Total comments %s. Checked %s. Found %s spam comments. %s bad comments (without IP or email).', 'cleantalk'),
255
+ 'ct_status_string_warning' => '<p>'.__('Please do backup of WordPress database before delete any accounts!', 'cleantalk').'</p>',
256
+ 'start' => !empty($_COOKIE['ct_comments_start_check']) ? true : false,
257
  ));
258
  wp_localize_script( 'jquery', 'ctCommentsScreen', array(
259
  'ct_ajax_nonce' => $ajax_nonce,
inc/cleantalk-comments.php CHANGED
@@ -257,47 +257,58 @@ function ct_ajax_check_comments(){
257
 
258
  check_ajax_referer( 'ct_secret_nonce', 'security' );
259
 
260
- global $ct_options, $ct_ip_penalty_days;
261
 
262
  $ct_options = ct_get_options();
263
 
264
- $params = array(
265
- 'fields' => array(
266
- 'comment_ID',
267
- 'comment_date_gmt',
268
- 'comment_author_IP',
269
- 'comment_author_email',
270
- ),
271
- 'meta_query' => array(
272
- 'relation' => 'AND',
273
- array(
274
- 'key' => 'ct_checked',
275
- 'compare' => 'NOT EXISTS'
276
- ),
277
- array(
278
- 'key' => 'ct_bad',
279
- 'compare' => 'NOT EXISTS'
280
- )
281
- ),
282
- 'orderby' => 'comment_date_gmt',
283
- 'order' => 'ASC',
284
- 'number' => 100
285
- );
286
-
287
  if(isset($_POST['from'], $_POST['till'])){
288
-
289
  $from_date = date('Y-m-d', intval(strtotime($_POST['from'])));
290
  $till_date = date('Y-m-d', intval(strtotime($_POST['till'])));
291
-
292
- $params['date_query'] = array(
293
- 'column' => 'comment_date_gmt',
294
- 'after' => $from_date,
295
- 'before' => $till_date,
296
- 'inclusive' => true,
297
- );
298
  }
299
 
300
- $c = get_comments( $params );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
 
302
  $check_result = array(
303
  'end' => 0,
@@ -309,6 +320,13 @@ function ct_ajax_check_comments(){
309
 
310
  if(sizeof($c)>0){
311
 
 
 
 
 
 
 
 
312
  if(!empty($_POST['accurate_check'])){
313
  // Leaving comments only with first comment's date. Unsetting others.
314
 
@@ -427,47 +445,47 @@ function ct_ajax_info_comments($direct_call = false){
427
  if (!$direct_call)
428
  check_ajax_referer( 'ct_secret_nonce', 'security' );
429
 
 
 
430
  // Checking dates value
431
  if(isset($_POST['from'], $_POST['till'])){
432
-
433
  $from_date = date('Y-m-d', intval(strtotime($_POST['from'])));
434
  $till_date = date('Y-m-d', intval(strtotime($_POST['till'])));
435
  }
436
 
437
- // Total comments
438
- $params = array(
439
- 'fields' => 'ids',
440
- 'count' => true,
441
- );
442
- if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'comment_date_gmt', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
443
- $cnt = get_comments( $params );
444
-
445
- // Spam comments
446
- $params = array(
447
- 'fields' => 'ids',
448
- 'meta_key' => 'ct_marked_as_spam',
449
- 'count' => true
450
- );
451
- if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'comment_date_gmt', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
452
- $cnt_spam = get_comments( $params );
453
-
454
- // Checked comments
455
- $params = array(
456
- 'fields' => 'ids',
457
- 'meta_key' => 'ct_checked',
458
- 'count' => true
459
- );
460
- if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'comment_date_gmt', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
461
- $cnt_checked = get_comments( $params );
 
 
 
462
 
463
- // Bad comments (without IP and Email)
464
- $params = array(
465
- 'fields' => 'ids',
466
- 'meta_key' => 'ct_bad',
467
- 'count' => true
468
- );
469
- if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'comment_date_gmt', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
470
- $cnt_bad = get_comments( $params );
471
 
472
  $return = array(
473
  'message' => '',
@@ -614,7 +632,9 @@ function ct_ajax_clear_comments(){
614
 
615
  check_ajax_referer( 'ct_secret_nonce', 'security' );
616
  global $wpdb;
617
- $wpdb->query("delete from $wpdb->commentmeta where meta_key='ct_checked' or meta_key='ct_marked_as_spam' or meta_key='ct_bad';");
 
 
618
  die();
619
  }
620
 
257
 
258
  check_ajax_referer( 'ct_secret_nonce', 'security' );
259
 
260
+ global $wpdb, $ct_options, $ct_ip_penalty_days;
261
 
262
  $ct_options = ct_get_options();
263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  if(isset($_POST['from'], $_POST['till'])){
 
265
  $from_date = date('Y-m-d', intval(strtotime($_POST['from'])));
266
  $till_date = date('Y-m-d', intval(strtotime($_POST['till'])));
 
 
 
 
 
 
 
267
  }
268
 
269
+ // Gettings comments 100 unchecked comments
270
+ if(isset($_COOKIE['ct_comments_safe_check'])){
271
+ $c = $wpdb->get_results("
272
+ SELECT comment_ID, comment_date_gmt, comment_author_IP, comment_author_email
273
+ FROM wp_comments as comm
274
+ WHERE
275
+ (comm.comment_approved = '1' OR comm.comment_approved = '0')
276
+ AND NOT EXISTS(
277
+ SELECT comment_id meta_key
278
+ FROM wp_commentmeta as meta
279
+ WHERE comm.comment_ID = meta.comment_id AND (meta_key = 'ct_checked' OR meta_key = 'ct_bad')
280
+ )
281
+ ORDER BY comment_date_gmt
282
+ LIMIT 100",
283
+ ARRAY_A
284
+ );
285
+ }else{
286
+ $params = array(
287
+ 'meta_query' => array(
288
+ 'relation' => 'AND',
289
+ array(
290
+ 'key' => 'ct_checked',
291
+ 'compare' => 'NOT EXISTS'
292
+ ),
293
+ array(
294
+ 'key' => 'ct_bad',
295
+ 'compare' => 'NOT EXISTS'
296
+ )
297
+ ),
298
+ 'orderby' => 'comment_date_gmt',
299
+ 'order' => 'ASC',
300
+ 'number' => 100
301
+ );
302
+ if(isset($from_date, $till_date)){
303
+ $params['date_query'] = array(
304
+ 'column' => 'comment_date_gmt',
305
+ 'after' => $from_date,
306
+ 'before' => $till_date,
307
+ 'inclusive' => true,
308
+ );
309
+ }
310
+ $c = get_comments( $params );
311
+ }
312
 
313
  $check_result = array(
314
  'end' => 0,
320
 
321
  if(sizeof($c)>0){
322
 
323
+ // Coverting $c to objects
324
+ if(is_array($c[0])){
325
+ foreach($c as $key => $value){
326
+ $c[$key] = (object)$value;
327
+ } unset($key, $value);
328
+ }
329
+
330
  if(!empty($_POST['accurate_check'])){
331
  // Leaving comments only with first comment's date. Unsetting others.
332
 
445
  if (!$direct_call)
446
  check_ajax_referer( 'ct_secret_nonce', 'security' );
447
 
448
+ global $wpdb;
449
+
450
  // Checking dates value
451
  if(isset($_POST['from'], $_POST['till'])){
 
452
  $from_date = date('Y-m-d', intval(strtotime($_POST['from'])));
453
  $till_date = date('Y-m-d', intval(strtotime($_POST['till'])));
454
  }
455
 
456
+ $metas = array('', 'ct_marked_as_spam', 'ct_checked', 'ct_bad');
457
+
458
+ $result = array();
459
+ foreach($metas as $meta){
460
+ if(isset($_COOKIE['ct_comments_safe_check'])){
461
+ $res = $wpdb->get_results("
462
+ SELECT COUNT(DISTINCT comment_ID) AS cnt
463
+ FROM `wp_comments` AS comm
464
+ WHERE (comm.comment_approved = '1' OR comm.comment_approved = '0')"
465
+ .(!empty($meta)
466
+ ? "AND EXISTS (SELECT comment_id, meta_key
467
+ FROM wp_commentmeta meta
468
+ WHERE comm.comment_ID = meta.comment_id AND meta_key = '$meta')" : '').
469
+ (isset($from_date, $till_date)
470
+ ? "AND comment_date_gmt BETWEEN
471
+ STR_TO_DATE('".$from_date."', '%Y-%m-%d %H:%i:%s') AND
472
+ STR_TO_DATE('".$till_date."', '%Y-%m-%d %H:%i:%s')" : ''),
473
+ ARRAY_A);
474
+ $result[] = $res[0]['cnt'];
475
+ }else{
476
+ $params = array('fields' => 'ids', 'count' => true);
477
+ if(!empty($meta))
478
+ $params['meta_key'] = $meta;
479
+ if(isset($from_date, $till_date))
480
+ $params['date_query'] = array('column' => 'comment_date_gmt', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
481
+ $result[] = get_comments( $params );
482
+ }
483
+ }
484
 
485
+ $cnt = $result[0]; // Total comments
486
+ $cnt_spam = $result[1]; // Spam comments
487
+ $cnt_checked = $result[2]; // Checked comments
488
+ $cnt_bad = $result[3]; // Bad comments (without IP and Email)
 
 
 
 
489
 
490
  $return = array(
491
  'message' => '',
632
 
633
  check_ajax_referer( 'ct_secret_nonce', 'security' );
634
  global $wpdb;
635
+ $wpdb->query("DELETE
636
+ FROM $wpdb->commentmeta
637
+ WHERE meta_key IN ('ct_checked', 'ct_marked_as_spam', 'ct_bad');");
638
  die();
639
  }
640
 
inc/cleantalk-common.php CHANGED
@@ -138,7 +138,7 @@ function ct_init_session() {
138
  * 'post_info' - string
139
  * @return array array('ct'=> Cleantalk, 'ct_result' => CleantalkResponse)
140
  */
141
- function ct_base_call($params = array(), $tmp = false) {
142
  global $wpdb, $ct_agent_version, $ct_formtime_label, $ct_options, $ct_data;
143
 
144
  $ct_options=ct_get_options();
@@ -146,9 +146,9 @@ function ct_base_call($params = array(), $tmp = false) {
146
 
147
  require_once('cleantalk.class.php');
148
 
149
- $submit_time = $tmp ? $params['submit_time'] : submit_time_test();
150
 
151
- $sender_info = get_sender_info($tmp);
152
  if (array_key_exists('sender_info', $params)) {
153
  $sender_info = array_merge($sender_info, (array) $params['sender_info']);
154
  }
@@ -246,7 +246,7 @@ function submit_time_test() {
246
  * Inner function - Default data array for senders
247
  * @return array
248
  */
249
- function get_sender_info($tmp = false) {
250
  global $ct_direct_post, $ct_options, $ct_data, $wp_rewrite, $ct_formtime_label;
251
 
252
  $ct_options = ct_get_options();
@@ -286,20 +286,33 @@ function get_sender_info($tmp = false) {
286
  }
287
  }
288
 
289
- return $sender_info = array(
290
- 'page_url' => htmlspecialchars(@$_SERVER['SERVER_NAME'].@$_SERVER['REQUEST_URI']),
291
- 'cms_lang' => substr(get_locale(), 0, 2),
292
- 'REFFERRER' => htmlspecialchars(@$_SERVER['HTTP_REFERER']),
293
- 'USER_AGENT' => htmlspecialchars(@$_SERVER['HTTP_USER_AGENT']),
294
- 'php_session' => $php_session,
295
- 'cookies_enabled' => $tmp ? apbct_cookies_test() : ct_cookies_test(true),
296
- 'direct_post' => $ct_direct_post,
297
- 'checkjs_data_post' => $checkjs_data_post,
 
 
 
 
298
  'checkjs_data_cookies' => $checkjs_data_cookies,
299
- 'ct_options' => json_encode($options2server),
300
- 'fields_number' => sizeof($_POST),
301
- 'js_info' => $js_info,
302
- );
 
 
 
 
 
 
 
 
 
303
  }
304
 
305
  /**
@@ -731,6 +744,8 @@ function ct_get_fields_any($arr, $message=array(), $email = null, $nickname = ar
731
  'security',
732
  'action',
733
  'http_referer',
 
 
734
  // Formidable Form
735
  'form_key',
736
  'submit_entry',
@@ -758,7 +773,12 @@ function ct_get_fields_any($arr, $message=array(), $email = null, $nickname = ar
758
  'output_\d+_\w{0,2}',
759
  // Contact Form by Web-Settler protection
760
  '_formId',
761
- '_returnLink'
 
 
 
 
 
762
  );
763
 
764
  $skip_message_post = array( // Reset $message if we have a sign-up data
@@ -961,10 +981,29 @@ function check_url_exclusions($exclusions = NULL){
961
 
962
  global $cleantalk_url_exclusions;
963
 
964
- if((isset($cleantalk_url_exclusions) && is_array($cleantalk_url_exclusions) && sizeof($cleantalk_url_exclusions)>0) || ($exclusions !== NULL && is_array($exclusions) && sizeof($exclusions)>0)){
 
 
965
  foreach($cleantalk_url_exclusions as $key => $value){
966
  if(stripos($_SERVER['REQUEST_URI'], $value) !== false){
967
- return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
968
  }
969
  }
970
  }
@@ -975,26 +1014,24 @@ function check_url_exclusions($exclusions = NULL){
975
  function ct_filter_array(&$array)
976
  {
977
  global $cleantalk_key_exclusions;
978
- if(isset($cleantalk_key_exclusions) && sizeof($cleantalk_key_exclusions)>0)
979
- {
980
- foreach($array as $key=>$value)
981
- {
982
- if(!is_array($value))
983
- {
984
- if(in_array($key,$cleantalk_key_exclusions))
985
- {
986
  unset($array[$key]);
987
  }
 
 
988
  }
989
- else
990
- {
991
- $array[$key]=ct_filter_array($value);
992
- }
993
  }
 
994
  return $array;
995
- }
996
- else
997
- {
998
  return $array;
999
  }
1000
  }
138
  * 'post_info' - string
139
  * @return array array('ct'=> Cleantalk, 'ct_result' => CleantalkResponse)
140
  */
141
+ function ct_base_call($params = array(), $cookie_submit_time = false, $field_count = false) {
142
  global $wpdb, $ct_agent_version, $ct_formtime_label, $ct_options, $ct_data;
143
 
144
  $ct_options=ct_get_options();
146
 
147
  require_once('cleantalk.class.php');
148
 
149
+ $submit_time = $cookie_submit_time ? $params['submit_time'] : submit_time_test();
150
 
151
+ $sender_info = get_sender_info($cookie_submit_time, $field_count);
152
  if (array_key_exists('sender_info', $params)) {
153
  $sender_info = array_merge($sender_info, (array) $params['sender_info']);
154
  }
246
  * Inner function - Default data array for senders
247
  * @return array
248
  */
249
+ function get_sender_info($cookie_submit_time = false, $field_count = false) {
250
  global $ct_direct_post, $ct_options, $ct_data, $wp_rewrite, $ct_formtime_label;
251
 
252
  $ct_options = ct_get_options();
286
  }
287
  }
288
 
289
+ $cookie_test = apbct_cookies_test();
290
+
291
+ $sender_info = array(
292
+ 'page_url' => htmlspecialchars(@$_SERVER['SERVER_NAME'].@$_SERVER['REQUEST_URI']),
293
+ 'cms_lang' => substr(get_locale(), 0, 2),
294
+ 'REFFERRER' => htmlspecialchars(@$_SERVER['HTTP_REFERER']),
295
+ 'USER_AGENT' => htmlspecialchars(@$_SERVER['HTTP_USER_AGENT']),
296
+ 'php_session' => $php_session,
297
+ 'cookies_enabled' => $cookie_submit_time ? $cookie_test : ct_cookies_test(true),
298
+ 'REFFERRER_PREVIOUS' => $cookie_test && !empty($_COOKIE['apbct_prev_referer']) ? htmlspecialchars($_COOKIE['apbct_prev_referer']) : null,
299
+ 'site_landing_ts' => $cookie_test && !empty($_COOKIE['apbct_site_landing_ts']) ? htmlspecialchars($_COOKIE['apbct_site_landing_ts']) : null,
300
+ 'direct_post' => $ct_direct_post,
301
+ 'checkjs_data_post' => $checkjs_data_post,
302
  'checkjs_data_cookies' => $checkjs_data_cookies,
303
+ 'ct_options' => json_encode($options2server),
304
+ 'fields_number' => sizeof($_POST),
305
+ 'js_info' => $js_info,
306
+ );
307
+
308
+ if($field_count){
309
+ $visible_inputs = !empty($_COOKIE['apbct_field_count'])
310
+ ? $_COOKIE['apbct_field_count']
311
+ : null;
312
+ $sender_info['form_visible_inputs'] = $visible_inputs;
313
+ }
314
+
315
+ return $sender_info;
316
  }
317
 
318
  /**
744
  'security',
745
  'action',
746
  'http_referer',
747
+ 'timestamp',
748
+ 'captcha',
749
  // Formidable Form
750
  'form_key',
751
  'submit_entry',
773
  'output_\d+_\w{0,2}',
774
  // Contact Form by Web-Settler protection
775
  '_formId',
776
+ '_returnLink',
777
+ // Social login and more
778
+ '_save',
779
+ '_facebook',
780
+ '_social',
781
+ 'user_login-',
782
  );
783
 
784
  $skip_message_post = array( // Reset $message if we have a sign-up data
981
 
982
  global $cleantalk_url_exclusions;
983
 
984
+ if ((isset($cleantalk_url_exclusions) && is_array($cleantalk_url_exclusions) && sizeof($cleantalk_url_exclusions)>0) ||
985
+ ($exclusions !== NULL && is_array($exclusions) && sizeof($exclusions)>0)
986
+ ){
987
  foreach($cleantalk_url_exclusions as $key => $value){
988
  if(stripos($_SERVER['REQUEST_URI'], $value) !== false){
989
+ return true;
990
+ }
991
+ }
992
+ }
993
+
994
+ return false;
995
+ }
996
+
997
+ function check_ip_exclusions($exclusions = NULL){
998
+
999
+ global $cleantalk_ip_exclusions;
1000
+
1001
+ if ((isset($cleantalk_ip_exclusions) && is_array($cleantalk_ip_exclusions) && sizeof($cleantalk_ip_exclusions)>0) ||
1002
+ ($exclusions !== NULL && is_array($exclusions) && sizeof($exclusions)>0)
1003
+ ){
1004
+ foreach($cleantalk_ip_exclusions as $key => $value){
1005
+ if(stripos($_SERVER['REMOTE_ADDR'], $value) !== false){
1006
+ return true;
1007
  }
1008
  }
1009
  }
1014
  function ct_filter_array(&$array)
1015
  {
1016
  global $cleantalk_key_exclusions;
1017
+
1018
+ if(isset($cleantalk_key_exclusions) && sizeof($cleantalk_key_exclusions) > 0){
1019
+
1020
+ foreach($array as $key => $value){
1021
+
1022
+ if(!is_array($value)){
1023
+ if(in_array($key,$cleantalk_key_exclusions)){
 
1024
  unset($array[$key]);
1025
  }
1026
+ }else{
1027
+ $array[$key] = ct_filter_array($value);
1028
  }
1029
+
 
 
 
1030
  }
1031
+
1032
  return $array;
1033
+
1034
+ }else{
 
1035
  return $array;
1036
  }
1037
  }
inc/cleantalk-public.php CHANGED
@@ -709,7 +709,7 @@ function ct_add_mouse_tracking($return_string = false){
709
  ctMouseEventTimerFlag = true, //Reading interval flag
710
  ctMouseData = [],
711
  ctMouseDataCounter = 0;
712
-
713
  function ctSetCookieSec(c_name, value) {
714
  document.cookie = c_name + "=" + encodeURIComponent(value) + "; path=/";
715
  }
@@ -838,7 +838,6 @@ function ct_frm_entries_footer_scripts($fields, $form) {
838
  input.setAttribute('type', 'hidden');
839
  input.setAttribute('name', '$ct_checkjs_frm');
840
  input.setAttribute('value', '$ct_checkjs_key');
841
-
842
  for (i = 0; i < document.forms.length; i++) {
843
  if (document.forms[i].id && document.forms[i].id.search('$ct_frm_name') != -1) {
844
  document.forms[i].appendChild(input);
@@ -1506,9 +1505,9 @@ function ct_test_registration($nickname, $email, $ip){
1506
  $ct_options = ct_get_options();
1507
  $ct_data = ct_get_data();
1508
 
1509
- $submit_time = submit_time_test();
1510
 
1511
- $sender_info = get_sender_info();
1512
 
1513
  $checkjs=0;
1514
 
@@ -1626,9 +1625,9 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
1626
  return $errors;
1627
  }
1628
 
1629
- $submit_time = submit_time_test();
1630
-
1631
- $sender_info = get_sender_info();
1632
 
1633
  $checkjs=0;
1634
 
@@ -2028,7 +2027,7 @@ function ct_wpcf7_spam($param) {
2028
  }
2029
  $message = sprintf("%s%s", $subject, $message);
2030
  }
2031
-
2032
  $ct_base_call_result = ct_base_call(array(
2033
  'submit_time' => apbct_get_submit_time(),
2034
  'message' => $message,
@@ -2346,13 +2345,14 @@ function ct_s2member_registration_test() {
2346
  return null;
2347
  }
2348
 
2349
- $submit_time = submit_time_test();
2350
-
 
 
2351
  $checkjs = js_test('ct_checkjs', $_COOKIE, true);
2352
 
2353
  require_once('cleantalk.class.php');
2354
 
2355
- $sender_info = get_sender_info();
2356
  $sender_info = json_encode($sender_info);
2357
  if ($sender_info === false) {
2358
  $sender_info= '';
@@ -2440,14 +2440,6 @@ function ct_contact_form_validate() {
2440
 
2441
  if($cleantalk_executed)
2442
  return null;
2443
-
2444
- if(isset($cleantalk_url_exclusions))
2445
- $ct_cnt = count($cleantalk_url_exclusions);
2446
- else
2447
- $ct_cnt = 0;
2448
-
2449
- //@header("CtExclusions: ".$ct_cnt);
2450
- cleantalk_debug("CtExclusions", $ct_cnt);
2451
 
2452
  if (@sizeof($_POST)==0 ||
2453
  (isset($_POST['signup_username']) && isset($_POST['signup_email']) && isset($_POST['signup_password'])) ||
@@ -2457,10 +2449,12 @@ function ct_contact_form_validate() {
2457
  (strpos($_SERVER['REQUEST_URI'],'/wp-admin/')!== false && (empty($_POST['your-phone']) && empty($_POST['your-email']) && empty($_POST['your-message']))) || //Bitrix24 Contact
2458
  strpos($_SERVER['REQUEST_URI'],'wp-login.php')!==false||
2459
  strpos($_SERVER['REQUEST_URI'],'wp-comments-post.php')!==false ||
 
2460
  (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'],'/wp-admin/') !== false) ||
2461
  strpos($_SERVER['REQUEST_URI'],'/login/')!==false||
2462
  isset($_GET['ptype']) && $_GET['ptype']=='login' ||
2463
  check_url_exclusions() ||
 
2464
  ct_check_array_keys($_POST) ||
2465
  isset($_POST['ct_checkjs_register_form']) ||
2466
  (isset($_POST['signup_username']) && isset($_POST['signup_password_confirm']) && isset($_POST['signup_submit']) ) ||
@@ -2502,13 +2496,8 @@ function ct_contact_form_validate() {
2502
  return null;
2503
  }
2504
 
2505
- //@header("CtConditions: Passed");
2506
- cleantalk_debug("CtConditions", "Passed");
2507
-
2508
  $_POST=ct_filter_array($_POST);
2509
- //@header("CtFilterArray: Passed");
2510
- cleantalk_debug("CtFilterArray", "Passed");
2511
-
2512
  $checkjs = js_test('ct_checkjs', $_COOKIE, true);
2513
 
2514
  $post_info['comment_type'] = 'feedback_general_contact_form';
@@ -2529,22 +2518,7 @@ function ct_contact_form_validate() {
2529
  $message = array_merge(array('subject' => $subject), $message);
2530
  }
2531
  $message = json_encode($message);
2532
-
2533
- //@header("CtGetFieldsAny: Passed");
2534
- cleantalk_debug("CtGetFieldsAny", "Passed");
2535
- //@header("CtSenderEmail: $sender_email");
2536
- cleantalk_debug("CtSenderEmail", $sender_email);
2537
- if($contact_form)
2538
- {
2539
- //@header("CtContactForm: true");
2540
- cleantalk_debug("CtContactForm", "true");
2541
- }
2542
- else
2543
- {
2544
- //@header("CtContactForm: false");
2545
- cleantalk_debug("CtContactForm", "false");
2546
- }
2547
-
2548
  // Skip submission if no data found
2549
  if ($sender_email===''|| !$contact_form) {
2550
  return false;
@@ -2556,9 +2530,6 @@ function ct_contact_form_validate() {
2556
  $tmp=$_POST['TellAFriend_Link'];
2557
  unset($_POST['TellAFriend_Link']);
2558
  }
2559
-
2560
- //@header("CtBaseCallBefore: 1");
2561
- cleantalk_debug("CtBaseCallBefore", "1");
2562
 
2563
  $ct_base_call_result = ct_base_call(array(
2564
  'submit_time' => apbct_get_submit_time(),
@@ -2571,9 +2542,6 @@ function ct_contact_form_validate() {
2571
  'checkjs' => $checkjs
2572
  ), true);
2573
 
2574
- //@header("CtBaseCall: Executed");
2575
- cleantalk_debug("CtBaseCall", "Executed");
2576
-
2577
  if(isset($_POST['TellAFriend_Link']))
2578
  {
2579
  $_POST['TellAFriend_Link']=$tmp;
@@ -2597,9 +2565,6 @@ function ct_contact_form_validate() {
2597
  if(!empty($contact_form))
2598
  break;
2599
  }
2600
-
2601
- //@header("CtResult: Not Allow");
2602
- cleantalk_debug("CtResult", "Not Allow");
2603
 
2604
  $ajax_call = false;
2605
  if ((defined( 'DOING_AJAX' ) && DOING_AJAX)
@@ -2607,13 +2572,9 @@ function ct_contact_form_validate() {
2607
  $ajax_call = true;
2608
  }
2609
  if ($ajax_call) {
2610
- //@header("AJAX: Yes");
2611
- cleantalk_debug("AJAX", "Yes");
2612
  echo $ct_result->comment;
2613
  } else {
2614
-
2615
- //@header("AJAX: No");
2616
- cleantalk_debug("AJAX", "No");
2617
  global $ct_comment;
2618
  $ct_comment = $ct_result->comment;
2619
  if(isset($_POST['cma-action'])&&$_POST['cma-action']=='add'){
@@ -2675,9 +2636,7 @@ function ct_contact_form_validate() {
2675
  }
2676
  exit;
2677
  }
2678
- //@header("CtResult: Allow");
2679
- cleantalk_debug("CtResult", "Allow");
2680
-
2681
  return null;
2682
  }
2683
 
@@ -2696,14 +2655,6 @@ function ct_contact_form_validate_postdata() {
2696
  if ((defined( 'DOING_AJAX' ) && DOING_AJAX))
2697
  return null;
2698
 
2699
- if(isset($cleantalk_url_exclusions))
2700
- $ct_cnt=sizeof($cleantalk_url_exclusions);
2701
- else
2702
- $ct_cnt=0;
2703
-
2704
- //@header("CtExclusions: ".$ct_cnt);
2705
- cleantalk_debug("CtExclusions", $ct_cnt);
2706
-
2707
  if (@sizeof($_POST)==0 ||
2708
  (isset($_POST['signup_username']) && isset($_POST['signup_email']) && isset($_POST['signup_password'])) ||
2709
  (isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
@@ -2714,8 +2665,10 @@ function ct_contact_form_validate_postdata() {
2714
  strpos($_SERVER['REQUEST_URI'],'wp-comments-post.php')!==false ||
2715
  @strpos($_SERVER['HTTP_REFERER'],'/wp-admin/')!==false ||
2716
  strpos($_SERVER['REQUEST_URI'],'/login/')!==false||
 
2717
  isset($_GET['ptype']) && $_GET['ptype']=='login' ||
2718
  check_url_exclusions() ||
 
2719
  ct_check_array_keys($_POST) ||
2720
  isset($_POST['ct_checkjs_register_form']) ||
2721
  (isset($_POST['signup_username']) && isset($_POST['signup_password_confirm']) && isset($_POST['signup_submit']) ) ||
709
  ctMouseEventTimerFlag = true, //Reading interval flag
710
  ctMouseData = [],
711
  ctMouseDataCounter = 0;
712
+
713
  function ctSetCookieSec(c_name, value) {
714
  document.cookie = c_name + "=" + encodeURIComponent(value) + "; path=/";
715
  }
838
  input.setAttribute('type', 'hidden');
839
  input.setAttribute('name', '$ct_checkjs_frm');
840
  input.setAttribute('value', '$ct_checkjs_key');
 
841
  for (i = 0; i < document.forms.length; i++) {
842
  if (document.forms[i].id && document.forms[i].id.search('$ct_frm_name') != -1) {
843
  document.forms[i].appendChild(input);
1505
  $ct_options = ct_get_options();
1506
  $ct_data = ct_get_data();
1507
 
1508
+ $submit_time = apbct_get_submit_time();//submit_time_test();
1509
 
1510
+ $sender_info = get_sender_info(true);
1511
 
1512
  $checkjs=0;
1513
 
1625
  return $errors;
1626
  }
1627
 
1628
+ $submit_time = apbct_get_submit_time();//submit_time_test();
1629
+
1630
+ $sender_info = get_sender_info(true);
1631
 
1632
  $checkjs=0;
1633
 
2027
  }
2028
  $message = sprintf("%s%s", $subject, $message);
2029
  }
2030
+
2031
  $ct_base_call_result = ct_base_call(array(
2032
  'submit_time' => apbct_get_submit_time(),
2033
  'message' => $message,
2345
  return null;
2346
  }
2347
 
2348
+ $submit_time = apbct_get_submit_time();//submit_time_test();
2349
+
2350
+ $sender_info = get_sender_info(true);
2351
+
2352
  $checkjs = js_test('ct_checkjs', $_COOKIE, true);
2353
 
2354
  require_once('cleantalk.class.php');
2355
 
 
2356
  $sender_info = json_encode($sender_info);
2357
  if ($sender_info === false) {
2358
  $sender_info= '';
2440
 
2441
  if($cleantalk_executed)
2442
  return null;
 
 
 
 
 
 
 
 
2443
 
2444
  if (@sizeof($_POST)==0 ||
2445
  (isset($_POST['signup_username']) && isset($_POST['signup_email']) && isset($_POST['signup_password'])) ||
2449
  (strpos($_SERVER['REQUEST_URI'],'/wp-admin/')!== false && (empty($_POST['your-phone']) && empty($_POST['your-email']) && empty($_POST['your-message']))) || //Bitrix24 Contact
2450
  strpos($_SERVER['REQUEST_URI'],'wp-login.php')!==false||
2451
  strpos($_SERVER['REQUEST_URI'],'wp-comments-post.php')!==false ||
2452
+ strpos($_SERVER['REQUEST_URI'],'?provider=facebook&')!==false ||
2453
  (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'],'/wp-admin/') !== false) ||
2454
  strpos($_SERVER['REQUEST_URI'],'/login/')!==false||
2455
  isset($_GET['ptype']) && $_GET['ptype']=='login' ||
2456
  check_url_exclusions() ||
2457
+ check_ip_exclusions() ||
2458
  ct_check_array_keys($_POST) ||
2459
  isset($_POST['ct_checkjs_register_form']) ||
2460
  (isset($_POST['signup_username']) && isset($_POST['signup_password_confirm']) && isset($_POST['signup_submit']) ) ||
2496
  return null;
2497
  }
2498
 
 
 
 
2499
  $_POST=ct_filter_array($_POST);
2500
+
 
 
2501
  $checkjs = js_test('ct_checkjs', $_COOKIE, true);
2502
 
2503
  $post_info['comment_type'] = 'feedback_general_contact_form';
2518
  $message = array_merge(array('subject' => $subject), $message);
2519
  }
2520
  $message = json_encode($message);
2521
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2522
  // Skip submission if no data found
2523
  if ($sender_email===''|| !$contact_form) {
2524
  return false;
2530
  $tmp=$_POST['TellAFriend_Link'];
2531
  unset($_POST['TellAFriend_Link']);
2532
  }
 
 
 
2533
 
2534
  $ct_base_call_result = ct_base_call(array(
2535
  'submit_time' => apbct_get_submit_time(),
2542
  'checkjs' => $checkjs
2543
  ), true);
2544
 
 
 
 
2545
  if(isset($_POST['TellAFriend_Link']))
2546
  {
2547
  $_POST['TellAFriend_Link']=$tmp;
2565
  if(!empty($contact_form))
2566
  break;
2567
  }
 
 
 
2568
 
2569
  $ajax_call = false;
2570
  if ((defined( 'DOING_AJAX' ) && DOING_AJAX)
2572
  $ajax_call = true;
2573
  }
2574
  if ($ajax_call) {
 
 
2575
  echo $ct_result->comment;
2576
  } else {
2577
+
 
 
2578
  global $ct_comment;
2579
  $ct_comment = $ct_result->comment;
2580
  if(isset($_POST['cma-action'])&&$_POST['cma-action']=='add'){
2636
  }
2637
  exit;
2638
  }
2639
+
 
 
2640
  return null;
2641
  }
2642
 
2655
  if ((defined( 'DOING_AJAX' ) && DOING_AJAX))
2656
  return null;
2657
 
 
 
 
 
 
 
 
 
2658
  if (@sizeof($_POST)==0 ||
2659
  (isset($_POST['signup_username']) && isset($_POST['signup_email']) && isset($_POST['signup_password'])) ||
2660
  (isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
2665
  strpos($_SERVER['REQUEST_URI'],'wp-comments-post.php')!==false ||
2666
  @strpos($_SERVER['HTTP_REFERER'],'/wp-admin/')!==false ||
2667
  strpos($_SERVER['REQUEST_URI'],'/login/')!==false||
2668
+ strpos($_SERVER['REQUEST_URI'],'?provider=facebook&')!==false ||
2669
  isset($_GET['ptype']) && $_GET['ptype']=='login' ||
2670
  check_url_exclusions() ||
2671
+ check_ip_exclusions() ||
2672
  ct_check_array_keys($_POST) ||
2673
  isset($_POST['ct_checkjs_register_form']) ||
2674
  (isset($_POST['signup_username']) && isset($_POST['signup_password_confirm']) && isset($_POST['signup_submit']) ) ||
inc/cleantalk.class.php CHANGED
@@ -723,10 +723,13 @@ class Cleantalk {
723
  $cookie_name = 'COOKIE';
724
 
725
  $ct_tmp[$cookie_name] = preg_replace(array(
726
- '/\s{0,1}ct_checkjs=[a-z0-9]*[;|$]{0,1}/',
727
- '/\s{0,1}ct_timezone=.{0,1}\d{1,2}[;|$]/',
728
- '/\s{0,1}ct_pointer_data=.*5D[;|$]{0,1}/',
729
- '/;{0,1}\s{0,3}$/'
 
 
 
730
  ), '', $ct_tmp[$cookie_name]);
731
  $msg->all_headers=json_encode($ct_tmp);
732
  }
723
  $cookie_name = 'COOKIE';
724
 
725
  $ct_tmp[$cookie_name] = preg_replace(array(
726
+ '/\s?ct_checkjs=[a-z0-9]*[;|$]/',
727
+ '/\s?ct_timezone=.{0,1}\d{1,2}[;|$]/',
728
+ '/\s?ct_pointer_data=.*5D[;|$]/',
729
+ '/\s?apbct_timestamp=\d*[;|$]/',
730
+ '/\s?apbct_site_landing_ts=\d*[;|$]/',
731
+ '/\s?apbct_cookies_test=%7B.*%7D[;|$]/',
732
+ '/\s?apbct_prev_referer=http.*?[;|$]/',
733
  ), '', $ct_tmp[$cookie_name]);
734
  $msg->all_headers=json_encode($ct_tmp);
735
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: znaeff, shagimuratov, sartemd174
3
  Tags: antispam, protection, contact form, comments, spam
4
  Requires at least: 3.0
5
- Tested up to: 4.8.2
6
- Stable tag: 5.78
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.
@@ -385,15 +385,20 @@ Yes, you can. Add this string in your wp-config.php file before defining databas
385
 
386
  Now, all pages containing strings 'url1', 'url2', or 'url3' will be excluded from anti-spam checking. Remember, that this option will not be applied in registration and comment checking — they are always protected from spam. This is similar to regular expression /.*url1.*/ or wildcard like *url1*.
387
 
388
- For example: You need to except these URLs.
389
-
390
  example.com/some/thing
391
  example.com/some/one
392
  example.com/some/body
393
-
394
- You need to type this:
395
 
396
  $cleantalk_url_exclusions = array('some');
 
 
 
 
 
 
 
397
 
398
  = Can I not send my personal data to CleanTalk servers? =
399
  Yes, you can exclude your data. Add this string in your wp-config.php file before defining database constants:
@@ -516,6 +521,12 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
516
  1. The plugin deletes/removes the existing spam comments and users accounts.
517
 
518
  == Changelog ==
 
 
 
 
 
 
519
  = 5.78 October 16 2017 =
520
  * Improved compatibility with themes. Changed core functions prefix.
521
  * Fixed issue with WooCommerce checkout.
@@ -1459,6 +1470,12 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
1459
  * First version
1460
 
1461
  == Upgrade Notice ==
 
 
 
 
 
 
1462
  = 5.78 October 16 2017 =
1463
  * Improved compatibility with themes. Changed core functions prefix.
1464
  * Fixed issue with WooCommerce checkout.
2
  Contributors: znaeff, shagimuratov, sartemd174
3
  Tags: antispam, protection, contact form, comments, spam
4
  Requires at least: 3.0
5
+ Tested up to: 4.8.3
6
+ Stable tag: 5.79
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.
385
 
386
  Now, all pages containing strings 'url1', 'url2', or 'url3' will be excluded from anti-spam checking. Remember, that this option will not be applied in registration and comment checking — they are always protected from spam. This is similar to regular expression /.*url1.*/ or wildcard like *url1*.
387
 
388
+ For example: If you need to except these URLs:
 
389
  example.com/some/thing
390
  example.com/some/one
391
  example.com/some/body
392
+ You should type this in wp-config.php:
 
393
 
394
  $cleantalk_url_exclusions = array('some');
395
+
396
+ = Can I add exclusions for some IP addresses? =
397
+ Yes, you can. Add this string in your wp-config.php file before defining database constants:
398
+
399
+ $cleantalk_ip_exclusions = array('127.0.0.1', '8.8.8.8');
400
+
401
+ Now, all requests from IP 127.0.0.1 and 8.8.8.8 will be excluded from anti-spam checking. Remember, that this option will not be applied in registration and comment checking — they are always protected from spam.
402
 
403
  = Can I not send my personal data to CleanTalk servers? =
404
  Yes, you can exclude your data. Add this string in your wp-config.php file before defining database constants:
521
  1. The plugin deletes/removes the existing spam comments and users accounts.
522
 
523
  == Changelog ==
524
+ = 5.79 October 26 2017 =
525
+ * Spam protection improved.
526
+ * Fixed issue with existing spam comments check.
527
+ * Added posibility to exclude IP from check.
528
+ * Minor fixes.
529
+
530
  = 5.78 October 16 2017 =
531
  * Improved compatibility with themes. Changed core functions prefix.
532
  * Fixed issue with WooCommerce checkout.
1470
  * First version
1471
 
1472
  == Upgrade Notice ==
1473
+ = 5.79 October 23 2017 =
1474
+ * Spam protection improved.
1475
+ * Fixed issue with existing spam comments check.
1476
+ * Added posibility to exclude IP from check.
1477
+ * Minor fixes.
1478
+
1479
  = 5.78 October 16 2017 =
1480
  * Improved compatibility with themes. Changed core functions prefix.
1481
  * Fixed issue with WooCommerce checkout.