Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.68

Version Description

June 22 2017 = * Contact Form for WordPress - Ultimate Form Builder Lite - integration. * Contact Bank - Contact Forms Builder - integration. * Smart Forms - integration. * cformsII - integration. * Contact Form by Web-Settler - integration. * Error fixes.

Download this release

Release Info

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

Code changes from version 5.67.3 to 5.68

assets/js/cleantalk-debug-ajax.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function(){
2
+
3
+ console.log('CT debug');
4
+
5
+ // Debug. Console all AJAX requests.
6
+ jQuery(document).ajaxComplete(function(e, xhr, settings, data) {
7
+ console.log("Success:")
8
+ console.log(e);
9
+ console.log(xhr);
10
+ console.log(settings);
11
+ console.log(data);
12
+ });
13
+
14
+ });
assets/js/cleantalk-public.js CHANGED
@@ -1,13 +1,4 @@
1
  jQuery(document).ready(function(){
2
-
3
- // Debug
4
- if(parseInt(ctPublic.ct_debug_ajax))
5
- jQuery(document).ajaxSuccess(function(e, xhr, settings, data) {
6
- console.log(e);
7
- console.log(xhr);
8
- console.log(settings);
9
- console.log(data);
10
- });
11
 
12
  // Set background-color similar to parents
13
  var ct_current_wrapper = jQuery('.ct_comment_info').parent(),
1
  jQuery(document).ready(function(){
 
 
 
 
 
 
 
 
 
2
 
3
  // Set background-color similar to parents
4
  var ct_current_wrapper = jQuery('.ct_comment_info').parent(),
cleantalk.php CHANGED
@@ -3,12 +3,12 @@
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.67.3
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
- $cleantalk_plugin_version='5.67.3';
11
- $ct_agent_version = 'wordpress-5673';
12
  $cleantalk_executed=false;
13
  $ct_sfw_updated = false;
14
 
@@ -841,4 +841,4 @@ function myplugin_init() {
841
 
842
  add_action( 'init', 'myplugin_init' );
843
  */
844
- ?>
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.68
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
+ $cleantalk_plugin_version='5.68';
11
+ $ct_agent_version = 'wordpress-568';
12
  $cleantalk_executed=false;
13
  $ct_sfw_updated = false;
14
 
841
 
842
  add_action( 'init', 'myplugin_init' );
843
  */
844
+ ?>
inc/cleantalk-admin.php CHANGED
@@ -2035,4 +2035,4 @@ function ct_unmark_red($message) {
2035
  return $message;
2036
  }
2037
 
2038
- ?>
2035
  return $message;
2036
  }
2037
 
2038
+ ?>
inc/cleantalk-ajax.php CHANGED
@@ -131,6 +131,10 @@ add_action( 'wp_ajax_ninja_forms_ajax_submit', 'ct_ajax_hook',1 );
131
  add_action( 'ninja_forms_process', 'ct_ajax_hook',1 );
132
  $cleantalk_hooked_actions[]='ninja_forms_ajax_submit';
133
 
 
 
 
 
134
  function ct_validate_email_ajaxlogin($email=null, $is_ajax=true)
135
  {
136
  require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
@@ -630,7 +634,57 @@ function ct_ajax_hook($message_obj = false, $additional = false)
630
  );
631
  print json_encode($result);
632
  die();
633
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
634
  else
635
  {
636
  print $ct_result->comment;
@@ -647,4 +701,4 @@ function ct_ajax_hook($message_obj = false, $additional = false)
647
  }
648
  }
649
 
650
- ?>
131
  add_action( 'ninja_forms_process', 'ct_ajax_hook',1 );
132
  $cleantalk_hooked_actions[]='ninja_forms_ajax_submit';
133
 
134
+ /* hooks for contact forms by web settler ajax*/
135
+ add_action( 'wp_ajax_nopriv_smuzform-storage', 'ct_ajax_hook',1 );
136
+ $cleantalk_hooked_actions[]='smuzform_form_submit';
137
+
138
  function ct_validate_email_ajaxlogin($email=null, $is_ajax=true)
139
  {
140
  require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
634
  );
635
  print json_encode($result);
636
  die();
637
+ }
638
+ // Ultimate Form Builder
639
+ elseif (isset($_POST['action']) && $_POST['action'] == 'ufbl_front_form_action'){
640
+ $result = Array(
641
+ 'error_keys' => array(),
642
+ 'error_flag' => 1,
643
+ 'response_message' => $ct_result->comment
644
+ );
645
+ print json_encode($result);
646
+ die();
647
+ }
648
+ // Smart Forms
649
+ elseif (isset($_POST['action']) && $_POST['action'] == 'rednao_smart_forms_save_form_values'){
650
+ error_log('true');
651
+ $result = Array(
652
+ 'message' => $ct_result->comment,
653
+ 'refreshCaptcha' => 'n',
654
+ 'success' => 'n'
655
+ );
656
+ print json_encode($result);
657
+ die();
658
+ }
659
+ //cFormsII
660
+ elseif(isset($_POST['action']) && $_POST['action'] == 'submitcform')
661
+ {
662
+ header('Content-Type: application/json');
663
+ $result = Array(
664
+ 'no' => "",
665
+ 'result' => "failure",
666
+ 'html' =>$ct_result->comment,
667
+ 'hide' => false,
668
+ 'redirection' => null
669
+
670
+ );
671
+ print json_encode($result);
672
+ die();
673
+ }
674
+ //Contact Form by Web-Settler
675
+ elseif(isset($_POST['smFieldData']))
676
+ {
677
+ $result = Array(
678
+ 'signal' => true,
679
+ 'code' => 0,
680
+ 'thanksMsg' => $ct_result->comment,
681
+ 'errors' => array(),
682
+ 'isMsg' => true,
683
+ 'redirectUrl' => null
684
+ );
685
+ print json_encode($result);
686
+ die();
687
+ }
688
  else
689
  {
690
  print $ct_result->comment;
701
  }
702
  }
703
 
704
+ ?>
inc/cleantalk-comments.php CHANGED
@@ -569,4 +569,4 @@ function ct_comment_check_approve_comment(){
569
 
570
  die();
571
  }
572
- ?>
569
 
570
  die();
571
  }
