Version Description
Feb 09 2022 =
XML-RPC requests excluded and minor issues fixed.
- Fix: Excluded standard WordPress search form from apbct-public.min.js
- Fix. Common. ct_contact_form_validate moved to the init hook.
- Fix. Exclusions. XML-RPC request removed from the filtering.
- Fix. Comments/users checker. Values for dates range validating.
- Fix. Comments/users checker. Values of dates range for resuming scanner validating.
Download this release
Release Info
Developer | glomberg |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.171.1 |
Comparing to | |
See all releases |
Code changes from version 5.171 to 5.171.1
- cleantalk.php +1 -1
- inc/cleantalk-public-validate.php +6 -1
- inc/cleantalk-public.php +4 -4
- js/apbct-public.min.js +1 -1
- js/apbct-public.min.js.map +1 -1
- lib/Cleantalk/ApbctWP/FindSpam/Checker.php +9 -2
- lib/Cleantalk/ApbctWP/FindSpam/CommentsChecker.php +11 -2
- lib/Cleantalk/ApbctWP/FindSpam/UsersChecker.php +11 -2
- readme.txt +9 -1
cleantalk.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Anti-Spam by CleanTalk
|
5 |
Plugin URI: https://cleantalk.org
|
6 |
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.
|
7 |
-
Version: 5.171
|
8 |
Author: СleanTalk <welcome@cleantalk.org>
|
9 |
Author URI: https://cleantalk.org
|
10 |
Text Domain: cleantalk-spam-protect
|
4 |
Plugin Name: Anti-Spam by CleanTalk
|
5 |
Plugin URI: https://cleantalk.org
|
6 |
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.
|
7 |
+
Version: 5.171.1
|
8 |
Author: СleanTalk <welcome@cleantalk.org>
|
9 |
Author URI: https://cleantalk.org
|
10 |
Text Domain: cleantalk-spam-protect
|
inc/cleantalk-public-validate.php
CHANGED
@@ -9,10 +9,15 @@ function ct_contact_form_validate()
|
|
9 |
{
|
10 |
global $pagenow, $apbct, $ct_checkjs_frm;
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
// Exclusios common function
|
13 |
if ( apbct_exclusions_check(__FUNCTION__) ) {
|
14 |
do_action('apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST);
|
15 |
-
|
16 |
return null;
|
17 |
}
|
18 |
|
9 |
{
|
10 |
global $pagenow, $apbct, $ct_checkjs_frm;
|
11 |
|
12 |
+
// Exclude the XML-RPC requests
|
13 |
+
if ( defined('XMLRPC_REQUEST') ) {
|
14 |
+
do_action('apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST);
|
15 |
+
return null;
|
16 |
+
}
|
17 |
+
|
18 |
// Exclusios common function
|
19 |
if ( apbct_exclusions_check(__FUNCTION__) ) {
|
20 |
do_action('apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST);
|
|
|
21 |
return null;
|
22 |
}
|
23 |
|
inc/cleantalk-public.php
CHANGED
@@ -119,10 +119,10 @@ function apbct_init()
|
|
119 |
|
120 |
if ( $apbct->settings['forms__general_contact_forms_test'] == 1 && empty($_POST['ct_checkjs_cf7']) && ! apbct_is_direct_trackback() ) {
|
121 |
add_action('CMA_custom_post_type_nav', 'ct_contact_form_validate_postdata', 1);
|
122 |
-
ct_contact_form_validate
|
123 |
if ( isset($_POST['reg_redirect_link']) && isset($_POST['tmpl_registration_nonce_field']) ) {
|
124 |
unset($_POST['ct_checkjs_register_form']);
|
125 |
-
ct_contact_form_validate
|
126 |
}
|
127 |
}
|
128 |
|
@@ -311,7 +311,7 @@ function apbct_init()
|
|
311 |
}
|
312 |
|
313 |
if ( $apbct->settings['data__protect_logged_in'] != 1 && is_user_logged_in() ) {
|
314 |
-
ct_contact_form_validate
|
315 |
}
|
316 |
|
317 |
if ( apbct_is_user_enable() ) {
|
@@ -332,7 +332,7 @@ function apbct_init()
|
|
332 |
* Integration with custom forms
|
333 |
*/
|
334 |
if ( ! empty($_POST) && apbct_custom_forms_trappings() ) {
|
335 |
-
ct_contact_form_validate
|
336 |
}
|
337 |
}
|
338 |
|
119 |
|
120 |
if ( $apbct->settings['forms__general_contact_forms_test'] == 1 && empty($_POST['ct_checkjs_cf7']) && ! apbct_is_direct_trackback() ) {
|
121 |
add_action('CMA_custom_post_type_nav', 'ct_contact_form_validate_postdata', 1);
|
122 |
+
add_action('init', 'ct_contact_form_validate', 999);
|
123 |
if ( isset($_POST['reg_redirect_link']) && isset($_POST['tmpl_registration_nonce_field']) ) {
|
124 |
unset($_POST['ct_checkjs_register_form']);
|
125 |
+
add_action('init', 'ct_contact_form_validate', 999);
|
126 |
}
|
127 |
}
|
128 |
|
311 |
}
|
312 |
|
313 |
if ( $apbct->settings['data__protect_logged_in'] != 1 && is_user_logged_in() ) {
|
314 |
+
add_action('init', 'ct_contact_form_validate', 999);
|
315 |
}
|
316 |
|
317 |
if ( apbct_is_user_enable() ) {
|
332 |
* Integration with custom forms
|
333 |
*/
|
334 |
if ( ! empty($_POST) && apbct_custom_forms_trappings() ) {
|
335 |
+
add_action('init', 'ct_contact_form_validate', 999);
|
336 |
}
|
337 |
}
|
338 |
|
js/apbct-public.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
function apbct_collect_visible_fields(
|
2 |
//# sourceMappingURL=apbct-public.min.js.map
|
1 |
+
function apbct_collect_visible_fields(t){var e=[],n="",c=0,o="",a=0,i=[];for(var l in t.elements)isNaN(+l)||(e[l]=t.elements[l]);return(e=e.filter(function(t){return-1===i.indexOf(t.getAttribute("name"))&&(-1===["radio","checkbox"].indexOf(t.getAttribute("type"))||(i.push(t.getAttribute("name")),!1))})).forEach(function(t,e,i){"submit"!==t.getAttribute("type")&&null!==t.getAttribute("name")&&"ct_checkjs"!==t.getAttribute("name")&&("none"!==getComputedStyle(t).display&&"hidden"!==getComputedStyle(t).visibility&&"0"!==getComputedStyle(t).opacity&&"hidden"!==t.getAttribute("type")||t.classList.contains("wp-editor-area")?(n+=" "+t.getAttribute("name"),c++):(o+=" "+t.getAttribute("name"),a++))}),o=o.trim(),{visible_fields:n=n.trim(),visible_fields_count:c,invisible_fields:o,invisible_fields_count:a}}function apbct_visible_fields_set_cookie(t,e){var i="object"==typeof t&&null!==t?t:{};if("native"===ctPublic.data__cookies_type)for(var n in i){if(10<n)return;ctSetCookie("apbct_visible_fields_"+(void 0!==e?e:n),JSON.stringify(i[n]))}else ctSetCookie("apbct_visible_fields",JSON.stringify(i))}function apbct_js_keys__set_input_value(t,e,i,n){if(0<document.querySelectorAll("[name^=ct_checkjs]").length)for(var c=document.querySelectorAll("[name^=ct_checkjs]"),o=0;o<c.length;o++)c[o].value=t.js_key}function apbctGetScreenInfo(){return JSON.stringify({fullWidth:document.documentElement.scrollWidth,fullHeight:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),visibleWidth:document.documentElement.clientWidth,visibleHeight:document.documentElement.clientHeight})}!function(){var o=new Date,e=(new Date).getTime(),i=!0,n=[],c=0,a={},t=!1,l=!1;function s(t,e,i){"function"==typeof window.addEventListener?t.addEventListener(e,i):t.attachEvent(e,i)}function _(t,e,i){"function"==typeof window.removeEventListener?t.removeEventListener(e,i):t.detachEvent(e,i)}var u=function(){var t=Math.floor((new Date).getTime()/1e3);ctSetCookie("ct_fkp_timestamp",t),_(window,"mousedown",u),_(window,"keydown",u)},d=setInterval(function(){i=!0},150),r=setInterval(function(){ctSetCookie("ct_pointer_data",JSON.stringify(n))},1200),m=function(t){l||(ctSetCookie("ct_mouse_moved","true"),l=!0),!0===i&&(n.push([Math.round(t.clientY),Math.round(t.clientX),Math.round((new Date).getTime()-e)]),i=!1,50<=++c&&(_(window,"mousemove",m),clearInterval(d),clearInterval(r)))};function p(t){var e=t.target.value;!e||e in a||("rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("check_email_before_post",{method:"POST",data:{email:e},callback:function(t){t.result&&(a[e]={result:t.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(a)))}}):"custom_ajax"===ctPublicFunctions.data__ajax_type?apbct_public_sendAJAX({action:"apbct_email_check_before_post",email:e},{apbct_ajax:1,callback:function(t){t.result&&(a[e]={result:t.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(a)))}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_email_check_before_post",email:e},{callback:function(t){t.result&&(a[e]={result:t.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(a)))}}))}function b(t){ctSetCookie("apbct_pixel_url",t),+ctPublic.pixel__enabled&&(document.getElementById("apbct_pixel")||jQuery("body").append('<img alt="Cleantalk Pixel" id="apbct_pixel" style="display: none; left: 99999px;" src="'+t+'">'))}s(window,"mousemove",m),s(window,"mousedown",u),s(window,"keydown",u),s(window,"scroll",function(){t||(ctSetCookie("ct_has_scrolled","true"),t=!0)}),s(window,"DOMContentLoaded",function(){var t,e=[["ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)],["ct_fkp_timestamp","0"],["ct_pointer_data","0"],["ct_timezone",o.getTimezoneOffset()/60*-1],["ct_screen_info",apbctGetScreenInfo()],["ct_has_scrolled","false"],["ct_mouse_moved","false"]];if("native"!==ctPublic.data__cookies_type)e.push(["apbct_visible_fields","0"]);else{var i=document.cookie.split(";");if(0!==i.length)for(var n=0;n<i.length;n++){var c=i[n].trim().split("=")[0];0===c.indexOf("apbct_visible_fields_")&&ctDeleteCookie(c)}}+ctPublic.pixel__setting&&(+ctPublic.pixel__enabled?"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_get_pixel_url",{method:"POST",callback:function(t){t&&b(t)}}):(t="custom_ajax"===ctPublicFunctions.data__ajax_type?1:0,apbct_public_sendAJAX({action:"apbct_get_pixel_url"},{apbct_ajax:t,notJson:!0,callback:function(t){t&&b(t)}})):e.push(["apbct_pixel_url",ctPublic.pixel__url])),+ctPublic.data__email_check_before_post&&(e.push(["ct_checked_emails","0"]),jQuery("input[type = 'email'], #email").blur(p)),ctSetCookie(e),setTimeout(function(){for(var t=0;t<document.forms.length;t++){var e,i,n=document.forms[t];"get"===n.method.toString().toLowerCase()||n.classList.contains("slp_search_form")||n.parentElement.classList.contains("mec-booking")||-1!==n.action.toString().indexOf("activehosted.com")||n.id&&"caspioform"===n.id||n.classList&&n.classList.contains("tinkoffPayRow")||n.classList&&n.classList.contains("give-form")||n.id&&"ult-forgot-password-form"===n.id||n.id&&-1!==n.id.toString().indexOf("calculatedfields")||n.id&&-1!==n.id.toString().indexOf("cp_tslotsbooking_pform")||n.name&&-1!==n.name.toString().indexOf("cp_tslotsbooking_pform")||((e=document.createElement("input")).setAttribute("type","hidden"),e.setAttribute("id","apbct_visible_fields_"+t),e.setAttribute("name","apbct_visible_fields"),(i={})[0]=apbct_collect_visible_fields(n),e.value=JSON.stringify(i),n.append(e),n.onsubmit_prev=n.onsubmit,n.ctFormIndex=t,n.onsubmit=function(t){var e;"native"!==ctPublic.data__cookies_type&&void 0!==t.target.ctFormIndex&&((e={})[0]=apbct_collect_visible_fields(this),apbct_visible_fields_set_cookie(e,t.target.ctFormIndex)),t.target.onsubmit_prev instanceof Function&&setTimeout(function(){t.target.onsubmit_prev.call(t.target,t)},500)})}},1e3)})}(),"undefined"!=typeof jQuery&&jQuery(document).ajaxComplete(function(t,e,i){var n;!e.responseText||-1===e.responseText.indexOf('"apbct')||void 0!==(n=JSON.parse(e.responseText)).apbct&&(n=n.apbct).blocked&&(document.dispatchEvent(new CustomEvent("apbctAjaxBockAlert",{bubbles:!0,detail:{message:n.comment}})),cleantalkModal.loaded=n.comment,cleantalkModal.open(),1==+n.stop_script&&window.stop())});
|
2 |
//# sourceMappingURL=apbct-public.min.js.map
|
js/apbct-public.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"apbct-public.min.js","sources":["apbct-public.js"],"sourcesContent":["(function() {\n\n\tvar ct_date = new Date(),\n\t\tctTimeMs = new Date().getTime(),\n\t\tctMouseEventTimerFlag = true, //Reading interval flag\n\t\tctMouseData = [],\n\t\tctMouseDataCounter = 0,\n\t\tctCheckedEmails = {},\n\t\tctScrollCollected = false,\n\t\tctMouseMovedCollected = false;\n\n\tfunction apbct_attach_event_handler(elem, event, callback){\n\t\tif(typeof window.addEventListener === \"function\") elem.addEventListener(event, callback);\n\t\telse elem.attachEvent(event, callback);\n\t}\n\n\tfunction apbct_remove_event_handler(elem, event, callback){\n\t\tif(typeof window.removeEventListener === \"function\") elem.removeEventListener(event, callback);\n\t\telse elem.detachEvent(event, callback);\n\t}\n\n\t//Writing first key press timestamp\n\tvar ctFunctionFirstKey = function output(event){\n\t\tvar KeyTimestamp = Math.floor(new Date().getTime()/1000);\n\t\tctSetCookie(\"ct_fkp_timestamp\", KeyTimestamp);\n\t\tctKeyStopStopListening();\n\t};\n\n\t//Reading interval\n\tvar ctMouseReadInterval = setInterval(function(){\n\t\tctMouseEventTimerFlag = true;\n\t}, 150);\n\n\t//Writting interval\n\tvar ctMouseWriteDataInterval = setInterval(function(){\n\t\tctSetCookie(\"ct_pointer_data\", JSON.stringify(ctMouseData));\n\t}, 1200);\n\n\t//Logging mouse position each 150 ms\n\tvar ctFunctionMouseMove = function output(event){\n\t\tctSetMouseMoved();\n\t\tif(ctMouseEventTimerFlag === true){\n\n\t\t\tctMouseData.push([\n\t\t\t\tMath.round(event.clientY),\n\t\t\t\tMath.round(event.clientX),\n\t\t\t\tMath.round(new Date().getTime() - ctTimeMs)\n\t\t\t]);\n\n\t\t\tctMouseDataCounter++;\n\t\t\tctMouseEventTimerFlag = false;\n\t\t\tif(ctMouseDataCounter >= 50){\n\t\t\t\tctMouseStopData();\n\t\t\t}\n\t\t}\n\t};\n\n\t//Stop mouse observing function\n\tfunction ctMouseStopData(){\n\t\tapbct_remove_event_handler(window, \"mousemove\", ctFunctionMouseMove);\n\t\tclearInterval(ctMouseReadInterval);\n\t\tclearInterval(ctMouseWriteDataInterval);\n\t}\n\n\t//Stop key listening function\n\tfunction ctKeyStopStopListening(){\n\t\tapbct_remove_event_handler(window, \"mousedown\", ctFunctionFirstKey);\n\t\tapbct_remove_event_handler(window, \"keydown\", ctFunctionFirstKey);\n\t}\n\n\tfunction checkEmail(e) {\n\t\tvar current_email = e.target.value;\n\t\tif (current_email && !(current_email in ctCheckedEmails)) {\n\t\t\t// Using REST API handler\n\t\t\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\t\t\tapbct_public_sendREST(\n\t\t\t\t\t'check_email_before_post',\n\t\t\t\t\t{\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata: {'email' : current_email},\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t// Using AJAX request and handler\n\t\t\t}else if( ctPublicFunctions.data__ajax_type === 'custom_ajax' ) {\n\t\t\t\tapbct_public_sendAJAX(\n\t\t\t\t\t{\n\t\t\t\t\t\taction: 'apbct_email_check_before_post',\n\t\t\t\t\t\temail : current_email,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tapbct_ajax: 1,\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} else if( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n\t\t\t\tapbct_public_sendAJAX(\n\t\t\t\t\t{\n\t\t\t\t\t\taction: 'apbct_email_check_before_post',\n\t\t\t\t\t\temail : current_email,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction ctSetPixelImg(pixelUrl) {\n\t\tctSetCookie('apbct_pixel_url', pixelUrl);\n\t\tif( +ctPublic.pixel__enabled ){\n\t\t\tif( ! document.getElementById('apbct_pixel') ) {\n\t\t\t\tjQuery('body').append( '<img alt=\"Cleantalk Pixel\" id=\"apbct_pixel\" style=\"display: none; left: 99999px;\" src=\"' + pixelUrl + '\">' );\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction ctGetPixelUrl() {\n\t\t// Using REST API handler\n\t\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\t\tapbct_public_sendREST(\n\t\t\t\t'apbct_get_pixel_url',\n\t\t\t\t{\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result) {\n\t\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t// Using AJAX request and handler\n\t\t}else{\n\t\t\tvar ajaxType = ctPublicFunctions.data__ajax_type === 'custom_ajax' ? 1 : 0;\n\t\t\tapbct_public_sendAJAX(\n\t\t\t\t{\n\t\t\t\t\taction: 'apbct_get_pixel_url',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tapbct_ajax: ajaxType,\n\t\t\t\t\tnotJson: true,\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result) {\n\t\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\tfunction ctSetHasScrolled() {\n\t\tif( ! ctScrollCollected ) {\n\t\t\tctSetCookie(\"ct_has_scrolled\", 'true');\n\t\t\tctScrollCollected = true;\n\t\t}\n\t}\n\n\tfunction ctSetMouseMoved() {\n\t\tif( ! ctMouseMovedCollected ) {\n\t\t\tctSetCookie(\"ct_mouse_moved\", 'true');\n\t\t\tctMouseMovedCollected = true;\n\t\t}\n\t}\n\n\tapbct_attach_event_handler(window, \"mousemove\", ctFunctionMouseMove);\n\tapbct_attach_event_handler(window, \"mousedown\", ctFunctionFirstKey);\n\tapbct_attach_event_handler(window, \"keydown\", ctFunctionFirstKey);\n\tapbct_attach_event_handler(window, \"scroll\", ctSetHasScrolled);\n\n\t// Ready function\n\tfunction apbct_ready(){\n\n\t\t// Collect scrolling info\n\t\tvar initCookies = [\n\t\t\t[\"ct_ps_timestamp\", Math.floor(new Date().getTime() / 1000)],\n\t\t\t[\"ct_fkp_timestamp\", \"0\"],\n\t\t\t[\"ct_pointer_data\", \"0\"],\n\t\t\t[\"ct_timezone\", ct_date.getTimezoneOffset()/60*(-1) ],\n\t\t\t[\"ct_screen_info\", apbctGetScreenInfo()],\n\t\t\t[\"ct_has_scrolled\", 'false'],\n\t\t\t[\"ct_mouse_moved\", 'false'],\n\t\t];\n\n\t\tif( ctPublic.data__cookies_type !== 'native' ) {\n\t\t\tinitCookies.push(['apbct_visible_fields', '0']);\n\t\t} else {\n\t\t\t// Delete all visible fields cookies on load the page\n\t\t\tvar cookiesArray = document.cookie.split(\";\");\n\t\t\tif( cookiesArray.length !== 0 ) {\n\t\t\t\tfor ( var i = 0; i < cookiesArray.length; i++ ) {\n\t\t\t\t\tvar currentCookie = cookiesArray[i].trim();\n\t\t\t\t\tvar cookieName = currentCookie.split(\"=\")[0];\n\t\t\t\t\tif( cookieName.indexOf(\"apbct_visible_fields_\") === 0 ) {\n\t\t\t\t\t\tctDeleteCookie(cookieName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( +ctPublic.pixel__setting ){\n\t\t\tif( +ctPublic.pixel__enabled ){\n\t\t\t\tctGetPixelUrl();\n\t\t\t} else {\n\t\t\t\tinitCookies.push(['apbct_pixel_url', ctPublic.pixel__url]);\n\t\t\t}\n\t\t}\n\n\t\tif ( +ctPublic.data__email_check_before_post) {\n\t\t\tinitCookies.push(['ct_checked_emails', '0']);\n\t\t\tjQuery(\"input[type = 'email'], #email\").blur(checkEmail);\n\t\t}\n\n\t\tctSetCookie(initCookies);\n\n\t\tsetTimeout(function(){\n\n\t\t\tfor(var i = 0; i < document.forms.length; i++){\n\t\t\t\tvar form = document.forms[i];\n\n\t\t\t\t//Exclusion for forms\n\t\t\t\tif (\n\t\t\t\t\tform.classList.contains('slp_search_form') || //StoreLocatorPlus form\n\t\t\t\t\tform.parentElement.classList.contains('mec-booking') ||\n\t\t\t\t\tform.action.toString().indexOf('activehosted.com') !== -1 || // Active Campaign\n\t\t\t\t\t(form.id && form.id === 'caspioform') || //Caspio Form\n\t\t\t\t\t(form.classList && form.classList.contains('tinkoffPayRow')) || // TinkoffPayForm\n\t\t\t\t\t(form.classList && form.classList.contains('give-form')) || // GiveWP\n\t\t\t\t\t(form.id && form.id === 'ult-forgot-password-form') || //ult forgot password\n\t\t\t\t\t(form.id && form.id.toString().indexOf('calculatedfields') !== -1) || // CalculatedFieldsForm\n\t\t\t\t\t(form.id && form.id.toString().indexOf('cp_tslotsbooking_pform') !== -1) || // WP Time Slots Booking Form\n\t\t\t\t\t(form.name && form.name.toString().indexOf('cp_tslotsbooking_pform') !== -1) // WP Time Slots Booking Form\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar hiddenInput = document.createElement( 'input' );\n\t\t\t\thiddenInput.setAttribute( 'type', 'hidden' );\n\t\t\t\thiddenInput.setAttribute( 'id', 'apbct_visible_fields_' + i );\n\t\t\t\thiddenInput.setAttribute( 'name', 'apbct_visible_fields');\n\t\t\t\tvar visibleFieldsToInput = {};\n\t\t\t\tvisibleFieldsToInput[0] = apbct_collect_visible_fields(form);\n\t\t\t\thiddenInput.value = JSON.stringify(visibleFieldsToInput);\n\t\t\t\tform.append( hiddenInput );\n\n\t\t\t\tform.onsubmit_prev = form.onsubmit;\n\n\t\t\t\tform.ctFormIndex = i;\n\t\t\t\tform.onsubmit = function (event) {\n\n\t\t\t\t\tif ( ctPublic.data__cookies_type !== 'native' && typeof event.target.ctFormIndex !== 'undefined' ) {\n\n\t\t\t\t\t\tvar visible_fields = {};\n\t\t\t\t\t\tvisible_fields[0] = apbct_collect_visible_fields(this);\n\t\t\t\t\t\tapbct_visible_fields_set_cookie( visible_fields, event.target.ctFormIndex );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Call previous submit action\n\t\t\t\t\tif (event.target.onsubmit_prev instanceof Function) {\n\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\tevent.target.onsubmit_prev.call(event.target, event);\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t}, 1000);\n\t}\n\tapbct_attach_event_handler(window, \"DOMContentLoaded\", apbct_ready);\n\n}());\n\nfunction apbct_collect_visible_fields( form ) {\n\n\t// Get only fields\n\tvar inputs = [],\n\t\tinputs_visible = '',\n\t\tinputs_visible_count = 0,\n\t\tinputs_invisible = '',\n\t\tinputs_invisible_count = 0,\n\t\tinputs_with_duplicate_names = [];\n\n\tfor(var key in form.elements){\n\t\tif(!isNaN(+key))\n\t\t\tinputs[key] = form.elements[key];\n\t}\n\n\t// Filter fields\n\tinputs = inputs.filter(function(elem){\n\n\t\t// Filter already added fields\n\t\tif( inputs_with_duplicate_names.indexOf( elem.getAttribute('name') ) !== -1 ){\n\t\t\treturn false;\n\t\t}\n\t\t// Filter inputs with same names for type == radio\n\t\tif( -1 !== ['radio', 'checkbox'].indexOf( elem.getAttribute(\"type\") )){\n\t\t\tinputs_with_duplicate_names.push( elem.getAttribute('name') );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\n\t// Visible fields\n\tinputs.forEach(function(elem, i, elements){\n\t\t// Unnecessary fields\n\t\tif(\n\t\t\telem.getAttribute(\"type\") === \"submit\" || // type == submit\n\t\t\telem.getAttribute('name') === null ||\n\t\t\telem.getAttribute('name') === 'ct_checkjs'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\t// Invisible fields\n\t\tif(\n\t\t\tgetComputedStyle(elem).display === \"none\" || // hidden\n\t\t\tgetComputedStyle(elem).visibility === \"hidden\" || // hidden\n\t\t\tgetComputedStyle(elem).opacity === \"0\" || // hidden\n\t\t\telem.getAttribute(\"type\") === \"hidden\" // type == hidden\n\t\t) {\n\t\t\tif( elem.classList.contains(\"wp-editor-area\") ) {\n\t\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_visible_count++;\n\t\t\t} else {\n\t\t\t\tinputs_invisible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_invisible_count++;\n\t\t\t}\n\t\t}\n\t\t// Visible fields\n\t\telse {\n\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\tinputs_visible_count++;\n\t\t}\n\n\t});\n\n\tinputs_invisible = inputs_invisible.trim();\n\tinputs_visible = inputs_visible.trim();\n\n\treturn {\n\t\tvisible_fields : inputs_visible,\n\t\tvisible_fields_count : inputs_visible_count,\n\t\tinvisible_fields : inputs_invisible,\n\t\tinvisible_fields_count : inputs_invisible_count,\n\t}\n\n}\n\nfunction apbct_visible_fields_set_cookie( visible_fields_collection, form_id ) {\n\n\tvar collection = typeof visible_fields_collection === 'object' && visible_fields_collection !== null ? visible_fields_collection : {};\n\n\tif( ctPublic.data__cookies_type === 'native' ) {\n\t\tfor ( var i in collection ) {\n\t\t\tif ( i > 10 ) {\n\t\t\t\t// Do not generate more than 10 cookies\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar collectionIndex = form_id !== undefined ? form_id : i;\n\t\t\tctSetCookie(\"apbct_visible_fields_\" + collectionIndex, JSON.stringify( collection[i] ) );\n\t\t}\n\t} else {\n\t\tctSetCookie(\"apbct_visible_fields\", JSON.stringify( collection ) );\n\t}\n}\n\nfunction apbct_js_keys__set_input_value(result, data, params, obj){\n\tif( document.querySelectorAll('[name^=ct_checkjs]').length > 0 ) {\n\t\tvar elements = document.querySelectorAll('[name^=ct_checkjs]');\n\t\tfor ( var i = 0; i < elements.length; i++ ) {\n\t\t\telements[i].value = result.js_key;\n\t\t}\n\t}\n}\n\nfunction apbctGetScreenInfo() {\n\treturn JSON.stringify({\n\t\tfullWidth : document.documentElement.scrollWidth,\n\t\tfullHeight : Math.max(\n\t\t\tdocument.body.scrollHeight, document.documentElement.scrollHeight,\n\t\t\tdocument.body.offsetHeight, document.documentElement.offsetHeight,\n\t\t\tdocument.body.clientHeight, document.documentElement.clientHeight\n\t\t),\n\t\tvisibleWidth : document.documentElement.clientWidth,\n\t\tvisibleHeight : document.documentElement.clientHeight,\n\t});\n}\n\nif(typeof jQuery !== 'undefined') {\n\n\t// Capturing responses and output block message for unknown AJAX forms\n\tjQuery(document).ajaxComplete(function (event, xhr, settings) {\n\t\tif (xhr.responseText && xhr.responseText.indexOf('\"apbct') !== -1) {\n\t\t\tvar response = JSON.parse(xhr.responseText);\n\t\t\tif (typeof response.apbct !== 'undefined') {\n\t\t\t\tresponse = response.apbct;\n\t\t\t\tif (response.blocked) {\n\t\t\t\t\tdocument.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent( \"apbctAjaxBockAlert\", {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tdetail: { message: response.comment }\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\n\t\t\t\t\t// Show the result by modal\n\t\t\t\t\tcleantalkModal.loaded = response.comment;\n\t\t\t\t\tcleantalkModal.open();\n\n\t\t\t\t\tif(+response.stop_script == 1)\n\t\t\t\t\t\twindow.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}"],"names":["apbct_collect_visible_fields","form","inputs","inputs_visible","inputs_visible_count","inputs_invisible","inputs_invisible_count","inputs_with_duplicate_names","key","elements","isNaN","filter","elem","indexOf","getAttribute","push","forEach","i","getComputedStyle","display","visibility","opacity","classList","contains","trim","visible_fields","visible_fields_count","invisible_fields","invisible_fields_count","apbct_visible_fields_set_cookie","visible_fields_collection","form_id","collection","ctPublic","data__cookies_type","ctSetCookie","undefined","JSON","stringify","apbct_js_keys__set_input_value","result","data","params","obj","document","querySelectorAll","length","value","js_key","apbctGetScreenInfo","fullWidth","documentElement","scrollWidth","fullHeight","Math","max","body","scrollHeight","offsetHeight","clientHeight","visibleWidth","clientWidth","visibleHeight","ct_date","Date","ctTimeMs","getTime","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","ctCheckedEmails","ctScrollCollected","ctMouseMovedCollected","apbct_attach_event_handler","event","callback","window","addEventListener","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","ctFunctionFirstKey","KeyTimestamp","floor","ctMouseReadInterval","setInterval","ctMouseWriteDataInterval","ctFunctionMouseMove","round","clientY","clientX","clearInterval","checkEmail","e","current_email","target","ctPublicFunctions","data__ajax_type","apbct_public_sendREST","method","email","timestamp","now","apbct_public_sendAJAX","action","apbct_ajax","ctSetPixelImg","pixelUrl","pixel__enabled","getElementById","jQuery","append","ajaxType","initCookies","getTimezoneOffset","cookiesArray","cookie","split","cookieName","ctDeleteCookie","pixel__setting","notJson","pixel__url","data__email_check_before_post","blur","setTimeout","forms","hiddenInput","visibleFieldsToInput","parentElement","toString","id","name","createElement","setAttribute","onsubmit_prev","onsubmit","ctFormIndex","this","Function","call","ajaxComplete","xhr","settings","response","responseText","parse","apbct","blocked","dispatchEvent","CustomEvent","bubbles","detail","message","comment","cleantalkModal","loaded","open","stop_script","stop"],"mappings":"AAgSA,SAASA,6BAA8BC,GAGtC,IAAIC,EAAS,GACZC,EAAiB,GACjBC,EAAuB,EACvBC,EAAmB,GACnBC,EAAyB,EACzBC,EAA8B,GAE/B,IAAI,IAAIC,KAAOP,EAAKQ,SACfC,OAAOF,KACVN,EAAOM,GAAOP,EAAKQ,SAASD,IAsD9B,OAlDAN,EAASA,EAAOS,OAAO,SAASC,GAG/B,OAA0E,IAAtEL,EAA4BM,QAASD,EAAKE,aAAa,YAItD,IAAM,CAAC,QAAS,YAAYD,QAASD,EAAKE,aAAa,WAC3DP,EAA4BQ,KAAMH,EAAKE,aAAa,UAC7C,OAMFE,QAAQ,SAASJ,EAAMK,EAAGR,GAGO,WAAtCG,EAAKE,aAAa,SACoB,OAAtCF,EAAKE,aAAa,SACoB,eAAtCF,EAAKE,aAAa,UAMoB,SAAtCI,iBAAiBN,GAAMO,SACe,WAAtCD,iBAAiBN,GAAMQ,YACe,MAAtCF,iBAAiBN,GAAMS,SACe,WAAtCT,EAAKE,aAAa,SAEdF,EAAKU,UAAUC,SAAS,mBAU5BpB,GAAkB,IAAMS,EAAKE,aAAa,QAC1CV,MAPCC,GAAoB,IAAMO,EAAKE,aAAa,QAC5CR,QAWHD,EAAmBA,EAAiBmB,OAG7B,CACNC,eAHDtB,EAAiBA,EAAeqB,OAI/BE,qBAAuBtB,EACvBuB,iBAAmBtB,EACnBuB,uBAAyBtB,GAK3B,SAASuB,gCAAiCC,EAA2BC,GAEpE,IAAIC,EAAkD,iBAA9BF,GAAwE,OAA9BA,EAAsCA,EAA4B,GAEpI,GAAoC,WAAhCG,SAASC,mBACZ,IAAM,IAAIjB,KAAKe,EAAa,CAC3B,GAAS,GAAJf,EAEJ,OAGDkB,YAAY,8BADsBC,IAAZL,EAAwBA,EAAUd,GACDoB,KAAKC,UAAWN,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,GAmZqB,oBAAXqC,QAGTA,OAAOnE,UAAUkG,aAAa,SAAUpE,EAAOqE,EAAKC,GACnD,IACKC,GADDF,EAAIG,eAAwD,IAAxCH,EAAIG,aAAarI,QAAQ,gBAElB,KAD1BoI,EAAW5G,KAAK8G,MAAMJ,EAAIG,eACVE,QACnBH,EAAWA,EAASG,OACPC,UACZzG,SAAS0G,cACR,IAAIC,YAAa,qBAAsB,CACtCC,SAAS,EACTC,OAAQ,CAAEC,QAAST,EAASU,YAK9BC,eAAeC,OAASZ,EAASU,QACjCC,eAAeE,OAEa,IAAxBb,EAASc,aACZnF,OAAOoF"}
|
1 |
+
{"version":3,"file":"apbct-public.min.js","sources":["apbct-public.js"],"sourcesContent":["(function() {\n\n\tvar ct_date = new Date(),\n\t\tctTimeMs = new Date().getTime(),\n\t\tctMouseEventTimerFlag = true, //Reading interval flag\n\t\tctMouseData = [],\n\t\tctMouseDataCounter = 0,\n\t\tctCheckedEmails = {},\n\t\tctScrollCollected = false,\n\t\tctMouseMovedCollected = false;\n\n\tfunction apbct_attach_event_handler(elem, event, callback){\n\t\tif(typeof window.addEventListener === \"function\") elem.addEventListener(event, callback);\n\t\telse elem.attachEvent(event, callback);\n\t}\n\n\tfunction apbct_remove_event_handler(elem, event, callback){\n\t\tif(typeof window.removeEventListener === \"function\") elem.removeEventListener(event, callback);\n\t\telse elem.detachEvent(event, callback);\n\t}\n\n\t//Writing first key press timestamp\n\tvar ctFunctionFirstKey = function output(event){\n\t\tvar KeyTimestamp = Math.floor(new Date().getTime()/1000);\n\t\tctSetCookie(\"ct_fkp_timestamp\", KeyTimestamp);\n\t\tctKeyStopStopListening();\n\t};\n\n\t//Reading interval\n\tvar ctMouseReadInterval = setInterval(function(){\n\t\tctMouseEventTimerFlag = true;\n\t}, 150);\n\n\t//Writting interval\n\tvar ctMouseWriteDataInterval = setInterval(function(){\n\t\tctSetCookie(\"ct_pointer_data\", JSON.stringify(ctMouseData));\n\t}, 1200);\n\n\t//Logging mouse position each 150 ms\n\tvar ctFunctionMouseMove = function output(event){\n\t\tctSetMouseMoved();\n\t\tif(ctMouseEventTimerFlag === true){\n\n\t\t\tctMouseData.push([\n\t\t\t\tMath.round(event.clientY),\n\t\t\t\tMath.round(event.clientX),\n\t\t\t\tMath.round(new Date().getTime() - ctTimeMs)\n\t\t\t]);\n\n\t\t\tctMouseDataCounter++;\n\t\t\tctMouseEventTimerFlag = false;\n\t\t\tif(ctMouseDataCounter >= 50){\n\t\t\t\tctMouseStopData();\n\t\t\t}\n\t\t}\n\t};\n\n\t//Stop mouse observing function\n\tfunction ctMouseStopData(){\n\t\tapbct_remove_event_handler(window, \"mousemove\", ctFunctionMouseMove);\n\t\tclearInterval(ctMouseReadInterval);\n\t\tclearInterval(ctMouseWriteDataInterval);\n\t}\n\n\t//Stop key listening function\n\tfunction ctKeyStopStopListening(){\n\t\tapbct_remove_event_handler(window, \"mousedown\", ctFunctionFirstKey);\n\t\tapbct_remove_event_handler(window, \"keydown\", ctFunctionFirstKey);\n\t}\n\n\tfunction checkEmail(e) {\n\t\tvar current_email = e.target.value;\n\t\tif (current_email && !(current_email in ctCheckedEmails)) {\n\t\t\t// Using REST API handler\n\t\t\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\t\t\tapbct_public_sendREST(\n\t\t\t\t\t'check_email_before_post',\n\t\t\t\t\t{\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata: {'email' : current_email},\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t// Using AJAX request and handler\n\t\t\t}else if( ctPublicFunctions.data__ajax_type === 'custom_ajax' ) {\n\t\t\t\tapbct_public_sendAJAX(\n\t\t\t\t\t{\n\t\t\t\t\t\taction: 'apbct_email_check_before_post',\n\t\t\t\t\t\temail : current_email,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tapbct_ajax: 1,\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} else if( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n\t\t\t\tapbct_public_sendAJAX(\n\t\t\t\t\t{\n\t\t\t\t\t\taction: 'apbct_email_check_before_post',\n\t\t\t\t\t\temail : current_email,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction ctSetPixelImg(pixelUrl) {\n\t\tctSetCookie('apbct_pixel_url', pixelUrl);\n\t\tif( +ctPublic.pixel__enabled ){\n\t\t\tif( ! document.getElementById('apbct_pixel') ) {\n\t\t\t\tjQuery('body').append( '<img alt=\"Cleantalk Pixel\" id=\"apbct_pixel\" style=\"display: none; left: 99999px;\" src=\"' + pixelUrl + '\">' );\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction ctGetPixelUrl() {\n\t\t// Using REST API handler\n\t\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\t\tapbct_public_sendREST(\n\t\t\t\t'apbct_get_pixel_url',\n\t\t\t\t{\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result) {\n\t\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t// Using AJAX request and handler\n\t\t}else{\n\t\t\tvar ajaxType = ctPublicFunctions.data__ajax_type === 'custom_ajax' ? 1 : 0;\n\t\t\tapbct_public_sendAJAX(\n\t\t\t\t{\n\t\t\t\t\taction: 'apbct_get_pixel_url',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tapbct_ajax: ajaxType,\n\t\t\t\t\tnotJson: true,\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result) {\n\t\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\tfunction ctSetHasScrolled() {\n\t\tif( ! ctScrollCollected ) {\n\t\t\tctSetCookie(\"ct_has_scrolled\", 'true');\n\t\t\tctScrollCollected = true;\n\t\t}\n\t}\n\n\tfunction ctSetMouseMoved() {\n\t\tif( ! ctMouseMovedCollected ) {\n\t\t\tctSetCookie(\"ct_mouse_moved\", 'true');\n\t\t\tctMouseMovedCollected = true;\n\t\t}\n\t}\n\n\tapbct_attach_event_handler(window, \"mousemove\", ctFunctionMouseMove);\n\tapbct_attach_event_handler(window, \"mousedown\", ctFunctionFirstKey);\n\tapbct_attach_event_handler(window, \"keydown\", ctFunctionFirstKey);\n\tapbct_attach_event_handler(window, \"scroll\", ctSetHasScrolled);\n\n\t// Ready function\n\tfunction apbct_ready(){\n\n\t\t// Collect scrolling info\n\t\tvar initCookies = [\n\t\t\t[\"ct_ps_timestamp\", Math.floor(new Date().getTime() / 1000)],\n\t\t\t[\"ct_fkp_timestamp\", \"0\"],\n\t\t\t[\"ct_pointer_data\", \"0\"],\n\t\t\t[\"ct_timezone\", ct_date.getTimezoneOffset()/60*(-1) ],\n\t\t\t[\"ct_screen_info\", apbctGetScreenInfo()],\n\t\t\t[\"ct_has_scrolled\", 'false'],\n\t\t\t[\"ct_mouse_moved\", 'false'],\n\t\t];\n\n\t\tif( ctPublic.data__cookies_type !== 'native' ) {\n\t\t\tinitCookies.push(['apbct_visible_fields', '0']);\n\t\t} else {\n\t\t\t// Delete all visible fields cookies on load the page\n\t\t\tvar cookiesArray = document.cookie.split(\";\");\n\t\t\tif( cookiesArray.length !== 0 ) {\n\t\t\t\tfor ( var i = 0; i < cookiesArray.length; i++ ) {\n\t\t\t\t\tvar currentCookie = cookiesArray[i].trim();\n\t\t\t\t\tvar cookieName = currentCookie.split(\"=\")[0];\n\t\t\t\t\tif( cookieName.indexOf(\"apbct_visible_fields_\") === 0 ) {\n\t\t\t\t\t\tctDeleteCookie(cookieName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( +ctPublic.pixel__setting ){\n\t\t\tif( +ctPublic.pixel__enabled ){\n\t\t\t\tctGetPixelUrl();\n\t\t\t} else {\n\t\t\t\tinitCookies.push(['apbct_pixel_url', ctPublic.pixel__url]);\n\t\t\t}\n\t\t}\n\n\t\tif ( +ctPublic.data__email_check_before_post) {\n\t\t\tinitCookies.push(['ct_checked_emails', '0']);\n\t\t\tjQuery(\"input[type = 'email'], #email\").blur(checkEmail);\n\t\t}\n\n\t\tctSetCookie(initCookies);\n\n\t\tsetTimeout(function(){\n\n\t\t\tfor(var i = 0; i < document.forms.length; i++){\n\t\t\t\tvar form = document.forms[i];\n\n\t\t\t\t//Exclusion for forms\n\t\t\t\tif (\n\t\t\t\t\tform.method.toString().toLowerCase() === 'get' ||\n\t\t\t\t\tform.classList.contains('slp_search_form') || //StoreLocatorPlus form\n\t\t\t\t\tform.parentElement.classList.contains('mec-booking') ||\n\t\t\t\t\tform.action.toString().indexOf('activehosted.com') !== -1 || // Active Campaign\n\t\t\t\t\t(form.id && form.id === 'caspioform') || //Caspio Form\n\t\t\t\t\t(form.classList && form.classList.contains('tinkoffPayRow')) || // TinkoffPayForm\n\t\t\t\t\t(form.classList && form.classList.contains('give-form')) || // GiveWP\n\t\t\t\t\t(form.id && form.id === 'ult-forgot-password-form') || //ult forgot password\n\t\t\t\t\t(form.id && form.id.toString().indexOf('calculatedfields') !== -1) || // CalculatedFieldsForm\n\t\t\t\t\t(form.id && form.id.toString().indexOf('cp_tslotsbooking_pform') !== -1) || // WP Time Slots Booking Form\n\t\t\t\t\t(form.name && form.name.toString().indexOf('cp_tslotsbooking_pform') !== -1) // WP Time Slots Booking Form\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar hiddenInput = document.createElement( 'input' );\n\t\t\t\thiddenInput.setAttribute( 'type', 'hidden' );\n\t\t\t\thiddenInput.setAttribute( 'id', 'apbct_visible_fields_' + i );\n\t\t\t\thiddenInput.setAttribute( 'name', 'apbct_visible_fields');\n\t\t\t\tvar visibleFieldsToInput = {};\n\t\t\t\tvisibleFieldsToInput[0] = apbct_collect_visible_fields(form);\n\t\t\t\thiddenInput.value = JSON.stringify(visibleFieldsToInput);\n\t\t\t\tform.append( hiddenInput );\n\n\t\t\t\tform.onsubmit_prev = form.onsubmit;\n\n\t\t\t\tform.ctFormIndex = i;\n\t\t\t\tform.onsubmit = function (event) {\n\n\t\t\t\t\tif ( ctPublic.data__cookies_type !== 'native' && typeof event.target.ctFormIndex !== 'undefined' ) {\n\n\t\t\t\t\t\tvar visible_fields = {};\n\t\t\t\t\t\tvisible_fields[0] = apbct_collect_visible_fields(this);\n\t\t\t\t\t\tapbct_visible_fields_set_cookie( visible_fields, event.target.ctFormIndex );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Call previous submit action\n\t\t\t\t\tif (event.target.onsubmit_prev instanceof Function) {\n\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\tevent.target.onsubmit_prev.call(event.target, event);\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t}, 1000);\n\t}\n\tapbct_attach_event_handler(window, \"DOMContentLoaded\", apbct_ready);\n\n}());\n\nfunction apbct_collect_visible_fields( form ) {\n\n\t// Get only fields\n\tvar inputs = [],\n\t\tinputs_visible = '',\n\t\tinputs_visible_count = 0,\n\t\tinputs_invisible = '',\n\t\tinputs_invisible_count = 0,\n\t\tinputs_with_duplicate_names = [];\n\n\tfor(var key in form.elements){\n\t\tif(!isNaN(+key))\n\t\t\tinputs[key] = form.elements[key];\n\t}\n\n\t// Filter fields\n\tinputs = inputs.filter(function(elem){\n\n\t\t// Filter already added fields\n\t\tif( inputs_with_duplicate_names.indexOf( elem.getAttribute('name') ) !== -1 ){\n\t\t\treturn false;\n\t\t}\n\t\t// Filter inputs with same names for type == radio\n\t\tif( -1 !== ['radio', 'checkbox'].indexOf( elem.getAttribute(\"type\") )){\n\t\t\tinputs_with_duplicate_names.push( elem.getAttribute('name') );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\n\t// Visible fields\n\tinputs.forEach(function(elem, i, elements){\n\t\t// Unnecessary fields\n\t\tif(\n\t\t\telem.getAttribute(\"type\") === \"submit\" || // type == submit\n\t\t\telem.getAttribute('name') === null ||\n\t\t\telem.getAttribute('name') === 'ct_checkjs'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\t// Invisible fields\n\t\tif(\n\t\t\tgetComputedStyle(elem).display === \"none\" || // hidden\n\t\t\tgetComputedStyle(elem).visibility === \"hidden\" || // hidden\n\t\t\tgetComputedStyle(elem).opacity === \"0\" || // hidden\n\t\t\telem.getAttribute(\"type\") === \"hidden\" // type == hidden\n\t\t) {\n\t\t\tif( elem.classList.contains(\"wp-editor-area\") ) {\n\t\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_visible_count++;\n\t\t\t} else {\n\t\t\t\tinputs_invisible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_invisible_count++;\n\t\t\t}\n\t\t}\n\t\t// Visible fields\n\t\telse {\n\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\tinputs_visible_count++;\n\t\t}\n\n\t});\n\n\tinputs_invisible = inputs_invisible.trim();\n\tinputs_visible = inputs_visible.trim();\n\n\treturn {\n\t\tvisible_fields : inputs_visible,\n\t\tvisible_fields_count : inputs_visible_count,\n\t\tinvisible_fields : inputs_invisible,\n\t\tinvisible_fields_count : inputs_invisible_count,\n\t}\n\n}\n\nfunction apbct_visible_fields_set_cookie( visible_fields_collection, form_id ) {\n\n\tvar collection = typeof visible_fields_collection === 'object' && visible_fields_collection !== null ? visible_fields_collection : {};\n\n\tif( ctPublic.data__cookies_type === 'native' ) {\n\t\tfor ( var i in collection ) {\n\t\t\tif ( i > 10 ) {\n\t\t\t\t// Do not generate more than 10 cookies\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar collectionIndex = form_id !== undefined ? form_id : i;\n\t\t\tctSetCookie(\"apbct_visible_fields_\" + collectionIndex, JSON.stringify( collection[i] ) );\n\t\t}\n\t} else {\n\t\tctSetCookie(\"apbct_visible_fields\", JSON.stringify( collection ) );\n\t}\n}\n\nfunction apbct_js_keys__set_input_value(result, data, params, obj){\n\tif( document.querySelectorAll('[name^=ct_checkjs]').length > 0 ) {\n\t\tvar elements = document.querySelectorAll('[name^=ct_checkjs]');\n\t\tfor ( var i = 0; i < elements.length; i++ ) {\n\t\t\telements[i].value = result.js_key;\n\t\t}\n\t}\n}\n\nfunction apbctGetScreenInfo() {\n\treturn JSON.stringify({\n\t\tfullWidth : document.documentElement.scrollWidth,\n\t\tfullHeight : Math.max(\n\t\t\tdocument.body.scrollHeight, document.documentElement.scrollHeight,\n\t\t\tdocument.body.offsetHeight, document.documentElement.offsetHeight,\n\t\t\tdocument.body.clientHeight, document.documentElement.clientHeight\n\t\t),\n\t\tvisibleWidth : document.documentElement.clientWidth,\n\t\tvisibleHeight : document.documentElement.clientHeight,\n\t});\n}\n\nif(typeof jQuery !== 'undefined') {\n\n\t// Capturing responses and output block message for unknown AJAX forms\n\tjQuery(document).ajaxComplete(function (event, xhr, settings) {\n\t\tif (xhr.responseText && xhr.responseText.indexOf('\"apbct') !== -1) {\n\t\t\tvar response = JSON.parse(xhr.responseText);\n\t\t\tif (typeof response.apbct !== 'undefined') {\n\t\t\t\tresponse = response.apbct;\n\t\t\t\tif (response.blocked) {\n\t\t\t\t\tdocument.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent( \"apbctAjaxBockAlert\", {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tdetail: { message: response.comment }\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\n\t\t\t\t\t// Show the result by modal\n\t\t\t\t\tcleantalkModal.loaded = response.comment;\n\t\t\t\t\tcleantalkModal.open();\n\n\t\t\t\t\tif(+response.stop_script == 1)\n\t\t\t\t\t\twindow.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}"],"names":["apbct_collect_visible_fields","form","inputs","inputs_visible","inputs_visible_count","inputs_invisible","inputs_invisible_count","inputs_with_duplicate_names","key","elements","isNaN","filter","elem","indexOf","getAttribute","push","forEach","i","getComputedStyle","display","visibility","opacity","classList","contains","trim","visible_fields","visible_fields_count","invisible_fields","invisible_fields_count","apbct_visible_fields_set_cookie","visible_fields_collection","form_id","collection","ctPublic","data__cookies_type","ctSetCookie","undefined","JSON","stringify","apbct_js_keys__set_input_value","result","data","params","obj","document","querySelectorAll","length","value","js_key","apbctGetScreenInfo","fullWidth","documentElement","scrollWidth","fullHeight","Math","max","body","scrollHeight","offsetHeight","clientHeight","visibleWidth","clientWidth","visibleHeight","ct_date","Date","ctTimeMs","getTime","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","ctCheckedEmails","ctScrollCollected","ctMouseMovedCollected","apbct_attach_event_handler","event","callback","window","addEventListener","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","ctFunctionFirstKey","KeyTimestamp","floor","ctMouseReadInterval","setInterval","ctMouseWriteDataInterval","ctFunctionMouseMove","round","clientY","clientX","clearInterval","checkEmail","e","current_email","target","ctPublicFunctions","data__ajax_type","apbct_public_sendREST","method","email","timestamp","now","apbct_public_sendAJAX","action","apbct_ajax","ctSetPixelImg","pixelUrl","pixel__enabled","getElementById","jQuery","append","ajaxType","initCookies","getTimezoneOffset","cookiesArray","cookie","split","cookieName","ctDeleteCookie","pixel__setting","notJson","pixel__url","data__email_check_before_post","blur","setTimeout","forms","hiddenInput","visibleFieldsToInput","toString","toLowerCase","parentElement","id","name","createElement","setAttribute","onsubmit_prev","onsubmit","ctFormIndex","this","Function","call","ajaxComplete","xhr","settings","response","responseText","parse","apbct","blocked","dispatchEvent","CustomEvent","bubbles","detail","message","comment","cleantalkModal","loaded","open","stop_script","stop"],"mappings":"AAiSA,SAASA,6BAA8BC,GAGtC,IAAIC,EAAS,GACZC,EAAiB,GACjBC,EAAuB,EACvBC,EAAmB,GACnBC,EAAyB,EACzBC,EAA8B,GAE/B,IAAI,IAAIC,KAAOP,EAAKQ,SACfC,OAAOF,KACVN,EAAOM,GAAOP,EAAKQ,SAASD,IAsD9B,OAlDAN,EAASA,EAAOS,OAAO,SAASC,GAG/B,OAA0E,IAAtEL,EAA4BM,QAASD,EAAKE,aAAa,YAItD,IAAM,CAAC,QAAS,YAAYD,QAASD,EAAKE,aAAa,WAC3DP,EAA4BQ,KAAMH,EAAKE,aAAa,UAC7C,OAMFE,QAAQ,SAASJ,EAAMK,EAAGR,GAGO,WAAtCG,EAAKE,aAAa,SACoB,OAAtCF,EAAKE,aAAa,SACoB,eAAtCF,EAAKE,aAAa,UAMoB,SAAtCI,iBAAiBN,GAAMO,SACe,WAAtCD,iBAAiBN,GAAMQ,YACe,MAAtCF,iBAAiBN,GAAMS,SACe,WAAtCT,EAAKE,aAAa,SAEdF,EAAKU,U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A0BvH,GAC1D+G,EAAYQ,aAAc,OAAQ,yBAC9BP,EAAuB,IACN,GAAKjI,6BAA6BC,GACvD+H,EAAYjF,MAAQV,KAAKC,UAAU2F,GACnChI,EAAK+G,OAAQgB,GAEb/H,EAAKwI,cAAgBxI,EAAKyI,SAE1BzI,EAAK0I,YAAc1H,EACnBhB,EAAKyI,SAAW,SAAUhE,GAEzB,IAEKjD,EAFgC,WAAhCQ,SAASC,yBAAuE,IAA7BwC,EAAMsB,OAAO2C,eAEhElH,EAAiB,IACN,GAAKzB,6BAA6B4I,MACjD/G,gCAAiCJ,EAAgBiD,EAAMsB,OAAO2C,cAI3DjE,EAAMsB,OAAOyC,yBAAyBI,UACzCf,WAAW,WACVpD,EAAMsB,OAAOyC,cAAcK,KAAKpE,EAAMsB,OAAQtB,IAC5C,SAKJ,OA3RL,GAoZqB,oBAAXqC,QAGTA,OAAOnE,UAAUmG,aAAa,SAAUrE,EAAOsE,EAAKC,GACnD,IACKC,GADDF,EAAIG,eAAwD,IAAxCH,EAAIG,aAAatI,QAAQ,gBAElB,KAD1BqI,EAAW7G,KAAK+G,MAAMJ,EAAIG,eACVE,QACnBH,EAAWA,EAASG,OACPC,UACZ1G,SAAS2G,cACR,IAAIC,YAAa,qBAAsB,CACtCC,SAAS,EACTC,OAAQ,CAAEC,QAAST,EAASU,YAK9BC,eAAeC,OAASZ,EAASU,QACjCC,eAAeE,OAEa,IAAxBb,EAASc,aACZpF,OAAOqF"}
|
lib/Cleantalk/ApbctWP/FindSpam/Checker.php
CHANGED
@@ -98,9 +98,16 @@ abstract class Checker
|
|
98 |
$dates_allowed = 'checked';
|
99 |
$dates_disabled = '';
|
100 |
}
|
101 |
-
$dates_from = Cookie::get('ct_' . $this->page_slug . '_dates_from');
|
102 |
-
$dates_till = Cookie::get('ct_' . $this->page_slug . '_dates_till');
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
?>
|
105 |
|
106 |
<!-- Count -->
|
98 |
$dates_allowed = 'checked';
|
99 |
$dates_disabled = '';
|
100 |
}
|
|
|
|
|
101 |
|
102 |
+
$dates_from = $dates_till = '';
|
103 |
+
|
104 |
+
if (
|
105 |
+
preg_match('/[a-zA-Z]{3}\s{1}\d{1,2}\s{1}\d{4}/', Cookie::get('ct_' . $this->page_slug . '_dates_from')) &&
|
106 |
+
preg_match('/[a-zA-Z]{3}\s{1}\d{1,2}\s{1}\d{4}/', Cookie::get('ct_' . $this->page_slug . '_dates_till'))
|
107 |
+
) {
|
108 |
+
$dates_from = Cookie::get('ct_' . $this->page_slug . '_dates_from');
|
109 |
+
$dates_till = Cookie::get('ct_' . $this->page_slug . '_dates_till');
|
110 |
+
}
|
111 |
?>
|
112 |
|
113 |
<!-- Count -->
|
lib/Cleantalk/ApbctWP/FindSpam/CommentsChecker.php
CHANGED
@@ -17,6 +17,15 @@ class CommentsChecker extends Checker
|
|
17 |
// Preparing data
|
18 |
if ( ! empty($_COOKIE['ct_paused_comments_check']) ) {
|
19 |
$prev_check = json_decode(stripslashes($_COOKIE['ct_paused_comments_check']), true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
|
22 |
wp_enqueue_script(
|
@@ -28,8 +37,8 @@ class CommentsChecker extends Checker
|
|
28 |
wp_localize_script('ct_comments_checkspam', 'ctCommentsCheck', array(
|
29 |
'ct_ajax_nonce' => wp_create_nonce('ct_secret_nonce'),
|
30 |
'ct_prev_accurate' => ! empty($prev_check['accurate']) ? true : false,
|
31 |
-
'ct_prev_from' => ! empty($
|
32 |
-
'ct_prev_till' => ! empty($
|
33 |
'ct_timeout_confirm' => __(
|
34 |
'Failed from timeout. Going to check comments again.',
|
35 |
'cleantalk-spam-protect'
|
17 |
// Preparing data
|
18 |
if ( ! empty($_COOKIE['ct_paused_comments_check']) ) {
|
19 |
$prev_check = json_decode(stripslashes($_COOKIE['ct_paused_comments_check']), true);
|
20 |
+
$prev_check_from = $prev_check_till = '';
|
21 |
+
if (
|
22 |
+
! empty($prev_check['from']) && ! empty($prev_check['till']) &&
|
23 |
+
preg_match('/[a-zA-Z]{3}\s{1}\d{1,2}\s{1}\d{4}/', $prev_check['from']) &&
|
24 |
+
preg_match('/[a-zA-Z]{3}\s{1}\d{1,2}\s{1}\d{4}/', $prev_check['till'])
|
25 |
+
) {
|
26 |
+
$prev_check_from = $prev_check['from'];
|
27 |
+
$prev_check_till = $prev_check['till'];
|
28 |
+
}
|
29 |
}
|
30 |
|
31 |
wp_enqueue_script(
|
37 |
wp_localize_script('ct_comments_checkspam', 'ctCommentsCheck', array(
|
38 |
'ct_ajax_nonce' => wp_create_nonce('ct_secret_nonce'),
|
39 |
'ct_prev_accurate' => ! empty($prev_check['accurate']) ? true : false,
|
40 |
+
'ct_prev_from' => ! empty($prev_check_from) ? $prev_check_from : false,
|
41 |
+
'ct_prev_till' => ! empty($prev_check_till) ? $prev_check_till : false,
|
42 |
'ct_timeout_confirm' => __(
|
43 |
'Failed from timeout. Going to check comments again.',
|
44 |
'cleantalk-spam-protect'
|
lib/Cleantalk/ApbctWP/FindSpam/UsersChecker.php
CHANGED
@@ -16,6 +16,15 @@ class UsersChecker extends Checker
|
|
16 |
$current_user = wp_get_current_user();
|
17 |
if ( ! empty($_COOKIE['ct_paused_users_check']) ) {
|
18 |
$prev_check = json_decode(stripslashes($_COOKIE['ct_paused_users_check']), true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
wp_enqueue_script(
|
@@ -27,8 +36,8 @@ class UsersChecker extends Checker
|
|
27 |
wp_localize_script('ct_users_checkspam', 'ctUsersCheck', array(
|
28 |
'ct_ajax_nonce' => wp_create_nonce('ct_secret_nonce'),
|
29 |
'ct_prev_accurate' => ! empty($prev_check['accurate']) ? true : false,
|
30 |
-
'ct_prev_from' => ! empty($
|
31 |
-
'ct_prev_till' => ! empty($
|
32 |
'ct_timeout' => __(
|
33 |
'Failed from timeout. Going to check users again.',
|
34 |
'cleantalk-spam-protect'
|
16 |
$current_user = wp_get_current_user();
|
17 |
if ( ! empty($_COOKIE['ct_paused_users_check']) ) {
|
18 |
$prev_check = json_decode(stripslashes($_COOKIE['ct_paused_users_check']), true);
|
19 |
+
$prev_check_from = $prev_check_till = '';
|
20 |
+
if (
|
21 |
+
! empty($prev_check['from']) && ! empty($prev_check['till']) &&
|
22 |
+
preg_match('/[a-zA-Z]{3}\s{1}\d{1,2}\s{1}\d{4}/', $prev_check['from']) &&
|
23 |
+
preg_match('/[a-zA-Z]{3}\s{1}\d{1,2}\s{1}\d{4}/', $prev_check['till'])
|
24 |
+
) {
|
25 |
+
$prev_check_from = $prev_check['from'];
|
26 |
+
$prev_check_till = $prev_check['till'];
|
27 |
+
}
|
28 |
}
|
29 |
|
30 |
wp_enqueue_script(
|
36 |
wp_localize_script('ct_users_checkspam', 'ctUsersCheck', array(
|
37 |
'ct_ajax_nonce' => wp_create_nonce('ct_secret_nonce'),
|
38 |
'ct_prev_accurate' => ! empty($prev_check['accurate']) ? true : false,
|
39 |
+
'ct_prev_from' => ! empty($prev_check_from) ? $prev_check_from : false,
|
40 |
+
'ct_prev_till' => ! empty($prev_check_till) ? $prev_check_till : false,
|
41 |
'ct_timeout' => __(
|
42 |
'Failed from timeout. Going to check users again.',
|
43 |
'cleantalk-spam-protect'
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: spam, antispam, anti-spam, comments, firewall
|
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.9
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 5.171
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
@@ -594,6 +594,14 @@ If your website has forms that send data to external sources, you can enable opt
|
|
594 |
|
595 |
== Changelog ==
|
596 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
597 |
= 5.171 Feb 03 2022 =
|
598 |
#### Visible fields processing modified, many excepted requests are skipped, SFW compatibility with a cache fixed and minor issues fixed.
|
599 |
* New. Exclusions. Excluded some service requests from checking but log them with exception flag.
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.9
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 5.171.1
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
594 |
|
595 |
== Changelog ==
|
596 |
|
597 |
+
= 5.171.1 Feb 09 2022 =
|
598 |
+
#### XML-RPC requests excluded and minor issues fixed.
|
599 |
+
* Fix: Excluded standard WordPress search form from apbct-public.min.js
|
600 |
+
* Fix. Common. ct_contact_form_validate moved to the init hook.
|
601 |
+
* Fix. Exclusions. XML-RPC request removed from the filtering.
|
602 |
+
* Fix. Comments/users checker. Values for dates range validating.
|
603 |
+
* Fix. Comments/users checker. Values of dates range for resuming scanner validating.
|
604 |
+
|
605 |
= 5.171 Feb 03 2022 =
|
606 |
#### Visible fields processing modified, many excepted requests are skipped, SFW compatibility with a cache fixed and minor issues fixed.
|
607 |
* New. Exclusions. Excluded some service requests from checking but log them with exception flag.
|