Version Description
December 13 2018 = * Fix: Double request in JetPack contact form. * Fix: Email notification about spam registration. * Fix: Links button for feedback comments. * Fix: Mail notification about plugin error. * Fix: Key field output. * Minor fixes.
Download this release
Release Info
Developer | Safronik |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.111 |
Comparing to | |
See all releases |
Code changes from version 5.110 to 5.111
- cleantalk.php +1 -1
- css/cleantalk-public-admin.css +49 -56
- inc/cleantalk-ajax.php +18 -2
- inc/cleantalk-common.php +1 -0
- inc/cleantalk-public.php +46 -63
- inc/cleantalk-settings.php +35 -10
- js/cleantalk-public-admin.js +7 -11
- lib/CleantalkState.php +1 -1
- readme.txt +17 -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.
|
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.111
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
css/cleantalk-public-admin.css
CHANGED
@@ -3,63 +3,56 @@
|
|
3 |
}
|
4 |
|
5 |
.ct_comment_info{
|
6 |
-
position: relative;
|
7 |
-
top: 10px;
|
8 |
-
left: -30px;
|
9 |
-
padding-top: 10px;
|
10 |
-
margin: 15px 0 15px 0;
|
11 |
-
border-top: 1px solid gray !important;
|
12 |
font-size: 11px;
|
13 |
-
line-height:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
-
.ct_comment_info_title{
|
16 |
-
position: absolute;
|
17 |
-
top: -7px; left: 15px;
|
18 |
-
margin: 0; padding: 0 5px;
|
19 |
-
background: inherit;
|
20 |
-
line-height: 12px;
|
21 |
-
}
|
22 |
-
p.ct_comment_logo_title{
|
23 |
-
position: absolute;
|
24 |
-
top: -7px; right: 10px;
|
25 |
-
margin: 0; padding: 0 7px;
|
26 |
-
background: inherit;
|
27 |
-
line-height: 12px;
|
28 |
-
}
|
29 |
-
.ct_comment_logo_img{
|
30 |
-
height: 12px;
|
31 |
-
margin-right: 0px;
|
32 |
-
vertical-align: text-top;
|
33 |
-
box-shadow: transparent 0 0 0 !important;
|
34 |
-
}
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
3 |
}
|
4 |
|
5 |
.ct_comment_info{
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
font-size: 11px;
|
7 |
+
line-height: 12px;
|
8 |
+
margin-bottom: 15px;
|
9 |
+
}
|
10 |
+
.ct_comment_titles
|
11 |
+
{
|
12 |
+
border-bottom: 1px solid gray !important;
|
13 |
+
background: inherit;
|
14 |
+
margin-bottom: 15px;
|
15 |
+
}
|
16 |
+
p.ct_comment_info_title{
|
17 |
+
display: inline-block;
|
18 |
+
}
|
19 |
+
p.ct_comment_logo_title{
|
20 |
+
float:right;
|
21 |
+
display: inline-block;
|
22 |
+
}
|
23 |
+
.ct_comment_logo_img{
|
24 |
+
height: 12px;
|
25 |
+
vertical-align: text-top;
|
26 |
+
box-shadow: transparent 0 0 0 !important;
|
27 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
+
.ct_this_is{
|
30 |
+
padding: 2px 3px;
|
31 |
+
cursor: pointer;
|
32 |
+
white-space: nowrap;
|
33 |
+
color: black !important;
|
34 |
+
background: rgba(230,230,230,1);
|
35 |
+
border: 1px solid #777;
|
36 |
+
border-radius: 4px;
|
37 |
+
}
|
38 |
+
.ct_this_is_spam{
|
39 |
|
40 |
+
}
|
41 |
+
p.ct_feedback_wrap{
|
42 |
+
display: none;
|
43 |
+
position: absolute;
|
44 |
+
top: 5px; left: 0px;
|
45 |
+
height: 100%;
|
46 |
+
background: white;
|
47 |
+
padding: 2px 6px;
|
48 |
+
border-radius: 3px;
|
49 |
+
}
|
50 |
+
.ct_feedback_result{display: none; text-decoration: underline;}
|
51 |
+
.ct_feedback_result_spam{color: red;}
|
52 |
+
.ct_feedback_result_not_spam{color: green;}
|
53 |
+
|
54 |
+
.ct_feedback_msg a{color: green !important; text-decoration: underline;}
|
55 |
+
|
56 |
+
.ct_feedback_success{color: green;}
|
57 |
+
.ct_feedback_error{color: red;}
|
58 |
+
.ct_feedback_no_hash{color: blue;}
|
inc/cleantalk-ajax.php
CHANGED
@@ -349,6 +349,24 @@ function ct_ajax_hook($message_obj = false, $additional = false)
|
|
349 |
} unset($key ,$value);
|
350 |
}
|
351 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
$base_call_result = apbct_base_call(
|
353 |
array(
|
354 |
'message' => $message,
|
@@ -629,5 +647,3 @@ function ct_ajax_hook($message_obj = false, $additional = false)
|
|
629 |
}
|
630 |
}
|
631 |
}
|
632 |
-
|
633 |
-
?>
|
349 |
} unset($key ,$value);
|
350 |
}
|
351 |
|
352 |
+
/**
|
353 |
+
* @todo Contact form detect
|
354 |
+
*/
|
355 |
+
// Detect contact form an set it's name to $contact_form to use later
|
356 |
+
// $contact_form = null;
|
357 |
+
// foreach($_POST as $param => $value){
|
358 |
+
// if(strpos($param, 'et_pb_contactform_submit') === 0){
|
359 |
+
// $contact_form = 'contact_form_divi_theme';
|
360 |
+
// $contact_form_additional = str_replace('et_pb_contactform_submit', '', $param);
|
361 |
+
// }
|
362 |
+
// if(strpos($param, 'avia_generated_form') === 0){
|
363 |
+
// $contact_form = 'contact_form_enfold_theme';
|
364 |
+
// $contact_form_additional = str_replace('avia_generated_form', '', $param);
|
365 |
+
// }
|
366 |
+
// if(!empty($contact_form))
|
367 |
+
// break;
|
368 |
+
// }
|
369 |
+
|
370 |
$base_call_result = apbct_base_call(
|
371 |
array(
|
372 |
'message' => $message,
|
647 |
}
|
648 |
}
|
649 |
}
|
|
|
|
inc/cleantalk-common.php
CHANGED
@@ -345,6 +345,7 @@ function ct_hash($new_hash = '') {
|
|
345 |
* @return string comment_content w\o cleantalk resume
|
346 |
*/
|
347 |
function ct_feedback($hash, $allow) {
|
|
|
348 |
|
349 |
$ct_feedback = $hash . ':' . $allow . ';';
|
350 |
if($apbct->data['feedback_request'])
|
345 |
* @return string comment_content w\o cleantalk resume
|
346 |
*/
|
347 |
function ct_feedback($hash, $allow) {
|
348 |
+
global $apbct;
|
349 |
|
350 |
$ct_feedback = $hash . ':' . $allow . ';';
|
351 |
if($apbct->data['feedback_request'])
|
inc/cleantalk-public.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
function apbct_init() {
|
11 |
|
12 |
global $ct_wplp_result_label, $ct_jp_comments, $ct_post_data_label, $ct_post_data_authnet_label, $apbct, $ct_check_post_result, $test_external_forms, $cleantalk_executed, $wpdb;
|
13 |
-
|
14 |
//Check internal forms with such "action" http://wordpress.loc/contact-us/some_script.php
|
15 |
if((isset($_POST['action']) && $_POST['action'] == 'ct_check_internal') &&
|
16 |
$apbct->settings['check_internal']
|
@@ -1051,13 +1051,12 @@ function apbct_comment__Wordpress__changeMailNotification($notify_message, $comm
|
|
1051 |
strrev(PHP_EOL . PHP_EOL . '---'
|
1052 |
.PHP_EOL
|
1053 |
.__('CleanTalk AntiSpam: This message is spam.', 'cleantalk')
|
1054 |
-
."\n".__('CleanTalk\'s anti-spam database:', 'cleantalk')
|
1055 |
-
."\n".'IP:
|
1056 |
-
."\n".'Email:
|
1057 |
."\n".PHP_EOL . sprintf(
|
1058 |
-
__('Activate protection in your
|
1059 |
-
'
|
1060 |
-
'</a>'
|
1061 |
)
|
1062 |
.PHP_EOL . '---'
|
1063 |
.PHP_EOL
|
@@ -1487,6 +1486,15 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
|
|
1487 |
);
|
1488 |
$ct_result = $base_call_result['ct_result'];
|
1489 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1490 |
$ct_signup_done = true;
|
1491 |
|
1492 |
$ct_result = ct_change_plugin_resonse($ct_result, $checkjs);
|
@@ -1518,15 +1526,6 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
|
|
1518 |
setcookie($apbct_cookie_request_id_label, $ct_result->id, time()+10, '/');
|
1519 |
}
|
1520 |
}
|
1521 |
-
|
1522 |
-
// Change mail notification if license is out of date
|
1523 |
-
if($apbct->data['moderate'] == 0 &&
|
1524 |
-
($ct_result->fast_submit == 1 || $ct_result->blacklisted == 1 || $ct_result->js_disabled == 1)
|
1525 |
-
){
|
1526 |
-
$apbct->sender_email = $user_email;
|
1527 |
-
$apbct->sender_ip = CleantalkHelper::ip_get(array('real'));
|
1528 |
-
add_filter('wp_new_user_notification_email_admin', 'apbct_registration__Wordpress__changeMailNotification', 100, 3);
|
1529 |
-
}
|
1530 |
|
1531 |
return $errors;
|
1532 |
}
|
@@ -1660,7 +1659,7 @@ function ct_contact_form_is_spam($form) {
|
|
1660 |
'message' => $message,
|
1661 |
'sender_email' => $sender_email,
|
1662 |
'sender_nickname' => $sender_nickname,
|
1663 |
-
'post_info' => array('comment_type' => '
|
1664 |
'sender_info' => array('sender_url' => @$form['comment_author_url']),
|
1665 |
'checkjs' => apbct_js_test($js_field_name, $_POST, true),
|
1666 |
)
|
@@ -1680,9 +1679,6 @@ function ct_contact_form_is_spam($form) {
|
|
1680 |
function ct_contact_form_is_spam_jetpack($is_spam,$form) {
|
1681 |
global $ct_checkjs_jpcf, $apbct;
|
1682 |
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
if ($apbct->settings['contact_forms_test'] == 0) {
|
1687 |
return null;
|
1688 |
}
|
@@ -1692,24 +1688,12 @@ function ct_contact_form_is_spam_jetpack($is_spam,$form) {
|
|
1692 |
if (preg_match("/^.+$ct_checkjs_jpcf$/", $k))
|
1693 |
$js_field_name = $k;
|
1694 |
}
|
1695 |
-
|
1696 |
-
$sender_email = null;
|
1697 |
-
$sender_nickname = null;
|
1698 |
-
$message = '';
|
1699 |
-
if (isset($form['comment_author_email']))
|
1700 |
-
$sender_email = $form['comment_author_email'];
|
1701 |
-
|
1702 |
-
if (isset($form['comment_author']))
|
1703 |
-
$sender_nickname = $form['comment_author'];
|
1704 |
-
|
1705 |
-
if (isset($form['comment_content']))
|
1706 |
-
$message = $form['comment_content'];
|
1707 |
|
1708 |
$base_call_result = apbct_base_call(
|
1709 |
array(
|
1710 |
-
'message' => $
|
1711 |
-
'sender_email' => $
|
1712 |
-
'sender_nickname' => $
|
1713 |
'post_info' => array('comment_type' => 'feedback'),
|
1714 |
'sender_info' => array('sender_url' => @$form['comment_author_url']),
|
1715 |
)
|
@@ -1788,7 +1772,7 @@ function apbct_form__contactForm7__testSpam($param) {
|
|
1788 |
'message' => $message,
|
1789 |
'sender_email' => $sender_email,
|
1790 |
'sender_nickname' => $sender_nickname,
|
1791 |
-
'post_info' => array('comment_type' => '
|
1792 |
'checkjs' => $checkjs,
|
1793 |
)
|
1794 |
);
|
@@ -1843,16 +1827,15 @@ function apbct_form__contactForm7__changeMailNotification($component){
|
|
1843 |
global $apbct;
|
1844 |
|
1845 |
$component['body'] =
|
1846 |
-
__('CleanTalk AntiSpam: This message is spam.', 'cleantalk')
|
1847 |
-
.
|
1848 |
-
.
|
1849 |
-
.
|
1850 |
-
.
|
1851 |
-
__('Activate protection in your
|
1852 |
-
'
|
1853 |
-
'</a>'
|
1854 |
)
|
1855 |
-
.
|
1856 |
.$component['body'];
|
1857 |
|
1858 |
return (array) $component;
|
@@ -1899,7 +1882,7 @@ function apbct_form__ninjaForms__testSpam() {
|
|
1899 |
'message' => $message,
|
1900 |
'sender_email' => $sender_email,
|
1901 |
'sender_nickname' => $sender_nickname,
|
1902 |
-
'post_info' => array('comment_type' => '
|
1903 |
'checkjs' => $checkjs,
|
1904 |
)
|
1905 |
);
|
@@ -2048,7 +2031,7 @@ function apbct_form__WPForms__testSpam() {
|
|
2048 |
'message' => $message,
|
2049 |
'sender_email' => $sender_email,
|
2050 |
'sender_nickname' => $sender_nickname,
|
2051 |
-
|
2052 |
'checkjs' => $checkjs,
|
2053 |
)
|
2054 |
);
|
@@ -2143,7 +2126,7 @@ function ct_si_contact_form_validate($form_errors = array(), $form_id_num = 0) {
|
|
2143 |
'message' => $message,
|
2144 |
'sender_email' => $sender_email,
|
2145 |
'sender_nickname' => $sender_nickname,
|
2146 |
-
'post_info' => array('comment_type' => '
|
2147 |
'checkjs' => apbct_js_test('ct_checkjs', $_POST, true),
|
2148 |
)
|
2149 |
);
|
@@ -2312,7 +2295,7 @@ function apbct_form__gravityForms__testSpam($is_spam, $form, $entry) {
|
|
2312 |
'message' => $message,
|
2313 |
'sender_email' => $sender_email,
|
2314 |
'sender_nickname' => $sender_nickname,
|
2315 |
-
'post_info' => array('comment_type' => '
|
2316 |
'checkjs' => $checkjs,
|
2317 |
)
|
2318 |
);
|
@@ -2419,7 +2402,8 @@ function ct_contact_form_validate() {
|
|
2419 |
(strpos($_SERVER['REQUEST_URI'], 'bizuno.php') && !empty($_POST['bizPass'])) ||
|
2420 |
(isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'],'my-dashboard/') !== false) || // ticket_id=7885
|
2421 |
isset($_POST['slm_action'], $_POST['license_key'], $_POST['secret_key'], $_POST['registered_domain']) || // ticket_id=9122
|
2422 |
-
(isset($_POST['wpforms']['submit']) && $_POST['wpforms']['submit'] == 'wpforms-submit') // WPForms
|
|
|
2423 |
) {
|
2424 |
return null;
|
2425 |
}
|
@@ -2484,11 +2468,11 @@ function ct_contact_form_validate() {
|
|
2484 |
$contact_form = null;
|
2485 |
foreach($_POST as $param => $value){
|
2486 |
if(strpos($param, 'et_pb_contactform_submit') === 0){
|
2487 |
-
$contact_form = '
|
2488 |
$contact_form_additional = str_replace('et_pb_contactform_submit', '', $param);
|
2489 |
}
|
2490 |
if(strpos($param, 'avia_generated_form') === 0){
|
2491 |
-
$contact_form = '
|
2492 |
$contact_form_additional = str_replace('avia_generated_form', '', $param);
|
2493 |
}
|
2494 |
if(!empty($contact_form))
|
@@ -2552,11 +2536,11 @@ function ct_contact_form_validate() {
|
|
2552 |
print json_encode($return);
|
2553 |
die();
|
2554 |
// Divi Theme Contact Form. Using $contact_form
|
2555 |
-
}elseif(!empty($contact_form) && $contact_form == '
|
2556 |
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>";
|
2557 |
die();
|
2558 |
// Enfold Theme Contact Form. Using $contact_form
|
2559 |
-
}elseif(!empty($contact_form) && $contact_form == '
|
2560 |
echo "<div id='ajaxresponse_1' class='ajaxresponse ajaxresponse_1' style='display: block;'><div id='ajaxresponse_1' class='ajaxresponse ajaxresponse_1'><h3 class='avia-form-success'>Antispam by CleanTalk: ".$ct_result->comment."</h3><a href='.'><-Back</a></div></div>";
|
2561 |
die();
|
2562 |
}else{
|
@@ -2608,7 +2592,8 @@ function ct_contact_form_validate_postdata() {
|
|
2608 |
(isset($_POST['wc_reset_password'], $_POST['_wpnonce'], $_POST['_wp_http_referer'])) || //WooCommerce recovery password form
|
2609 |
(isset($_POST['woocommerce-login-nonce'], $_POST['login'], $_POST['password'], $_POST['_wp_http_referer'])) || //WooCommerce login form
|
2610 |
(isset($_POST['provider'], $_POST['authcode']) && $_POST['provider'] == 'Two_Factor_Totp') || //TwoFactor authorization
|
2611 |
-
(isset($_GET['wc-ajax']) && $_GET['wc-ajax'] == 'sa_wc_buy_now_get_ajax_buy_now_button') //BuyNow add to cart
|
|
|
2612 |
) {
|
2613 |
return null;
|
2614 |
}
|
@@ -2685,7 +2670,7 @@ function ct_get_data_from_submit($value = null, $field_name = null) {
|
|
2685 |
* @return null
|
2686 |
*/
|
2687 |
function ct_send_error_notice ($comment = '') {
|
2688 |
-
global $ct_admin_notoice_period;
|
2689 |
|
2690 |
$timelabel_reg = intval( get_option('cleantalk_timelabel_reg') );
|
2691 |
if(time() - $ct_admin_notoice_period > $timelabel_reg){
|
@@ -2693,9 +2678,9 @@ function ct_send_error_notice ($comment = '') {
|
|
2693 |
|
2694 |
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
|
2695 |
$message = __('Attention, please!', 'cleantalk') . "\r\n\r\n";
|
2696 |
-
$message .= sprintf(__('"%s" plugin error on your site %s:', 'cleantalk'), $apbct->plugin_name, $blogname) . "\r\n\r\n";
|
2697 |
-
$message .= $comment . "\r\n\r\n";
|
2698 |
-
@wp_mail(ct_get_admin_email(), sprintf(__('[%s] %s error!', 'cleantalk'), $apbct->plugin_name, $blogname), $message);
|
2699 |
}
|
2700 |
|
2701 |
return null;
|
@@ -2864,16 +2849,14 @@ function ct_comments_output($curr_comment, $param2, $wp_list_comments_args){
|
|
2864 |
|
2865 |
$settings_link = '/wp-admin/'.(is_network_admin() ? "settings.php?page=cleantalk" : "options-general.php?page=cleantalk");
|
2866 |
|
2867 |
-
echo "<div class='ct_comment_info'>";
|
2868 |
-
|
2869 |
echo "<p class='ct_comment_info_title'>".__('Sender info', 'cleantalk')."</p>";
|
2870 |
|
2871 |
echo "<p class='ct_comment_logo_title'>
|
2872 |
".__('by', 'cleantalk')
|
2873 |
." <a href='{$settings_link}' target='_blank'><img class='ct_comment_logo_img' src='".plugins_url()."/cleantalk-spam-protect/inc/images/logo_color.png'></a>"
|
2874 |
." <a href='{$settings_link}' target='_blank'>CleanTalk</a>"
|
2875 |
-
."</p>";
|
2876 |
-
|
2877 |
// Outputs email if exists
|
2878 |
if($email)
|
2879 |
echo "<a href='https://cleantalk.org/blacklists/$email' target='_blank' title='https://cleantalk.org/blacklists/$email'>"
|
10 |
function apbct_init() {
|
11 |
|
12 |
global $ct_wplp_result_label, $ct_jp_comments, $ct_post_data_label, $ct_post_data_authnet_label, $apbct, $ct_check_post_result, $test_external_forms, $cleantalk_executed, $wpdb;
|
13 |
+
|
14 |
//Check internal forms with such "action" http://wordpress.loc/contact-us/some_script.php
|
15 |
if((isset($_POST['action']) && $_POST['action'] == 'ct_check_internal') &&
|
16 |
$apbct->settings['check_internal']
|
1051 |
strrev(PHP_EOL . PHP_EOL . '---'
|
1052 |
.PHP_EOL
|
1053 |
.__('CleanTalk AntiSpam: This message is spam.', 'cleantalk')
|
1054 |
+
."\n".__('You could check it in CleanTalk\'s anti-spam database:', 'cleantalk')
|
1055 |
+
."\n".'IP: https://cleantalk.org/blacklists/' . $apbct->sender_ip . '?utm_source=newsletter&utm_medium=email&utm_campaign=wp_spam_comment_passed" target="_blank'
|
1056 |
+
."\n".'Email: https://cleantalk.org/blacklists/' . $apbct->sender_email . '?utm_source=newsletter&utm_medium=email&utm_campaign=wp_spam_comment_passed" target="_blank'
|
1057 |
."\n".PHP_EOL . sprintf(
|
1058 |
+
__('Activate protection in your Anti-Spam Dashboard: %s.', 'clentalk'),
|
1059 |
+
'https://cleantalk.org/my/?cp_mode=antispam&utm_source=newsletter&utm_medium=email&utm_campaign=wp_spam_comment_passed" target="_blank'
|
|
|
1060 |
)
|
1061 |
.PHP_EOL . '---'
|
1062 |
.PHP_EOL
|
1486 |
);
|
1487 |
$ct_result = $base_call_result['ct_result'];
|
1488 |
|
1489 |
+
// Change mail notification if license is out of date
|
1490 |
+
if($apbct->data['moderate'] == 0 &&
|
1491 |
+
($ct_result->fast_submit == 1 || $ct_result->blacklisted == 1 || $ct_result->js_disabled == 1)
|
1492 |
+
){
|
1493 |
+
$apbct->sender_email = $user_email;
|
1494 |
+
$apbct->sender_ip = CleantalkHelper::ip_get(array('real'));
|
1495 |
+
add_filter('wp_new_user_notification_email_admin', 'apbct_registration__Wordpress__changeMailNotification', 100, 3);
|
1496 |
+
}
|
1497 |
+
|
1498 |
$ct_signup_done = true;
|
1499 |
|
1500 |
$ct_result = ct_change_plugin_resonse($ct_result, $checkjs);
|
1526 |
setcookie($apbct_cookie_request_id_label, $ct_result->id, time()+10, '/');
|
1527 |
}
|
1528 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1529 |
|
1530 |
return $errors;
|
1531 |
}
|
1659 |
'message' => $message,
|
1660 |
'sender_email' => $sender_email,
|
1661 |
'sender_nickname' => $sender_nickname,
|
1662 |
+
'post_info' => array('comment_type' => 'contact_form_grunion'),
|
1663 |
'sender_info' => array('sender_url' => @$form['comment_author_url']),
|
1664 |
'checkjs' => apbct_js_test($js_field_name, $_POST, true),
|
1665 |
)
|
1679 |
function ct_contact_form_is_spam_jetpack($is_spam,$form) {
|
1680 |
global $ct_checkjs_jpcf, $apbct;
|
1681 |
|
|
|
|
|
|
|
1682 |
if ($apbct->settings['contact_forms_test'] == 0) {
|
1683 |
return null;
|
1684 |
}
|
1688 |
if (preg_match("/^.+$ct_checkjs_jpcf$/", $k))
|
1689 |
$js_field_name = $k;
|
1690 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1691 |
|
1692 |
$base_call_result = apbct_base_call(
|
1693 |
array(
|
1694 |
+
'message' => isset($form['comment_content']) ? $form['comment_content'] : '',
|
1695 |
+
'sender_email' => isset($form['comment_author_email']) ? $form['comment_author_email'] : null,
|
1696 |
+
'sender_nickname' => isset($form['comment_author']) ? $form['comment_author'] : null,
|
1697 |
'post_info' => array('comment_type' => 'feedback'),
|
1698 |
'sender_info' => array('sender_url' => @$form['comment_author_url']),
|
1699 |
)
|
1772 |
'message' => $message,
|
1773 |
'sender_email' => $sender_email,
|
1774 |
'sender_nickname' => $sender_nickname,
|
1775 |
+
'post_info' => array('comment_type' => 'contact_form_cf7'),
|
1776 |
'checkjs' => $checkjs,
|
1777 |
)
|
1778 |
);
|
1827 |
global $apbct;
|
1828 |
|
1829 |
$component['body'] =
|
1830 |
+
__('CleanTalk AntiSpam: This message is spam. You could check it at cleantalk.org.', 'cleantalk')
|
1831 |
+
.PHP_EOL . __('CleanTalk\'s anti-spam database:', 'cleantalk')
|
1832 |
+
.PHP_EOL . 'IP: ' . $apbct->sender_ip
|
1833 |
+
.PHP_EOL . 'Email: ' . $apbct->sender_email
|
1834 |
+
.PHP_EOL . sprintf(
|
1835 |
+
__('Activate protection in your Anti-Spam Dashboard: %s.', 'clentalk'),
|
1836 |
+
'https://cleantalk.org/my/?cp_mode=antispam&utm_source=newsletter&utm_medium=email&utm_campaign=cf7_activate_antispam&user_token='.$apbct->user_token
|
|
|
1837 |
)
|
1838 |
+
.PHP_EOL . '---' . PHP_EOL . PHP_EOL
|
1839 |
.$component['body'];
|
1840 |
|
1841 |
return (array) $component;
|
1882 |
'message' => $message,
|
1883 |
'sender_email' => $sender_email,
|
1884 |
'sender_nickname' => $sender_nickname,
|
1885 |
+
'post_info' => array('comment_type' => 'contact_form_ninja_froms'),
|
1886 |
'checkjs' => $checkjs,
|
1887 |
)
|
1888 |
);
|
2031 |
'message' => $message,
|
2032 |
'sender_email' => $sender_email,
|
2033 |
'sender_nickname' => $sender_nickname,
|
2034 |
+
'post_info' => array('comment_type' => 'contact_form_wp_forms'),
|
2035 |
'checkjs' => $checkjs,
|
2036 |
)
|
2037 |
);
|
2126 |
'message' => $message,
|
2127 |
'sender_email' => $sender_email,
|
2128 |
'sender_nickname' => $sender_nickname,
|
2129 |
+
'post_info' => array('comment_type' => 'contact_form_fscf'),
|
2130 |
'checkjs' => apbct_js_test('ct_checkjs', $_POST, true),
|
2131 |
)
|
2132 |
);
|
2295 |
'message' => $message,
|
2296 |
'sender_email' => $sender_email,
|
2297 |
'sender_nickname' => $sender_nickname,
|
2298 |
+
'post_info' => array('comment_type' => 'contact_form_gravity_forms'),
|
2299 |
'checkjs' => $checkjs,
|
2300 |
)
|
2301 |
);
|
2402 |
(strpos($_SERVER['REQUEST_URI'], 'bizuno.php') && !empty($_POST['bizPass'])) ||
|
2403 |
(isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'],'my-dashboard/') !== false) || // ticket_id=7885
|
2404 |
isset($_POST['slm_action'], $_POST['license_key'], $_POST['secret_key'], $_POST['registered_domain']) || // ticket_id=9122
|
2405 |
+
(isset($_POST['wpforms']['submit']) && $_POST['wpforms']['submit'] == 'wpforms-submit') || // WPForms
|
2406 |
+
(isset($_POST['action']) && $_POST['action'] == 'grunion-contact-form') // JetPack
|
2407 |
) {
|
2408 |
return null;
|
2409 |
}
|
2468 |
$contact_form = null;
|
2469 |
foreach($_POST as $param => $value){
|
2470 |
if(strpos($param, 'et_pb_contactform_submit') === 0){
|
2471 |
+
$contact_form = 'contact_form_divi_theme';
|
2472 |
$contact_form_additional = str_replace('et_pb_contactform_submit', '', $param);
|
2473 |
}
|
2474 |
if(strpos($param, 'avia_generated_form') === 0){
|
2475 |
+
$contact_form = 'contact_form_enfold_theme';
|
2476 |
$contact_form_additional = str_replace('avia_generated_form', '', $param);
|
2477 |
}
|
2478 |
if(!empty($contact_form))
|
2536 |
print json_encode($return);
|
2537 |
die();
|
2538 |
// Divi Theme Contact Form. Using $contact_form
|
2539 |
+
}elseif(!empty($contact_form) && $contact_form == 'contact_form_divi_theme'){
|
2540 |
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>";
|
2541 |
die();
|
2542 |
// Enfold Theme Contact Form. Using $contact_form
|
2543 |
+
}elseif(!empty($contact_form) && $contact_form == 'contact_form_enfold_theme'){
|
2544 |
echo "<div id='ajaxresponse_1' class='ajaxresponse ajaxresponse_1' style='display: block;'><div id='ajaxresponse_1' class='ajaxresponse ajaxresponse_1'><h3 class='avia-form-success'>Antispam by CleanTalk: ".$ct_result->comment."</h3><a href='.'><-Back</a></div></div>";
|
2545 |
die();
|
2546 |
}else{
|
2592 |
(isset($_POST['wc_reset_password'], $_POST['_wpnonce'], $_POST['_wp_http_referer'])) || //WooCommerce recovery password form
|
2593 |
(isset($_POST['woocommerce-login-nonce'], $_POST['login'], $_POST['password'], $_POST['_wp_http_referer'])) || //WooCommerce login form
|
2594 |
(isset($_POST['provider'], $_POST['authcode']) && $_POST['provider'] == 'Two_Factor_Totp') || //TwoFactor authorization
|
2595 |
+
(isset($_GET['wc-ajax']) && $_GET['wc-ajax'] == 'sa_wc_buy_now_get_ajax_buy_now_button') || //BuyNow add to cart
|
2596 |
+
strpos($_SERVER['REQUEST_URI'],'/wp-json/wpstatistics/v1/hit')!==false //WPStatistics
|
2597 |
) {
|
2598 |
return null;
|
2599 |
}
|
2670 |
* @return null
|
2671 |
*/
|
2672 |
function ct_send_error_notice ($comment = '') {
|
2673 |
+
global $ct_admin_notoice_period, $apbct;
|
2674 |
|
2675 |
$timelabel_reg = intval( get_option('cleantalk_timelabel_reg') );
|
2676 |
if(time() - $ct_admin_notoice_period > $timelabel_reg){
|
2678 |
|
2679 |
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
|
2680 |
$message = __('Attention, please!', 'cleantalk') . "\r\n\r\n";
|
2681 |
+
$message .= sprintf(__('"%s" plugin error on your site "%s":', 'cleantalk'), $apbct->plugin_name, $blogname) . "\r\n\r\n";
|
2682 |
+
$message .= preg_replace('/^(.*?)<a.*?"(.*?)".*?>(.*?)<.a>(.*)$/', '$1. $3: $2?user_token='. $apbct->user_token .' $4', $comment) . "\r\n\r\n";
|
2683 |
+
@wp_mail(ct_get_admin_email(), sprintf(__('[%s] "%s" error!', 'cleantalk'), $apbct->plugin_name, $blogname), $message);
|
2684 |
}
|
2685 |
|
2686 |
return null;
|
2849 |
|
2850 |
$settings_link = '/wp-admin/'.(is_network_admin() ? "settings.php?page=cleantalk" : "options-general.php?page=cleantalk");
|
2851 |
|
2852 |
+
echo "<div class='ct_comment_info'><div class ='ct_comment_titles'>";
|
|
|
2853 |
echo "<p class='ct_comment_info_title'>".__('Sender info', 'cleantalk')."</p>";
|
2854 |
|
2855 |
echo "<p class='ct_comment_logo_title'>
|
2856 |
".__('by', 'cleantalk')
|
2857 |
." <a href='{$settings_link}' target='_blank'><img class='ct_comment_logo_img' src='".plugins_url()."/cleantalk-spam-protect/inc/images/logo_color.png'></a>"
|
2858 |
." <a href='{$settings_link}' target='_blank'>CleanTalk</a>"
|
2859 |
+
."</p></div>";
|
|
|
2860 |
// Outputs email if exists
|
2861 |
if($email)
|
2862 |
echo "<a href='https://cleantalk.org/blacklists/$email' target='_blank' title='https://cleantalk.org/blacklists/$email'>"
|
inc/cleantalk-settings.php
CHANGED
@@ -623,7 +623,7 @@ function apbct_settings__field__api_key(){
|
|
623 |
placeholder="' . __('Enter the key', 'cleantalk') . '" />';
|
624 |
|
625 |
// Key is correct
|
626 |
-
if((apbct_api_key__is_correct($apbct->api_key)
|
627 |
echo '<br>'
|
628 |
.sprintf(
|
629 |
__('Account at cleantalk.org is %s.', 'cleantalk'),
|
@@ -637,26 +637,35 @@ function apbct_settings__field__api_key(){
|
|
637 |
|
638 |
// Auto get key
|
639 |
if(!$apbct->ip_license){
|
640 |
-
echo '<button id="apbct_setting_get_key_auto" name="submit" type="submit" class="cleantalk_manual_link" value="get_key_auto"
|
641 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
.'</button>';
|
|
|
643 |
echo '<input type="hidden" id="ct_admin_timezone" name="ct_admin_timezone" value="null" />';
|
644 |
-
echo ' ' . __('or') . ' ';
|
645 |
}
|
646 |
|
647 |
// Manual get key
|
648 |
-
echo '<a class="apbct_color--gray" target="__blank" href="https://cleantalk.org/register?platform=wordpress&email='.urlencode(ct_get_admin_email()).'&website='.urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST)).'">'.__('Get access key manually', 'cleantalk').'</a>';
|
649 |
echo '<br />';
|
650 |
echo '<br />';
|
651 |
-
|
652 |
// Warnings and GDPR
|
653 |
-
printf(__('Admin e-mail (%s) will be used for registration', 'cleantalk'),
|
|
|
|
|
|
|
|
|
654 |
echo '<div>';
|
655 |
echo '<input checked type="checkbox" id="license_agreed" onclick="apbctSettingsDependencies(\'get_key_auto\');"/>';
|
656 |
echo '<label for="spbc_license_agreed">';
|
657 |
printf(
|
658 |
-
__('I agree with
|
659 |
-
'<a href="https://cleantalk.org/publicoffer#privacy" target="_blank" style="color:#66b;">', '</a>',
|
660 |
'<a href="https://cleantalk.org/publicoffer" target="_blank" style="color:#66b;">', '</a>'
|
661 |
);
|
662 |
echo "</label>";
|
@@ -900,7 +909,21 @@ function apbct_settings__validate($settings) {
|
|
900 |
ct_sfw_update($settings['apikey']);
|
901 |
ct_sfw_send_logs($settings['apikey']);
|
902 |
}
|
903 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
904 |
// Updating brief data for dashboard widget
|
905 |
$apbct->data['brief_data'] = CleantalkAPI::method__get_antispam_report_breif($settings['apikey']);
|
906 |
|
@@ -916,6 +939,8 @@ function apbct_settings__validate($settings) {
|
|
916 |
|
917 |
// Server error when notice_validate_key
|
918 |
}else{
|
|
|
|
|
919 |
$apbct->error_add('key_invalid', $result);
|
920 |
}
|
921 |
|
623 |
placeholder="' . __('Enter the key', 'cleantalk') . '" />';
|
624 |
|
625 |
// Key is correct
|
626 |
+
if((apbct_api_key__is_correct($apbct->api_key) && $apbct->key_is_ok) && isset($apbct->data['account_name_ob']) && $apbct->data['account_name_ob'] != ''){
|
627 |
echo '<br>'
|
628 |
.sprintf(
|
629 |
__('Account at cleantalk.org is %s.', 'cleantalk'),
|
637 |
|
638 |
// Auto get key
|
639 |
if(!$apbct->ip_license){
|
640 |
+
echo '<button id="apbct_setting_get_key_auto" name="submit" type="submit" class="cleantalk_manual_link" value="get_key_auto"'
|
641 |
+
// . 'title="'
|
642 |
+
// .sprintf(__('Admin e-mail (%s) will be used to get access key if you want to use another email, click on Get Access Key Manually.', 'cleantalk'),
|
643 |
+
// ct_get_admin_email()
|
644 |
+
// )
|
645 |
+
// . '"'
|
646 |
+
. '>'
|
647 |
+
.__('Get Access Key Automatically', 'cleantalk')
|
648 |
.'</button>';
|
649 |
+
// .' '.__('or', 'cleantalk').' ';
|
650 |
echo '<input type="hidden" id="ct_admin_timezone" name="ct_admin_timezone" value="null" />';
|
|
|
651 |
}
|
652 |
|
653 |
// Manual get key
|
654 |
+
// echo '<a class="apbct_color--gray" target="__blank" href="https://cleantalk.org/register?platform=wordpress&email='.urlencode(ct_get_admin_email()).'&website='.urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST)).'">'.__('Get access key manually', 'cleantalk').'</a>';
|
655 |
echo '<br />';
|
656 |
echo '<br />';
|
657 |
+
|
658 |
// Warnings and GDPR
|
659 |
+
printf(__('Admin e-mail (%s) will be used for registration, if you want to use other email please %sGet Access Key Manually%s.', 'cleantalk'),
|
660 |
+
ct_get_admin_email(),
|
661 |
+
'<a href="https://cleantalk.org/register?platform=wordpress&website='. urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST)) .'">',
|
662 |
+
'</a>'
|
663 |
+
);
|
664 |
echo '<div>';
|
665 |
echo '<input checked type="checkbox" id="license_agreed" onclick="apbctSettingsDependencies(\'get_key_auto\');"/>';
|
666 |
echo '<label for="spbc_license_agreed">';
|
667 |
printf(
|
668 |
+
__('I agree with of %sLicense Agreement%s.', 'security-malware-firewall'),
|
|
|
669 |
'<a href="https://cleantalk.org/publicoffer" target="_blank" style="color:#66b;">', '</a>'
|
670 |
);
|
671 |
echo "</label>";
|
909 |
ct_sfw_update($settings['apikey']);
|
910 |
ct_sfw_send_logs($settings['apikey']);
|
911 |
}
|
912 |
+
|
913 |
+
//Turn off protection if account is disabled
|
914 |
+
if ($apbct->data['moderate'] == 0)
|
915 |
+
{
|
916 |
+
$settings['registrations_test'] = 0;
|
917 |
+
$settings['comments_test'] = 0;
|
918 |
+
$settings['contact_forms_test'] = 0;
|
919 |
+
$settings['general_contact_forms_test'] = 0;
|
920 |
+
$settings['wc_checkout_test'] = 0;
|
921 |
+
$settings['check_external'] = 0;
|
922 |
+
$settings['check_internal'] = 0;
|
923 |
+
$settings['bp_private_messages'] = 0;
|
924 |
+
$settings['general_postdata_test'] = 0;
|
925 |
+
}
|
926 |
+
|
927 |
// Updating brief data for dashboard widget
|
928 |
$apbct->data['brief_data'] = CleantalkAPI::method__get_antispam_report_breif($settings['apikey']);
|
929 |
|
939 |
|
940 |
// Server error when notice_validate_key
|
941 |
}else{
|
942 |
+
$apbct->data['key_is_ok'] = false;
|
943 |
+
$apbct->save('data');
|
944 |
$apbct->error_add('key_invalid', $result);
|
945 |
}
|
946 |
|
js/cleantalk-public-admin.js
CHANGED
@@ -1,16 +1,12 @@
|
|
1 |
jQuery(document).ready(function(){
|
2 |
|
3 |
// Set background-color similar to parents
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
jQuery('.ct_comment_info').css('background', ct_current_wrapper.css('background-color'));
|
11 |
-
break;
|
12 |
-
}
|
13 |
-
}
|
14 |
|
15 |
// Set same float style with article
|
16 |
var ct_post_float = jQuery('.ct_comment_info').prev().last().css('float');
|
@@ -20,7 +16,7 @@ jQuery(document).ready(function(){
|
|
20 |
|
21 |
jQuery(ct_posts).each(function(indx, elem){
|
22 |
curr_elem = jQuery(elem);
|
23 |
-
curr_elem.
|
24 |
});
|
25 |
|
26 |
// Handler for buttons
|
1 |
jQuery(document).ready(function(){
|
2 |
|
3 |
// Set background-color similar to parents
|
4 |
+
jQuery('.ct_comment_info').parents().each(function() {
|
5 |
+
if ((e = jQuery(this).css('background-color')).length > 0 && e != 'rgba(0, 0, 0, 0)'){
|
6 |
+
jQuery('.ct_comment_info').css('background', e);
|
7 |
+
return false;
|
8 |
+
}
|
9 |
+
});
|
|
|
|
|
|
|
|
|
10 |
|
11 |
// Set same float style with article
|
12 |
var ct_post_float = jQuery('.ct_comment_info').prev().last().css('float');
|
16 |
|
17 |
jQuery(ct_posts).each(function(indx, elem){
|
18 |
curr_elem = jQuery(elem);
|
19 |
+
curr_elem.parent().prepend(curr_elem);
|
20 |
});
|
21 |
|
22 |
// Handler for buttons
|
lib/CleantalkState.php
CHANGED
@@ -193,7 +193,7 @@ class CleantalkState
|
|
193 |
$option = $option ? $option : array();
|
194 |
}
|
195 |
|
196 |
-
//
|
197 |
if($this->option_prefix.'_'.$option_name === 'cleantalk_remote_calls'){
|
198 |
$option = is_array($option) ? array_merge($this->def_remote_calls, $option) : $this->def_remote_calls;
|
199 |
}
|
193 |
$option = $option ? $option : array();
|
194 |
}
|
195 |
|
196 |
+
// Default remote calls
|
197 |
if($this->option_prefix.'_'.$option_name === 'cleantalk_remote_calls'){
|
198 |
$option = is_array($option) ? array_merge($this->def_remote_calls, $option) : $this->def_remote_calls;
|
199 |
}
|
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.
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
@@ -547,6 +547,14 @@ Yes, it is. Please read this article,
|
|
547 |
10. Website's options.
|
548 |
|
549 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
550 |
= 5.110 November 29 2018 =
|
551 |
* Integration: BuddyPress ActivityWall spam protection.
|
552 |
* Add: GDPR setting for shortcode.
|
@@ -1736,6 +1744,14 @@ Yes, it is. Please read this article,
|
|
1736 |
* First version
|
1737 |
|
1738 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1739 |
= 5.110 November 29 2018 =
|
1740 |
* Integration: BuddyPress ActivityWall spam protection.
|
1741 |
* Add: Support different BuddyPress templates on activity wall.
|
3 |
Tags: spam, antispam, protection, comments, firewall
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.0
|
6 |
+
Stable tag: 5.111
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
547 |
10. Website's options.
|
548 |
|
549 |
== Changelog ==
|
550 |
+
= 5.111 December 13 2018 =
|
551 |
+
* Fix: Double request in JetPack contact form.
|
552 |
+
* Fix: Email notification about spam registration.
|
553 |
+
* Fix: Links button for feedback comments.
|
554 |
+
* Fix: Mail notification about plugin error.
|
555 |
+
* Fix: Key field output.
|
556 |
+
* Minor fixes.
|
557 |
+
|
558 |
= 5.110 November 29 2018 =
|
559 |
* Integration: BuddyPress ActivityWall spam protection.
|
560 |
* Add: GDPR setting for shortcode.
|
1744 |
* First version
|
1745 |
|
1746 |
== Upgrade Notice ==
|
1747 |
+
= 5.111 December 13 2018 =
|
1748 |
+
* Fix: Double request in JetPack contact form.
|
1749 |
+
* Fix: Email notification about spam registration.
|
1750 |
+
* Fix: Links button for feedback comments.
|
1751 |
+
* Fix: Mail notification about plugin error.
|
1752 |
+
* Fix: Key field output.
|
1753 |
+
* Minor fixes.
|
1754 |
+
|
1755 |
= 5.110 November 29 2018 =
|
1756 |
* Integration: BuddyPress ActivityWall spam protection.
|
1757 |
* Add: Support different BuddyPress templates on activity wall.
|