572
+ ?>
inc/cleantalk-common.php CHANGED
@@ -747,7 +747,9 @@ function ct_get_fields_any($arr, $message=array(), $email = null, $nickname = ar
747
  'formData_settings',
748
  //E_signature
749
  'recipient_signature',
750
- 'output_\d+_\w{0,2}'
 
 
751
  );
752
 
753
  $skip_message_post = array( // Reset $message if we have a sign-up data
@@ -1025,4 +1027,4 @@ function ct_change_plugin_resonse($ct_result = null, $checkjs = null) {
1025
  return $ct_result;
1026
  }
1027
 
1028
- ?>
747
  'formData_settings',
748
  //E_signature
749
  'recipient_signature',
750
+ 'output_\d+_\w{0,2}',
751
+ '_formId',
752
+ '_returnLink'
753
  );
754
 
755
  $skip_message_post = array( // Reset $message if we have a sign-up data
1027
  return $ct_result;
1028
  }
1029
 
1030
+ ?>
inc/cleantalk-public.php CHANGED
@@ -2459,10 +2459,11 @@ function ct_contact_form_validate() {
2459
  if (isset($_COOKIE[LOGGED_IN_COOKIE]) && $ct_options['protect_logged_in'] != 1)
2460
  return null;
2461
 
2462
- //Skip the test if the checkout setting is unset && and it's not WooCommerce
2463
- if($ct_options['wc_checkout_test'] == 0 && strpos($_SERVER['REQUEST_URI'],'wc-ajax=checkout') && strpos($_POST['_wp_http_referer'],'wc-ajax=update_order_review'))
2464
  return null;
2465
-
 
2466
  //@header("CtConditions: Passed");
2467
  cleantalk_debug("CtConditions", "Passed");
2468
 
@@ -2609,11 +2610,11 @@ function ct_contact_form_validate() {
2609
 
2610
  }elseif(isset($_POST['vfb-submit']) && defined('VFB_VERSION')){
2611
  wp_die("<h1>".__('Spam protection by CleanTalk', 'cleantalk')."</h1><h2>".$ct_result->comment."</h2>", '', array('response' => 403, "back_link" => true, "text_direction" => 'ltr'));
2612
-
2613
  }elseif(isset($_POST['action']) && $_POST['action'] == 'cf_process_ajax_submit'){
2614
- echo "<h3>Antispam by CleanTalk: <u>".$ct_result->comment."</u></h3>";
2615
  die();
2616
- //Mailster
2617
  }elseif(isset($_POST['_referer'], $_POST['formid'], $_POST['email'])){
2618
  $return = array(
2619
  'success' => false,
@@ -2621,7 +2622,7 @@ function ct_contact_form_validate() {
2621
  );
2622
  print json_encode($return);
2623
  die();
2624
- //Divi Theme Contact Form. Using $contact_form
2625
  }elseif(!empty($contact_form) && $contact_form == 'divi_theme_contact_form'){
2626
  echo "<div id='et_pb_contact_form{$contact_form_additional}'><h1>Your request looks like spam.</h1><div><p>{$ct_result->comment}</p></div></div>";
2627
  die;
@@ -2849,12 +2850,15 @@ function ct_enqueue_scripts_public($hook){
2849
  'ct_ajaxurl' => admin_url('admin-ajax.php'),
2850
  'ct_feedback_msg' => sprintf(__("Feedback has been sent to %sCleanTalk Dashboard%s.", 'cleantalk'), $user_token ? "<a target='_blank' href=https://cleantalk.org/my/show_requests?user_token={$user_token}&cp_mode=antispam>" : '', $user_token ? "</a>" : ''),
2851
  'ct_feedback_error' => __('Error occured while sending feedback.', 'cleantalk'),
2852
- 'ct_feedback_no_hash' => __('Feedback wasn\'t sent. There is no associated request.', 'cleantalk'),
2853
- 'ct_debug_ajax' => '0'
2854
  ));
2855
 
2856
  }
2857
  }
 
 
 
 
