Skip to content

Commit 9f73ac8

Browse files
committed
Merge fix
2 parents 6f86905 + a77c69c commit 9f73ac8

75 files changed

Lines changed: 3653 additions & 416 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

changelog.txt

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,158 @@
11
== Changelog ==
22

3+
4+
= 6.78 29.04.2026 =
5+
* Removing the link to install "Gravity Forms to doBoard" (#784)
6+
* Mod. BloomForms. Editing the integration with BloomForms
7+
* Update inc/cleantalk-settings.php
8+
* Upd. Integrations. Improve Divi newsletters flow to attach meta data to request.
9+
* Add "Read more" link to cleantalk page (#782)
10+
* New. BaseCall. Default params class.
11+
* Fix. REST API. Updated 'email' argument type from 'email' to 'string' in callbacks.
12+
* Fix. GFA. Replaced email regex with isEmailLike method and added unit tests for validation.
13+
* Upd. Integrations. Improve Divi newsletters flow to attach meta data to request. (#786)
14+
* Ref. AntiCrawler. Module flow refactored. (#788)
15+
16+
= 6.77 16.04.2026 =
17+
* Fix. AltSession. Correcting the issue of array conversion
18+
* New. BookingCalendar. New integration with BookingCalendar
19+
* Upd. Settings. Updated flow to check pingback. (#764) (#773) (#774)
20+
* Fix. CF7. Edit honeypot
21+
* Fix. Integration. EDD integration fixed. (#770)
22+
* Fix. Code. Editing the bot detector settings
23+
* Fix. Exclusion. Skip request from Metorik Helper
24+
* Fix. Common. Add bot detector state to ct_options. (#778)
25+
* Fix. WPMS. Errors output for WPMS mutual-mutual mode fixed. (#772)
26+
* Fix. WPMS. Settings for `mutual/mutual` fixed.
27+
* Fix. WPMS. Settings page error fixed.
28+
29+
= 6.76 02.04.2026 =
30+
* Mod. ForceAltCookies. Removed the use of force alt cookies for integration with piotnet-addons-for-elementor
31+
* Upd. Integrations. Improve FluentBooking flow to attach meta data to request.
32+
* Upd. Settings. Updated flow to check pingback.
33+
* Upd. Settings. Bot Detector setting - bot-detector setting removed.
34+
* Fix. Code. Unit tests fixed: TestFluentForms, TestNinjaForms.
35+
* Fix. JS. Gathering. Passing js_on independent of gathering loaded.
36+
* Fix. Integrations. QuForm. Fixed js_on param gathering.
37+
38+
= 6.75 19.03.2026 =
39+
* Upd. JS. catchJqueryAjax. Refactored to also use ajaxPrefilter. Bloomform now skip using force alt-sessions.
40+
* Upd. ContactEncoder. Improve aria labels protect.
41+
* Upd. Integration. HivePress forms protection improved.
42+
* Upd. Settings. SFW outdated message refactored.
43+
* Upd. Settings. Error. Fixed case when SFW outdated error is not removable.
44+
* Upd. TRP. TRP popup text and styles updated.
45+
* Fix. Integrations. Improve statement to protect memberpress.
46+
* Fix. Integrations. Improved membershippro processing statement.
47+
* Fix. Integration. Gravity forms integration fixed.
48+
* Add. Integrations. Added Elfsight compability.
49+
* Fix. RemoteCalls. Changes to the RC functionality
50+
* Upd. Settings. Improved copability.
51+
* Fix. Contacts Encoder. Shortcode for exclude encoding.
52+
* Upd. BotDetector. Update load strategy.
53+
* Upd. BotDetector. Update load strategy for fluent booking and fluent form.
54+
55+
= 6.74 05.03.2026 =
56+
* Mod. SFW. Atomic approach to updating SFW
57+
* Upd. Exclusions. Ajax. Plugin "cart-recovery".
58+
* Fix. Code. JS loading by defer fixed.
59+
* Mod. OtterForms. Changing integration from a hook to a route
60+
* Mod. OtterForms. Changing the integration, renaming the request interception method
61+
* Upd. Connection reports. Email subject updated.
62+
* Fix. JS. catchFetchRequest. Origin fetch definitions.
63+
* Upd. Exclusions. Ajax. Plugin "invoicing".
64+
* Upd. Gravity Forms. Skipped request extended log.
65+
* Fix. Translate. Fixed msgids.
66+
* Upd. Connection reports. Email title edited.
67+
* Upd. Connection reports. Service id added.
68+
* Fix. SubmitTime. Calculation of the submit time when enabling the gathering script
69+
* Upd. SFW updates sentinel. Updated report.
70+
* Upd. Settings. Updated RC to init settings update.
71+
* Fix. SubmitTime. Editing the creation of a timestamp
72+
73+
= 6.73.1 19.02.2026 =
74+
* Fix. Code. JS loading by `defer` fixed.
75+
76+
= 6.73 19.02.2026 =
77+
* Upd. Code. SFW Update. HTTP multi request refactored.
78+
* New. ShadowrootProtection. Implementation of form protection in Shadowroot elements, integration with Mailchimp shadowroot
79+
* Mod. ShadowrootPrt. Architectural changes in logic, the addition of situational callbacks
80+
* Fix. CurlMulti. Editing implementation comments
81+
* Fix. Integration. Ninja forms. Filter NF common fields before processing.
82+
* Fix. Exclusions. "woocommerce-abandoned-cart"
83+
* Fix. Exclusions. "woo-abandoned-cart-recovery"
84+
* Fix. Exclusions. "abandoned-cart-capture"
85+
* Fix. Code. Returned the lost code during the merge
86+
* Fix. FluentForm. Vendor integration compliance fixed.
87+
* Upd. Integrations. Elementor UltimateAddons Register integration handler to use ajax middleware.
88+
* Fix. IntegMailChimp. Clearing all fields except for the field whose name contains message
89+
* Fix. Code. Edit Remote Calls
90+
* Fix. AdminActions. Checking permissions for Actions
91+
* Upd. Exclusions. Ajax. Plugin "wp-multi-step-checkout".
92+
* Fix. Exclusions. Ajax. Plugin "woo-abandoned-cart-recovery". Fixed condition.
93+
* Code. Unit tests for apbct_is_skip_request() refactored.
94+
* Fix. Code. Escaping woocommerce order data
95+
* Upd. Exclusions. Ajax. Plugin "woocommerce-sendinblue-newsletter-subscription"
96+
* Fix. Remote Calls. Skip check if no sign of RC action provided in Request.
97+
* Fix. Exclusion. Added path invoice4u/v1/callback.
98+
* Fix. Contact Encoder. Every hook that has actions BEFORE modify now have actions AFTER.
99+
* Fix. Enqueue. Script individual-disable-comments.js renamed to cleantalk-individual-disable-comments.js
100+
* Upd. CommentsCheck. Improve statement.
101+
* Upd. JS parameters. Gathering dynamic lod implemented.
102+
* Fix. Connection reports. Email for reports fixed.
103+
* Fix. Integration. SmartQuizBuilder integration fixed.
104+
* Fix. ContentEncoder. Editing the data type in the 3rd str_replace argument
105+
106+
= 6.72 05.02.2026 =
107+
* Upd. WooCommSpamOrders. Added a hint for the disabled option to save spam orders.
108+
* Fix. Integrations. Fluent Forms. Visible fields collection fixed.
109+
* Fix. Integrations. Skip encoding for woo registration button. (#722)
110+
* Upd. Integration. Mailpoet. Visible fields gathering.
111+
* Upd. Visible fields extractor. Static method to get a new extractor.
112+
* Fix. Integration. Exclusions for WC requests fixed.
113+
* Fix. Integrations. GiveWP multi-page form. Exclude requests without email.
114+
* Fix. Integrations. GiveWP. Skip external forms check.
115+
* Fix. Integrations. GiveWP. Bot detector token. Intercept iframe fetch to add field if available.
116+
* Fix. Integrations. Fixed fetch request fields assignment (NoCookie|EventToken)
117+
* Fix. Woocommerce. Stored oreders. Fixed code error.
118+
* Mod. ContentEncoder. The ability to exclude the main page by hook
119+
* Fix. Code. Getting cleantalk addresses fixed.
120+
* Fix. Integrations. Add event token in jQuery catching for forms of "wpr_form_builder_email" action.
121+
* Upd. Footer. Footer promo link added. (#729)
122+
* Fix. Integrations. WooCommerce. Stripe express checkout address normalize excluded.
123+
* Fix. Integrations. Paid Membership Pro. Login form excluded.
124+
* Upd. Updater. Add index update mechanism. (#721)
125+
* Fix. Skip Elementor login widget request for WooCommerce checkout.
126+
* Fix. Integration. Mailpoet integration fixed.
127+
128+
= 6.71.1 26.01.2026 =
129+
* Fix. Promotion. GF2DB promo setting and message reverted.
130+
131+
= 6.71 22.01.2026 =
132+
* Fix. Integration. Woocommerce (checkout by REST) integration fixed.
133+
* Fix. Integration. Fluent forms integration fixed
134+
* Fix. Integration. Klaviyo (external forms) integration fixed.
135+
* Upd. PHPUnit. testIsAllowMessage/User refactored
136+
* Fix. Settings. Description for Send connection reports fixed.
137+
* Fix. Contacts Encoder. Exclusions fixed.
138+
* Fix. Contacts Encoder. Regex pattern for emails fixed.
139+
* Upd. Links. UTM preset for bbPress spam scanner added.
140+
* Fix. Fetch request catching. Fixed case with empty GET requests from pojo-accessebility plugin.
141+
* Fix. SFW pages. Fixed bundle name with resolver.
142+
* Fix. Common. Helper. PHP 8.4. Function str_getcsv() escape argument added
143+
* Fix. Workflow. Make the zip with subfolder instead of zip-root.
144+
* Fix. Exclusions by URL. Fixed validation and URL gain for ajax requests.
145+
* Upd. Requirements Checker. Modified curl_multi_exec to curl_multi array of functions.
146+
* Upd. SFW update. Do not start update if curl multi funcs are not available.
147+
* Fix. Integrations. Excluded recaptcha from cloning and ensured it is reinserted into the origin form during processing.
148+
* Fix. Integrations. Update condition to skip check of account update for logged in users.
149+
* New. Promotions. GF2DB.
150+
* New. Settings. Added RC to init settings update.
151+
* New. Integration. Bit Form integration implemented.
152+
* Upd. Code. PHP compatibility increased to 7.2.
153+
* New. Settings. Added project management menu item.
154+
* Fix. SFW. User agents priority fixed. (#874)
155+
3156
= 6.70.1 19.12.2025 =
4157
* Fix. Integration. Fluent forms integration fixed (fix for commit ae74511a96417b607f2b79b83ef984de7eac0588).
5158

cleantalk.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin Name: Anti-Spam by CleanTalk
55
Plugin URI: https://cleantalk.org
66
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: 6.86.99-fix
7+
Version: 6.87.99-fix
88
Author: CleanTalk - Anti-Spam Protection <welcome@cleantalk.org>
99
Author URI: https://cleantalk.org
1010
Text Domain: cleantalk-spam-protect
@@ -347,6 +347,7 @@ function apbct_register_my_rest_routes()
347347
&& empty(Post::get('action')) //bbPress
348348
&& ! \Cleantalk\Variables\Server::inUri('/favicon.ico') // /favicon request rewritten cookies fix
349349
&& ! apbct__is_wp_rocket_preloader_request()
350+
&& ! apbct__is_wordpress_loopback_request()
350351
) {
351352
if ( $apbct->data['cookies_type'] !== 'alternative' ) {
352353
if ( !$apbct->settings['forms__search_test'] && !Get::get('s') ) { //skip cookie set for search form redirect page
@@ -614,11 +615,11 @@ function apbct_write_js_errors($data)
614615

615616

616617
add_action('mec_booking_end_form_step_2', function () {
617-
echo "<script>
618-
if (typeof ctPublic.force_alt_cookies == 'undefined' || (ctPublic.force_alt_cookies !== 'undefined' && !ctPublic.force_alt_cookies)) {
618+
echo apbct_get_inline_script_tag(
619+
"if (typeof ctPublic.force_alt_cookies == 'undefined' || (ctPublic.force_alt_cookies !== 'undefined' && !ctPublic.force_alt_cookies)) {
619620
ctNoCookieAttachHiddenFieldsToForms();
620-
}
621-
</script>";
621+
}"
622+
);
622623
});
623624

624625
// Public actions

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"wp-cli/wp-cli-bundle": "*",
1919
"mockery/mockery": "*",
2020
"cleantalk/apbct-installer": "*",
21-
"cleantalk/contacts-encoder": "2.0.18",
21+
"cleantalk/contacts-encoder": "2.0.18.7",
2222
"cleantalk/rate-limiter": "*"
2323
},
2424
"scripts": {

i18n/cleantalk-spam-protect.pot

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,6 +1539,12 @@ msgstr ""
15391539
msgid "Protect logged in Users"
15401540
msgstr ""
15411541

1542+
#. %s: HTML link to CleanTalk Anti-Spam
1543+
#: inc/cleantalk-public.php:1337
1544+
#, php-format
1545+
msgid "Protected by %s"
1546+
msgstr ""
1547+
15421548
#: inc/cleantalk-settings.php:1817
15431549
msgid "Protection is active"
15441550
msgstr ""

inc/cleantalk-ajax.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,6 @@ function ct_ajax_hook($message_obj = null)
894894
'message' => $ct_result->comment
895895
)
896896
);
897-
die();
898897
}
899898

900899
// Plugin Name: eForm - WordPress Form Builder; ajax action ipt_fsqm_save_form

inc/cleantalk-common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,7 @@ function apbct_validate_api_response__service_template_get($template_id, $templa
16301630
$services_templates_get_error = 'Parse services_templates_get API error: template_id is empty';
16311631
break;
16321632
}
1633-
if ( $template['template_id'] === (int)$template_id ) {
1633+
if ( (int)$template['template_id'] === (int)$template_id ) {
16341634
if ( empty($template['options_site']) ) {
16351635
$services_templates_get_error = 'Parse services_templates_get API error: options_site is empty';
16361636
break;

inc/cleantalk-pluggable.php

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2235,6 +2235,58 @@ function apbct__is_wp_rocket_preloader_request()
22352235
);
22362236
}
22372237

2238+
/**
2239+
* True for WordPress HTTP API loopback requests (Site Health, updates, cron).
2240+
* Default WP user-agent: "WordPress/{version}; {siteurl}"
2241+
*
2242+
* Requires both the WordPress UA prefix and that the URL in the UA belongs
2243+
* to this site. UA-only matching would skip Anti-Crawler for any spoofed
2244+
* WordPress client, including requests from other sites.
2245+
*
2246+
* Do not require REMOTE_ADDR === SERVER_ADDR: php-fpm loopbacks often arrive
2247+
* from the public origin IP while SERVER_ADDR is 127.0.0.1.
2248+
*
2249+
* @return bool
2250+
*/
2251+
function apbct__is_wordpress_loopback_request()
2252+
{
2253+
if ( ! isset($_SERVER['HTTP_USER_AGENT']) ) {
2254+
return false;
2255+
}
2256+
2257+
if ( preg_match('#^WordPress/\d[\d.]*;\s+(\S+)#', $_SERVER['HTTP_USER_AGENT'], $matches) !== 1 ) {
2258+
return false;
2259+
}
2260+
2261+
$ua_url = isset($matches[1]) ? $matches[1] : '';
2262+
if ( $ua_url === '' ) {
2263+
return false;
2264+
}
2265+
2266+
$ua_host = wp_parse_url($ua_url, PHP_URL_HOST);
2267+
if ( ! is_string($ua_host) || $ua_host === '' ) {
2268+
return false;
2269+
}
2270+
$ua_host = strtolower($ua_host);
2271+
2272+
$site_hosts = array();
2273+
foreach ( array(home_url(), site_url()) as $url ) {
2274+
$host = wp_parse_url($url, PHP_URL_HOST);
2275+
if ( is_string($host) && $host !== '' ) {
2276+
$site_hosts[] = strtolower($host);
2277+
}
2278+
}
2279+
2280+
if ( isset($_SERVER['HTTP_HOST']) ) {
2281+
$host_header = preg_replace('/:\d+$/', '', $_SERVER['HTTP_HOST']);
2282+
if ( is_string($host_header) && $host_header !== '' ) {
2283+
$site_hosts[] = strtolower($host_header);
2284+
}
2285+
}
2286+
2287+
return in_array($ua_host, $site_hosts, true);
2288+
}
2289+
22382290
/**
22392291
* Generates MD5 hash for email encoder pass key
22402292
*
@@ -2246,3 +2298,67 @@ function apbct_get_email_encoder_pass_key()
22462298

22472299
return md5(Helper::ipGet() . $apbct->api_key . 'email_encoder');
22482300
}
2301+
2302+
/**
2303+
* Returns CSP nonce for CleanTalk inline scripts.
2304+
*
2305+
* @return string
2306+
*/
2307+
function apbct_get_csp_nonce()
2308+
{
2309+
/**
2310+
* Filter CSP nonce for CleanTalk inline scripts.
2311+
*
2312+
* @param string $nonce CSP nonce value for script tags.
2313+
*/
2314+
return (string) apply_filters('apbct_csp_nonce', '');
2315+
}
2316+
2317+
/**
2318+
* Returns inline script tag with optional CSP nonce.
2319+
*
2320+
* @param string $javascript JavaScript code.
2321+
* @param array<string, string|bool> $attributes Script tag attributes.
2322+
*
2323+
* @return string
2324+
*/
2325+
function apbct_get_inline_script_tag($javascript, $attributes = array())
2326+
{
2327+
$nonce = apbct_get_csp_nonce();
2328+
if ( $nonce !== '' ) {
2329+
$attributes['nonce'] = $nonce;
2330+
}
2331+
2332+
if ( function_exists('wp_get_inline_script_tag') ) {
2333+
return wp_get_inline_script_tag($javascript, $attributes);
2334+
}
2335+
2336+
$attr_string = '';
2337+
foreach ( $attributes as $name => $value ) {
2338+
if ( $value === true ) {
2339+
$attr_string .= ' ' . esc_attr($name);
2340+
} elseif ( $value !== false && $value !== null && $value !== '' ) {
2341+
$attr_string .= ' ' . esc_attr($name) . '="' . esc_attr((string) $value) . '"';
2342+
}
2343+
}
2344+
2345+
$javascript = preg_replace('#</script#i', '<\/script', $javascript);
2346+
2347+
return '<script' . $attr_string . '>' . $javascript . '</script>';
2348+
}
2349+
2350+
/**
2351+
* Returns allowed HTML tags for inline CleanTalk scripts passed through kses.
2352+
*
2353+
* @return array<string, array<string, bool>>
2354+
*/
2355+
function apbct_get_inline_script_kses()
2356+
{
2357+
return array(
2358+
'script' => array(
2359+
'type' => true,
2360+
'data-cookieconsent' => true,
2361+
'nonce' => true,
2362+
),
2363+
);
2364+
}

inc/cleantalk-public-integrations.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2448,9 +2448,6 @@ function apbct_form__the7_contact_form()
24482448
);
24492449

24502450
wp_send_json($response);
2451-
2452-
// IMPORTANT: don't forget to "exit" @todo AG: Why? Exit does not terminate connection, but I can't see how it is applicable
2453-
exit;
24542451
}
24552452
}
24562453
}

0 commit comments

Comments
 (0)