Version Description
2016-02-04 = * Improved JavaScript anti spam protection * Improvements for avoiding blocking requests from payment systems
Download this release
Release Info
Developer | Vlad Cleantalk |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.36 |
Comparing to | |
See all releases |
Code changes from version 5.35 to 5.36
- cleantalk.php +53 -44
- inc/cleantalk-common.php +4 -1
- inc/cleantalk-public.php +5 -0
- readme.txt +10 -2
cleantalk.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
Description: Max power, all-in-one, captcha less, 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 |
*/
|
10 |
-
$cleantalk_plugin_version='5.
|
11 |
$cleantalk_executed=false;
|
12 |
|
13 |
if(defined('CLEANTALK_AJAX_USE_BUFFER'))
|
@@ -328,61 +328,70 @@ function ct_add_nocache_script()
|
|
328 |
|
329 |
function ct_add_nocache_script_footer()
|
330 |
{
|
331 |
-
|
332 |
-
print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_nocache.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
|
333 |
-
if($test_external_forms)
|
334 |
{
|
335 |
-
|
336 |
-
print "<script async type='text/javascript' src='".plugins_url( '/inc/
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
}
|
338 |
-
//print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk-info.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
|
339 |
}
|
340 |
|
341 |
function ct_add_nocache_script_header()
|
342 |
{
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
|
|
|
|
|
|
355 |
}
|
356 |
|
357 |
function ct_inject_nocache_script($html)
|
358 |
{
|
359 |
-
|
360 |
-
$ct_options=ct_get_options();
|
361 |
-
if(@intval($ct_options['collect_details'])==1)
|
362 |
-
{
|
363 |
-
$ct_info_flag="var ct_info_flag=true;\n";
|
364 |
-
}
|
365 |
-
else
|
366 |
-
{
|
367 |
-
$ct_info_flag="var ct_info_flag=false;\n";
|
368 |
-
}
|
369 |
-
if(!is_admin()&&stripos($html,"</body")!==false)
|
370 |
{
|
371 |
-
|
372 |
-
|
373 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
{
|
375 |
-
|
376 |
-
$ct_replace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
}
|
378 |
-
|
379 |
-
//$html=str_ireplace("</body",$ct_replace."</body",$html);
|
380 |
-
$html=substr_replace($html,$ct_replace."</body",strripos($html,"</body"),6);
|
381 |
-
}
|
382 |
-
if(!is_admin()&&preg_match("#<head[^>]*>#i",$html)==1)
|
383 |
-
{
|
384 |
-
$ct_replace="\n<script type='text/javascript'>\nvar ct_ajaxurl = '".admin_url('admin-ajax.php')."';\n $ct_info_flag </script>\n";
|
385 |
-
$html=preg_replace("(<head[^>]*>)","$0".$ct_replace,$html,1);
|
386 |
}
|
387 |
return $html;
|
388 |
}
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
Description: Max power, all-in-one, captcha less, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
|
6 |
+
Version: 5.36
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
+
$cleantalk_plugin_version='5.36';
|
11 |
$cleantalk_executed=false;
|
12 |
|
13 |
if(defined('CLEANTALK_AJAX_USE_BUFFER'))
|
328 |
|
329 |
function ct_add_nocache_script_footer()
|
330 |
{
|
331 |
+
if(strpos($_SERVER['REQUEST_URI'],'jm-ajax')===false)
|
|
|
|
|
332 |
{
|
333 |
+
global $test_external_forms, $cleantalk_plugin_version;
|
334 |
+
print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_nocache.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
|
335 |
+
if($test_external_forms)
|
336 |
+
{
|
337 |
+
print "\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
338 |
+
print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_external.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
|
339 |
+
}
|
340 |
+
//print "<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk-info.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
|
341 |
}
|
|
|
342 |
}
|
343 |
|
344 |
function ct_add_nocache_script_header()
|
345 |
{
|
346 |
+
if(strpos($_SERVER['REQUEST_URI'],'jm-ajax')===false)
|
347 |
+
{
|
348 |
+
global $ct_options;
|
349 |
+
$ct_options=ct_get_options();
|
350 |
+
if(@intval($ct_options['collect_details'])==1)
|
351 |
+
{
|
352 |
+
$ct_info_flag="var ct_info_flag=true;\n";
|
353 |
+
}
|
354 |
+
else
|
355 |
+
{
|
356 |
+
$ct_info_flag="var ct_info_flag=false;\n";
|
357 |
+
}
|
358 |
+
|
359 |
+
print "\n<script type='text/javascript'>\nvar ct_ajaxurl = '".admin_url('admin-ajax.php')."';\n $ct_info_flag </script>\n";
|
360 |
+
}
|
361 |
}
|
362 |
|
363 |
function ct_inject_nocache_script($html)
|
364 |
{
|
365 |
+
if(strpos($_SERVER['REQUEST_URI'],'jm-ajax')===false)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
{
|
367 |
+
global $test_external_forms, $cleantalk_plugin_version, $ct_options;
|
368 |
+
$ct_options=ct_get_options();
|
369 |
+
if(@intval($ct_options['collect_details'])==1)
|
370 |
+
{
|
371 |
+
$ct_info_flag="var ct_info_flag=true;\n";
|
372 |
+
}
|
373 |
+
else
|
374 |
+
{
|
375 |
+
$ct_info_flag="var ct_info_flag=false;\n";
|
376 |
+
}
|
377 |
+
if(!is_admin()&&stripos($html,"</body")!==false)
|
378 |
{
|
379 |
+
//$ct_replace.="\n<script type='text/javascript'>var ajaxurl = '".admin_url('admin-ajax.php')."';\n $ct_info_flag </script>\n";
|
380 |
+
$ct_replace="<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_nocache.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
|
381 |
+
if($test_external_forms)
|
382 |
+
{
|
383 |
+
$ct_replace.="\n<script type='text/javascript'>var ct_blog_home = '".get_home_url()."';</script>\n";
|
384 |
+
$ct_replace.="<script async type='text/javascript' src='".plugins_url( '/inc/cleantalk_external.js' , __FILE__ )."?random=".$cleantalk_plugin_version."'></script>\n";
|
385 |
+
}
|
386 |
+
|
387 |
+
//$html=str_ireplace("</body",$ct_replace."</body",$html);
|
388 |
+
$html=substr_replace($html,$ct_replace."</body",strripos($html,"</body"),6);
|
389 |
+
}
|
390 |
+
if(!is_admin()&&preg_match("#<head[^>]*>#i",$html)==1)
|
391 |
+
{
|
392 |
+
$ct_replace="\n<script type='text/javascript'>\nvar ct_ajaxurl = '".admin_url('admin-ajax.php')."';\n $ct_info_flag </script>\n";
|
393 |
+
$html=preg_replace("(<head[^>]*>)","$0".$ct_replace,$html,1);
|
394 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
}
|
396 |
return $html;
|
397 |
}
|
inc/cleantalk-common.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
$ct_agent_version = 'wordpress-
|
4 |
$ct_plugin_name = 'Anti-spam by CleanTalk';
|
5 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
6 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
@@ -297,6 +297,8 @@ function get_sender_info() {
|
|
297 |
{
|
298 |
$ct_first_referer = 'null';
|
299 |
}
|
|
|
|
|
300 |
|
301 |
return $sender_info = array(
|
302 |
'page_url' => htmlspecialchars(@$_SERVER['SERVER_NAME'].@$_SERVER['REQUEST_URI']),
|
@@ -312,6 +314,7 @@ function get_sender_info() {
|
|
312 |
'fields_number' => sizeof($_POST),
|
313 |
'js_info' => $js_info,
|
314 |
'ct_first_referer' => $ct_first_referer,
|
|
|
315 |
);
|
316 |
}
|
317 |
|
1 |
<?php
|
2 |
|
3 |
+
$ct_agent_version = 'wordpress-536';
|
4 |
$ct_plugin_name = 'Anti-spam by CleanTalk';
|
5 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
6 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
297 |
{
|
298 |
$ct_first_referer = 'null';
|
299 |
}
|
300 |
+
$post_id=url_to_postid($_SERVER['HTTP_ORIGIN'].@$_SERVER['REQUEST_URI']);
|
301 |
+
$post_type=get_post_type($post_id);
|
302 |
|
303 |
return $sender_info = array(
|
304 |
'page_url' => htmlspecialchars(@$_SERVER['SERVER_NAME'].@$_SERVER['REQUEST_URI']),
|
314 |
'fields_number' => sizeof($_POST),
|
315 |
'js_info' => $js_info,
|
316 |
'ct_first_referer' => $ct_first_referer,
|
317 |
+
'post_type' => $post_type,
|
318 |
);
|
319 |
}
|
320 |
|
inc/cleantalk-public.php
CHANGED
@@ -27,6 +27,11 @@ function ct_init() {
|
|
27 |
{
|
28 |
unset($_POST['ct_checkjs_register_form']);
|
29 |
}
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
if($test_external_forms && $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['cleantalk_hidden_method']) && isset($_POST['cleantalk_hidden_action']))
|
32 |
{
|
27 |
{
|
28 |
unset($_POST['ct_checkjs_register_form']);
|
29 |
}
|
30 |
+
|
31 |
+
if(isset($_POST['_wpnonce-et-pb-contact-form-submitted']))
|
32 |
+
{
|
33 |
+
add_shortcode( 'et_pb_contact_form', 'ct_contact_form_validate' );
|
34 |
+
}
|
35 |
|
36 |
if($test_external_forms && $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['cleantalk_hidden_method']) && isset($_POST['cleantalk_hidden_action']))
|
37 |
{
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: znaeff, shagimuratov, vlad-cleantalk
|
3 |
Tags: anti-spam, antispam, bbpress, buddypress, captcha, capcha, captha, catcha, cf7 spam, comments, contact form spam, signup, spam, spammers, spammy, woocommerce, wordpress spam, booking, order, subscription, gravity spam, jetpack, bots, contact form 7, contact form, registrations, ninja, Fast Secure Contact, Gravity forms, formidable, mailchimp, s2member, protection, protect, email, akismet, plugin, contact, recaptcha, google captcha, google recaptcha, math, security, login, blacklist, prevent spam comments, wordpress, User Frontend, bulk delete, bulk remove, cloudflare, widget, review, auth forms, firewall, ddos, cleantalk, mailpoet, profile builder, comment spam, registration spam, spam comments, comment moderation, spam bots, block spam, signup spam, spam blocker, spam filter, user registration spam,pingback,trackback, spam trackbacks, anti-spam plugin
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 4.4.
|
6 |
-
Stable tag: 5.
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -428,6 +428,10 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
|
|
428 |
1. CleanTalk works faster than most of the other anti-spam plugins.
|
429 |
|
430 |
== Changelog ==
|
|
|
|
|
|
|
|
|
431 |
= 5.35 2016-01-14 =
|
432 |
* Added support for IP licensing
|
433 |
* Some anti-spam protection improvements
|
@@ -959,6 +963,10 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
|
|
959 |
* First version
|
960 |
|
961 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
962 |
= 5.35 2016-01-14 =
|
963 |
* Added support for IP licensing
|
964 |
* Some anti-spam protection improvements
|
2 |
Contributors: znaeff, shagimuratov, vlad-cleantalk
|
3 |
Tags: anti-spam, antispam, bbpress, buddypress, captcha, capcha, captha, catcha, cf7 spam, comments, contact form spam, signup, spam, spammers, spammy, woocommerce, wordpress spam, booking, order, subscription, gravity spam, jetpack, bots, contact form 7, contact form, registrations, ninja, Fast Secure Contact, Gravity forms, formidable, mailchimp, s2member, protection, protect, email, akismet, plugin, contact, recaptcha, google captcha, google recaptcha, math, security, login, blacklist, prevent spam comments, wordpress, User Frontend, bulk delete, bulk remove, cloudflare, widget, review, auth forms, firewall, ddos, cleantalk, mailpoet, profile builder, comment spam, registration spam, spam comments, comment moderation, spam bots, block spam, signup spam, spam blocker, spam filter, user registration spam,pingback,trackback, spam trackbacks, anti-spam plugin
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 4.4.2
|
6 |
+
Stable tag: 5.36
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
428 |
1. CleanTalk works faster than most of the other anti-spam plugins.
|
429 |
|
430 |
== Changelog ==
|
431 |
+
= 5.36 2016-02-04 =
|
432 |
+
* Improved JavaScript anti spam protection
|
433 |
+
* Improvements for avoiding blocking requests from payment systems
|
434 |
+
|
435 |
= 5.35 2016-01-14 =
|
436 |
* Added support for IP licensing
|
437 |
* Some anti-spam protection improvements
|
963 |
* First version
|
964 |
|
965 |
== Upgrade Notice ==
|
966 |
+
= 5.36 2016-02-04 =
|
967 |
+
* Improved JavaScript anti spam protection
|
968 |
+
* Improvements for avoiding blocking requests from payment systems
|
969 |
+
|
970 |
= 5.35 2016-01-14 =
|
971 |
* Added support for IP licensing
|
972 |
* Some anti-spam protection improvements
|