2858
  }
2859
 
2860
  /**
@@ -2921,5 +2925,4 @@ function ct_comments_output($curr_comment, $param2, $wp_list_comments_args){
2921
  // Ending comment output
2922
  echo "</{$wp_list_comments_args['style']}>";
2923
  }
2924
-
2925
- ?>
2459
  if (isset($_COOKIE[LOGGED_IN_COOKIE]) && $ct_options['protect_logged_in'] != 1)
2460
  return null;
2461
 
2462
+ // Skip the test if it's WooCommerce and the checkout test unset
2463
+ if(strpos($_SERVER['REQUEST_URI'],'wc-ajax=checkout') !==false && $ct_options['wc_checkout_test'] == 0){
2464
  return null;
2465
+ }
2466
+
2467
  //@header("CtConditions: Passed");
2468
  cleantalk_debug("CtConditions", "Passed");
2469
 
2610
 
2611
  }elseif(isset($_POST['vfb-submit']) && defined('VFB_VERSION')){
2612
  wp_die("<h1>".__('Spam protection by CleanTalk', 'cleantalk')."</h1><h2>".$ct_result->comment."</h2>", '', array('response' => 403, "back_link" => true, "text_direction" => 'ltr'));
2613
+ // Caldera Contact Forms
2614
  }elseif(isset($_POST['action']) && $_POST['action'] == 'cf_process_ajax_submit'){
2615
+ print json_encode("<h3 style='color: red;'><red>".$ct_result->comment);
2616
  die();
2617
+ // Mailster
2618
  }elseif(isset($_POST['_referer'], $_POST['formid'], $_POST['email'])){
2619
  $return = array(
2620
  'success' => false,
2622
  );
2623
  print json_encode($return);
2624
  die();
2625
+ // Divi Theme Contact Form. Using $contact_form
2626
  }elseif(!empty($contact_form) && $contact_form == 'divi_theme_contact_form'){
2627
  echo "<div id='et_pb_contact_form{$contact_form_additional}'><h1>Your request looks like spam.</h1><div><p>{$ct_result->comment}</p></div></div>";
2628
  die;
2850
  'ct_ajaxurl' => admin_url('admin-ajax.php'),
2851
  'ct_feedback_msg' => sprintf(__("Feedback has been sent to %sCleanTalk Dashboard%s.", 'cleantalk'), $user_token ? "<a target='_blank' href=https://cleantalk.org/my/show_requests?user_token={$user_token}&cp_mode=antispam>" : '', $user_token ? "</a>" : ''),
2852
  'ct_feedback_error' => __('Error occured while sending feedback.', 'cleantalk'),
2853
+ 'ct_feedback_no_hash' => __('Feedback wasn\'t sent. There is no associated request.', 'cleantalk')
 
2854
  ));
2855
 
2856
  }
2857
  }
2858
+
2859
+ if(!empty($ct_options['debug_ajax'])){
2860
+ wp_enqueue_script('ct_debug_js', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-debug-ajax.js'), array('jquery'), $cleantalk_plugin_version, true);
2861
+ }
2862
  }
2863
 
2864
  /**
2925
  // Ending comment output
2926
  echo "</{$wp_list_comments_args['style']}>";
2927
  }
2928
+ ?>
 
inc/cleantalk-users.php CHANGED
@@ -488,8 +488,6 @@ function ct_ajax_insert_users()
488
 
489
  if (is_int($user_id))
490
  $inserted++;
491
- else
492
- error_log(print_r($user_id, true));
493
 
494
  }
495
  }else{
@@ -577,4 +575,4 @@ function ct_usercheck_get_csv_file() {
577
  die();
578
  }
579
 
580
- ?>
488
 
489
  if (is_int($user_id))
490
  $inserted++;
 
 
491
 
492
  }
493
  }else{
575
  die();
576
  }
577
 
578
+ ?>
inc/sfw_die_page.html CHANGED
@@ -70,4 +70,4 @@ function get_current_url() {
70
  }, reload_timeout);
71
  </script>
72
  </body>
73
- </html>
70
  }, reload_timeout);
71
  </script>
72
  </body>
73
+ </html>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: znaeff, shagimuratov, serge00, sartemd174, amagsumov
3
  Tags: antispam, protection, contact form, comments, spam
4
  Requires at least: 3.0
5
  Tested up to: 4.8
6
- Stable tag: 5.67.3
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.
@@ -51,7 +51,10 @@ Contact Form Plugin - PirateForms, Visual Form Builder, Form, Contact Form by
51
  WebDorado, Contact Form Email, MW WP Form, Contact Form by Jeff Bulllins, Easy
52
  Contact, Contact Us Form, Grunion Contact Form, WCP Contact Form, Easy
53
  WordPress Contact Form Plugin, WPForms Lite, Custom Contact, Forms, Amo Forms,
54
- Caldera Forms, Visual Form Builder, Contact Form Clean and Simple, Divi by Elegant Themes and any other themes or custom contact forms.
 
 
 
55
 
56
  = WooCommerce spam filter =
57
  Anti-spam by CleanTalk filters spam registrations and spam reviews for WooCommerce. The plugin is fully compatible with WooCommerce 2.1 and higher.
@@ -501,6 +504,14 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
501
  1. The Dashboard with a map of most spam active countries per your account.
502
 
503
  == Changelog ==
 
 
 
 
 
 
 
 
504
  = 5.67.3 June 9 2017 =
505
  * Fixed JS attachment error.
506
 
@@ -1364,6 +1375,14 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
1364
  * First version
1365
 
1366
  == Upgrade Notice ==
 
 
 
 
 
 
 
 
1367
  = 5.67.3 June 9 2017 =
1368
  * Fixed JS attachment error.
1369
 
3
  Tags: antispam, protection, contact form, comments, spam
4
  Requires at least: 3.0
5
  Tested up to: 4.8
6
+ Stable tag: 5.68
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.
51
  WebDorado, Contact Form Email, MW WP Form, Contact Form by Jeff Bulllins, Easy
52
  Contact, Contact Us Form, Grunion Contact Form, WCP Contact Form, Easy
53
  WordPress Contact Form Plugin, WPForms Lite, Custom Contact, Forms, Amo Forms,
54
+ Caldera Forms, Visual Form Builder, Contact Form Clean and Simple, Divi by Elegant Themes and any other themes or custom contact forms,
55
+ amoForms, Custom Contact Form, Ultimate Form Builder, Contact Bank - Contact Forms Builder,
56
+ Forms easily built with Smart Forms, Quick Contact Form, Usernoise contact form,
57
+ cformsII - contact form, Contact Form by Web-Settler, HubSpot Marketing Free.
58
 
59
  = WooCommerce spam filter =
60
  Anti-spam by CleanTalk filters spam registrations and spam reviews for WooCommerce. The plugin is fully compatible with WooCommerce 2.1 and higher.
504
  1. The Dashboard with a map of most spam active countries per your account.
505
 
506
  == Changelog ==
507
+ = 5.68 June 22 2017 =
508
+ * Contact Form for WordPress - Ultimate Form Builder Lite - integration.
509
+ * Contact Bank - Contact Forms Builder - integration.
510
+ * Smart Forms - integration.
511
+ * cformsII - integration.
512
+ * Contact Form by Web-Settler - integration.
513
+ * Error fixes.
514
+
515
  = 5.67.3 June 9 2017 =
516
  * Fixed JS attachment error.
517
 
1375
  * First version
1376
 
1377
  == Upgrade Notice ==
1378
+ = 5.68 June 22 2017 =
1379
+ * Contact Form for WordPress - Ultimate Form Builder Lite - integration.
1380
+ * Contact Bank - Contact Forms Builder - integration.
1381
+ * Smart Forms - integration.
1382
+ * cformsII - integration.
1383
+ * Contact Form by Web-Settler - integration.
1384
+ * Error fixes.
1385
+
1386
  = 5.67.3 June 9 2017 =
1387
  * Fixed JS attachment error.
1388