Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.143.1

Version Description

Aug 06 2020 = * Fix: Recursion fixed. * Fix: Rebuild url for SFW updating process.

Download this release

Release Info

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

Code changes from version 5.143 to 5.143.1

changelog.txt CHANGED
@@ -1,2802 +1,2802 @@
1
- == Changelog ==
2
-
3
- = 5.132.3 December 19 2019 =
4
- * Fix: The disable comments functionality.
5
-
6
- = 5.132.2 December 17 2019 =
7
- * Fix: The disable comments functionality.
8
-
9
- = 5.132.1 December 17 2019 =
10
- * Fix: Fatal PHP error.
11
-
12
- = 5.132 December 17 2019 =
13
- * Fix: PHP 7.4 compability
14
- * New: Settings and description for "disable comments" functionality.
15
- * Mod: WooCommerce settings moved to separate block.
16
- * Minor fixes.
17
- * Spam protection improved.
18
-
19
- = 5.131 December 6 2019 =
20
- * Fix: WooCommerce registration.
21
- * Fix: Auto update on Wordperss Multisite.
22
- * Fix: URLs exceptions validation.
23
- * New: Secuirty improved.
24
- * Spam protection is improved.
25
- * Minor fixes ond improvments.
26
-
27
- = 5.130.1 November 20 2019 =
28
- * Fix: Plugin autoupdate issues.
29
- * FIx: Woocommerce checking.
30
- * Fix: Correct IP detection.
31
- * Fix: CSV export not working after update.
32
- * Fix: QuickForms duplicates issues.
33
-
34
- = 5.130 November 14 2019 =
35
- * Fix: JetPack contact form JS check.
36
- * FIx: Iphorm AJAX form.
37
- * Fix: Paid Memberships Pro fix.
38
- * Fix: Divi theme contact form fix.
39
- * Integration: Paid Memberships Pro.
40
- * Integration: Elementor Pro page builder forms.
41
- * Improved: Compatibility with different server.
42
-
43
- = 5.129.1 November 5 2019 =
44
- * Fix: WooCommerce order detecting.
45
-
46
- = 5.129 October 30 2019 =
47
- * Upd: Localize updated.
48
- * Fix: Direct $_SERVER access replaced.
49
- * Integration: The 7 theme contact form.
50
- * Fix: Minor improvements and bug fixes.
51
- * Mod: Putting site in maintenance mode during plugin update.
52
-
53
- = 5.128.1 October 23 2019 =
54
- * Fix: Fatal error when using buffer output.
55
- * Fix: Translate domain for errors.
56
- * Code: Fix spelling in function name.
57
- * Fix: JS disabled error.
58
- * Upd: Comment edit screen updated.
59
- * Fix: Cleantalk\Arr::search() fixed.
60
-
61
- = 5.128 October 17 2019 =
62
- * Mod: Users check - functionality updated.
63
- * Fix: Users check - dates format updated.
64
- * Mod: Comments check - functionality updated.
65
- * Fix: Comments check - dates format updated.
66
- * Fix: Fields exclusion fixed.
67
- * Fix: Notice fixed.
68
- * Fix: Cleantalk/Antispam/API.
69
- * Fix: Minor improvements and bug fixes.
70
-
71
- = 5.127.4 October 13 2019 =
72
- * Mod: Automatically decrease amount of checked users by one request if an error occurs.
73
- * Fix: Security issue.
74
- * Fix: Static JS key.
75
-
76
- = 5.127.3 October 8 2019 =
77
- * Fix: Errors during registration.
78
-
79
- = 5.127.2 October 8 2019 =
80
- * Integration: SeedProd Coming Soon Page Pro.
81
- * Fix: WooCommerce double reuqests.
82
- * Fix: Static JS key.
83
-
84
- = 5.127.1 October 7 2019 =
85
- * Fix: WPMS settings logic.
86
- * Using default database storage engine for tables.
87
-
88
- = 5.127 September 30 2019 =
89
- * Fix: Delete redirect notice on external forms
90
- * Fix: Storing spam for 15 days.
91
- * Fix: correct DiVi display message.
92
- * Integration: Ultimate Members.
93
- * Mod: Setting "Use static JS key" switched to "Auto" if it was "No". Default is "Auto".
94
- * Mod: Moving White Label option to main site settings.
95
- * New: Use static JS key if cache plugin detected.
96
- * New: Settings for URLs, fields, roles exclusions.
97
- * New: Regular Expressions support in URLs, fields exclusions.
98
- * New: Send validation errors on standard registration form.
99
- * Updater: Move exclusions from global variable to settings.
100
- * Deprecated: IP exclusions.
101
-
102
- = 5.126 September 9 2019 =
103
- * Spam protection improved!
104
- * Integration: Option wheel.
105
- * Mod: Improved Email detection.
106
- * Mod: Improved IP detection.
107
- * Fix: Too large database table with alternative sessions.
108
- * Fix: Exception for WooCommerce AJAX.
109
- * Fix: API key validation.
110
- * Minor fixes.
111
-
112
- = 5.125 August 26 2019 =
113
- * Fix: PHP Notices.
114
- * Fix: Auto update.
115
- * Fix: Displaying protection status for IP license.
116
- * Fix: prevent capturing buffer for XMLRPC requests (check_external functionality).
117
- * Fix: API key validating.
118
- * New: Complete deactivation setting.
119
-
120
- = 5.124.1 August 8 2019 =
121
- * Fix: Error on PHP 5.3.
122
-
123
- = 5.124 August 8 2019 =
124
- * Spam protection improved.
125
- * Fix: SpamFireWall local database counter on Multisite.
126
- * Fix: Caldera Forms integration.
127
- * Fix: Settings "Use AJAX for JS check" description.
128
- * Fix: Formidable integration.
129
- * New: External forms check now independed from JavaScript.
130
- * New: Setting Protect external - capture buffer.
131
- * New: QuForm integration.
132
-
133
- = 5.123 July 25 2019 =
134
- * Fix: Plenty of minor fixes.
135
- * Fix: wpDiscuz integration.
136
- * Fix: Integration with bbPress.
137
- * Fix: New comment email notification.
138
- * New: Follow-Up Emails integration.
139
- * Fix: Woocommerce integration.
140
- * Fix: Spelling.
141
-
142
- = 5.122 July 10 2019 =
143
- * Spam Protection improved.
144
- * Fix: Error while checking account status.
145
- * Fix: Conflict with Elementor Pro.
146
- * Fix: Integration with Ninja Forms.
147
- * Fix: Integration with Formidable.
148
- * New: Detecting mobile devices.
149
- * New: Integration for Easy Forms for Mailchimp.
150
-
151
- = 5.121 June 26 2019 =
152
- * Fix: Translation typos.
153
- * Fix: Woocommerce integration.
154
- * Fix: Catching admin in AJAX queries.
155
- * Mod: Session table (cleantalk_sessions) issue.
156
- * Mod: Spam protection improved.
157
- * Integration: Wilcity theme custom registration validation enabled
158
- * New: Option "Use static JS key".
159
-
160
- = 5.120.2 June 17 2019 =
161
- * Fix: WPForms integration.
162
- * Fix: Translation and spelling.
163
- * Fix: Minor PHP error
164
-
165
- = 5.120.1 June 6 2019 =
166
- * Mod: Description for Search form protection.
167
- * Fix: CSS and JS attachment.
168
- * Fix: Undefined index error.
169
-
170
- = 5.120 June 5 2019 =
171
- * Fix: bbPress false positives.
172
- * Fix: SpamFireWall check condition.
173
- * Fix: SpamFireWall block page.
174
- * Fix: Catch admin action via search form test.
175
- * Fix: Catch admin action (AJAX).
176
- * Mod: Using minified version of JS and CSS.
177
- * Mod: Date format in statistics.
178
-
179
- = 5.119.1 May 30 2019 =
180
- * Fix: Helper class error.
181
-
182
- = 5.119 May 30 2019 =
183
- * Fix: No more second request after registration.
184
- * Fix: Activation hook.
185
- * Fix: Alternative sessions. Clear table.
186
- * Fix: Stop capchuring AJAX requests in admin area.
187
- * Fix: Spelling.
188
- * Fix: Registration cookies set.
189
- * Mod: SFW exdtended die page when testing.
190
- * Mod: User-agent modified.
191
- * New: Test search queries for spam.
192
- * New: Gathering and output statistics.
193
-
194
- = 5.118.4 May 13 2019 =
195
- * Fix: SFW cookie. Set correct domain for subdomains.
196
- * Fix: SFW update.
197
- * Fix: IP detection.
198
- * Fix: Triggering AJAX check in backend.
199
- * Fix: Zero submit time on few forms.
200
-
201
- = 5.118.3 April 29 2019 =
202
- * Fix: Spam statistics in dashboard widget.
203
- * Fix: IP detection.
204
- * Fix: Double check AJAX integrated forms like Ninja Forms.
205
- * Fix: Use url exclusions for AJAX forms.
206
-
207
- = 5.118.2 April 25 2019 =
208
- * Mod: Spam filtration quality improved.
209
- * Mod: Store SFW cookie for 30 days.
210
- * Mod: Server IP added to connection report.
211
- * Fix: spam_stat is not defined.
212
-
213
- = 5.118.1 April 19 2019 =
214
- * Fix: Fatal error.
215
- * Mod: Spam protection improved on registrations.
216
-
217
- = 5.118 April 19 2019 =
218
- * Fix: Cookies on registration page.
219
- * Fix: Update fix.
220
- * Fix: Wordpress built-in API.
221
- * Fix: WooCommerce checkout form.
222
- * Fix: UpdraftPlus. Saving settings.
223
- * Fix: Convert Pro saving settings.
224
- * Fix: UTF-8 Converting.
225
- * Fix: GDPR notice.
226
- * Fix: cleantalk_sessions table size reduced.
227
- * Mod: Localization.
228
- * Mod: Performance improved.
229
- * Mod: SpamFierWall improvments.
230
- * Mod: IP detection improved.
231
- * Mod: JavaScript check rewised.
232
- * New: Setting "Use alternative mechanism for cookies".
233
-
234
- = 5.117.1 April 5 2019 =
235
- * Fix: GDPR notice.
236
- * Fix: noCacheJS localization.
237
- * Fix: Fatal error when updating.
238
-
239
- = 5.117 March 27 2019 =
240
- * New: Update logic runs on all pages.
241
- * New: Integration for Ajax Contact Forms plugin.
242
- * New: Notification for users groups about new comments.
243
- * New: SFW die page. Show browser and page creation time.
244
- * Fix: Huge bug in Cleantalk.php connected with servers changing.
245
- * Fix: Check AJAX requests for logged in users.
246
- * Fix: Deleting debug in JS.
247
- * Fix: Validating settings before saving.
248
-
249
- = 5.116.3 March 14 2019 =
250
- * Fix: "Headers already sent" error.
251
- * Fix: Images paths.
252
- * Fix: IP detection.
253
- * Fix: Skip lost password form check
254
- * Fix: Skip mobile requests (push settings)
255
- * Fix: PHP notice when detecting BuddyPress template.
256
-
257
- = 5.116.2 March 7 2019 =
258
- * Fix: Creating tables in MariaDB.
259
-
260
- = 5.116.1 March 6 2019 =
261
- * Fix: Creating tables in DB.
262
- * Fix: PHP Warning in spam statistics widget.
263
-
264
- = 5.116 March 6 2019 =
265
- * Spam filtration quality improved.
266
- * New: Storing visited URLs.
267
- * New: Check before validation Contact Form 7, Comments, Jetpack comments.
268
- * New: Get validation result for Contact Form 7, Comments, Jetpack comments.
269
- * Fix: ES add subscriber.
270
- * Fix: IP detection.
271
-
272
- = 5.115.2 February 27 2019 =
273
- * Fix: False positives spam detection in WP Forms and Contact Form 7.
274
-
275
- = 5.115.1 February 16 2019 =
276
- * Fix: SpamFireWall's false positives.
277
-
278
- = 5.115 February 14 2019 =
279
- * Fix: Http_only flag for backend cookies.
280
- * Fix: Spam filtration improved.
281
- * New: IP detection improved.
282
- * Fix: SpamFirewall update speeded up.
283
- * New: False positives with caching solutions decreased.
284
- * New: Opportunity to use Wordpress HTTP API to connect with Cloud.
285
-
286
- = 5.114 January 31 2019 =
287
- * New: Setting "Use Wordpress HTTP API" as alternative to CURL. Disabled by default.
288
- * Fix: Formidable: Adding small JS check when adding JS_key.
289
- * Mod: layout of settings page.
290
- * Mod: Banner logic altered.
291
-
292
- = 5.113.2 January 18 2019 =
293
- * Fix: "Settings" link returns to plugin page.
294
-
295
- = 5.113.1 January 17 2019 =
296
- * Fix: Conflict with CityTours theme.
297
- * Fix: Error for Wordpress lower 4.7.
298
- * Add: Spam protection: "Validate email for existence".
299
-
300
- = 5.113 January 16 2019 =
301
- * Fix: Fast and Simple Contact Form.
302
- * Fix: Settings layout.
303
- * Fix: Error with WooCommerce Quickview.
304
- * Fix: Bitrix24 contact form.
305
- * Fix: Request time decreased.
306
- * Fix: Requesting account status when activating for IP licenses.
307
- * Add: Precise AJAX request detection.
308
- * Spam protection improved.
309
-
310
- = 5.112 December 21 2018 =
311
- * Fix: Woocommerce AJAX checkout form.
312
- * Fix: Profile Builder Pro.
313
- * Fix: DB structure improvements for WPMS.
314
- * Spam filtering quality improved.
315
- * Minor fixes.
316
-
317
- = 5.111 December 13 2018 =
318
- * Fix: Double request in JetPack contact form.
319
- * Fix: Email notification about spam registration.
320
- * Fix: Links button for feedback comments.
321
- * Fix: Mail notification about plugin error.
322
- * Fix: Key field output.
323
- * Minor fixes.
324
-
325
- = 5.110 November 29 2018 =
326
- * Integration: BuddyPress ActivityWall spam protection.
327
- * Add: GDPR setting for shortcode.
328
- * Add: Support different BuddyPress templates on activity wall.
329
- * Fix: Admin/moderator checking for validate post data.
330
-
331
- = 5.109 November 15 2018 =
332
- * Fix: Added URL and IP exclusions to Contact Form 7.
333
- * Fix: js error when responseText is not exists
334
- * Fix: Sitename when getting key automatically under WPMS.
335
- * Mod: SpamFireWall is now fully compatible with WPMS.
336
- * Mod: Setting 'Tell others about CleanTalk' was deleted.
337
- * Mod: Protection from spam improved.
338
-
339
- = 5.108.1 November 8 2018 =
340
- * Fix: Errors with integration class.
341
-
342
- = 5.108 November 7 2018 =
343
- * Fix: White label mode.
344
- * Fix: SpamFireWall now can be disabled.
345
- * Fix: Layout.
346
- * Integration: WPForms.
347
- * Add: Message about block for all no integrated AJAX forms.
348
- * Add: Displaying account name near api key.
349
-
350
- = 5.107 October 29 2018 =
351
- * Fix: Ninja Forms integration.
352
- * Fix: Cookie usage.
353
- * Add: Capturing AJAX responses from non integrated forms.
354
- * Spam protection improved.
355
- * Minor fixes.
356
-
357
- = 5.106 October 11 2018 =
358
- * Spam filtration improved.
359
- * New: White Label mode.
360
- * Modification: Warning message about test on SpamFireWall die page.
361
- * Integration: WP Maintenance Mode.
362
- * Fix: S2Member.
363
- * Fix: JavaScript attachments reconsidered.
364
- * Fix: Admin banners layout.
365
- * Fix: Minor layout fixes.
366
-
367
- = 5.105 September 26 2018 =
368
- * Integration: Now bloking spam for QAEngine questions.
369
- * Fix: Async http__request call.
370
- * Fix: Unnecessary get_antispam_report_breif method call.
371
- * Layout: Hide "Do you like Cleantlak?" when key is not ok.
372
- * Layout: Minor fixes.
373
-
374
- = 5.104 September 18 2018 =
375
- * Fix: Error when saving settings.
376
- * Fix: Trying update anti spam plugin for the first installation.
377
- * Fix: Update system.
378
- * Fix: Errors output.
379
- * Fix: Plugin's settings under WPMS.
380
- * Fix: SpamFireWall update.
381
- * Fix: The server change system repaired.
382
- * Mod: Cron saving tasks improved.
383
-
384
- = 5.103.1 September 14 2018 =
385
- * Fix: Error when saving settings.
386
- * Fix: Error when getting key automatically.
387
-
388
- = 5.103 September 13 2018 =
389
- * Fix: Gravity Forms response message.
390
- * Fix: SpamFireWall redirect to 404 page.
391
- * Major anti-spam plugin improvement.
392
- * Recombined setting page.
393
- * Added error notification.
394
- * Mod: S2 Members integration.
395
- * Mod: Improved remote calls.
396
-
397
- = 5.102 August 29 2018 =
398
- * Fix: Users and comments check.
399
- * Fix: Update from 5.70 or previous versions.
400
- * Fix: GDPR public JS-script.
401
- * Fix: Dashboard widget JS scripts attachment.
402
- * Fix: WooCommerce "Place order" action.
403
- * Mod: Notification logic altered.
404
- * Mod: Users check table now has 'Signed up' column.
405
- * Minor fixes.
406
-
407
- = 5.101 August 10 2018 =
408
- * Fix: Set cookie only for non-dashboard pages.
409
- * Fix: Dashboard widget JS error.
410
- * Fix: JavaScript error for some environment.
411
- * Mod: Antispam protection accelerated for some pages.
412
-
413
- = 5.100 July 30 2018 =
414
- * Fix: JavaScript dependencies.
415
-
416
- = 5.99.1 July 17 2018 =
417
- * IP detection fixed and improved.
418
-
419
- = 5.99 July 10 2018 =
420
- * Fix: WooCommerce false positives.
421
- * Fix: SpamFireWall IP detection.
422
- * Minor fixes.
423
-
424
- = 5.98 June 27 2018 =
425
- * Fix: WooCommerce: Theme exclusion.
426
- * Fix: Public GDPR JS code.
427
- * Minor fixes.
428
-
429
- = 5.97 June 7 2018 =
430
- * Fix: Update system.
431
- * Fix: Feedback from public page (admin only).
432
- * Fix: Users and comment check: API error.
433
- * Fix: Too many negative reports. (Too big ct_data option)
434
- * Fix: SpamFireWall: Infinite redirection on the blocking page.
435
- * Minor fixes.
436
-
437
- = 5.96 May 22 2018 =
438
- * Fix: Update system.
439
- * Mod: Reset all counters button in admin bar.
440
- * Mod: GDPR compliance.
441
- * Minor fixes.
442
-
443
- = 5.95.1 May 3 2018 =
444
- * Fix: "Get key automatically" button display logic.
445
- * Fix: PHP notices.
446
-
447
- = 5.95 May 2 2018 =
448
- * Spam filtration improved.
449
- * Fix: Public widget layout.
450
- * Fix: Connection reports output.
451
- * Minor fixes.
452
-
453
- = 5.94 April 23 2018 =
454
- * Mod: Async load option for JS.
455
- * Mod: JS scripts loading is conditional.
456
- * Fix: IP detection.
457
- * Fix: IP detection.
458
- * Fix: Javascript error.
459
-
460
- = 5.93.1 April 9 2018 =
461
- * Fix: Fatal error on PHP 5.5 or lower.
462
-
463
- = 5.93 April 9 2018 =
464
- * Fix: Spam FireWall IP detection.
465
- * Fix: Contact Form 7. False positives.
466
- * Mod: Autoupdate function improved.
467
- * Minor fixes.
468
-
469
- = 5.92.2 March 23 2018 =
470
- * Fix: Error if cURL extension is disabled.
471
-
472
- = 5.92.1 March 23 2018 =
473
- * Fix: Spelling
474
- * Fix: Fatal error if cURL extension is disabled.
475
-
476
- = 5.92 March 22 2018 =
477
- * IP detection improved.
478
- * Fix: SSL connection.
479
- * Fix: False positives spam detection in Contact Form 7.
480
- * Minor fixes.
481
-
482
- = 5.91 March 15 2018 =
483
- * Fix: Errors for PHP compiled without XML support.
484
- * Fix: Spelling and translation.
485
- * Stability increased.
486
- * Minor fixes.
487
-
488
- = 5.90 March 7 2018 =
489
- * Improvement: Better IP recognition in Spam FireWall.
490
- * Fix: Gravity Froms blocking message.
491
- * Security improvments.
492
- * Minor fixes.
493
-
494
- = 5.89 February 21 2018 =
495
- * Improved spam filtration quality.
496
- * Improved compatibility.
497
- * Public widget: Styles and referral link added.
498
- * Dashboard widget: revised and fixed.
499
- * Minor fixes.
500
-
501
- = 5.88 February 12 2018 =
502
- * Integration: ConvertPro.
503
- * Improvement: Search for visitor's names in request.
504
- * Fix: Contact Form 7 message recognition.
505
- * Preparation for the remote plugin update.
506
- * Minor fixes.
507
-
508
- = 5.87 February 2 2018 =
509
- * Filtration quality improved.
510
- * Fix: WP Foto Vote downloading images.
511
- * Fix: Fatal error for unsupported PHP 5.2.
512
- * Fix: Formidable Forms improved spam filtration.
513
-
514
- = 5.86 January 25 2018 =
515
- * Fix: High CPU load with wp-ajax.php.
516
- * Fix: Mailpoet: Newsletter.
517
- * Fix: Gravity: Forms standardization for input fields.
518
- * Fix: ajax hook checks data for contact form.
519
- * Fix: UTF8 character in requests.
520
-
521
- = 5.85 January 11 2018 =
522
- * Fix: Fast Secure contact form spam block message.
523
- * Fix: IP license status.
524
- * Layout: Dashboard widget description altered.
525
-
526
- = 5.84 December 26 2017 =
527
- * Integration: PeepSo contact form
528
- * Repared: Feedback from comments page.
529
- * Fix: mb_* functions used only if exists.
530
- * Fix: Gravity forms: Multi-page form logic repared.
531
- * Fix: Gravity forms: AJAX form logic repared.
532
- * Minor fixes.
533
-
534
- = 5.83.2 December 19 2017 =
535
- * Fix: Error in base class.
536
-
537
- = 5.83.1 December 19 2017 =
538
- * Fix: CDN IP detection.
539
-
540
- = 5.83 December 19 2017 =
541
- * Improving: Stability and compatibility.
542
- * Improving: Spam protection.
543
- * Fix: Comments logic filtration.
544
- * Fix: Admin bar counter.
545
- * Minor errors fixes.
546
-
547
- = 5.82.1 December 7 2017 =
548
- * Fixed minor error with attaching JS and CSS files.
549
-
550
- = 5.82 December 4 2017 =
551
- * Plugin doesn't use PHP sessions anymore.
552
- * Bug fixes.
553
- * Improved update logic.
554
-
555
- = 5.81 November 22 2017 =
556
- * Fixed error with "Show/Hide key" button.
557
- * Slightly improved spam protection for all forms.
558
- * Small errors fixes.
559
-
560
- = 5.80 November 3 2017 =
561
- * Spam protection improved.
562
- * Improved filtration quality for WooCommerce checkout.
563
- * Minor fixes for Spam FireWall.
564
-
565
- = 5.79 October 26 2017 =
566
- * Spam protection improved.
567
- * Fixed issue with existing spam comments check.
568
- * Added posibility to exclude IP from check.
569
- * Minor fixes.
570
-
571
- = 5.78 October 16 2017 =
572
- * Improved compatibility with themes. Changed core functions prefix.
573
- * Fixed issue with WooCommerce checkout.
574
- * Spam protection improved.
575
- * Minor fixes.
576
-
577
- = 5.77 October 2 2017 =
578
- * Connection report's system.
579
- * Integration for CouponXXL Theme.
580
- * Fixed issue with mb_* functions.
581
- * Banners logic updated.
582
-
583
- = 5.76 September 20 2017 =
584
- * Fixed issue with Spam FireWall and caching plugins.
585
- * Banners logic updated.
586
-
587
- = 5.75 September 15 2017 =
588
- * Pause feature for users/comments spam check.
589
- * Improved protection from spam.
590
- * Small fixes.
591
-
592
- = 5.74.2 September 2 2017 =
593
- * Fix for users spam check for PHP 5.3 and lower.
594
-
595
- = 5.74.1 September 2 2017 =
596
- * Fix for the update system and cloud communication.
597
- * Added possibility to check users and comments for spam with a specific date range.
598
-
599
- = 5.74 August 31 2017 =
600
- * Users and comments spam check: Two check types (fast and accurate).
601
- * Fix for WooCommerce checkout test.
602
- * Minor fixes.
603
-
604
- = 5.73 August 11 2017 =
605
- * Fix for spam check for already existed users and comments.
606
- * Spam FireWall updated.
607
- * Layout fix for BT Comments.
608
- * Minor fixes.
609
-
610
- = 5.72 July 27 2017 =
611
- * Improved spam check for existed users and comments.
612
- * Minor fixes.
613
-
614
- = 5.71 July 20 2017 =
615
- * Improved spam protection for external forms.
616
- * Optimization.
617
- * Minor fixes.
618
-
619
- = 5.70.2 July 17 2017 =
620
- * Fix for Spam FireWall for Multisite.
621
-
622
- = 5.70.1 July 17 2017 =
623
- * Fix for Spam FireWall.
624
- * Spam detection improved.
625
-
626
- = 5.70 July 13 2017 =
627
- * New updater logic.
628
- * Self cron system.
629
- * Improved AMP compatibility.
630
- * Optimization.
631
- * Fixed users and comments spam check.
632
- * Fixed layout for Comment's feedback from public page.
633
- * Updated Spam FireWall.
634
- * SFW: Spam FireWall counter now work in real-time.
635
- * SFW: Improved compatibility with different Data Bases.
636
-
637
- = 5.69 July 3 2017 =
638
- * Reviewer - integration.
639
- * Optimization for Users and Comments check for big databases.
640
- * Errors fixes.
641
- * Improved protection from spam.
642
-
643
- = 5.68 June 22 2017 =
644
- * Contact Form for WordPress - Ultimate Form Builder Lite - integration.
645
- * Contact Bank - Contact Forms Builder - integration.
646
- * Smart Forms - integration.
647
- * cformsII - integration.
648
- * Contact Form by Web-Settler - integration.
649
- * Error fixes.
650
-
651
- = 5.67.3 June 9 2017 =
652
- * Fixed JS attachment error.
653
-
654
- = 5.67.2 June 5 2017 =
655
- * Fixed error with IP determination.
656
-
657
- = 5.67.1 June 4 2017 =
658
- * Fixed JS error in 5.67 version.
659
- * Integrations: Enfold theme, Convertplug.
660
- * Links to check for Emails/IP for spam.
661
- * Control comments and feedback about them from public post's page.
662
- * Improved connection stability with cloud service.
663
- * Spam protection improved.
664
- * Other small fixes.
665
-
666
- = 5.67 June 1 2017 =
667
- * Integrations: Enfold theme, Convertplug.
668
- * Links to check for Emails/IP for spam.
669
- * Control comments and feedback about them from public post's page.
670
- * Improved connection stability with cloud service.
671
- * Spam protection improved.
672
- * Other small fixes.
673
-
674
- = 5.66 May 23 2017 =
675
- * Spam protection improved.
676
- * Major fixes for users and comments spam check.
677
- * Added feedback from Wordpress comments list.
678
- * Fix for "internal forms check" option.
679
- * Fixed issue with caching Spam FireWall die page.
680
- * Other small fixes.
681
-
682
- = 5.65 May 16 2017 =
683
- * Fix for PayPal redirecton.
684
- * Fixed issue with empty query for bulk comments test.
685
- * Added protection for Enfold contact form.
686
- * Ninja forms integration.
687
-
688
- = 5.64 April 26 2017 =
689
- * Integration for Facebook registrations.
690
- * Small fixes for WPMS.
691
- * Fix for Activecampaign service.
692
- * Fix for check spam users.
693
- * Fixed rare notice Notice: Undefined index: REQUEST_URI
694
-
695
- = 5.63 April 20 2017 =
696
- * Fix for the dashboard spam stat widget.
697
- * Added translation posibility for all text.
698
-
699
- = 5.62 April 17 2017 =
700
- * Fix for the dashboard spam statistics widget.
701
- * Fix for users spam check.
702
- * Small appearance changes.
703
-
704
- = 5.61 April 6 2017 =
705
- * Improved filtration.
706
- * Additional logic for the form recognizing.
707
- * Integration: Divi Theme Contact Form.
708
- * Fix: Gravity Forms multipages forms.
709
- * Stat Widget: Minor fixes.
710
- * Added possibility to download results of the users check in CSV format.
711
- * Alteration for settings page (footer).
712
-
713
- = 5.60.1 March 29 2017 =
714
- * Fixed error function 'locale_get_display_region' no exists.
715
-
716
- = 5.60 March 29 2017 =
717
- * Added main dashboard widget with spam sctivity stats.
718
- * Mailster - integration.
719
- * Base class updated.
720
-
721
- = 5.59 March 24 2017 =
722
- * Users/comments check fix.
723
- * Plugin's name changed to Anti-Spam by CleanTalk.
724
- * Trial banner is dismissable. Disapear for 24h or till logout.
725
- * Settings modified (Auto testing failed warning).
726
- * Mailing(inactive key) interval increased to 6 hours.
727
-
728
- = 5.58.6 March 16 2017 =
729
- * Fix for Ninja forms (protection updated).
730
- * Fix for QA Theme.
731
- * Fix for RSVP form.
732
- * Setting changes (Spam FireWall).
733
- * Improved debug section.
734
- * Improved gathering data function.
735
- * Minor fixes.
736
-
737
- = 5.58.5 March 6 2017 =
738
- * Minor backend fix.
739
-
740
- = 5.58.4 March 6 2017 =
741
- * Users check fix (redirect after the check).
742
- * Fixed PHP Notice "HTTP_REFERER" is unset.
743
- * Updated Notice logic.
744
-
745
- = 5.58.3 February 28 2017 =
746
- * Bitrix24 Contact form integration.
747
- * Users/comments check fix.
748
- * Spam sorting updated.
749
- * Banner showing logic.
750
-
751
- = 5.58.2 February 17 2017 =
752
- * Cron fix for daily report.
753
-
754
- = 5.58.1 February 16 2017 =
755
- * Minor fixes.
756
-
757
- = 5.58 February 15 2017 =
758
- * Work without access key
759
- * Bitrix24 contact integration
760
- * Issues fixes
761
-
762
- = 5.57.1 February 8 2017 =
763
- * Fix for notice logic.
764
-
765
- = 5.57 February 8 2017 =
766
- * Setting page changes.
767
- * Bug fixes for WooCommerce.
768
- * Spam FireWall filters only GET requests.
769
- * Optimization.
770
- * Minor and major fixes.
771
-
772
- = 5.56.1 January 25 2017 =
773
- * Minor fixes
774
-
775
- = 5.56 January 19 2017 =
776
- * Integrations: MailChimp Premium, Profile Press.
777
- * Changes comments flow.
778
- * FireWall updater fix.
779
- * Users check optimization.
780
-
781
- = 5.55 December 23 2016 =
782
- * Integrations: Caldera Forms, Visual Form Builder.
783
- * Fix for different 'cookies' header names.
784
- * Fixed user deletion.
785
-
786
- = 5.54 December 12 2016 =
787
- * Integrations: AmoForms, Contact Form Clean and Simple.
788
- * Comments check logic refreshed.
789
- * Registration JS error fix.
790
- * Users check fix.
791
- * Fix for translation system.
792
- * Minor fixes.
793
-
794
- = 5.53.1 December 9 2016 =
795
- * Minor layout fixes.
796
-
797
- = 5.53 November 28 2016 =
798
- * Addition warning before deleting users.
799
- * Spam FireWall is enabled by default.
800
- * Usernoise modal feedback / contact form : integration.
801
- * Translations.
802
- * Optimization.
803
- * Fixes.
804
-
805
- = 5.52.1 November 14 2016 =
806
- * Users and comments check: Using new API method.
807
- * Quick Contact From: Integration via "Custom Contact Forms" setting.
808
- * JavaScript filtration improved.
809
- * Translation changes.
810
- * Optimized JavaScript code.
811
-
812
- = 5.51 November 2 2016 =
813
- * Added protection for internal forms
814
- * Immediate spam check for comments and users from WP dashboard
815
- * Optimized code
816
-
817
- = 5.50.1 October 24 2016 =
818
- * Improved filtration in contact forms.
819
- * Spam FireWall: Fixed issue with SFW logs
820
- * Skipping service fields: Fast Secure Contact Froms, QU Forms, Custom Contact Forms
821
-
822
- = 5.50 October 20 2016 =
823
- * Custom contact forms: integration.
824
- * Pirate Forms: integration.
825
- * PHP 7 compatibility: Deleted third-party JSON library and dependences.
826
- * PHP 7 compatibility: Fixed end of lines.
827
- * YOAST Seo: Fixed PHP warnings.
828
- * Spam FireWall: Minor fix for Spam FireWall counter.
829
- * Only admin could access to CleanTalk dashboard (exclude Authors an Editors).
830
- * Improved filtration in contact forms.
831
-
832
- = 5.49.2 October 5 2016 =
833
- * Second Fix for database error. Stable version.
834
-
835
- = 5.49.1 October 5 2016 =
836
- * Fixed database error.
837
-
838
- = 5.49 October 3 2016 =
839
- * Spam FireWall feature: Class upgraded.
840
- * New feature: Delete links from approved comments.
841
- * Settings: Grouped.
842
- * Settings: Altered description fixed spelling mistakes.
843
- * Settings: Added indicator for Spam FireWall.
844
- * Admin bar: Added Spam FireWall counter
845
- * Clean and Simple Contact Form: Direct integration.
846
- * WooCommerce: Don't check password recovery form.
847
- * WooCommerce Wishlists: Issue with check for Google bots.
848
- * JetPack: contact form fix.
849
- * Fixed and created the defaults for all CleanTalk options.
850
- * Fixed spelling mistakes.
851
-
852
- = 5.48 September 15 2016 =
853
- * buddyPress: Added private messages filtering. Doesn't check user if he has 3 or more messages in the "sentbox" and "inbox" folders.
854
- * buddyPress: Added option in settings for private messages check.
855
- * WooCommerce Wishlist: Added check for wishlists.
856
- * Fixed issue with "check all post data" option.
857
- * Improved filtering for Gravity Forms
858
- * Mobile Assistant Connector fix
859
- * Minor fixes.
860
-
861
- = 5.47 September 5 2016 =
862
- * WooCommerce: direct integration for checkout form.
863
- * WooCommerce Sensei: login form fix.
864
- * bbPress: Added the check for topics and comments with stop_words
865
- * bbPress: Skip check for admin in comments and topics
866
- * UserPro: fixes. Request without field "shortcode"
867
- * Contact Form 7: Bug fix.
868
- * Spam FireWall: Optimized logs rotation.
869
- * Updated inner functions (compatibility fix for PHP 5.4+)
870
- * Fixed output of counters (without spamfirewall stats)
871
- * Fixed spelling in settings
872
- * Added "Delete from the list" button in comments spam check page
873
- * Minor fixes.
874
-
875
- = 5.46 August 17 2016 =
876
- * Fixed issue with admin bar links in WP Multi Network mode.
877
- * Added "All time counter" and "Daily counter" into admin bar.
878
- * Added settings to disable counters in admin bar.
879
- * New style for "Get access key manually" button.
880
-
881
- = 5.45.2 August 4 2016 =
882
- * Added Anti-Spam protection for Quick Event Manager.
883
- * Improved bulk spam test for users. Now the plugin does not mark as Spam user, if the user IP address has spam activity more than 30 days ago.
884
- * Fixed bulk spam test for comments. Previous version had a conflict between spam history for IP and Email.
885
- * Minor fix function to get the API key.
886
-
887
- = 5.45.1 July 26 2016 =
888
- * Fixed issue with missed spam messages, subscriptions.
889
- * Improved bulk spam test for comments. Now the plugin will not mark as Spam comments, if a comment sender (IP address) has spam activity more than 30 days ago.
890
-
891
- = 5.45 July 21 2016 =
892
- * Optimized bulk spam comments deletion.
893
- * Turned off JavaScript anti-spam cookies if the option 'Set cookies' is turned off. It helps to avoid issues with Varnish.
894
- * Added links to bulk spam comments&users removal tool.
895
-
896
- = 5.44.1 July 13 2016 =
897
- * Optimized options getting code.
898
- * Added the option 'Protect Logged in users' to do anti-spam tests for submissions by logged in users.
899
-
900
- = 5.43.2 June 30 2016 =
901
- * Optimized anti-spam code for AJAX based contact forms.
902
- * Fixed CSS layout of counters in Admin bar (issue with layout in IE11).
903
-
904
- = 5.43.1 June 23 2016 =
905
- * Added agent version in requests to test a connection between the website and servers.
906
- * Fixed issue with PHP notices in cleantalk-admin.php.
907
-
908
- = 5.43 June 22 2016 =
909
- * Added spam protection for registrations via 'Login with AJAX' plug-in.
910
- * Added a new counter to Admin bar that allows to count spam and approved submissions since last reset.
911
- * Update the code that tests a connection between a website and CleanTalk's servers. New version doesn't generate submissions with email good@cleantalk.org.
912
- * Fixed issue with spam protection for nested forms by Formidable plug-in.
913
-
914
- = 5.42 2016-06-15 =
915
- * Added anti-spam protection for UserPro.
916
- * Improved protection for Formidable forms + Varnish.
917
- * Improved bulk search for spam accounts.
918
- * Fixed spam protection for pages that contain multiple Formidable forms with same HTML ID.
919
- * Optimized PHP code to be compatible with PHP 5.4 and above. The patch has been applied to Formidable forms spam protection.
920
- * Minor fixes in plugin backend.
921
-
922
- = 5.41 2016-05-31 =
923
- * Added HTTP response in plugin response if an network issue was happend.
924
- * Optimized JavaScript anti-spam test for Formidable forms.
925
- * Re-stored the option to auto redirect to plugn settings after plugin activation.
926
- * Updated Spanish, Russian translations.
927
- * Fixed issue with nasted fields in Formidable forms.
928
-
929
- = 5.40.3 2016-05-26 =
930
- * Added option to encrypt (SSL) connection to CleanTalk anti-spam servers.
931
- * Added JSON encoding for AJAX forms.
932
- * Obfuscated private data for Custom contact forms option.
933
- * Optimized bulk users check for spam over blacklists database.
934
- * Fixed issue with lost connection to servers and JavaScript anti-spam test.
935
- * Fixed issue with WordFence and collect_details.
936
-
937
- = 5.40.2 2016-05-11 =
938
- * Improved account status check logic.
939
- * Fixed issue with double anti-spam tests for FastSecure contact forms.
940
- * Fixed issue with nulled JavaScript variables assigned from backend. This issue might me occurred on standart WordPress registration form and with failed JavaScript spam test.
941
- * Fixed issue with session_start() with PHP sessions stored in memcache.
942
-
943
- = 5.40.1 2016-04-28 =
944
- * Fixed issue with Super Socializer.
945
- * Fixed issue with spam filtration for logged in users and Formidable forms.
946
- * Added logging of all submitted fields for FastSecure contact form.
947
-
948
- = 5.40 2016-04-19 =
949
- * Added JSON encoding for posts that were protected via Custom contact forms option. It allows show anti-spam logs in the Dashboard in more comfortable view.
950
- * Minor fix in plugin settings.
951
- * Fixed pagination for bulk users spam test.
952
- * Fixed issue with unknown _SESSION.
953
- * Fixed issue with double Spam FireWall database upload.
954
-
955
- = 5.39.1 2016-04-04 =
956
- * Improved AJAX based anti-spam test with HTTPS backends.
957
- * Added fix to avoid issue with empty ct_info_flag on JavaScript side.
958
- * Added logic to exclude caching for Spam FireWall.
959
- * Removed a condition to skip accounts with 127.0.0.1 IP in spam test for registered acconts.
960
-
961
- = 5.38.1 2016-03-24 =
962
- * Fixed issue with PHP sessions and 'The session id is too long or contains illegal characters'.
963
- * Removed Spam FireWall protection on /feed page.
964
- * Disabled anti-spam tests for AJAX calls if the option 'Custom contact forms' is turned off.
965
- * Added reject notice for spam submissions on Gravity forms with AJAX calls.
966
-
967
- = 5.37.3 2016-03-10 =
968
- * Fixed bug with broken MailPoet previews.
969
- * Fixed bug with broken Geo My WP pop-up windows.
970
- * Fixed issue with mb_convert_encoding() function.
971
- * Removed double JavaScript code in front-end.
972
- * Removed unused variables in anti spam logic.
973
- * Added option 'Set cookies' (turned on by default). If the option turned off, the plugin will not generate cookies, but in this case plugin will not protect some rarely used contact forms. Any way, turn this option off be compatible with Varnish in spam protection for WordPress core comments, registrations and most popular contact forms.
974
- * Added anti-spam protection for Gravity forms via option 'Contact forms' with hook gform_entry_is_spam().
975
-
976
- = 5.36.1 2016-02-05 =
977
- * Fixed bug, when users receive error after logging in
978
- * Improve anti-spam filters for contact forms.
979
-
980
- = 5.36 2016-02-04 =
981
- * Improved JavaScript anti spam protection
982
- * Improvements for avoiding blocking requests from payment systems
983
-
984
- = 5.35 2016-01-14 =
985
- * Added support for IP licensing
986
- * Some anti-spam protection improvements
987
- * Small backend interface fixes
988
-
989
- = 5.34.1 2015-12-17 =
990
- * Fixed trackback antispam protection: improved checking mechanism
991
- * Fixed problem with blocking MailPoet: added exclusions in spam checking algorithm
992
-
993
- = 5.34 2015-12-10 =
994
- * Improved spam checking mechanism
995
- * Added "Collect browser details" option for better antispam protection
996
- * Fixed custom contact forms checking for AJAX requests
997
- * Minor translations fixes
998
-
999
- = 5.33.1 2015-12-04 =
1000
- * Fixed issue with BBPress: restored old user permission checking mechanism
1001
- * Fixed anti-spam comments checking: sometimes get_comments returned wrong comments number
1002
- * Fixed bulk checking: made numeric indexes in users and comments arrays
1003
- * Fixed trackback and pingback checking: removed exception for checking
1004
-
1005
- = 5.33 2015-12-01 =
1006
- * Backend interface fixes
1007
- * Improved Spam FireWall efficiency
1008
- * Improved performance of anti spam checking
1009
-
1010
- = 5.32 2015-11-26 =
1011
- * Added improvements for manual spam detection
1012
- * Fixed errors in backend
1013
- * Fixed bulk users anti spam checking
1014
- * Added indicator for bulk spam checking
1015
- * Added "Get access key automatically" button
1016
-
1017
- = 5.31 2015-11-11 =
1018
- * Improved backend performance
1019
- * Fixed counter of approved/blocked spam attacks
1020
- * Fixed Spam FireWall logging
1021
-
1022
- = 5.30 2015-11-05 =
1023
- * Improved anti-spam checking
1024
- * Optimized performance
1025
- * Fixed blocking email preview in MailPoet
1026
- * Interface fixes
1027
- * WPMU interface fixes
1028
-
1029
- = 5.29 2015-10-27 =
1030
- * Optimized performance
1031
- * Fixed bugs in custom contact forms spam checking
1032
-
1033
- = 5.28.7 2015-10-23 =
1034
- * Optimized PHP sessions creation algorithm. This fix should increase plugin perfomance on hostings without retenion of PHP sessions files.
1035
- * Removed autoredirection to plugin settings after plugin activation.
1036
-
1037
- = 5.28 2015-10-16 =
1038
- * Fixed errors in anti-spam checking
1039
- * Restored options for spam checking registrations and cpmmon contact forms
1040
- * Improved spam protection
1041
- * Fixed problems with AJAX functionality in MailPoet, WooCommerce and other AJAX plugins
1042
-
1043
- = 5.27 2015-10-13 =
1044
- * Improvements in SpamFireWall feature
1045
- * Code optimization
1046
- * Backend interface fixes
1047
-
1048
- = 5.26 2015-10-05 =
1049
- * Added WordPress Language Pack support
1050
- * Removed spam checking for some autorisation plugins
1051
- * New experimental feature: SpamFireWall
1052
-
1053
- = 5.25.2 2015-09-28 =
1054
- * Fixed backend bug
1055
-
1056
- = 5.25.1 2015-09-28 =
1057
- * Added widget with anti-spam stats
1058
- * Added information about blocked spam attacks in admin dashboard and CleanTalk settings
1059
- * Added ability not to check comments for users with 3 or above allowed comments
1060
- * Added an option 'Help others known CleanTalk' to show information for site visitors, that your site is protected from spam by us
1061
- * Some backend interface settings
1062
-
1063
- = 5.24.1 2015-09-16 =
1064
- * Fixed some errors in frontend
1065
- * Fixed access key saving
1066
-
1067
- = 5.24 2015-09-14 =
1068
- * Backend interface fixes
1069
- * Improvement for AJAX JavaScript spam checking
1070
-
1071
- = 5.23 2015-09-01 =
1072
- * Fixed BuddyPress profile search false positivities of anti-spam protection.
1073
- * Some interface fixes of bulk users & comments spam checking
1074
-
1075
- = 5.22 2015-08-26 =
1076
- * Fixed possible XSS issue for anti-spam test on third-party forms.
1077
-
1078
- = 5.21 2015-08-21 =
1079
- * Fixed bug with skipping spam submissions
1080
- * Fixed bug with receiving old user_token for viewing anti-spam stats
1081
- * Small backend fixes
1082
-
1083
- = 5.20 2015-08-15 =
1084
- * Fixed anti-spam stats in admin bar - now stats updates every hour
1085
- * Fixed issue with skipping spam submissions
1086
- * Added some PHP-constants for advanced users - CLEANTALK_AJAX_USE_BUFFER and CLEANTALK_AJAX_USE_FOOTER_HEADER can be defined to true or false in wp-config.php to control method, which will be used for injection of AJAX script.
1087
-
1088
- = 5.19 2015-08-11 =
1089
- * New feature: anti-spam checking for registered users
1090
- * Fixed issue with AJAX JavaScript anti-spam test.
1091
- * Fixed issue with SEO Yoast xml sitemaps and JavaScript anti-spam test.
1092
-
1093
- = 5.18 2015-08-04 =
1094
- * Fixed issue with user_token
1095
- * Added anti-spam API, see our FAQ
1096
-
1097
- = 5.17 2015-07-23 =
1098
- * Fixed infinite redirection after activation
1099
- * Minor backend fixes
1100
-
1101
- = 5.16 2015-07-22 =
1102
- * Fixed external services checking
1103
- * Fixed mass comments deletion
1104
- * Fixed AJAX anti-spam protection
1105
-
1106
- = 5.15 2015-07-16 =
1107
- * New feature: anti-spam protection for forms, that uses external services
1108
-
1109
- = 5.14 2015-07-03 =
1110
- * Added anti-spam protection for some themes and plugins
1111
- * Some backend fixes
1112
-
1113
- = 5.13 2015-06-12 =
1114
- * Closing notification for anti-spam renew
1115
- * Fixed bulk anti spam comment checking
1116
-
1117
- = 5.12 2015-06-01 =
1118
- * Added option for checking all post data for spam
1119
- * Some JavaScript protection improvements
1120
- * Added option for old JavaScript check (without AJAX)
1121
-
1122
- = 5.10 2015-05-25 =
1123
- * Fixed Javascript error on some forms
1124
-
1125
- = 5.9 2015-05-21 =
1126
- * Fixed Javascript error on CF7 and JetPack
1127
- * Some backend and frontent fixes
1128
-
1129
- = 5.8 2015-05-18 =
1130
- * Minor fixes
1131
-
1132
- = 5.7 2015-05-18 =
1133
- * Fixed French translation
1134
- * Fixed protection algorithm
1135
-
1136
- = 5.6 2015-05-11 =
1137
- * Fixed translation
1138
- * Fixed bulk comments anti-spam checking
1139
- * Added option for disabling anti spam stats in adminbar
1140
- * Some security fixes
1141
-
1142
- = 5.5 2015-04-29 =
1143
- * Fixed security issue
1144
- * Some interface fixes
1145
-
1146
- = 5.4 2015-04-27 =
1147
- * Some interface and functionality changes in plugin settings page
1148
- * Added counter for anti-spam stats in admin bar
1149
-
1150
- = 5.3 2015-04-13 =
1151
- * Added anti-spam protection for Divi theme contact forms
1152
- * Added anti-spam protection for MyMail contact forms
1153
- * Added anti-spam protection for MailPoet Newsletters
1154
- * Some interface and functionality changes in backend
1155
-
1156
- = 5.2 2015-04-01 =
1157
- * Added link for anti-spam stats
1158
- * Added WP User Frontend Pro registration form protection
1159
-
1160
- = 5.1 2015-03-24 =
1161
- * Fixed site crash after installing 5.0 on some websites
1162
-
1163
- = 5.0 2015-03-24 =
1164
- * Added bulk comments checking for spam via CleanTalk blacklists
1165
- * Added anti-spam form protection for 'Ajax Login & Register'
1166
- * Fixed JetPack form protection
1167
-
1168
- = 4.24 2015-03-20 =
1169
- * Added immediate spam protection activation.
1170
-
1171
- = 4.22 2015-03-17 =
1172
- * Added button for automatic spam protection key getting.
1173
-
1174
- = 4.21 2015-03-11 =
1175
- * Added license renew notification.
1176
-
1177
- = 4.20 2015-03-03 =
1178
- * Added German, Italian, Polish, Portuguese translations.
1179
- * Minor code fixes.
1180
-
1181
- = 4.19 2015-02-24 =
1182
- * Increased keys lifetime for JS spam test.
1183
-
1184
- = 4.18 2015-02-17 =
1185
- * Fixed bug with comments approvement - moved ct_unmark_red() to cleantalk-admin.php
1186
- * Added PayPal 'payment_status' in skip list.
1187
- * Added Akismet 'spam' status processing.
1188
-
1189
- = 4.17 2015-02-12 =
1190
- * New base class.
1191
- * Divided code to 3 separate files - common, public and admin.
1192
-
1193
- = 4.16 2015-02-05 =
1194
- * New base class.
1195
- * Fixed JetPack spam filters logics.
1196
- * Optimized Formidable, bbPress, BuddyPress spam filters.
1197
-
1198
- = 4.15 2015-01-29 =
1199
- * Support spam test for Contact Form 7 versions before 3.0.0.
1200
- * Fixed global JS-vars for JS spam test.
1201
- * Fixed online notice cookie logics.
1202
- * Optimized spam filters for FSCF, WooCommerce, JetPack.
1203
- * Optimized option getting.
1204
-
1205
- = 4.14 2015-01-19 =
1206
- * Removed deprecated option from comment approvement code.
1207
- * New API key URL.
1208
- * Trimmed API key in admin panel.
1209
- * Added current options to array sended to CleanTalk servers.
1210
- = 4.13 2014-12-29 =
1211
- * Fixed bug with autimatically aprovement not spam comments. Now this option disabled and do not override local WordPress policy.
1212
-
1213
- = 4.12 2014-12-29 =
1214
- * Fixed bug with 'Wrong Access key...' notice in WordPress dashboard.
1215
- * Fixed filtration bug in WordPress dashboard login form.
1216
-
1217
- = 4.11 2014-12-22 =
1218
- * Improved anti-spam protection for custom contact/registration/subscribe forms.
1219
- * Improved anti-spam protection for comments.
1220
- * Accelerated plugin speed for comments, regirstrations and contacts.
1221
- * Added translation to French.
1222
-
1223
- = 4.10 2014-12-10 =
1224
- * Improved anti-spam protection for custom contact/registration/subscribe forms.
1225
- * Option 'Custom contact forms' enabled by default for new setups.
1226
- * Removed settings "Publish relevant comments", "Use encrypted (SSL) connection".
1227
- * Added translation to Danish (thank you for Mikkel at KreativJul.dk).
1228
-
1229
- = 4.9 2014-11-24 =
1230
- * Fixed spam test for Contact Form 7.
1231
-
1232
- = 4.8 2014-11-19 =
1233
- * Improved anti-spam protection for BuddyPress registrations and custom contact forms.
1234
-
1235
- = 4.7 2014-11-16 =
1236
- * Fixed JavaScript spam test for FastSecure contact form.
1237
-
1238
- = 4.6 2014-11-11 =
1239
- * Improved anti-spam protection on BuddyPress registrations.
1240
- * Improved anti-spam protection on contact forms.
1241
- * Removed plugin sign from pending, spam comments. To get details about a comment please use Dashboard at cleantalk.org.
1242
- * Improved Access key validation function.
1243
- * Added protection for bbPress comments via stop list. Stop list function is a list to reject comments by prefiled words. To fill the list please use Dashboard at cleantalk.org.
1244
-
1245
- = 4.5 2014-11-04 =
1246
- * Fixed CF7 JavaScript bug.
1247
- * Fixed rejects in bbPress guests comments.
1248
-
1249
- = 4.4 2014-10-29 =
1250
- * Improved anti-spam JS test for CF7.
1251
- * Fixed 'noscript' text in FaceBook Like preview in Valenti theme.
1252
-
1253
- = 4.2 2014-10-20 =
1254
- * Fixed double checks issue for BuddyPress registrations.
1255
- * Increased timeout limits to find the work server.
1256
-
1257
- = 4.1 2014-10-13 =
1258
- * Optimized code for manual moderation feedback sending.
1259
- * Optimized anti-spam algorithms for comments, contacts and signups.
1260
-
1261
- = 4.0 2014-10-06 =
1262
- * Improved anti-spam protection for custom contact forms.
1263
- * Improved anti-spam protection for registration forms.
1264
-
1265
- = 3.9 2014-10-01 =
1266
- * Did exception to do not break to create new user in WordPress backend.
1267
-
1268
- = 3.8 2014-09-19 =
1269
- * Fixed json_encode() + malformed characters.
1270
- * Fixed JavaScript issue with wpautop().
1271
-
1272
- = 3.6 2014-09-15 =
1273
- * Fixed preg_match() issue for Formidable forms and Custom contact forms.
1274
- * Improved anti-spam protection for Custom contact forms.
1275
-
1276
- = 3.4 2014-09-04 =
1277
- * We've added anti-spam for themes contact forms and any untested contact forms plugins. To use this test enable option "Custom contact forms" in plugin settings.
1278
- * We've added auto rotation for spam comments. Now the plugin removes comments in SPAM folder older then 15 days. This option is enabled by default.
1279
-
1280
- = 3.2 2014-08-27 =
1281
- * Fixed submit_time() logic for failed submits (comments/registrations). Now form fill time resets after every failed submit.
1282
-
1283
- = 3.1 2014-08-19 =
1284
- * Added anti-spam test over senders Cookies.
1285
- * Improved form fill anti-spam test.
1286
- * Improved speed selection of the nearest server to website.
1287
- * Improved anti-spam speed for comments.
1288
- * Relevance anti-spam test disabled by default. To enable test should be used option 'relevance_test'.
1289
-
1290
- = 2.58 2014-08-06 =
1291
- * Added anti-spam protection for signups posted via WooCommerce order form.
1292
- * Improved anti-spam protection for Contact Form 7.
1293
- * Improved anti-spam protection for registrations. Now the plugin looking for JavaScript anti spam test results not only in POST array, but in COOKIES array too. This improvement allows protect signup forms for any untested signups plugins and themes.
1294
- * Updated PHP API. Now the plugin can resolve sender IP for websites behind proxy servers. If the proxy servers uses private IP address.
1295
-
1296
- = 2.57 2014-07-29 =
1297
- * Improved anti-spam protection for comments. The plugin now proccessing website url in the comments form.
1298
- * Fixed sign remove logic for approved comments. Previous version doesn't cut sign for comments approved via AJAX call in WordPress backend.
1299
- * Fixed switching to SSL for comments. Previous version doesn't use secured connection for comments.
1300
-
1301
- = 2.56 2014-07-21 =
1302
- * Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
1303
-
1304
- = 2.55 2014-07-11 =
1305
- * Fixed bug with account status function. In backend the plugin showed notice 'Please don't forget to disable CAPTCHA if you have it!' on every page.
1306
-
1307
- = 2.54 2014-07-11 =
1308
- * Fixed signup anti-spam protection logic for BuddyPress registrations.
1309
- * Fixed anti-spam protection for JetPack contact form.
1310
- * Changed account status check logic.
1311
-
1312
- = 2.53 2014-06-27 =
1313
- * Fixed anit-spam protection bug for signups.
1314
- * Changed anti-spam functions (comments and signups) priority.
1315
-
1316
- = 2.52 2014-06-25 =
1317
- * Fixed 'Fatal error: Call to a member function get_error_code()' issue with signups via BuddyPress.
1318
-
1319
- = 2.51 2014-06-23 =
1320
- * Added spam protection for registrations via plugin New User Approve by Josh Harrison. If the CleanTalk matched signup as spam this signup will be denied to placing in pending queue.
1321
- * Added option "Use secure (SSL) connection to CleanTalk cloud". If the option enabled plugin will communicate with CleanTalk severs via 128bit encrypted data channel. So, if you have SSL protected webforms on website you can use this option to be sure that visitors personal data safely transmits to CleanTalk servers.
1322
- * Fixed minor bug with loading backend functions.
1323
-
1324
- = 2.49 2014-06-10 =
1325
- * Added spam protection for S2Member Auth.net forms.
1326
- * Added spam protection for multisite signup form.
1327
- * Optimized account status check function.
1328
-
1329
- = 2.46 2014-05-19 =
1330
- * Added: HTML notice about the need to enable JavaScript.
1331
- * Fixed: Fixed pingbacks anti-spam test.
1332
-
1333
- = 2.44 2014-05-12 =
1334
- * Added: Anti-spam protection for S2Member framework.
1335
- * Improved: JavaScript anti-spam test.
1336
- * Improved: Plugin load time for backend and frontend.
1337
- * Fixed: PHP warning mb_convert_encoding()
1338
-
1339
- = 2.42 2014-04-29 =
1340
- * Fixed: JavaScript anti-spam test for comments.
1341
-
1342
- = 2.40 2014-04-25 =
1343
- * New: Fast Secure Contact form support.
1344
- * New: WordPress Landing Pages support
1345
-
1346
- = 2.38 2014-03-27 =
1347
- * Fixed: Registraion form submit time spam test.
1348
-
1349
- = 2.36 2014-03-12 =
1350
- * Reversed to patches from old revisions.
1351
-
1352
- = 2.35 2014-03-12 =
1353
- * New: Notifications about disabled account
1354
- * New: Improved JavaScript spam test.
1355
- * Fixed: Code optimization
1356
- * Fixed: JavaScript test for signups.
1357
-
1358
- = 2.33 2014-02-12 =
1359
- * Fixed: CURLOPT_FOLLOWLOCATION bug at admin notice
1360
-
1361
- = 2.32 2014-02-04 =
1362
- * New: Added notice about automatically approved comment. The notice shows only for first approved comment and only for new commentators (without approved comments) of the blog.
1363
- * New: At WordPress console added banner for notices.
1364
- * Changed: Screenshots updated.
1365
-
1366
- = 2.31 2014-01-24 =
1367
- * New: Added spam protection for JetPack comments
1368
- * Fixed: cURL connection issue "Expect: 100-continue"
1369
-
1370
- = 2.30 2014-01-13 =
1371
- * Changed: Improved servers connection logic.
1372
- * Fixed: Antispam test for Fomidable forms.
1373
-
1374
- = 2.28 2013-12-19 =
1375
- * New: Added protection against spam bots for WooCommerce review form.
1376
- * Fixed: JavaScript anti-spam logic for WooCommerce review form.
1377
-
1378
- = 2.27 2013-12-06 =
1379
- * New: Added protection against spam bots for JetPack Contact form.
1380
- * Fixed: JavaScript anti-spam logic for registrations and Contact form 7.
1381
-
1382
- = 2.25 2013-11-27 =
1383
- * New: Added protection against spam bots for BuddyPress registrations.
1384
- * New: Added protection against spam bots for Contact form 7.
1385
- * New: Added Spanish (es_ES) translation.
1386
-
1387
- = 2.23 2013-11-20 =
1388
- * New: Added automatic training blacklists on spam bot account deletion.
1389
- * New: Added URL to project homepage at plugin options.
1390
- * Changed: Improved anti-spam logic.
1391
-
1392
- = 2.21 2013-11-13 =
1393
- * Changed: WordPress blacklists settings get priority over plugin's anti-spam settings
1394
- * Changed: Disabled management approval comments for regular commentators of the blog. Automatically approved for publication only the comments of the new blog authors.
1395
- * Changed: Removed form submit time test. Imporved JavaScript spam test.
1396
- * Changed: PHP code optimizations
1397
-
1398
- = 2.19 2013-11-08 =
1399
- * New: Antispam protection from spam bots at the registration form
1400
- * Changed: Russian localization for admin panel
1401
- * Changed: PHP code optimizations
1402
-
1403
- = 2.5.18 2013-11-01 =
1404
- * Fixed: Bug with selection of the last comments for post
1405
- * New: Antispam protection for Formidable feedback forms
1406
- * New: Automatic deletion of outdated spam comments
1407
- * New: On/Off option for comments spam filtration
1408
- * Tested with WordPress 3.7.1
1409
-
1410
- = 2.4.15 2013-09-26 =
1411
- * Fixed: Bug with mass comments deletion
1412
- * Changed: Russian localization for admin panel
1413
- * Tested with mulitsite setup (WordPress network or WPMU)
1414
-
1415
- = 2.4.14 2013-08-29 =
1416
- * Changed: Removed feedback requests to the servers for banned (spam) comments.
1417
-
1418
- = 2.4.13 2013-08-19 =
1419
- * Changed: Switched HTTP requests from file_get_contents() to CURL. Added file_get_contens() as backup connection to the servers.
1420
- * Changed: Removed feedback requests for comments moved to trash.
1421
- * Fixed: "Fail connect to servers..." error on hostings with disabled 'allow_url_fopen' PHP option.
1422
-
1423
- = 2.4.12 2013-08-12 =
1424
- * Removed RPC::XML library from plugin.
1425
- * Switched plugin to HTTP+JSON connection with servers.
1426
- * Fixed bug with comments anti-spam tests with non UTF8 codepage.
1427
-
1428
- = 2.4.11 2013-08-02 =
1429
- * Removed spam tests for self-made pingbacks
1430
- * Tested up to WP 3.6
1431
-
1432
- = 2.4.10 2013-07-24 =
1433
- * Fixed warning in PHP 5.4
1434
- * Fixed bug with disabling comments test for Administrators, Authors and Editors
1435
- * "Stop words" settings moved to <a href="http://cleantalk.org/my">Control panel</a> of the service
1436
- * "Response language" settings moved <a href="http://cleantalk.org/my">Control panel</a> of the service
1437
-
1438
- = 2.4.9 =
1439
- * Fixed extra debugging in base class
1440
-
1441
- = 2.4.8 =
1442
- * Enabled convertion to UTF8 for comment and example text
1443
- * Optimized PHP code
1444
-
1445
- = 2.3.8 =
1446
- * Enabled selection the fastest server in the pool
1447
- * Fixed work server in plugin's config
1448
-
1449
- = 2.2.3 =
1450
- * Secured md5 string for JavaScript test
1451
- * Added requests's timestamp to calculate request work time
1452
- * Update base CleanTalk's PHP class
1453
-
1454
- = 2.1.2 =
1455
- * Improved perfomance for processing large comments (over 32kb size)
1456
- * Improved perfomance for bulk operations with comments in Comments panel
1457
- * Added feedback request with URL to approved comment
1458
-
1459
- = 2.0.2 =
1460
- * Fixed bug with JavaScript test and WordPress cache plugins
1461
-
1462
- = 2.0.1 =
1463
- * Added option "Publicate relevant comments" to plugin's options.
1464
- * Added descriptions to plugin options
1465
-
1466
- = 1.5.4 =
1467
- * Fixed HTTP_REFERER transmission to the servers
1468
- * Improved JavaScript spam test
1469
- * Optimized PHP code
1470
-
1471
- = 1.4.4 =
1472
- * Pingback, trackback comments has moved to manual moderataion
1473
- * Added transmission to the serves comment type and URL
1474
- * Post title, body and comments separated into individual data elements
1475
- * Added priority for matched words in the comment with post title
1476
- * Enabled stop words filtration as default option
1477
-
1478
- = 1.3.4 =
1479
- * Removed PHP debugging.
1480
-
1481
- = 1.3.3 =
1482
- * Added notice at admin panel about empty Access key in plugin settings
1483
- * Removed HTTP link to the site project from post page
1484
- * Removed unused options from settings page
1485
- * Tested up to WordPress 3.5
1486
-
1487
- = 1.2.3 =
1488
- * Fixed bug with session_start.
1489
-
1490
- = 1.2.2 =
1491
- * Plugin rename to CleanTalk. Spam prevent plugin
1492
- * Integration Base Class version 0.7
1493
- * Added fast submit check
1494
- * Added check website in form
1495
- * Added feedbacks for change comment status (Not spam, unapprove)
1496
- * Added function move comment in spam folder if CleanTalk say is spam
1497
- * Disable checking for user groups Administrator, Author, Editor
1498
- * Marked red color bad words
1499
-
1500
- = 1.1.2 =
1501
- * Addition: Title of the post attached to the example text in auto publication tool.
1502
- * Tested with WordPress 3.4.1.
1503
-
1504
- = 1.1.1 =
1505
- * HTTP_REFERER bug fixed
1506
-
1507
- = 1.1.1 =
1508
- * Added user locale support, tested up to WP 3.4
1509
-
1510
- = 1.1.0 =
1511
- * First version
1512
-
1513
-
1514
- == Upgrade Notice ==
1515
- = 5.130 November 14 2019 =
1516
- * Fix: JetPack contact form JS check.
1517
- * FIx: Iphorm AJAX form.
1518
- * Fix: Paid Memberships Pro fix.
1519
- * Fix: Divi theme contact form fix.
1520
- * Integration: Paid Memberships Pro.
1521
- * Integration: Elementor Pro page builder forms.
1522
- * Improved: Compatibility with different server.
1523
-
1524
- = 5.129.1 November 5 2019 =
1525
- * Fix: WooCommerce order detecting.
1526
-
1527
- = 5.129 October 30 2019 =
1528
- * Upd: Localize updated.
1529
- * Fix: Direct $_SERVER access replaced.
1530
- * Integration: The 7 theme contact form.
1531
- * Fix: Minor improvements and bug fixes.
1532
- * Mod: Putting site in maintenance mode during plugin update.
1533
-
1534
- = 5.128.1 October 23 2019 =
1535
- * Fix: Fatal error when using buffer output.
1536
- * Fix: Translate domain for errors.
1537
- * Code: Fix spelling in function name.
1538
- * Fix: JS disabled error.
1539
- * Upd: Comment edit screen updated.
1540
- * Fix: Cleantalk\Arr::search() fixed.
1541
-
1542
- = 5.128 October 17 2019 =
1543
- * Mod: Users check - functionality updated.
1544
- * Fix: Users check - dates format updated.
1545
- * Mod: Comments check - functionality updated.
1546
- * Fix: Comments check - dates format updated.
1547
- * Fix: Fields exclusion fixed.
1548
- * Fix: Notice fixed.
1549
- * Fix: Cleantalk/Antispam/API.
1550
- * Fix: Minor improvements and bug fixes.
1551
-
1552
- = 5.127.4 October 13 2019 =
1553
- * Mod: Automatically decrease amount of checked users by one request if an error occurs.
1554
- * Fix: Security issue.
1555
- * Fix: Static JS key.
1556
-
1557
- = 5.127.3 October 8 2019 =
1558
- * Fix: Errors during registration.
1559
-
1560
- = 5.127.2 October 8 2019 =
1561
- * Integration: SeedProd Coming Soon Page Pro.
1562
- * Fix: WooCommerce double reuqests.
1563
- * Fix: Static JS key.
1564
-
1565
- = 5.127.1 October 7 2019 =
1566
- * Fix: WPMS settings logic.
1567
- * Using default database storage engine for tables.
1568
-
1569
- = 5.127 September 30 2019 =
1570
- * Fix: Delete redirect notice on external forms
1571
- * Fix: Storing spam for 15 days.
1572
- * Fix: correct DiVi display message.
1573
- * Integration: Ultimate Members.
1574
- * Mod: Setting "Use static JS key" switched to "Auto" if it was "No". Default is "Auto".
1575
- * Mod: Moving White Label option to main site settings.
1576
- * New: Use static JS key if cache plugin detected.
1577
- * New: Settings for URLs, fields, roles exclusions.
1578
- * New: Regular Expressions support in URLs, fields exclusions.
1579
- * New: Send validation errors on standard registration form.
1580
- * Updater: Move exclusions from global variable to settings.
1581
- * Deprecated: IP exclusions.
1582
-
1583
- = 5.126 September 9 2019 =
1584
- * Spam protection improved!
1585
- * Integration: Option wheel.
1586
- * Mod: Improved Email detection.
1587
- * Mod: Improved IP detection.
1588
- * Fix: Too large database table with alternative sessions.
1589
- * Fix: Exception for WooCommerce AJAX.
1590
- * Fix: API key validation.
1591
- * Minor fixes.
1592
-
1593
- = 5.125 August 26 2019 =
1594
- * Fix: PHP Notices.
1595
- * Fix: Auto update.
1596
- * Fix: Displaying protection status for IP license.
1597
- * Fix: prevent capturing buffer for XMLRPC requests (check_external functionality).
1598
- * Fix: API key validating.
1599
- * New: Complete deactivation setting.
1600
-
1601
- = 5.124.1 August 8 2019 =
1602
- * Fix: Error on PHP 5.3.
1603
-
1604
- = 5.124 August 8 2019 =
1605
- * Spam protection improved.
1606
- * Fix: SpamFireWall local database counter on Multisite.
1607
- * Fix: Caldera Forms integration.
1608
- * Fix: Settings "Use AJAX for JS check" description.
1609
- * Fix: Formidable integration.
1610
- * New: External forms check now independed from JavaScript.
1611
- * New: Setting Protect external - capture buffer.
1612
- * New: QuForm integration.
1613
-
1614
- = 5.123 July 25 2019 =
1615
- * Fix: Plenty of minor fixes.
1616
- * Fix: wpDiscuz integration.
1617
- * Fix: Integration with bbPress.
1618
- * Fix: New comment email notification.
1619
- * New: Follow-Up Emails integration.
1620
- * Fix: Woocommerce integration.
1621
- * Fix: Spelling.
1622
-
1623
- = 5.122 July 10 2019 =
1624
- * Spam Protection improved.
1625
- * Fix: Error while checking account status.
1626
- * Fix: Conflict with Elementor Pro.
1627
- * Fix: Integration with Ninja Forms.
1628
- * Fix: Integration with Formidable.
1629
- * New: Detecting mobile devices.
1630
- * New: Integration for Easy Forms for Mailchimp.
1631
-
1632
- = 5.121 June 26 2019 =
1633
- * Fix: Translation typos.
1634
- * Fix: Woocommerce integration.
1635
- * Fix: Catching admin in AJAX queries.
1636
- * Mod: Session table (cleantalk_sessions) issue.
1637
- * Mod: Spam protection improved.
1638
- * Integration: Wilcity theme custom registration validation enabled
1639
- * New: Option "Use static JS key".
1640
-
1641
- = 5.120.2 June 17 2019 =
1642
- * Fix: WPForms integration.
1643
- * Fix: Translation and spelling.
1644
- * Fix: Minor PHP error
1645
-
1646
- = 5.120.1 June 6 2019 =
1647
- * Mod: Description for Search form protection.
1648
- * Fix: CSS and JS attachment.
1649
- * Fix: Undefined index error.
1650
-
1651
- = 5.120 June 5 2019 =
1652
- * Fix: bbPress false positives.
1653
- * Fix: SpamFireWall check condition.
1654
- * Fix: SpamFireWall block page.
1655
- * Fix: Catch admin action via search form test.
1656
- * Fix: Catch admin action (AJAX).
1657
- * Mod: Using minified version of JS and CSS.
1658
- * Mod: Date format in statistics.
1659
-
1660
-
1661
- = 5.119.1 May 30 2019 =
1662
- * Fix: Helper class error.
1663
-
1664
- = 5.119 May 30 2019 =
1665
- * Fix: No more second request after registration.
1666
- * Fix: Activation hook.
1667
- * Fix: Alternative sessions. Clear table.
1668
- * Fix: Stop capchuring AJAX requests in admin area.
1669
- * Fix: Spelling.
1670
- * Fix: Registration cookies set.
1671
- * Mod: SFW exdtended die page when testing.
1672
- * Mod: User-agent modified.
1673
- * New: Test search queries for spam.
1674
- * New: Gathering and output statistics.
1675
-
1676
- = 5.118.4 May 13 2019 =
1677
- * Fix: SFW cookie. Set correct domain for subdomains.
1678
- * Fix: SFW update.
1679
- * Fix: IP detection.
1680
- * Fix: Triggering AJAX check in backend.
1681
- * Fix: Zero submit time on few forms.
1682
-
1683
- = 5.118.3 April 29 2019 =
1684
- * Fix: Spam statistics in dashboard widget.
1685
- * Fix: IP detection.
1686
- * Fix: Double check AJAX integrated forms like Ninja Forms.
1687
- * Fix: Use url exclusions for AJAX forms.
1688
-
1689
- = 5.118.2 April 25 2019 =
1690
- * Mod: Spam filtration quality improved.
1691
- * Mod: Store SFW cookie for 30 days.
1692
- * Mod: Server IP added to connection report.
1693
- * Fix: spam_stat is not defined.
1694
-
1695
- = 5.118.1 April 19 2019 =
1696
- * Fix: Fatal error.
1697
- * Mod: Spam protection improved on registrations.
1698
-
1699
- = 5.118 April 19 2019 =
1700
- * Fix: Cookies on registration page.
1701
- * Fix: Update fix.
1702
- * Fix: Wordpress built-in API.
1703
- * Fix: WooCommerce checkout form.
1704
- * Fix: UpdraftPlus. Saving settings.
1705
- * Fix: Convert Pro saving settings.
1706
- * Fix: UTF-8 Converting.
1707
- * Fix: GDPR notice.
1708
- * Fix: cleantalk_sessions table size reduced.
1709
- * Mod: Localization.
1710
- * Mod: Performance improved.
1711
- * Mod: SpamFierWall improvments.
1712
- * Mod: IP detection improved.
1713
- * Mod: JavaScript check rewised.
1714
- * New: Setting "Use alternative mechanism for cookies".
1715
-
1716
- = 5.117.1 April 5 2019 =
1717
- * Fix: GDPR notice.
1718
- * Fix: noCacheJS localization.
1719
- * Fix: Fatal error when updating.
1720
-
1721
- = 5.117 March 27 2019 =
1722
- * New: Update logic runs on all pages.
1723
- * New: Integration for Ajax Contact Forms plugin.
1724
- * New: Notification for users groups about new comments.
1725
- * New: SFW die page. Show browser and page creation time.
1726
- * Fix: Huge bug in Cleantalk.php connected with servers changing.
1727
- * Fix: Check AJAX requests for logged in users.
1728
- * Fix: Deleting debug in JS.
1729
- * Fix: Validating settings before saving.
1730
-
1731
- = 5.116.3 March 14 2019 =
1732
- * Fix: "Headers already sent" error.
1733
- * Fix: Images paths.
1734
- * Fix: IP detection.
1735
- * Fix: Skip lost password form check
1736
- * Fix: Skip mobile requests (push settings)
1737
- * Fix: PHP notice when detecting BuddyPress template.
1738
-
1739
- = 5.116.2 March 7 2019 =
1740
- * Fix: Creating tables in MariaDB.
1741
-
1742
- = 5.116.1 March 6 2019 =
1743
- * Fix: Creating tables in DB.
1744
- * Fix: PHP Warning in spam statistics widget.
1745
-
1746
- = 5.116 March 6 2019 =
1747
- * Spam filtration quality improved.
1748
- * New: Storing visited URLs.
1749
- * New: Check before validation Contact Form 7, Comments, Jetpack comments.
1750
- * New: Get validation result for Contact Form 7, Comments, Jetpack comments.
1751
- * Fix: ES add subscriber.
1752
- * Fix: IP detection.
1753
-
1754
- = 5.115.2 February 27 2019 =
1755
- * Fix: False positives spam detection in WP Forms and Contact Form 7.
1756
-
1757
- = 5.115.1 February 16 2019 =
1758
- * Fix: SpamFireWall's false positives.
1759
-
1760
- = 5.115 February 14 2019 =
1761
- * Fix: Http_only flag for backend cookies.
1762
- * Fix: Spam filtration improved.
1763
- * New: IP detection improved.
1764
- * Fix: SpamFirewall update speeded up.
1765
- * New: False positives with caching solutions decreased.
1766
- * New: Opportunity to use Wordpress HTTP API to connect with Cloud.
1767
-
1768
- = 5.114 January 31 2019 =
1769
- * New: Setting "Use Wordpress HTTP API" as alternative to CURL. Disabled by default.
1770
- * Fix: Formidable: Adding small JS check when adding JS_key.
1771
- * Mod: layout of settings page.
1772
- * Mod: Banner logic altered.
1773
-
1774
- = 5.113.2 January 18 2019 =
1775
- * Fix: "Settings" link returns to plugin page.
1776
-
1777
- = 5.113.1 January 17 2019 =
1778
- * Fix: Conflict with CityTours theme.
1779
- * Fix: Error for Wordperss lower 4.7.
1780
- * Add: Spam protection: "Validate email for existance".
1781
-
1782
- = 5.113 January 16 2019 =
1783
- * Fix: Fast and Simple Contact Form.
1784
- * Fix: Settings layout.
1785
- * Fix: Error with WooCommerce Quickview.
1786
- * Fix: Bitrix24 contact form.
1787
- * Fix: Request time decreased.
1788
- * Fix: Requesting account status when activating for IP licenses.
1789
- * Add: Precise AJAX request detection.
1790
- * Spam protection improved.
1791
-
1792
- = 5.112 December 21 2018 =
1793
- * Fix: Woocommerce AJAX checkout form.
1794
- * Fix: Profile Builder Pro.
1795
- * Fix: DB structure improvements for WPMS.
1796
- * Spam filtering quality improved.
1797
- * Minor fixes.
1798
-
1799
- = 5.111 December 13 2018 =
1800
- * Fix: Double request in JetPack contact form.
1801
- * Fix: Email notification about spam registration.
1802
- * Fix: Links button for feedback comments.
1803
- * Fix: Mail notification about plugin error.
1804
- * Fix: Key field output.
1805
- * Minor fixes.
1806
-
1807
- = 5.110 November 29 2018 =
1808
- * Integration: BuddyPress ActivityWall spam protection.
1809
- * Add: Support different BuddyPress templates on activity wall.
1810
- * Fix: Admin/moderator checking for validate post data.
1811
- * Add: GDPR setting for shortcode.
1812
- * Fix: Increase timeout for spam_check_cms to 15.
1813
-
1814
- = 5.109 November 15 2018 =
1815
- * Fix: Added URL and IP exclusions to Contact Form 7.
1816
- * Fix: js error when responseText is not exists
1817
- * Fix: Sitename when getting key automatically under WPMS.
1818
- * Mod: SpamFireWall is now fully compatible with WPMS.
1819
- * Mod: Setting 'Tell others about CleanTalk' was deleted.
1820
- * Mod: Protection from spam improved.
1821
-
1822
- = 5.108.1 November 8 2018 =
1823
- * Fix: Errors with integration class.
1824
-
1825
- = 5.108 November 7 2018 =
1826
- * Fix: White label mode.
1827
- * Fix: SpamFireWall now can be disabled.
1828
- * Fix: Layout.
1829
- * Integration: WPForms.
1830
- * Add: Message about block for all no integrated AJAX forms.
1831
- * Add: Displaying account name near api key.
1832
-
1833
- = 5.107 October 29 2018 =
1834
- * Fix: Ninja Forms integration.
1835
- * Fix: Cookie usage.
1836
- * Add: Capturing AJAX responses from non integrated forms.
1837
- * Spam protection improved.
1838
- * Minor fixes.
1839
-
1840
- = 5.106 October 11 2018 =
1841
- * Spam filtration improved.
1842
- * New: White Label mode.
1843
- * Modification: Warning message about test on SpamFireWall die page.
1844
- * Integration: WP Maintenance Mode.
1845
- * Fix: S2Member.
1846
- * Fix: JavaScript attachments reconsidered.
1847
- * Fix: Admin banners layout.
1848
- * Fix: Minor layout fixes.
1849
-
1850
- = 5.105 September 26 2018 =
1851
- * Integration: Now bloking spam for QAEngine questions.
1852
- * Fix: Async http__request call.
1853
- * Fix: Unnecessary get_antispam_report_breif method call.
1854
- * Layout: Hide "Do you like Cleantlak?" when key is not ok.
1855
- * Layout: Minor fixes.
1856
-
1857
- = 5.104 September 18 2018 =
1858
- * Fix: Error when saving settings.
1859
- * Fix: Trying update plugin plugin for the first installation.
1860
- * Fix: Update system.
1861
- * Fix: Errors output.
1862
- * Fix: Plugin's settings under WPMS.
1863
- * Fix: SpamFireWall update.
1864
- * Fix: The server change system repaired.
1865
- * Mod: Cron saving tasks improved.
1866
-
1867
- = 5.103.1 September 14 2018 =
1868
- * Fix: Error when saving settings.
1869
- * Fix: Error when getting key automatically.
1870
-
1871
- = 5.103 September 13 2018 =
1872
- * Fix: Gravity Forms response message.
1873
- * Fix: SpamFireWall redirect to 404 page.
1874
- * Major anti-spam plugin improvement.
1875
- * Recombined setting page.
1876
- * Added error notification.
1877
- * Mod: S2 Members integration.
1878
- * Mod: Improved remote calls.
1879
-
1880
- = 5.102 August 29 2018 =
1881
- * Fix: Users and comments check.
1882
- * Fix: Update from 5.70 or previous versions.
1883
- * Fix: GDPR public JS-script.
1884
- * Fix: Dashboard widget JS scripts attachment.
1885
- * Fix: WooCommerce "Place order" action.
1886
- * Mod: Notification logic altered.
1887
- * Mod: Users check table now has 'Signed up' column.
1888
- * Minor fixes.
1889
-
1890
- = 5.101 August 10 2018 =
1891
- * Fix: Set cookie only for non-dashboard pages.
1892
- * Fix: Dashboard widget JS error.
1893
- * Fix: JavaScript error for some environment.
1894
- * Mod: Antispam protection accelerated for some pages.
1895
-
1896
- = 5.100 July 30 2018 =
1897
- * Fix: JavaScript dependencies.
1898
-
1899
- = 5.99.1 July 17 2018 =
1900
- * IP detection fixed and improved.
1901
-
1902
- = 5.99 July 10 2018 =
1903
- * Fix: WooCommerce false positives.
1904
- * Fix: SpamFireWall IP detection.
1905
- * Minor fixes.
1906
-
1907
- = 5.98 June 27 2018 =
1908
- * Fix: WooCommerce: Exclusion.
1909
- * Fix: Public GDPR JS code.
1910
- * Minor fixes.
1911
-
1912
- = 5.97 June 7 2018 =
1913
- * Fix: Update system.
1914
- * Fix: Feedback from public page (admin only).
1915
- * Fix: Users and comment check: API error.
1916
- * Fix: Too many negative reports. (Too big ct_data option)
1917
- * Fix: SpamFireWall: Infinite redirection on the blocking page.
1918
- * Minor fixes.
1919
-
1920
- = 5.96 May 22 2018 =
1921
- * Fix: Update system.
1922
- * Mod: Reset all counters button in admin bar.
1923
- * Mod: GDPR compliance.
1924
- * Minor fixes.
1925
-
1926
- = 5.95.1 May 3 2018 =
1927
- * Fix: "Get key automatically" button display logic.
1928
- * Fix: PHP notices.
1929
-
1930
- = 5.95 May 2 2018 =
1931
- * Spam filtration improved.
1932
- * Fix: Public widget layout.
1933
- * Fix: Connection reports output.
1934
- * Minor fixes.
1935
-
1936
- = 5.94 April 23 2018 =
1937
- * Mod: Async load option for JS.
1938
- * Mod: JS scripts loading is conditional.
1939
- * Fix: IP detection.
1940
- * Fix: IP detection.
1941
- * Fix: Javascript error.
1942
-
1943
- = 5.93.1 April 9 2018 =
1944
- * Fix: Fatal error on PHP 5.5 or lower.
1945
-
1946
- = 5.93 April 9 2018 =
1947
- * Fix: SpamFirewall IP detection.
1948
- * Fix: Contact Form 7. False positives.
1949
- * Mod: Autoupdate function improved.
1950
- * Minor fixes.
1951
-
1952
- = 5.92.2 March 23 2018 =
1953
- * Fix: Error if cURL extension is disabled.
1954
-
1955
- = 5.92.1 March 23 2018 =
1956
- * Fix: Spelling
1957
- * Fix: Fatal error if cURL extension is disabled.
1958
-
1959
- = 5.92 March 22 2018 =
1960
- * IP detection improved.
1961
- * Fix: SSL connection.
1962
- * Fix: False positives spam detection in Contact Form 7.
1963
- * Minor fixes.
1964
-
1965
- = 5.91 March 15 2018 =
1966
- * Fix: Errors for PHP compiled without XML support.
1967
- * Fix: Spelling and translation.
1968
- * Stability increased.
1969
- * Minor fixes.
1970
-
1971
- = 5.90 March 7 2018 =
1972
- * Improvement: Better IP recognition in Spam FireWall.
1973
- * Fix: Gravity Froms blocking message.
1974
- * Security improvments.
1975
- * Minor fixes.
1976
-
1977
- = 5.89 February 21 2018 =
1978
- * Improved spam filtration quality.
1979
- * Improved compatibility.
1980
- * Public widget: Styles and referral link added.
1981
- * Dashboard widget: revised and fixed.
1982
- * Minor fixes.
1983
-
1984
- = 5.88 February 12 2018 =
1985
- * Integration: ConvertPro.
1986
- * Improvement: Search for visitor's names in request.
1987
- * Fix: Contact Form 7 message recognition.
1988
- * Preparation for the remote plugin update.
1989
- * Minor fixes.
1990
-
1991
- = 5.87 February 2 2018 =
1992
- * Filtration quality improved.
1993
- * Fix: WP Foto Vote downloading images.
1994
- * Fix: Fatal error for unsupported PHP 5.2.
1995
- * Fix: Formidable Forms improved spam filtration.
1996
-
1997
- = 5.86 January 25 2018 =
1998
- * Fix: High CPU load with wp-ajax.php.
1999
- * Fix: Mailpoet: Newsletter.
2000
- * Fix: Gravity: Forms standardization for input fields.
2001
- * Fix: ajax hook checks data for contact form.
2002
- * Fix: UTF8 character in requests.
2003
-
2004
- = 5.85 January 11 2018 =
2005
- * Fix: Fast Secure contact form spam block message.
2006
- * Fix: IP license status.
2007
- * Layout: Dashboard widget description altered.
2008
-
2009
- = 5.84 December 26 2017 =
2010
- * Integration: PeepSo contact form
2011
- * Repared: Feedback from comments page.
2012
- * Fix: mb_* functions used only if exists.
2013
- * Fix: Gravity forms: Multi-page form logic repared.
2014
- * Fix: Gravity forms: AJAX form logic repared.
2015
- * Minor fixes.
2016
-
2017
- = 5.83.2 December 19 2017 =
2018
- * Fix: Error in base class.
2019
-
2020
- = 5.83.1 December 19 2017 =
2021
- * Fix: CDN IP detection.
2022
-
2023
- = 5.83 December 19 2017 =
2024
- * Improving: Stability and compatibility.
2025
- * Improving: Spam protection.
2026
- * Fix: Comments logic filtration.
2027
- * Fix: Admin bar counter.
2028
- * Minor errors fixes.
2029
-
2030
- = 5.82.1 December 7 2017 =
2031
- * Fixed minor error with attaching JS and CSS files.
2032
-
2033
- = 5.82 December 4 2017 =
2034
- * Plugin doesn't use PHP sessions anymore.
2035
- * Bug fixes.
2036
- * Improved update logic.
2037
-
2038
- = 5.81 November 22 2017 =
2039
- * Fixed error with "Show/Hide key" button.
2040
- * Slightly improved spam protection for all forms.
2041
- * Small errors fixes.
2042
-
2043
- = 5.80 November 3 2017 =
2044
- * Spam protection improved.
2045
- * Improved filtration quality for WooCommerce checkout.
2046
- * Minor fixes for Spam FireWall.
2047
-
2048
- = 5.79 October 26 2017 =
2049
- * Spam protection improved.
2050
- * Fixed issue with existing spam comments check.
2051
- * Added posibility to exclude IP from check.
2052
- * Minor fixes.
2053
-
2054
- = 5.78 October 16 2017 =
2055
- * Improved compatibility with themes. Changed core functions prefix.
2056
- * Fixed issue with WooCommerce checkout.
2057
- * Spam protection improved.
2058
- * Minor fixes.
2059
-
2060
- = 5.77 October 2 2017 =
2061
- * Connection report's system.
2062
- * Integration for CouponXXL Theme.
2063
- * Fixed issue with mb_* functions.
2064
- * Banners logic updated.
2065
-
2066
- = 5.76 September 20 2017 =
2067
- * Fixed issue with Spam FireWall and caching plugins.
2068
- * Banners logic updated.
2069
-
2070
- = 5.75 September 15 2017 =
2071
- * Pause feature for users/comments spam check.
2072
- * Improved protection from spam.
2073
- * Small fixes.
2074
-
2075
- = 5.74.2 September 2 2017 =
2076
- * Fix for users spam check for PHP 5.3 and lower.
2077
-
2078
- = 5.74.1 September 2 2017 =
2079
- * Fix for the update system and cloud communication.
2080
- * Added possibility to check users and comments for spam with a specific date range.
2081
-
2082
- = 5.74 August 31 2017 =
2083
- * Users and comments spam check: Two check types (fast and accurate).
2084
- * Fix for WooCommerce checkout test.
2085
- * Minor fixes.
2086
-
2087
- = 5.73 August 11 2017 =
2088
- * Fix for spam check for already existed users and comments.
2089
- * Spam FireWall updated.
2090
- * Layout fix for BT Comments.
2091
- * Minor fixes.
2092
-
2093
- = 5.72 July 27 2017 =
2094
- * Improved spam check for existed users and comments.
2095
- * Minor fixes.
2096
-
2097
- = 5.71 July 20 2017 =
2098
- * Improved spam protection for external forms.
2099
- * Optimization.
2100
- * Minor fixes.
2101
-
2102
- = 5.70.2 July 17 2017 =
2103
- * Fix for Spam FireWall for Multisite.
2104
-
2105
- = 5.70.1 July 17 2017 =
2106
- * Fix for Spam FireWall.
2107
- * Spam detection improved.
2108
-
2109
- = 5.70 July 13 2017 =
2110
- * New updater logic.
2111
- * Self cron system.
2112
- * Improved AMP compatibility.
2113
- * Optimization.
2114
- * Fixed users and comments spam check.
2115
- * Fixed layout for Comment's feedback from public page.
2116
- * Updated Spam FireWall.
2117
- * SFW: Spam FireWall counter now work in real-time.
2118
- * SFW: Improved compatibility with different Data Bases.
2119
-
2120
- = 5.69 July 3 2017 =
2121
- * Reviewer - integration.
2122
- * Optimization for Users and Comments check for big databases.
2123
- * Errors fixes.
2124
- * Improved protection from spam.
2125
-
2126
- = 5.68 June 22 2017 =
2127
- * Contact Form for WordPress - Ultimate Form Builder Lite - integration.
2128
- * Contact Bank - Contact Forms Builder - integration.
2129
- * Smart Forms - integration.
2130
- * cformsII - integration.
2131
- * Contact Form by Web-Settler - integration.
2132
- * Error fixes.
2133
-
2134
- = 5.67.3 June 9 2017 =
2135
- * Fixed JS attachment error.
2136
-
2137
- = 5.67.2 June 5 2017 =
2138
- * Fixed error with IP determination.
2139
-
2140
- = 5.67.1 June 4 2017 =
2141
- * Fixed JS error in 5.67 version.
2142
- * Integrations: Enfold theme, Convertplug.
2143
- * Links to check for Emails/IP for spam.
2144
- * Control comments and feedback about them from public post's page.
2145
- * Improved connection stability with cloud service.
2146
- * Spam protection improved.
2147
- * Other small fixes.
2148
-
2149
- = 5.67 June 1 2017 =
2150
- * Integrations: Enfold theme, Convertplug.
2151
- * Links to check for Emails/IP for spam.
2152
- * Control comments and feedback about them from public post's page.
2153
- * Improved connection stability with cloud service.
2154
- * Spam protection improved.
2155
- * Other small fixes.
2156
-
2157
- = 5.66 May 23 2017 =
2158
- * Spam protection improved.
2159
- * Major fixes for users and comments spam check.
2160
- * Added feedback from Wordpress comments list.
2161
- * Fix for "internal forms check" option.
2162
- * Fixed issue with caching Spam FireWall die page.
2163
- * Other small fixes.
2164
-
2165
- = 5.65 May 16 2017 =
2166
- * Fix for PayPal redirecton.
2167
- * Fixed issue with empty query for bulk comments test.
2168
- * Added protection for Enfold contact form.
2169
- * Ninja forms integration.
2170
-
2171
- = 5.64 April 26 2017 =
2172
- * Integration for Facebook registrations.
2173
- * Small fixes for WPMS.
2174
- * Fix for Activecampaign service.
2175
- * Fix for check spam users.
2176
- * Fixed rare notice Notice: Undefined index: REQUEST_URI
2177
-
2178
- = 5.63 April 20 2017 =
2179
- * Fix for the dashboard spam stat widget.
2180
- * Added translation posibility for all text.
2181
-
2182
- = 5.62 April 17 2017 =
2183
- * Fix for the dashboard spam statistics widget.
2184
- * Fix for users spam check.
2185
- * Small appearance changes.
2186
-
2187
- = 5.61 April 6 2017 =
2188
- * Improved filtration.
2189
- * Additional logic for the form recognizing.
2190
- * Integration: Divi Theme Contact Form.
2191
- * Fix: Gravity Forms multipages forms.
2192
- * Stat Widget: Minor fixes.
2193
- * Added possibility to download results of the users check in CSV format.
2194
- * Alteration for settings page (footer).
2195
-
2196
- = 5.60.1 March 29 2017 =
2197
- * Fixed error function 'locale_get_display_region' no exists.
2198
-
2199
- = 5.60 March 29 2017 =
2200
- * Added main dashboard widget with spam sctivity stats.
2201
- * Mailster - integration.
2202
- * Base class updated.
2203
-
2204
- = 5.59 March 24 2017 =
2205
- * Users/comments check fix.
2206
- * Plugin's name changed to Anti-Spam by CleanTalk.
2207
- * Trial banner is dismissable. Disapear for 24h or till logout.
2208
- * Settings modified (Auto testing failed warning).
2209
- * Mailing(inactive key) interval increased to 6 hours.
2210
-
2211
- = 5.58.6 March 16 2017 =
2212
- * Fix for Ninja forms (protection updated).
2213
- * Fix for QA Theme.
2214
- * Fix for RSVP form.
2215
- * Setting changes (Spam FireWall).
2216
- * Improved debug section.
2217
- * Improved gathering data function.
2218
- * Minor fixes.
2219
-
2220
- = 5.58.5 March 6 2017 =
2221
- * Minor backend fix.
2222
-
2223
- = 5.58.4 March 6 2017 =
2224
- * Users check fix (redirect after the check).
2225
- * Fixed PHP Notice "HTTP_REFERER" is unset.
2226
- * Updated Notice logic.
2227
-
2228
- = 5.58.3 February 28 2017 =
2229
- * Bitrix24 Contact form integration.
2230
- * Users/comments check fix.
2231
- * Spam sorting updated.
2232
- * Banner showing logic.
2233
-
2234
- = 5.58.2 February 17 2017 =
2235
- * Cron fix for daily report.
2236
-
2237
- = 5.58.1 February 16 2017 =
2238
- * Minor fixes.
2239
-
2240
- = 5.58 February 15 2017 =
2241
- * Work without access key
2242
- * Bitrix24 contact integration
2243
- * Issues fixes
2244
-
2245
- = 5.57.1 February 8 2017 =
2246
- * Fix for notice logic.
2247
-
2248
- = 5.57 February 8 2017 =
2249
- * Setting page changes.
2250
- * Bug fixes for WooCommerce.
2251
- * Spam FireWall filters only GET requests.
2252
- * Optimization.
2253
- * Minor and major fixes.
2254
-
2255
- = 5.56.1 January 25 2017 =
2256
- * Minor fixes
2257
-
2258
- = 5.56 January 19 2017 =
2259
- * Integrations: MailChimp Premium, Profile Press.
2260
- * Changes comments flow.
2261
- * FireWall updater fix.
2262
- * Users check optimization.
2263
-
2264
- = 5.55 December 23 2016 =
2265
- * Integrations: Caldera Forms, Visual Form Builder.
2266
- * Fix for different 'cookies' header names.
2267
- * Fixed user deletion.
2268
-
2269
- = 5.54 December 12 2016 =
2270
- * Integrations: AmoForms, Contact Form Clean and Simple.
2271
- * Comments check logic refreshed.
2272
- * Registration JS error fix.
2273
- * Users check fix.
2274
- * Fix for translation system.
2275
- * Minor fixes.
2276
-
2277
- = 5.53.1 December 9 2016 =
2278
- * Minor layout fixes.
2279
-
2280
- = 5.53 November 28 2016 =
2281
- * Addition warning before deleting users.
2282
- * Spam FireWall is enabled by default.
2283
- * Usernoise modal feedback / contact form : integration.
2284
- * Translations.
2285
- * Optimization.
2286
- * Fixes.
2287
-
2288
- = 5.52.1 November 14 2016 =
2289
- * Users and comments check: Using new API method.
2290
- * Quick Contact From: Integration via "Custom Contact Forms" setting.
2291
- * JavaScript filtration improved.
2292
- * Translation changes.
2293
- * Optimized JavaScript code.
2294
-
2295
- = 5.51 November 2 2016 =
2296
- * Added protection for internal forms
2297
- * Immediate spam check for comments and users from WP dashboard
2298
- * Optimized code
2299
-
2300
- = 5.50.1 October 24 2016 =
2301
- * Improved filtration in contact forms.
2302
- * Spam FireWall: Fixed issue with SFW logs
2303
- * Skipping service fields: Fast Secure Contact Froms, QU Forms, Custom Contact Forms
2304
-
2305
- = 5.50 October 20 2016 =
2306
- * Custom contact forms: integration.
2307
- * Pirate Forms: integration.
2308
- * PHP 7 compatibility: Deleted third-party JSON library and dependences.
2309
- * PHP 7 compatibility: Fixed end of lines.
2310
- * YOAST Seo: Fixed PHP warnings.
2311
- * Spam FireWall: Minor fix for Spam FireWall counter.
2312
- * Only admin could access to CleanTalk dashboard (exclude Authors an Editors).
2313
- * Improved filtration in contact forms.
2314
-
2315
- = 5.49.2 October 5 2016 =
2316
- * Second Fix for database error. Stable version.
2317
-
2318
- = 5.49.1 October 5 2016 =
2319
- * Fixed database error.
2320
-
2321
- = 5.49 October 3 2016 =
2322
- * Spam FireWall feature: Class upgraded.
2323
- * New feature: Delete links from approved comments.
2324
- * Settings: Grouped.
2325
- * Settings: Altered description fixed spelling mistakes.
2326
- * Settings: Added indicator for Spam FireWall.
2327
- * Admin bar: Added Spam FireWall counter
2328
- * Clean and Simple Contact Form: Direct integration.
2329
- * WooCommerce: Don't check password recovery form.
2330
- * WooCommerce Wishlists: Issue with check for Google bots.
2331
- * JetPack: contact form fix.
2332
- * Fixed and created the defaults for all CleanTalk options.
2333
- * Fixed spelling mistakes.
2334
-
2335
- = 5.48 September 15 2016 =
2336
- * buddyPress: Added private messages filtering. Doesn't check user if he has 3 or more messages in the "sentbox" and "inbox" folders.
2337
- * buddyPress: Added option in settings for private messages check.
2338
- * WooCommerce Wishlist: Added check for wishlists.
2339
- * Fixed issue with "check all post data" option.
2340
- * Improved filtering for Gravity Forms
2341
- * Mobile Assistant Connector fix
2342
- * Minor fixes.
2343
-
2344
- = 5.47 September 5 2016 =
2345
- * WooCommerce: direct integration for checkout form.
2346
- * WooCommerce Sensei: login form fix.
2347
- * bbPress: Added the check for topics and comments with stop_words
2348
- * bbPress: Skip check for admin in comments and topics
2349
- * UserPro: fixes. Request without field "shortcode"
2350
- * Contact Form 7: Bug fix.
2351
- * Spam FireWall: Optimized logs rotation.
2352
- * Updated inner functions (compatibility fix for PHP 5.4+)
2353
- * Fixed output of counters (without spamfirewall stats)
2354
- * Fixed spelling in settings
2355
- * Added "Delete from the list" button in comments spam check page
2356
- * Minor fixes.
2357
-
2358
- = 5.46 August 17 2016 =
2359
- * Fixed issue with admin bar links in WP Multi Network mode.
2360
- * Added "All time counter" and "Daily counter" into admin bar.
2361
- * Added settings to disable counters in admin bar.
2362
- * New style for "Get access key manually" button.
2363
-
2364
- = 5.45.2 August 4 2016 =
2365
- * Added Anti-Spam protection for Quick Event Manager.
2366
- * Improved bulk spam test for users. Now the plugin does not mark as Spam user, if the user IP address has spam activity more then 30 days ago.
2367
- * Fixed bulk spam test for comments. Previous version had a conflict between spam history for IP and Email.
2368
- * Minor fix function to get the API key.
2369
-
2370
- = 5.45.1 July 26 2016 =
2371
- * Fixed issue with missed spam messages, subscriptions.
2372
- * Improved bulk spam test for comments. Now the plugin will not mark as Spam comments, if a comment sender (IP address) has spam activity more then 30 days ago.
2373
-
2374
- = 5.45 July 21 2016 =
2375
- * Optimized bulk spam comments deletion.
2376
- * Turned off JavaScript anti-spam cookies if the option 'Set cookies' is turned off. It helps to avoid issues with Varnish.
2377
- * Added links to bulk spam comments&users removal tool.
2378
-
2379
- = 5.44.1 July 13 2016 =
2380
- * Optimized options getting code.
2381
- * Added the option 'Protect Logged in users' to do anti-spam tests for submissions by logged in users.
2382
-
2383
- = 5.43.2 June 30 2016 =
2384
- * Optimized anti-spam code for AJAX based contact forms.
2385
- * Fixed CSS layout of counters in Admin bar (issue with layout in IE11).
2386
-
2387
- = 5.43.1 June 23 2016 =
2388
- * Added agent version in requests to test a connection between the website and servers.
2389
- * Fixed issue with PHP notices in cleantalk-admin.php.
2390
-
2391
- = 5.43 June 22 2016 =
2392
- * Added spam protection for registrations via 'Login with AJAX' plug-in.
2393
- * Added a new counter to Admin bar that allows to count spam and approved submissions since last reset.
2394
- * Update the code that tests a connection between a website and CleanTalk's servers. New version doesn't generate submissions with email good@cleantalk.org.
2395
- * Fixed issue with spam protection for nested forms by Formidable plug-in.
2396
-
2397
- = 5.42 2016-06-15 =
2398
- * Added anti-spam protection for UserPro.
2399
- * Improved protection for Formidable forms + Varnish.
2400
- * Improved bulk search for spam accounts.
2401
- * Fixed spam protection for pages that contain multiple Formidable forms with same HTML ID.
2402
- * Optimized PHP code to be compatible with PHP 5.4 and above. The patch has been applied to Formidable forms spam protection.
2403
- * Minor fixes in plugin backend.
2404
-
2405
- = 5.41 2016-05-31 =
2406
- * Added HTTP response in plugin response if an network issue was happend.
2407
- * Optimized JavaScript anti-spam test for Formidable forms.
2408
- * Re-stored the option to auto redirect to plugn settings after plugin activation.
2409
- * Fixed issue with nasted fields in Formidable forms.
2410
-
2411
- = 5.40.3 2016-05-26 =
2412
- * Added option to encrypt (SSL) connection to CleanTalk anti-spam servers.
2413
- * Added JSON encoding for AJAX forms.
2414
- * Obfuscated private data for Custom contact forms option.
2415
- * Optimized bulk users check for spam over blacklists database.
2416
- * Fixed issue with lost connection to servers and JavaScript anti-spam test.
2417
- * Fixed issue with WordFence and collect_details.
2418
-
2419
- = 5.40.2 2016-05-11 =
2420
- * Improved account status check logic.
2421
- * Fixed issue with double anti-spam tests for FastSecure contact forms.
2422
- * Fixed issue with nulled JavaScript variables assigned from backend. This issue might me occurred on standart WordPress registration form and with failed JavaScript spam test.
2423
- * Fixed issue with session_start() with PHP sessions stored in memcache.
2424
-
2425
- = 5.40.1 2016-04-28 =
2426
- * Fixed issue with Super Socializer.
2427
- * Fixed issue with spam filtration for logged in users and Formidable forms.
2428
- * Added logging of all submitted fields for FastSecure contact form.
2429
-
2430
- = 5.40 2016-04-19 =
2431
- * Added JSON encoding for posts that were protected via Custom contact forms option. It allows show anti-spam logs in the Dashboard in more comfortable view.
2432
- * Minor fix in plugin settings.
2433
- * Fixed pagination for bulk users spam test.
2434
- * Fixed issue with unknown _SESSION.
2435
- * Fixed issue with double Spam FireWall database upload.
2436
-
2437
- = 5.39.1 2016-04-04 =
2438
- * Improved AJAX based anti-spam test with HTTPS backends.
2439
- * Added fix to avoid issue with empty ct_info_flag on JavaScript side.
2440
- * Added logic to exclude caching for Spam FireWall.
2441
- * Removed a condition to skip accounts with 127.0.0.1 IP in spam test for registered acconts.
2442
-
2443
- = 5.38.1 2016-03-24 =
2444
- * Fixed issue with PHP sessions and 'The session id is too long or contains illegal characters'.
2445
- * Removed Spam FireWall protection on /feed page.
2446
- * Disabled anti-spam tests for AJAX calls if the option 'Custom contact forms' is turned off.
2447
- * Added reject notice for spam submissions on Gravity forms with AJAX calls.
2448
-
2449
- = 5.37.3 2016-03-10 =
2450
- * Minor bug fixes. Added an option to support Varnish cache.
2451
-
2452
- = 5.36.1 2016-02-05 =
2453
- * Fixed bug, when users receive error after logging in
2454
-
2455
- = 5.36 2016-02-04 =
2456
- * Improved JavaScript anti spam protection
2457
- * Improvements for avoiding blocking requests from payment systems
2458
-
2459
- = 5.35 2016-01-14 =
2460
- * Added support for IP licensing
2461
- * Some anti-spam protection improvements
2462
- * Small backend interface fixes
2463
-
2464
- = 5.34.1 2015-12-17 =
2465
- * Fixed trackback antispam protection: improved checking mechanism
2466
- * Fixed problem with blocking MailPoet: added exclusions in spam checking algorithm
2467
-
2468
- = 5.34 2015-12-10 =
2469
- * Improved spam checking mechanism
2470
- * Added "Collect browser details" option for better antispam protection
2471
- * Fixed custom contact forms checking
2472
- * Minor translations fixes
2473
-
2474
- = 5.33.1 2015-12-04 =
2475
- * Fixed issue with BBPress
2476
- * Fixed anti-spam comments checking
2477
- * Fixed bulk checking
2478
- * Fixed trackback and pingback checking
2479
-
2480
- = 5.33 2015-12-01 =
2481
- * Backend interface fixes
2482
- * Improved Spam FireWall efficiency
2483
- * Improved performance of anti spam checking
2484
-
2485
- = 5.32 2015-11-26 =
2486
- * Added improvements for manual spam detection
2487
- * Fixed errors in backend
2488
- * Fixed bulk users anti spam checking
2489
- * Added indicator for bulk spam checking
2490
- * Added "Get access key automatically" feature
2491
-
2492
- = 5.31 2015-11-11 =
2493
- * Improved backend performance
2494
- * Fixed counter of approved/blocked spam attacks
2495
- * Fixed Spam Firewall logging
2496
-
2497
- = 5.30 2015-11-05 =
2498
- * Improved anti-spam checking
2499
- * Optimized performance
2500
- * Fixed blocking email preview in MailPoet
2501
- * Interface fixes
2502
- * WPMU interface fixes
2503
-
2504
- = 5.29 2015-10-27 =
2505
- * Optimized performance
2506
- * Fixed bugs in custom contact forms spam checking
2507
-
2508
- = 5.28.7 2015-10-23 =
2509
- * Major backend peromance fix.
2510
-
2511
- = 5.28 2015-10-16 =
2512
- * Fixed errors in anti-spam checking
2513
- * Restored options for spam checking registrations and cpmmon contact forms
2514
- * Improved anti spam defence
2515
- * Fixed problems with AJAX functionality in MailPoet, WooCommerce and other AJAX plugins
2516
-
2517
- = 5.27 2015-10-13 =
2518
- * Improvements in Spam FireWall feature
2519
- * Code optimization
2520
- * Backend interface fixes
2521
-
2522
- = 5.26 2015-10-05 =
2523
- * Added WordPress Language Pack support
2524
- * Removed spam checking for some autorisation plugins
2525
- * New experimental feature: Spam FireWall
2526
-
2527
- = 5.25.2 2015-09-28 =
2528
- * Fixed backend bug
2529
-
2530
- = 5.25.1 2015-09-28 =
2531
- * Added widget with anti-spam stats
2532
- * Added information about blocked spam attacks in admin dashboard and CleanTalk settings
2533
- * Added ability not to check comments for users with 3 or above allowed comments
2534
- * Added an option 'Help others known CleanTalk' to show information for site visitors, that your site is protected from spam by us
2535
- * Some backend interface settings
2536
- * Removed "CleanTalk connection test" query
2537
-
2538
- = 5.24.1 2015-09-16 =
2539
- * Fixed some errors in frontend
2540
- * Fixed access key saving
2541
-
2542
- = 5.24 2015-09-14 =
2543
- * Backend interface fixes
2544
- * Improvement for AJAX JavaScript spam checking
2545
-
2546
- = 5.23 2015-09-01 =
2547
- * Fixed BuddyPress profile search false positivities of anti-spam protection.
2548
- * Some interface fixes of bulk users & comments spam checking
2549
-
2550
- = 5.22 2015-08-26 =
2551
- * Fixed possible XSS issue for anti-spam test on third-party forms.
2552
-
2553
- = 5.21 2015-08-21 =
2554
- * Fixed bug with skipping spam submissions
2555
- * Fixed bug with receiving old user_token for viewing anti-spam stats
2556
- * Small backend fixes
2557
-
2558
- = 5.20 2015-08-15 =
2559
- * Fixed anti-spam stats in admin bar
2560
- * Fixed issue with skipping spam submissions
2561
- * Added some PHP-constants for advanced users
2562
-
2563
- = 5.19 2015-08-11 =
2564
- * New feature: anti-spam checking for registered users
2565
- * Fixed issue with AJAX JavaScript checking
2566
- * Fixed issue with SEO Yoast xml sitemaps.
2567
-
2568
- = 5.18 2015-08-04 =
2569
- * Fixed issue with user_token
2570
- * Added anti-spam API, see our FAQ
2571
-
2572
- = 5.17 2015-07-23 =
2573
- * Fixed infinite redirection after activation
2574
- * Minor backend fixes
2575
-
2576
- = 5.16 2015-07-22 =
2577
- * Fixed external services checking
2578
- * Fixed mass comments deletion
2579
- * Fixed AJAX anti-spam protection
2580
-
2581
- = 5.15 2015-07-16 =
2582
- * New feature: anti-spam protection for forms, that uses external services
2583
-
2584
- = 5.14 2015-07-03 =
2585
- * Added anti-spam protection for some themes and plugins
2586
- * Some backend fixes
2587
-
2588
- = 5.13 2015-06-12 =
2589
- * Closing notification for anti-spam renew
2590
- * Fixed bulk anti spam comment checking
2591
-
2592
- = 5.12 2015-06-01 =
2593
- * Added option for checking all post data for spam
2594
- * Some JavaScript protection improvements
2595
- * Added option for old JavaScript check (without AJAX)
2596
-
2597
- = 5.10 2015-05-25 =
2598
- * Fixed Javascript error on some forms
2599
-
2600
- = 5.9 2015-05-21 =
2601
- * Fixed Javascript error on CF7 and JetPack
2602
- * Some backend and frontent fixes
2603
-
2604
- = 5.8 2015-05-18 =
2605
- * Minor fixes
2606
-
2607
- = 5.7 2015-05-18 =
2608
- * Fixed French translation
2609
- * Fixed protection algorithm
2610
-
2611
- = 5.6 2015-05-11 =
2612
- * Fixed translation
2613
- * Fixed bulk comments anti-spam checking
2614
- * Added option for disabling anti spam stats in adminbar
2615
- * Some security fixes
2616
-
2617
- = 5.5 2015-04-29
2618
- * Fixed security issue
2619
-
2620
- = 5.4 2015-04-27 =
2621
- * Some interface and functionality changes in plugin settings page
2622
- * Added counter for anti-spam stats in admin bar
2623
-
2624
- = 5.3 2015-04-13 =
2625
- * Added anti-spam protection for Divi theme contact forms
2626
- * Added anti-spam protection for MyMail contact forms
2627
- * Added anti-spam protection for MailPoet Newsletters
2628
- * Some interface and functionality changes in backend
2629
-
2630
- = 5.2 2015-04-01 =
2631
- * Added link for anti-spam stats
2632
- * Added WP User Frontend Pro registration form protection
2633
-
2634
- = 5.10 2015-03-24 =
2635
- * Fixed site crash after installing 5.0 on some websites
2636
-
2637
- = 5.00 2015-03-24 =
2638
- * Added bulk comments checking for spam via CleanTalk blacklists
2639
- * Added anti-spam form protection for 'Ajax Login & Register'
2640
- * Fixed JetPack form protection
2641
-
2642
- = 4.24 2015-03-20 =
2643
- Added immediate spam protection activation.
2644
-
2645
- = 4.22 2015-03-17 =
2646
- * Added button for automatic spam protection key getting.
2647
-
2648
- = 4.21 2015-03-11 =
2649
- * Added license renew notification.
2650
-
2651
- = 4.20 2015-03-03 =
2652
- * German, Italian, Polish, Portuguese translations, minor code fixes.
2653
-
2654
- = 4.19 2015-02-24 =
2655
- * Increased JS keys lifetime.
2656
-
2657
- = 4.18 2015-02-17 =
2658
- * Bugfix - fixed bug with comments approvement, PayPal 'payment_status' and Akismet 'spam' status processing.
2659
-
2660
- = 4.17 2015-02-12 =
2661
- * New base class, divided code to 3 separate files - common, public and admin.
2662
-
2663
- = 4.16 2015-02-05 =
2664
- * New base class, fixed JetPack filters logics, optimized Formidable, bbPress, BuddyPress filters.
2665
-
2666
- = 4.15 2015-01-29 =
2667
- * Support of Contact Form 7 versions before 3.0.0, fixed global JS-vars and online notice cookie logics.
2668
-
2669
- = 4.14 2015-01-19 =
2670
- * Removed deprecated option from comment approvement code.
2671
-
2672
- = 4.13 2014-12-29 =
2673
- * Not spam comments auto approvement bug fix.
2674
-
2675
- = 4.12 2014-12-29 =
2676
- * Plugin backend minfor bug fixes.
2677
-
2678
- = 4.11 2014-12-22 =
2679
- * Major changes in spam protection algorithms.
2680
-
2681
- = 4.10 2014-12-10 =
2682
- * Minor improvements for custom contact/registration/subscribe forms.
2683
-
2684
- = 4.9 2014-11-24 =
2685
- * Minor bug fix for Contact form 7.
2686
-
2687
- = 4.8 2014-11-19 =
2688
- * Improved anti-spam protection for BuddyPress registrations and custom contact forms.
2689
-
2690
- = 4.7 2014-11-16 =
2691
- * Fixed JavaScript antispam test for FastSecure contact form.
2692
-
2693
- = 4.6 2014-11-11 =
2694
- * Minor changes in anti-spam logic for BuddyPress registrations, contact forms and bbPress guest posting.
2695
-
2696
- = 4.5 2014-11-04 =
2697
- * Bug fixes for Contact form 7 and bbPress guests posting.
2698
-
2699
- = 4.4 2014-10-29 =
2700
- * Improved JS checking for CF7.
2701
-
2702
- = 4.2 2014-10-20 =
2703
- * Increased plugin perfomance for BuddyPress registrations.
2704
-
2705
- = 4.1 2014-10-13 =
2706
- * Minor anti-spam improvements for contacts, registration and contact forms.
2707
-
2708
- = 4.0 2014-10-06 =
2709
- * Major anti-spam improvements for registration and contact forms.
2710
-
2711
- = 3.9 2014-10-01 =
2712
- * Did exception to do not break to create new user in WordPress backend.
2713
-
2714
- = 3.8 2014-09-19 =
2715
- * Bug fix release. Minor fixes in API class and JavaScript anti-spam test.
2716
-
2717
- = 3.6 2014-09-15 =
2718
- * Minor fixes in anti-spam protection for Formidable and custom contact forms.
2719
-
2720
- = 3.4 2014-09-04 =
2721
- * Spam comments rotation. Custom (themes) contact forms support.
2722
-
2723
- = 3.2 2014-08-27 =
2724
- * Minor changes in spam filtration logic.
2725
-
2726
- = 3.1 2014-08-19 =
2727
- * Major changes for comments antispam logic. Improved plugin speed.
2728
-
2729
- = 2.59 2014-08-14 =
2730
- * Antispam protection for bbPress guests posts. Improvement for JetPack comments and PHP API update.
2731
-
2732
- = 2.58 2014-08-06 =
2733
- * Added anti-spam protection for signups posted via WooCommerce order form.
2734
- * Improved anti-spam protection for Contact Form 7.
2735
- * Improved anti-spam protection for registrations. Now the plugin looking for JavaScript antispam test results not only in POST array, but in COOKIES array too. This improvement allows protect signup forms for any untested signups plugins and themes.
2736
- * Updated PHP API. No the plugin can resolve sender IP for websites behind proxy servers. If the proxy servers uses private IP address.
2737
-
2738
- = 2.57 2014-07-29 =
2739
- * Improved anti-spam protection for comments. The plugin now proccessing website url in the comments form.
2740
- * Fixed sign remove logic for approved comments. Previous version doesn't cut sign for comments approved via AJAX call in WordPress backend.
2741
- * Fixed switching to SSL for comments. Previous version doesn't use secured connection for comments.
2742
-
2743
- = 2.56 2014-07-21 =
2744
- * Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
2745
-
2746
- = 2.55 2014-07-11 =
2747
- * Fixed bug with account status function. In backend the plugin showed notice 'Please don't forget to disable CAPTCHA if you have it on every page.
2748
-
2749
- = 2.54 2014-07-11 =
2750
- * Fixed signup anti-spam protection logic for BuddyPress registrations.
2751
- * Fixed anti-spam protection for JetPack contact form.
2752
- * Changed account status check logic.
2753
-
2754
- = 2.53 2014-06-27 =
2755
- * Fixed anit-spam protection bug for signups.
2756
- * Changed anti-spam functions (comments and signups) priority.
2757
-
2758
- = 2.52 2014-06-25 =
2759
- * Fixed 'Fatal error: Call to a member function get_error_code()' issue with signups via BuddyPress.
2760
-
2761
- = 2.51 2014-06-23 =
2762
- * Added spam protection for registrations via plugin New User Approve by Josh Harrison. If the CleanTalk matched signup as spam this signup will be denied to placing in pending queue.
2763
- * Added option "Use secure (SSL) connection to CleanTalk cloud". If the option enabled plugin will communicate with CleanTalk severs via 128bit encrypted data channel. So, if you have SSL protected webforms on website you can use this option to be sure that visitors personal data safely transmits to CleanTalk servers.
2764
- * Fixed minor bug with loading backend functions.
2765
-
2766
- = 2.49 2014-06-10 =
2767
- * Added spam protection for S2Member Auth.net forms.
2768
- * Added spam protection for multisite signup form.
2769
- * Optimized account status check function.
2770
-
2771
- = 2.46 2014-05-19 =
2772
- * Added: HTML notice about the need to enable JavaScript.
2773
- * Fixed: Fixed pingbacks anti-spam test.
2774
-
2775
- = 2.44 2014-05-12 =
2776
- * Added: Anti-spam protection for S2Member framework.
2777
- * Improved: Plugin load time for backend and frontend.
2778
- * Improved: JavaScript anti-spam test.
2779
- * Fixed: PHP warning mb_convert_encoding()
2780
-
2781
- = 2.42 2014-04-29 =
2782
- * Fixed: JavaScript anti-spam test for comments.
2783
-
2784
- = 2.38 2014-03-27 =
2785
- * Fixed: Registraion form submit time spam test.
2786
-
2787
- = 2.36 2014-03-12 =
2788
- * Reversed to patches from old revisions.
2789
-
2790
- = 2.35 2014-03-12 =
2791
- * New: Notifications about disabled account
2792
- * New: Improved JavaScript spam test.
2793
- * Fixed: Code optimization
2794
- * Fixed: JavaScript test for signups.
2795
-
2796
- = 2.33 2014-02-12 =
2797
- * Fixed: CURLOPT_FOLLOWLOCATION bug at admin notice
2798
-
2799
- = 2.32 2014-02-04 =
2800
- * New: Added notice about automatically approved comment. The notice shows only for first approved comment and only for new commentators (without approved comments) of the blog.
2801
- * New: At WordPress console added banner for notices.
2802
- * Changed: Screenshots updated.
1
+ == Changelog ==
2
+
3
+ = 5.132.3 December 19 2019 =
4
+ * Fix: The disable comments functionality.
5
+
6
+ = 5.132.2 December 17 2019 =
7
+ * Fix: The disable comments functionality.
8
+
9
+ = 5.132.1 December 17 2019 =
10
+ * Fix: Fatal PHP error.
11
+
12
+ = 5.132 December 17 2019 =
13
+ * Fix: PHP 7.4 compability
14
+ * New: Settings and description for "disable comments" functionality.
15
+ * Mod: WooCommerce settings moved to separate block.
16
+ * Minor fixes.
17
+ * Spam protection improved.
18
+
19
+ = 5.131 December 6 2019 =
20
+ * Fix: WooCommerce registration.
21
+ * Fix: Auto update on Wordperss Multisite.
22
+ * Fix: URLs exceptions validation.
23
+ * New: Secuirty improved.
24
+ * Spam protection is improved.
25
+ * Minor fixes ond improvments.
26
+
27
+ = 5.130.1 November 20 2019 =
28
+ * Fix: Plugin autoupdate issues.
29
+ * FIx: Woocommerce checking.
30
+ * Fix: Correct IP detection.
31
+ * Fix: CSV export not working after update.
32
+ * Fix: QuickForms duplicates issues.
33
+
34
+ = 5.130 November 14 2019 =
35
+ * Fix: JetPack contact form JS check.
36
+ * FIx: Iphorm AJAX form.
37
+ * Fix: Paid Memberships Pro fix.
38
+ * Fix: Divi theme contact form fix.
39
+ * Integration: Paid Memberships Pro.
40
+ * Integration: Elementor Pro page builder forms.
41
+ * Improved: Compatibility with different server.
42
+
43
+ = 5.129.1 November 5 2019 =
44
+ * Fix: WooCommerce order detecting.
45
+
46
+ = 5.129 October 30 2019 =
47
+ * Upd: Localize updated.
48
+ * Fix: Direct $_SERVER access replaced.
49
+ * Integration: The 7 theme contact form.
50
+ * Fix: Minor improvements and bug fixes.
51
+ * Mod: Putting site in maintenance mode during plugin update.
52
+
53
+ = 5.128.1 October 23 2019 =
54
+ * Fix: Fatal error when using buffer output.
55
+ * Fix: Translate domain for errors.
56
+ * Code: Fix spelling in function name.
57
+ * Fix: JS disabled error.
58
+ * Upd: Comment edit screen updated.
59
+ * Fix: Cleantalk\Arr::search() fixed.
60
+
61
+ = 5.128 October 17 2019 =
62
+ * Mod: Users check - functionality updated.
63
+ * Fix: Users check - dates format updated.
64
+ * Mod: Comments check - functionality updated.
65
+ * Fix: Comments check - dates format updated.
66
+ * Fix: Fields exclusion fixed.
67
+ * Fix: Notice fixed.
68
+ * Fix: Cleantalk/Antispam/API.
69
+ * Fix: Minor improvements and bug fixes.
70
+
71
+ = 5.127.4 October 13 2019 =
72
+ * Mod: Automatically decrease amount of checked users by one request if an error occurs.
73
+ * Fix: Security issue.
74
+ * Fix: Static JS key.
75
+
76
+ = 5.127.3 October 8 2019 =
77
+ * Fix: Errors during registration.
78
+
79
+ = 5.127.2 October 8 2019 =
80
+ * Integration: SeedProd Coming Soon Page Pro.
81
+ * Fix: WooCommerce double reuqests.
82
+ * Fix: Static JS key.
83
+
84
+ = 5.127.1 October 7 2019 =
85
+ * Fix: WPMS settings logic.
86
+ * Using default database storage engine for tables.
87
+
88
+ = 5.127 September 30 2019 =
89
+ * Fix: Delete redirect notice on external forms
90
+ * Fix: Storing spam for 15 days.
91
+ * Fix: correct DiVi display message.
92
+ * Integration: Ultimate Members.
93
+ * Mod: Setting "Use static JS key" switched to "Auto" if it was "No". Default is "Auto".
94
+ * Mod: Moving White Label option to main site settings.
95
+ * New: Use static JS key if cache plugin detected.
96
+ * New: Settings for URLs, fields, roles exclusions.
97
+ * New: Regular Expressions support in URLs, fields exclusions.
98
+ * New: Send validation errors on standard registration form.
99
+ * Updater: Move exclusions from global variable to settings.
100
+ * Deprecated: IP exclusions.
101
+
102
+ = 5.126 September 9 2019 =
103
+ * Spam protection improved!
104
+ * Integration: Option wheel.
105
+ * Mod: Improved Email detection.
106
+ * Mod: Improved IP detection.
107
+ * Fix: Too large database table with alternative sessions.
108
+ * Fix: Exception for WooCommerce AJAX.
109
+ * Fix: API key validation.
110
+ * Minor fixes.
111
+
112
+ = 5.125 August 26 2019 =
113
+ * Fix: PHP Notices.
114
+ * Fix: Auto update.
115
+ * Fix: Displaying protection status for IP license.
116
+ * Fix: prevent capturing buffer for XMLRPC requests (check_external functionality).
117
+ * Fix: API key validating.
118
+ * New: Complete deactivation setting.
119
+
120
+ = 5.124.1 August 8 2019 =
121
+ * Fix: Error on PHP 5.3.
122
+
123
+ = 5.124 August 8 2019 =
124
+ * Spam protection improved.
125
+ * Fix: SpamFireWall local database counter on Multisite.
126
+ * Fix: Caldera Forms integration.
127
+ * Fix: Settings "Use AJAX for JS check" description.
128
+ * Fix: Formidable integration.
129
+ * New: External forms check now independed from JavaScript.
130
+ * New: Setting Protect external - capture buffer.
131
+ * New: QuForm integration.
132
+
133
+ = 5.123 July 25 2019 =
134
+ * Fix: Plenty of minor fixes.
135
+ * Fix: wpDiscuz integration.
136
+ * Fix: Integration with bbPress.
137
+ * Fix: New comment email notification.
138
+ * New: Follow-Up Emails integration.
139
+ * Fix: Woocommerce integration.
140
+ * Fix: Spelling.
141
+
142
+ = 5.122 July 10 2019 =
143
+ * Spam Protection improved.
144
+ * Fix: Error while checking account status.
145
+ * Fix: Conflict with Elementor Pro.
146
+ * Fix: Integration with Ninja Forms.
147
+ * Fix: Integration with Formidable.
148
+ * New: Detecting mobile devices.
149
+ * New: Integration for Easy Forms for Mailchimp.
150
+
151
+ = 5.121 June 26 2019 =
152
+ * Fix: Translation typos.
153
+ * Fix: Woocommerce integration.
154
+ * Fix: Catching admin in AJAX queries.
155
+ * Mod: Session table (cleantalk_sessions) issue.
156
+ * Mod: Spam protection improved.
157
+ * Integration: Wilcity theme custom registration validation enabled
158
+ * New: Option "Use static JS key".
159
+
160
+ = 5.120.2 June 17 2019 =
161
+ * Fix: WPForms integration.
162
+ * Fix: Translation and spelling.
163
+ * Fix: Minor PHP error
164
+
165
+ = 5.120.1 June 6 2019 =
166
+ * Mod: Description for Search form protection.
167
+ * Fix: CSS and JS attachment.
168
+ * Fix: Undefined index error.
169
+
170
+ = 5.120 June 5 2019 =
171
+ * Fix: bbPress false positives.
172
+ * Fix: SpamFireWall check condition.
173
+ * Fix: SpamFireWall block page.
174
+ * Fix: Catch admin action via search form test.
175
+ * Fix: Catch admin action (AJAX).
176
+ * Mod: Using minified version of JS and CSS.
177
+ * Mod: Date format in statistics.
178
+
179
+ = 5.119.1 May 30 2019 =
180
+ * Fix: Helper class error.
181
+
182
+ = 5.119 May 30 2019 =
183
+ * Fix: No more second request after registration.
184
+ * Fix: Activation hook.
185
+ * Fix: Alternative sessions. Clear table.
186
+ * Fix: Stop capchuring AJAX requests in admin area.
187
+ * Fix: Spelling.
188
+ * Fix: Registration cookies set.
189
+ * Mod: SFW exdtended die page when testing.
190
+ * Mod: User-agent modified.
191
+ * New: Test search queries for spam.
192
+ * New: Gathering and output statistics.
193
+
194
+ = 5.118.4 May 13 2019 =
195
+ * Fix: SFW cookie. Set correct domain for subdomains.
196
+ * Fix: SFW update.
197
+ * Fix: IP detection.
198
+ * Fix: Triggering AJAX check in backend.
199
+ * Fix: Zero submit time on few forms.
200
+
201
+ = 5.118.3 April 29 2019 =
202
+ * Fix: Spam statistics in dashboard widget.
203
+ * Fix: IP detection.
204
+ * Fix: Double check AJAX integrated forms like Ninja Forms.
205
+ * Fix: Use url exclusions for AJAX forms.
206
+
207
+ = 5.118.2 April 25 2019 =
208
+ * Mod: Spam filtration quality improved.
209
+ * Mod: Store SFW cookie for 30 days.
210
+ * Mod: Server IP added to connection report.
211
+ * Fix: spam_stat is not defined.
212
+
213
+ = 5.118.1 April 19 2019 =
214
+ * Fix: Fatal error.
215
+ * Mod: Spam protection improved on registrations.
216
+
217
+ = 5.118 April 19 2019 =
218
+ * Fix: Cookies on registration page.
219
+ * Fix: Update fix.
220
+ * Fix: Wordpress built-in API.
221
+ * Fix: WooCommerce checkout form.
222
+ * Fix: UpdraftPlus. Saving settings.
223
+ * Fix: Convert Pro saving settings.
224
+ * Fix: UTF-8 Converting.
225
+ * Fix: GDPR notice.
226
+ * Fix: cleantalk_sessions table size reduced.
227
+ * Mod: Localization.
228
+ * Mod: Performance improved.
229
+ * Mod: SpamFierWall improvments.
230
+ * Mod: IP detection improved.
231
+ * Mod: JavaScript check rewised.
232
+ * New: Setting "Use alternative mechanism for cookies".
233
+
234
+ = 5.117.1 April 5 2019 =
235
+ * Fix: GDPR notice.
236
+ * Fix: noCacheJS localization.
237
+ * Fix: Fatal error when updating.
238
+
239
+ = 5.117 March 27 2019 =
240
+ * New: Update logic runs on all pages.
241
+ * New: Integration for Ajax Contact Forms plugin.
242
+ * New: Notification for users groups about new comments.
243
+ * New: SFW die page. Show browser and page creation time.
244
+ * Fix: Huge bug in Cleantalk.php connected with servers changing.
245
+ * Fix: Check AJAX requests for logged in users.
246
+ * Fix: Deleting debug in JS.
247
+ * Fix: Validating settings before saving.
248
+
249
+ = 5.116.3 March 14 2019 =
250
+ * Fix: "Headers already sent" error.
251
+ * Fix: Images paths.
252
+ * Fix: IP detection.
253
+ * Fix: Skip lost password form check
254
+ * Fix: Skip mobile requests (push settings)
255
+ * Fix: PHP notice when detecting BuddyPress template.
256
+
257
+ = 5.116.2 March 7 2019 =
258
+ * Fix: Creating tables in MariaDB.
259
+
260
+ = 5.116.1 March 6 2019 =
261
+ * Fix: Creating tables in DB.
262
+ * Fix: PHP Warning in spam statistics widget.
263
+
264
+ = 5.116 March 6 2019 =
265
+ * Spam filtration quality improved.
266
+ * New: Storing visited URLs.
267
+ * New: Check before validation Contact Form 7, Comments, Jetpack comments.
268
+ * New: Get validation result for Contact Form 7, Comments, Jetpack comments.
269
+ * Fix: ES add subscriber.
270
+ * Fix: IP detection.
271
+
272
+ = 5.115.2 February 27 2019 =
273
+ * Fix: False positives spam detection in WP Forms and Contact Form 7.
274
+
275
+ = 5.115.1 February 16 2019 =
276
+ * Fix: SpamFireWall's false positives.
277
+
278
+ = 5.115 February 14 2019 =
279
+ * Fix: Http_only flag for backend cookies.
280
+ * Fix: Spam filtration improved.
281
+ * New: IP detection improved.
282
+ * Fix: SpamFirewall update speeded up.
283
+ * New: False positives with caching solutions decreased.
284
+ * New: Opportunity to use Wordpress HTTP API to connect with Cloud.
285
+
286
+ = 5.114 January 31 2019 =
287
+ * New: Setting "Use Wordpress HTTP API" as alternative to CURL. Disabled by default.
288
+ * Fix: Formidable: Adding small JS check when adding JS_key.
289
+ * Mod: layout of settings page.
290
+ * Mod: Banner logic altered.
291
+
292
+ = 5.113.2 January 18 2019 =
293
+ * Fix: "Settings" link returns to plugin page.
294
+
295
+ = 5.113.1 January 17 2019 =
296
+ * Fix: Conflict with CityTours theme.
297
+ * Fix: Error for Wordpress lower 4.7.
298
+ * Add: Spam protection: "Validate email for existence".
299
+
300
+ = 5.113 January 16 2019 =
301
+ * Fix: Fast and Simple Contact Form.
302
+ * Fix: Settings layout.
303
+ * Fix: Error with WooCommerce Quickview.
304
+ * Fix: Bitrix24 contact form.
305
+ * Fix: Request time decreased.
306
+ * Fix: Requesting account status when activating for IP licenses.
307
+ * Add: Precise AJAX request detection.
308
+ * Spam protection improved.
309
+
310
+ = 5.112 December 21 2018 =
311
+ * Fix: Woocommerce AJAX checkout form.
312
+ * Fix: Profile Builder Pro.
313
+ * Fix: DB structure improvements for WPMS.
314
+ * Spam filtering quality improved.
315
+ * Minor fixes.
316
+
317
+ = 5.111 December 13 2018 =
318
+ * Fix: Double request in JetPack contact form.
319
+ * Fix: Email notification about spam registration.
320
+ * Fix: Links button for feedback comments.
321
+ * Fix: Mail notification about plugin error.
322
+ * Fix: Key field output.
323
+ * Minor fixes.
324
+
325
+ = 5.110 November 29 2018 =
326
+ * Integration: BuddyPress ActivityWall spam protection.
327
+ * Add: GDPR setting for shortcode.
328
+ * Add: Support different BuddyPress templates on activity wall.
329
+ * Fix: Admin/moderator checking for validate post data.
330
+
331
+ = 5.109 November 15 2018 =
332
+ * Fix: Added URL and IP exclusions to Contact Form 7.
333
+ * Fix: js error when responseText is not exists
334
+ * Fix: Sitename when getting key automatically under WPMS.
335
+ * Mod: SpamFireWall is now fully compatible with WPMS.
336
+ * Mod: Setting 'Tell others about CleanTalk' was deleted.
337
+ * Mod: Protection from spam improved.
338
+
339
+ = 5.108.1 November 8 2018 =
340
+ * Fix: Errors with integration class.
341
+
342
+ = 5.108 November 7 2018 =
343
+ * Fix: White label mode.
344
+ * Fix: SpamFireWall now can be disabled.
345
+ * Fix: Layout.
346
+ * Integration: WPForms.
347
+ * Add: Message about block for all no integrated AJAX forms.
348
+ * Add: Displaying account name near api key.
349
+
350
+ = 5.107 October 29 2018 =
351
+ * Fix: Ninja Forms integration.
352
+ * Fix: Cookie usage.
353
+ * Add: Capturing AJAX responses from non integrated forms.
354
+ * Spam protection improved.
355
+ * Minor fixes.
356
+
357
+ = 5.106 October 11 2018 =
358
+ * Spam filtration improved.
359
+ * New: White Label mode.
360
+ * Modification: Warning message about test on SpamFireWall die page.
361
+ * Integration: WP Maintenance Mode.
362
+ * Fix: S2Member.
363
+ * Fix: JavaScript attachments reconsidered.
364
+ * Fix: Admin banners layout.
365
+ * Fix: Minor layout fixes.
366
+
367
+ = 5.105 September 26 2018 =
368
+ * Integration: Now bloking spam for QAEngine questions.
369
+ * Fix: Async http__request call.
370
+ * Fix: Unnecessary get_antispam_report_breif method call.
371
+ * Layout: Hide "Do you like Cleantlak?" when key is not ok.
372
+ * Layout: Minor fixes.
373
+
374
+ = 5.104 September 18 2018 =
375
+ * Fix: Error when saving settings.
376
+ * Fix: Trying update anti spam plugin for the first installation.
377
+ * Fix: Update system.
378
+ * Fix: Errors output.
379
+ * Fix: Plugin's settings under WPMS.
380
+ * Fix: SpamFireWall update.
381
+ * Fix: The server change system repaired.
382
+ * Mod: Cron saving tasks improved.
383
+
384
+ = 5.103.1 September 14 2018 =
385
+ * Fix: Error when saving settings.
386
+ * Fix: Error when getting key automatically.
387
+
388
+ = 5.103 September 13 2018 =
389
+ * Fix: Gravity Forms response message.
390
+ * Fix: SpamFireWall redirect to 404 page.
391
+ * Major anti-spam plugin improvement.
392
+ * Recombined setting page.
393
+ * Added error notification.
394
+ * Mod: S2 Members integration.
395
+ * Mod: Improved remote calls.
396
+
397
+ = 5.102 August 29 2018 =
398
+ * Fix: Users and comments check.
399
+ * Fix: Update from 5.70 or previous versions.
400
+ * Fix: GDPR public JS-script.
401
+ * Fix: Dashboard widget JS scripts attachment.
402
+ * Fix: WooCommerce "Place order" action.
403
+ * Mod: Notification logic altered.
404
+ * Mod: Users check table now has 'Signed up' column.
405
+ * Minor fixes.
406
+
407
+ = 5.101 August 10 2018 =
408
+ * Fix: Set cookie only for non-dashboard pages.
409
+ * Fix: Dashboard widget JS error.
410
+ * Fix: JavaScript error for some environment.
411
+ * Mod: Antispam protection accelerated for some pages.
412
+
413
+ = 5.100 July 30 2018 =
414
+ * Fix: JavaScript dependencies.
415
+
416
+ = 5.99.1 July 17 2018 =
417
+ * IP detection fixed and improved.
418
+
419
+ = 5.99 July 10 2018 =
420
+ * Fix: WooCommerce false positives.
421
+ * Fix: SpamFireWall IP detection.
422
+ * Minor fixes.
423
+
424
+ = 5.98 June 27 2018 =
425
+ * Fix: WooCommerce: Theme exclusion.
426
+ * Fix: Public GDPR JS code.
427
+ * Minor fixes.
428
+
429
+ = 5.97 June 7 2018 =
430
+ * Fix: Update system.
431
+ * Fix: Feedback from public page (admin only).
432
+ * Fix: Users and comment check: API error.
433
+ * Fix: Too many negative reports. (Too big ct_data option)
434
+ * Fix: SpamFireWall: Infinite redirection on the blocking page.
435
+ * Minor fixes.
436
+
437
+ = 5.96 May 22 2018 =
438
+ * Fix: Update system.
439
+ * Mod: Reset all counters button in admin bar.
440
+ * Mod: GDPR compliance.
441
+ * Minor fixes.
442
+
443
+ = 5.95.1 May 3 2018 =
444
+ * Fix: "Get key automatically" button display logic.
445
+ * Fix: PHP notices.
446
+
447
+ = 5.95 May 2 2018 =
448
+ * Spam filtration improved.
449
+ * Fix: Public widget layout.
450
+ * Fix: Connection reports output.
451
+ * Minor fixes.
452
+
453
+ = 5.94 April 23 2018 =
454
+ * Mod: Async load option for JS.
455
+ * Mod: JS scripts loading is conditional.
456
+ * Fix: IP detection.
457
+ * Fix: IP detection.
458
+ * Fix: Javascript error.
459
+
460
+ = 5.93.1 April 9 2018 =
461
+ * Fix: Fatal error on PHP 5.5 or lower.
462
+
463
+ = 5.93 April 9 2018 =
464
+ * Fix: Spam FireWall IP detection.
465
+ * Fix: Contact Form 7. False positives.
466
+ * Mod: Autoupdate function improved.
467
+ * Minor fixes.
468
+
469
+ = 5.92.2 March 23 2018 =
470
+ * Fix: Error if cURL extension is disabled.
471
+
472
+ = 5.92.1 March 23 2018 =
473
+ * Fix: Spelling
474
+ * Fix: Fatal error if cURL extension is disabled.
475
+
476
+ = 5.92 March 22 2018 =
477
+ * IP detection improved.
478
+ * Fix: SSL connection.
479
+ * Fix: False positives spam detection in Contact Form 7.
480
+ * Minor fixes.
481
+
482
+ = 5.91 March 15 2018 =
483
+ * Fix: Errors for PHP compiled without XML support.
484
+ * Fix: Spelling and translation.
485
+ * Stability increased.
486
+ * Minor fixes.
487
+
488
+ = 5.90 March 7 2018 =
489
+ * Improvement: Better IP recognition in Spam FireWall.
490
+ * Fix: Gravity Froms blocking message.
491
+ * Security improvments.
492
+ * Minor fixes.
493
+
494
+ = 5.89 February 21 2018 =
495
+ * Improved spam filtration quality.
496
+ * Improved compatibility.
497
+ * Public widget: Styles and referral link added.
498
+ * Dashboard widget: revised and fixed.
499
+ * Minor fixes.
500
+
501
+ = 5.88 February 12 2018 =
502
+ * Integration: ConvertPro.
503
+ * Improvement: Search for visitor's names in request.
504
+ * Fix: Contact Form 7 message recognition.
505
+ * Preparation for the remote plugin update.
506
+ * Minor fixes.
507
+
508
+ = 5.87 February 2 2018 =
509
+ * Filtration quality improved.
510
+ * Fix: WP Foto Vote downloading images.
511
+ * Fix: Fatal error for unsupported PHP 5.2.
512
+ * Fix: Formidable Forms improved spam filtration.
513
+
514
+ = 5.86 January 25 2018 =
515
+ * Fix: High CPU load with wp-ajax.php.
516
+ * Fix: Mailpoet: Newsletter.
517
+ * Fix: Gravity: Forms standardization for input fields.
518
+ * Fix: ajax hook checks data for contact form.
519
+ * Fix: UTF8 character in requests.
520
+
521
+ = 5.85 January 11 2018 =
522
+ * Fix: Fast Secure contact form spam block message.
523
+ * Fix: IP license status.
524
+ * Layout: Dashboard widget description altered.
525
+
526
+ = 5.84 December 26 2017 =
527
+ * Integration: PeepSo contact form
528
+ * Repared: Feedback from comments page.
529
+ * Fix: mb_* functions used only if exists.
530
+ * Fix: Gravity forms: Multi-page form logic repared.
531
+ * Fix: Gravity forms: AJAX form logic repared.
532
+ * Minor fixes.
533
+
534
+ = 5.83.2 December 19 2017 =
535
+ * Fix: Error in base class.
536
+
537
+ = 5.83.1 December 19 2017 =
538
+ * Fix: CDN IP detection.
539
+
540
+ = 5.83 December 19 2017 =
541
+ * Improving: Stability and compatibility.
542
+ * Improving: Spam protection.
543
+ * Fix: Comments logic filtration.
544
+ * Fix: Admin bar counter.
545
+ * Minor errors fixes.
546
+
547
+ = 5.82.1 December 7 2017 =
548
+ * Fixed minor error with attaching JS and CSS files.
549
+
550
+ = 5.82 December 4 2017 =
551
+ * Plugin doesn't use PHP sessions anymore.
552
+ * Bug fixes.
553
+ * Improved update logic.
554
+
555
+ = 5.81 November 22 2017 =
556
+ * Fixed error with "Show/Hide key" button.
557
+ * Slightly improved spam protection for all forms.
558
+ * Small errors fixes.
559
+
560
+ = 5.80 November 3 2017 =
561
+ * Spam protection improved.
562
+ * Improved filtration quality for WooCommerce checkout.
563
+ * Minor fixes for Spam FireWall.
564
+
565
+ = 5.79 October 26 2017 =
566
+ * Spam protection improved.
567
+ * Fixed issue with existing spam comments check.
568
+ * Added posibility to exclude IP from check.
569
+ * Minor fixes.
570
+
571
+ = 5.78 October 16 2017 =
572
+ * Improved compatibility with themes. Changed core functions prefix.
573
+ * Fixed issue with WooCommerce checkout.
574
+ * Spam protection improved.
575
+ * Minor fixes.
576
+
577
+ = 5.77 October 2 2017 =
578
+ * Connection report's system.
579
+ * Integration for CouponXXL Theme.
580
+ * Fixed issue with mb_* functions.
581
+ * Banners logic updated.
582
+
583
+ = 5.76 September 20 2017 =
584
+ * Fixed issue with Spam FireWall and caching plugins.
585
+ * Banners logic updated.
586
+
587
+ = 5.75 September 15 2017 =
588
+ * Pause feature for users/comments spam check.
589
+ * Improved protection from spam.
590
+ * Small fixes.
591
+
592
+ = 5.74.2 September 2 2017 =
593
+ * Fix for users spam check for PHP 5.3 and lower.
594
+
595
+ = 5.74.1 September 2 2017 =
596
+ * Fix for the update system and cloud communication.
597
+ * Added possibility to check users and comments for spam with a specific date range.
598
+
599
+ = 5.74 August 31 2017 =
600
+ * Users and comments spam check: Two check types (fast and accurate).
601
+ * Fix for WooCommerce checkout test.
602
+ * Minor fixes.
603
+
604
+ = 5.73 August 11 2017 =
605
+ * Fix for spam check for already existed users and comments.
606
+ * Spam FireWall updated.
607
+ * Layout fix for BT Comments.
608
+ * Minor fixes.
609
+
610
+ = 5.72 July 27 2017 =
611
+ * Improved spam check for existed users and comments.
612
+ * Minor fixes.
613
+
614
+ = 5.71 July 20 2017 =
615
+ * Improved spam protection for external forms.
616
+ * Optimization.
617
+ * Minor fixes.
618
+
619
+ = 5.70.2 July 17 2017 =
620
+ * Fix for Spam FireWall for Multisite.
621
+
622
+ = 5.70.1 July 17 2017 =
623
+ * Fix for Spam FireWall.
624
+ * Spam detection improved.
625
+
626
+ = 5.70 July 13 2017 =
627
+ * New updater logic.
628
+ * Self cron system.
629
+ * Improved AMP compatibility.
630
+ * Optimization.
631
+ * Fixed users and comments spam check.
632
+ * Fixed layout for Comment's feedback from public page.
633
+ * Updated Spam FireWall.
634
+ * SFW: Spam FireWall counter now work in real-time.
635
+ * SFW: Improved compatibility with different Data Bases.
636
+
637
+ = 5.69 July 3 2017 =
638
+ * Reviewer - integration.
639
+ * Optimization for Users and Comments check for big databases.
640
+ * Errors fixes.
641
+ * Improved protection from spam.
642
+
643
+ = 5.68 June 22 2017 =
644
+ * Contact Form for WordPress - Ultimate Form Builder Lite - integration.
645
+ * Contact Bank - Contact Forms Builder - integration.
646
+ * Smart Forms - integration.
647
+ * cformsII - integration.
648
+ * Contact Form by Web-Settler - integration.
649
+ * Error fixes.
650
+
651
+ = 5.67.3 June 9 2017 =
652
+ * Fixed JS attachment error.
653
+
654
+ = 5.67.2 June 5 2017 =
655
+ * Fixed error with IP determination.
656
+
657
+ = 5.67.1 June 4 2017 =
658
+ * Fixed JS error in 5.67 version.
659
+ * Integrations: Enfold theme, Convertplug.
660
+ * Links to check for Emails/IP for spam.
661
+ * Control comments and feedback about them from public post's page.
662
+ * Improved connection stability with cloud service.
663
+ * Spam protection improved.
664
+ * Other small fixes.
665
+
666
+ = 5.67 June 1 2017 =
667
+ * Integrations: Enfold theme, Convertplug.
668
+ * Links to check for Emails/IP for spam.
669
+ * Control comments and feedback about them from public post's page.
670
+ * Improved connection stability with cloud service.
671
+ * Spam protection improved.
672
+ * Other small fixes.
673
+
674
+ = 5.66 May 23 2017 =
675
+ * Spam protection improved.
676
+ * Major fixes for users and comments spam check.
677
+ * Added feedback from Wordpress comments list.
678
+ * Fix for "internal forms check" option.
679
+ * Fixed issue with caching Spam FireWall die page.
680
+ * Other small fixes.
681
+
682
+ = 5.65 May 16 2017 =
683
+ * Fix for PayPal redirecton.
684
+ * Fixed issue with empty query for bulk comments test.
685
+ * Added protection for Enfold contact form.
686
+ * Ninja forms integration.
687
+
688
+ = 5.64 April 26 2017 =
689
+ * Integration for Facebook registrations.
690
+ * Small fixes for WPMS.
691
+ * Fix for Activecampaign service.
692
+ * Fix for check spam users.
693
+ * Fixed rare notice Notice: Undefined index: REQUEST_URI
694
+
695
+ = 5.63 April 20 2017 =
696
+ * Fix for the dashboard spam stat widget.
697
+ * Added translation posibility for all text.
698
+
699
+ = 5.62 April 17 2017 =
700
+ * Fix for the dashboard spam statistics widget.
701
+ * Fix for users spam check.
702
+ * Small appearance changes.
703
+
704
+ = 5.61 April 6 2017 =
705
+ * Improved filtration.
706
+ * Additional logic for the form recognizing.
707
+ * Integration: Divi Theme Contact Form.
708
+ * Fix: Gravity Forms multipages forms.
709
+ * Stat Widget: Minor fixes.
710
+ * Added possibility to download results of the users check in CSV format.
711
+ * Alteration for settings page (footer).
712
+
713
+ = 5.60.1 March 29 2017 =
714
+ * Fixed error function 'locale_get_display_region' no exists.
715
+
716
+ = 5.60 March 29 2017 =
717
+ * Added main dashboard widget with spam sctivity stats.
718
+ * Mailster - integration.
719
+ * Base class updated.
720
+
721
+ = 5.59 March 24 2017 =
722
+ * Users/comments check fix.
723
+ * Plugin's name changed to Anti-Spam by CleanTalk.
724
+ * Trial banner is dismissable. Disapear for 24h or till logout.
725
+ * Settings modified (Auto testing failed warning).
726
+ * Mailing(inactive key) interval increased to 6 hours.
727
+
728
+ = 5.58.6 March 16 2017 =
729
+ * Fix for Ninja forms (protection updated).
730
+ * Fix for QA Theme.
731
+ * Fix for RSVP form.
732
+ * Setting changes (Spam FireWall).
733
+ * Improved debug section.
734
+ * Improved gathering data function.
735
+ * Minor fixes.
736
+
737
+ = 5.58.5 March 6 2017 =
738
+ * Minor backend fix.
739
+
740
+ = 5.58.4 March 6 2017 =
741
+ * Users check fix (redirect after the check).
742
+ * Fixed PHP Notice "HTTP_REFERER" is unset.
743
+ * Updated Notice logic.
744
+
745
+ = 5.58.3 February 28 2017 =
746
+ * Bitrix24 Contact form integration.
747
+ * Users/comments check fix.
748
+ * Spam sorting updated.
749
+ * Banner showing logic.
750
+
751
+ = 5.58.2 February 17 2017 =
752
+ * Cron fix for daily report.
753
+
754
+ = 5.58.1 February 16 2017 =
755
+ * Minor fixes.
756
+
757
+ = 5.58 February 15 2017 =
758
+ * Work without access key
759
+ * Bitrix24 contact integration
760
+ * Issues fixes
761
+
762
+ = 5.57.1 February 8 2017 =
763
+ * Fix for notice logic.
764
+
765
+ = 5.57 February 8 2017 =
766
+ * Setting page changes.
767
+ * Bug fixes for WooCommerce.
768
+ * Spam FireWall filters only GET requests.
769
+ * Optimization.
770
+ * Minor and major fixes.
771
+
772
+ = 5.56.1 January 25 2017 =
773
+ * Minor fixes
774
+
775
+ = 5.56 January 19 2017 =
776
+ * Integrations: MailChimp Premium, Profile Press.
777
+ * Changes comments flow.
778
+ * FireWall updater fix.
779
+ * Users check optimization.
780
+
781
+ = 5.55 December 23 2016 =
782
+ * Integrations: Caldera Forms, Visual Form Builder.
783
+ * Fix for different 'cookies' header names.
784
+ * Fixed user deletion.
785
+
786
+ = 5.54 December 12 2016 =
787
+ * Integrations: AmoForms, Contact Form Clean and Simple.
788
+ * Comments check logic refreshed.
789
+ * Registration JS error fix.
790
+ * Users check fix.
791
+ * Fix for translation system.
792
+ * Minor fixes.
793
+
794
+ = 5.53.1 December 9 2016 =
795
+ * Minor layout fixes.
796
+
797
+ = 5.53 November 28 2016 =
798
+ * Addition warning before deleting users.
799
+ * Spam FireWall is enabled by default.
800
+ * Usernoise modal feedback / contact form : integration.
801
+ * Translations.
802
+ * Optimization.
803
+ * Fixes.
804
+
805
+ = 5.52.1 November 14 2016 =
806
+ * Users and comments check: Using new API method.
807
+ * Quick Contact From: Integration via "Custom Contact Forms" setting.
808
+ * JavaScript filtration improved.
809
+ * Translation changes.
810
+ * Optimized JavaScript code.
811
+
812
+ = 5.51 November 2 2016 =
813
+ * Added protection for internal forms
814
+ * Immediate spam check for comments and users from WP dashboard
815
+ * Optimized code
816
+
817
+ = 5.50.1 October 24 2016 =
818
+ * Improved filtration in contact forms.
819
+ * Spam FireWall: Fixed issue with SFW logs
820
+ * Skipping service fields: Fast Secure Contact Froms, QU Forms, Custom Contact Forms
821
+
822
+ = 5.50 October 20 2016 =
823
+ * Custom contact forms: integration.
824
+ * Pirate Forms: integration.
825
+ * PHP 7 compatibility: Deleted third-party JSON library and dependences.
826
+ * PHP 7 compatibility: Fixed end of lines.
827
+ * YOAST Seo: Fixed PHP warnings.
828
+ * Spam FireWall: Minor fix for Spam FireWall counter.
829
+ * Only admin could access to CleanTalk dashboard (exclude Authors an Editors).
830
+ * Improved filtration in contact forms.
831
+
832
+ = 5.49.2 October 5 2016 =
833
+ * Second Fix for database error. Stable version.
834
+
835
+ = 5.49.1 October 5 2016 =
836
+ * Fixed database error.
837
+
838
+ = 5.49 October 3 2016 =
839
+ * Spam FireWall feature: Class upgraded.
840
+ * New feature: Delete links from approved comments.
841
+ * Settings: Grouped.
842
+ * Settings: Altered description fixed spelling mistakes.
843
+ * Settings: Added indicator for Spam FireWall.
844
+ * Admin bar: Added Spam FireWall counter
845
+ * Clean and Simple Contact Form: Direct integration.
846
+ * WooCommerce: Don't check password recovery form.
847
+ * WooCommerce Wishlists: Issue with check for Google bots.
848
+ * JetPack: contact form fix.
849
+ * Fixed and created the defaults for all CleanTalk options.
850
+ * Fixed spelling mistakes.
851
+
852
+ = 5.48 September 15 2016 =
853
+ * buddyPress: Added private messages filtering. Doesn't check user if he has 3 or more messages in the "sentbox" and "inbox" folders.
854
+ * buddyPress: Added option in settings for private messages check.
855
+ * WooCommerce Wishlist: Added check for wishlists.
856
+ * Fixed issue with "check all post data" option.
857
+ * Improved filtering for Gravity Forms
858
+ * Mobile Assistant Connector fix
859
+ * Minor fixes.
860
+
861
+ = 5.47 September 5 2016 =
862
+ * WooCommerce: direct integration for checkout form.
863
+ * WooCommerce Sensei: login form fix.
864
+ * bbPress: Added the check for topics and comments with stop_words
865
+ * bbPress: Skip check for admin in comments and topics
866
+ * UserPro: fixes. Request without field "shortcode"
867
+ * Contact Form 7: Bug fix.
868
+ * Spam FireWall: Optimized logs rotation.
869
+ * Updated inner functions (compatibility fix for PHP 5.4+)
870
+ * Fixed output of counters (without spamfirewall stats)
871
+ * Fixed spelling in settings
872
+ * Added "Delete from the list" button in comments spam check page
873
+ * Minor fixes.
874
+
875
+ = 5.46 August 17 2016 =
876
+ * Fixed issue with admin bar links in WP Multi Network mode.
877
+ * Added "All time counter" and "Daily counter" into admin bar.
878
+ * Added settings to disable counters in admin bar.
879
+ * New style for "Get access key manually" button.
880
+
881
+ = 5.45.2 August 4 2016 =
882
+ * Added Anti-Spam protection for Quick Event Manager.
883
+ * Improved bulk spam test for users. Now the plugin does not mark as Spam user, if the user IP address has spam activity more than 30 days ago.
884
+ * Fixed bulk spam test for comments. Previous version had a conflict between spam history for IP and Email.
885
+ * Minor fix function to get the API key.
886
+
887
+ = 5.45.1 July 26 2016 =
888
+ * Fixed issue with missed spam messages, subscriptions.
889
+ * Improved bulk spam test for comments. Now the plugin will not mark as Spam comments, if a comment sender (IP address) has spam activity more than 30 days ago.
890
+
891
+ = 5.45 July 21 2016 =
892
+ * Optimized bulk spam comments deletion.
893
+ * Turned off JavaScript anti-spam cookies if the option 'Set cookies' is turned off. It helps to avoid issues with Varnish.
894
+ * Added links to bulk spam comments&users removal tool.
895
+
896
+ = 5.44.1 July 13 2016 =
897
+ * Optimized options getting code.
898
+ * Added the option 'Protect Logged in users' to do anti-spam tests for submissions by logged in users.
899
+
900
+ = 5.43.2 June 30 2016 =
901
+ * Optimized anti-spam code for AJAX based contact forms.
902
+ * Fixed CSS layout of counters in Admin bar (issue with layout in IE11).
903
+
904
+ = 5.43.1 June 23 2016 =
905
+ * Added agent version in requests to test a connection between the website and servers.
906
+ * Fixed issue with PHP notices in cleantalk-admin.php.
907
+
908
+ = 5.43 June 22 2016 =
909
+ * Added spam protection for registrations via 'Login with AJAX' plug-in.
910
+ * Added a new counter to Admin bar that allows to count spam and approved submissions since last reset.
911
+ * Update the code that tests a connection between a website and CleanTalk's servers. New version doesn't generate submissions with email good@cleantalk.org.
912
+ * Fixed issue with spam protection for nested forms by Formidable plug-in.
913
+
914
+ = 5.42 2016-06-15 =
915
+ * Added anti-spam protection for UserPro.
916
+ * Improved protection for Formidable forms + Varnish.
917
+ * Improved bulk search for spam accounts.
918
+ * Fixed spam protection for pages that contain multiple Formidable forms with same HTML ID.
919
+ * Optimized PHP code to be compatible with PHP 5.4 and above. The patch has been applied to Formidable forms spam protection.
920
+ * Minor fixes in plugin backend.
921
+
922
+ = 5.41 2016-05-31 =
923
+ * Added HTTP response in plugin response if an network issue was happend.
924
+ * Optimized JavaScript anti-spam test for Formidable forms.
925
+ * Re-stored the option to auto redirect to plugn settings after plugin activation.
926
+ * Updated Spanish, Russian translations.
927
+ * Fixed issue with nasted fields in Formidable forms.
928
+
929
+ = 5.40.3 2016-05-26 =
930
+ * Added option to encrypt (SSL) connection to CleanTalk anti-spam servers.
931
+ * Added JSON encoding for AJAX forms.
932
+ * Obfuscated private data for Custom contact forms option.
933
+ * Optimized bulk users check for spam over blacklists database.
934
+ * Fixed issue with lost connection to servers and JavaScript anti-spam test.
935
+ * Fixed issue with WordFence and collect_details.
936
+
937
+ = 5.40.2 2016-05-11 =
938
+ * Improved account status check logic.
939
+ * Fixed issue with double anti-spam tests for FastSecure contact forms.
940
+ * Fixed issue with nulled JavaScript variables assigned from backend. This issue might me occurred on standart WordPress registration form and with failed JavaScript spam test.
941
+ * Fixed issue with session_start() with PHP sessions stored in memcache.
942
+
943
+ = 5.40.1 2016-04-28 =
944
+ * Fixed issue with Super Socializer.
945
+ * Fixed issue with spam filtration for logged in users and Formidable forms.
946
+ * Added logging of all submitted fields for FastSecure contact form.
947
+
948
+ = 5.40 2016-04-19 =
949
+ * Added JSON encoding for posts that were protected via Custom contact forms option. It allows show anti-spam logs in the Dashboard in more comfortable view.
950
+ * Minor fix in plugin settings.
951
+ * Fixed pagination for bulk users spam test.
952
+ * Fixed issue with unknown _SESSION.
953
+ * Fixed issue with double Spam FireWall database upload.
954
+
955
+ = 5.39.1 2016-04-04 =
956
+ * Improved AJAX based anti-spam test with HTTPS backends.
957
+ * Added fix to avoid issue with empty ct_info_flag on JavaScript side.
958
+ * Added logic to exclude caching for Spam FireWall.
959
+ * Removed a condition to skip accounts with 127.0.0.1 IP in spam test for registered acconts.
960
+
961
+ = 5.38.1 2016-03-24 =
962
+ * Fixed issue with PHP sessions and 'The session id is too long or contains illegal characters'.
963
+ * Removed Spam FireWall protection on /feed page.
964
+ * Disabled anti-spam tests for AJAX calls if the option 'Custom contact forms' is turned off.
965
+ * Added reject notice for spam submissions on Gravity forms with AJAX calls.
966
+
967
+ = 5.37.3 2016-03-10 =
968
+ * Fixed bug with broken MailPoet previews.
969
+ * Fixed bug with broken Geo My WP pop-up windows.
970
+ * Fixed issue with mb_convert_encoding() function.
971
+ * Removed double JavaScript code in front-end.
972
+ * Removed unused variables in anti spam logic.
973
+ * Added option 'Set cookies' (turned on by default). If the option turned off, the plugin will not generate cookies, but in this case plugin will not protect some rarely used contact forms. Any way, turn this option off be compatible with Varnish in spam protection for WordPress core comments, registrations and most popular contact forms.
974
+ * Added anti-spam protection for Gravity forms via option 'Contact forms' with hook gform_entry_is_spam().
975
+
976
+ = 5.36.1 2016-02-05 =
977
+ * Fixed bug, when users receive error after logging in
978
+ * Improve anti-spam filters for contact forms.
979
+
980
+ = 5.36 2016-02-04 =
981
+ * Improved JavaScript anti spam protection
982
+ * Improvements for avoiding blocking requests from payment systems
983
+
984
+ = 5.35 2016-01-14 =
985
+ * Added support for IP licensing
986
+ * Some anti-spam protection improvements
987
+ * Small backend interface fixes
988
+
989
+ = 5.34.1 2015-12-17 =
990
+ * Fixed trackback antispam protection: improved checking mechanism
991
+ * Fixed problem with blocking MailPoet: added exclusions in spam checking algorithm
992
+
993
+ = 5.34 2015-12-10 =
994
+ * Improved spam checking mechanism
995
+ * Added "Collect browser details" option for better antispam protection
996
+ * Fixed custom contact forms checking for AJAX requests
997
+ * Minor translations fixes
998
+
999
+ = 5.33.1 2015-12-04 =
1000
+ * Fixed issue with BBPress: restored old user permission checking mechanism
1001
+ * Fixed anti-spam comments checking: sometimes get_comments returned wrong comments number
1002
+ * Fixed bulk checking: made numeric indexes in users and comments arrays
1003
+ * Fixed trackback and pingback checking: removed exception for checking
1004
+
1005
+ = 5.33 2015-12-01 =
1006
+ * Backend interface fixes
1007
+ * Improved Spam FireWall efficiency
1008
+ * Improved performance of anti spam checking
1009
+
1010
+ = 5.32 2015-11-26 =
1011
+ * Added improvements for manual spam detection
1012
+ * Fixed errors in backend
1013
+ * Fixed bulk users anti spam checking
1014
+ * Added indicator for bulk spam checking
1015
+ * Added "Get access key automatically" button
1016
+
1017
+ = 5.31 2015-11-11 =
1018
+ * Improved backend performance
1019
+ * Fixed counter of approved/blocked spam attacks
1020
+ * Fixed Spam FireWall logging
1021
+
1022
+ = 5.30 2015-11-05 =
1023
+ * Improved anti-spam checking
1024
+ * Optimized performance
1025
+ * Fixed blocking email preview in MailPoet
1026
+ * Interface fixes
1027
+ * WPMU interface fixes
1028
+
1029
+ = 5.29 2015-10-27 =
1030
+ * Optimized performance
1031
+ * Fixed bugs in custom contact forms spam checking
1032
+
1033
+ = 5.28.7 2015-10-23 =
1034
+ * Optimized PHP sessions creation algorithm. This fix should increase plugin perfomance on hostings without retenion of PHP sessions files.
1035
+ * Removed autoredirection to plugin settings after plugin activation.
1036
+
1037
+ = 5.28 2015-10-16 =
1038
+ * Fixed errors in anti-spam checking
1039
+ * Restored options for spam checking registrations and cpmmon contact forms
1040
+ * Improved spam protection
1041
+ * Fixed problems with AJAX functionality in MailPoet, WooCommerce and other AJAX plugins
1042
+
1043
+ = 5.27 2015-10-13 =
1044
+ * Improvements in SpamFireWall feature
1045
+ * Code optimization
1046
+ * Backend interface fixes
1047
+
1048
+ = 5.26 2015-10-05 =
1049
+ * Added WordPress Language Pack support
1050
+ * Removed spam checking for some autorisation plugins
1051
+ * New experimental feature: SpamFireWall
1052
+
1053
+ = 5.25.2 2015-09-28 =
1054
+ * Fixed backend bug
1055
+
1056
+ = 5.25.1 2015-09-28 =
1057
+ * Added widget with anti-spam stats
1058
+ * Added information about blocked spam attacks in admin dashboard and CleanTalk settings
1059
+ * Added ability not to check comments for users with 3 or above allowed comments
1060
+ * Added an option 'Help others known CleanTalk' to show information for site visitors, that your site is protected from spam by us
1061
+ * Some backend interface settings
1062
+
1063
+ = 5.24.1 2015-09-16 =
1064
+ * Fixed some errors in frontend
1065
+ * Fixed access key saving
1066
+
1067
+ = 5.24 2015-09-14 =
1068
+ * Backend interface fixes
1069
+ * Improvement for AJAX JavaScript spam checking
1070
+
1071
+ = 5.23 2015-09-01 =
1072
+ * Fixed BuddyPress profile search false positivities of anti-spam protection.
1073
+ * Some interface fixes of bulk users & comments spam checking
1074
+
1075
+ = 5.22 2015-08-26 =
1076
+ * Fixed possible XSS issue for anti-spam test on third-party forms.
1077
+
1078
+ = 5.21 2015-08-21 =
1079
+ * Fixed bug with skipping spam submissions
1080
+ * Fixed bug with receiving old user_token for viewing anti-spam stats
1081
+ * Small backend fixes
1082
+
1083
+ = 5.20 2015-08-15 =
1084
+ * Fixed anti-spam stats in admin bar - now stats updates every hour
1085
+ * Fixed issue with skipping spam submissions
1086
+ * Added some PHP-constants for advanced users - CLEANTALK_AJAX_USE_BUFFER and CLEANTALK_AJAX_USE_FOOTER_HEADER can be defined to true or false in wp-config.php to control method, which will be used for injection of AJAX script.
1087
+
1088
+ = 5.19 2015-08-11 =
1089
+ * New feature: anti-spam checking for registered users
1090
+ * Fixed issue with AJAX JavaScript anti-spam test.
1091
+ * Fixed issue with SEO Yoast xml sitemaps and JavaScript anti-spam test.
1092
+
1093
+ = 5.18 2015-08-04 =
1094
+ * Fixed issue with user_token
1095
+ * Added anti-spam API, see our FAQ
1096
+
1097
+ = 5.17 2015-07-23 =
1098
+ * Fixed infinite redirection after activation
1099
+ * Minor backend fixes
1100
+
1101
+ = 5.16 2015-07-22 =
1102
+ * Fixed external services checking
1103
+ * Fixed mass comments deletion
1104
+ * Fixed AJAX anti-spam protection
1105
+
1106
+ = 5.15 2015-07-16 =
1107
+ * New feature: anti-spam protection for forms, that uses external services
1108
+
1109
+ = 5.14 2015-07-03 =
1110
+ * Added anti-spam protection for some themes and plugins
1111
+ * Some backend fixes
1112
+
1113
+ = 5.13 2015-06-12 =
1114
+ * Closing notification for anti-spam renew
1115
+ * Fixed bulk anti spam comment checking
1116
+
1117
+ = 5.12 2015-06-01 =
1118
+ * Added option for checking all post data for spam
1119
+ * Some JavaScript protection improvements
1120
+ * Added option for old JavaScript check (without AJAX)
1121
+
1122
+ = 5.10 2015-05-25 =
1123
+ * Fixed Javascript error on some forms
1124
+
1125
+ = 5.9 2015-05-21 =
1126
+ * Fixed Javascript error on CF7 and JetPack
1127
+ * Some backend and frontent fixes
1128
+
1129
+ = 5.8 2015-05-18 =
1130
+ * Minor fixes
1131
+
1132
+ = 5.7 2015-05-18 =
1133
+ * Fixed French translation
1134
+ * Fixed protection algorithm
1135
+
1136
+ = 5.6 2015-05-11 =
1137
+ * Fixed translation
1138
+ * Fixed bulk comments anti-spam checking
1139
+ * Added option for disabling anti spam stats in adminbar
1140
+ * Some security fixes
1141
+
1142
+ = 5.5 2015-04-29 =
1143
+ * Fixed security issue
1144
+ * Some interface fixes
1145
+
1146
+ = 5.4 2015-04-27 =
1147
+ * Some interface and functionality changes in plugin settings page
1148
+ * Added counter for anti-spam stats in admin bar
1149
+
1150
+ = 5.3 2015-04-13 =
1151
+ * Added anti-spam protection for Divi theme contact forms
1152
+ * Added anti-spam protection for MyMail contact forms
1153
+ * Added anti-spam protection for MailPoet Newsletters
1154
+ * Some interface and functionality changes in backend
1155
+
1156
+ = 5.2 2015-04-01 =
1157
+ * Added link for anti-spam stats
1158
+ * Added WP User Frontend Pro registration form protection
1159
+
1160
+ = 5.1 2015-03-24 =
1161
+ * Fixed site crash after installing 5.0 on some websites
1162
+
1163
+ = 5.0 2015-03-24 =
1164
+ * Added bulk comments checking for spam via CleanTalk blacklists
1165
+ * Added anti-spam form protection for 'Ajax Login & Register'
1166
+ * Fixed JetPack form protection
1167
+
1168
+ = 4.24 2015-03-20 =
1169
+ * Added immediate spam protection activation.
1170
+
1171
+ = 4.22 2015-03-17 =
1172
+ * Added button for automatic spam protection key getting.
1173
+
1174
+ = 4.21 2015-03-11 =
1175
+ * Added license renew notification.
1176
+
1177
+ = 4.20 2015-03-03 =
1178
+ * Added German, Italian, Polish, Portuguese translations.
1179
+ * Minor code fixes.
1180
+
1181
+ = 4.19 2015-02-24 =
1182
+ * Increased keys lifetime for JS spam test.
1183
+
1184
+ = 4.18 2015-02-17 =
1185
+ * Fixed bug with comments approvement - moved ct_unmark_red() to cleantalk-admin.php
1186
+ * Added PayPal 'payment_status' in skip list.
1187
+ * Added Akismet 'spam' status processing.
1188
+
1189
+ = 4.17 2015-02-12 =
1190
+ * New base class.
1191
+ * Divided code to 3 separate files - common, public and admin.
1192
+
1193
+ = 4.16 2015-02-05 =
1194
+ * New base class.
1195
+ * Fixed JetPack spam filters logics.
1196
+ * Optimized Formidable, bbPress, BuddyPress spam filters.
1197
+
1198
+ = 4.15 2015-01-29 =
1199
+ * Support spam test for Contact Form 7 versions before 3.0.0.
1200
+ * Fixed global JS-vars for JS spam test.
1201
+ * Fixed online notice cookie logics.
1202
+ * Optimized spam filters for FSCF, WooCommerce, JetPack.
1203
+ * Optimized option getting.
1204
+
1205
+ = 4.14 2015-01-19 =
1206
+ * Removed deprecated option from comment approvement code.
1207
+ * New API key URL.
1208
+ * Trimmed API key in admin panel.
1209
+ * Added current options to array sended to CleanTalk servers.
1210
+ = 4.13 2014-12-29 =
1211
+ * Fixed bug with autimatically aprovement not spam comments. Now this option disabled and do not override local WordPress policy.
1212
+
1213
+ = 4.12 2014-12-29 =
1214
+ * Fixed bug with 'Wrong Access key...' notice in WordPress dashboard.
1215
+ * Fixed filtration bug in WordPress dashboard login form.
1216
+
1217
+ = 4.11 2014-12-22 =
1218
+ * Improved anti-spam protection for custom contact/registration/subscribe forms.
1219
+ * Improved anti-spam protection for comments.
1220
+ * Accelerated plugin speed for comments, regirstrations and contacts.
1221
+ * Added translation to French.
1222
+
1223
+ = 4.10 2014-12-10 =
1224
+ * Improved anti-spam protection for custom contact/registration/subscribe forms.
1225
+ * Option 'Custom contact forms' enabled by default for new setups.
1226
+ * Removed settings "Publish relevant comments", "Use encrypted (SSL) connection".
1227
+ * Added translation to Danish (thank you for Mikkel at KreativJul.dk).
1228
+
1229
+ = 4.9 2014-11-24 =
1230
+ * Fixed spam test for Contact Form 7.
1231
+
1232
+ = 4.8 2014-11-19 =
1233
+ * Improved anti-spam protection for BuddyPress registrations and custom contact forms.
1234
+
1235
+ = 4.7 2014-11-16 =
1236
+ * Fixed JavaScript spam test for FastSecure contact form.
1237
+
1238
+ = 4.6 2014-11-11 =
1239
+ * Improved anti-spam protection on BuddyPress registrations.
1240
+ * Improved anti-spam protection on contact forms.
1241
+ * Removed plugin sign from pending, spam comments. To get details about a comment please use Dashboard at cleantalk.org.
1242
+ * Improved Access key validation function.
1243
+ * Added protection for bbPress comments via stop list. Stop list function is a list to reject comments by prefiled words. To fill the list please use Dashboard at cleantalk.org.
1244
+
1245
+ = 4.5 2014-11-04 =
1246
+ * Fixed CF7 JavaScript bug.
1247
+ * Fixed rejects in bbPress guests comments.
1248
+
1249
+ = 4.4 2014-10-29 =
1250
+ * Improved anti-spam JS test for CF7.
1251
+ * Fixed 'noscript' text in FaceBook Like preview in Valenti theme.
1252
+
1253
+ = 4.2 2014-10-20 =
1254
+ * Fixed double checks issue for BuddyPress registrations.
1255
+ * Increased timeout limits to find the work server.
1256
+
1257
+ = 4.1 2014-10-13 =
1258
+ * Optimized code for manual moderation feedback sending.
1259
+ * Optimized anti-spam algorithms for comments, contacts and signups.
1260
+
1261
+ = 4.0 2014-10-06 =
1262
+ * Improved anti-spam protection for custom contact forms.
1263
+ * Improved anti-spam protection for registration forms.
1264
+
1265
+ = 3.9 2014-10-01 =
1266
+ * Did exception to do not break to create new user in WordPress backend.
1267
+
1268
+ = 3.8 2014-09-19 =
1269
+ * Fixed json_encode() + malformed characters.
1270
+ * Fixed JavaScript issue with wpautop().
1271
+
1272
+ = 3.6 2014-09-15 =
1273
+ * Fixed preg_match() issue for Formidable forms and Custom contact forms.
1274
+ * Improved anti-spam protection for Custom contact forms.
1275
+
1276
+ = 3.4 2014-09-04 =
1277
+ * We've added anti-spam for themes contact forms and any untested contact forms plugins. To use this test enable option "Custom contact forms" in plugin settings.
1278
+ * We've added auto rotation for spam comments. Now the plugin removes comments in SPAM folder older then 15 days. This option is enabled by default.
1279
+
1280
+ = 3.2 2014-08-27 =
1281
+ * Fixed submit_time() logic for failed submits (comments/registrations). Now form fill time resets after every failed submit.
1282
+
1283
+ = 3.1 2014-08-19 =
1284
+ * Added anti-spam test over senders Cookies.
1285
+ * Improved form fill anti-spam test.
1286
+ * Improved speed selection of the nearest server to website.
1287
+ * Improved anti-spam speed for comments.
1288
+ * Relevance anti-spam test disabled by default. To enable test should be used option 'relevance_test'.
1289
+
1290
+ = 2.58 2014-08-06 =
1291
+ * Added anti-spam protection for signups posted via WooCommerce order form.
1292
+ * Improved anti-spam protection for Contact Form 7.
1293
+ * Improved anti-spam protection for registrations. Now the plugin looking for JavaScript anti spam test results not only in POST array, but in COOKIES array too. This improvement allows protect signup forms for any untested signups plugins and themes.
1294
+ * Updated PHP API. Now the plugin can resolve sender IP for websites behind proxy servers. If the proxy servers uses private IP address.
1295
+
1296
+ = 2.57 2014-07-29 =
1297
+ * Improved anti-spam protection for comments. The plugin now proccessing website url in the comments form.
1298
+ * Fixed sign remove logic for approved comments. Previous version doesn't cut sign for comments approved via AJAX call in WordPress backend.
1299
+ * Fixed switching to SSL for comments. Previous version doesn't use secured connection for comments.
1300
+
1301
+ = 2.56 2014-07-21 =
1302
+ * Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
1303
+
1304
+ = 2.55 2014-07-11 =
1305
+ * Fixed bug with account status function. In backend the plugin showed notice 'Please don't forget to disable CAPTCHA if you have it!' on every page.
1306
+
1307
+ = 2.54 2014-07-11 =
1308
+ * Fixed signup anti-spam protection logic for BuddyPress registrations.
1309
+ * Fixed anti-spam protection for JetPack contact form.
1310
+ * Changed account status check logic.
1311
+
1312
+ = 2.53 2014-06-27 =
1313
+ * Fixed anit-spam protection bug for signups.
1314
+ * Changed anti-spam functions (comments and signups) priority.
1315
+
1316
+ = 2.52 2014-06-25 =
1317
+ * Fixed 'Fatal error: Call to a member function get_error_code()' issue with signups via BuddyPress.
1318
+
1319
+ = 2.51 2014-06-23 =
1320
+ * Added spam protection for registrations via plugin New User Approve by Josh Harrison. If the CleanTalk matched signup as spam this signup will be denied to placing in pending queue.
1321
+ * Added option "Use secure (SSL) connection to CleanTalk cloud". If the option enabled plugin will communicate with CleanTalk severs via 128bit encrypted data channel. So, if you have SSL protected webforms on website you can use this option to be sure that visitors personal data safely transmits to CleanTalk servers.
1322
+ * Fixed minor bug with loading backend functions.
1323
+
1324
+ = 2.49 2014-06-10 =
1325
+ * Added spam protection for S2Member Auth.net forms.
1326
+ * Added spam protection for multisite signup form.
1327
+ * Optimized account status check function.
1328
+
1329
+ = 2.46 2014-05-19 =
1330
+ * Added: HTML notice about the need to enable JavaScript.
1331
+ * Fixed: Fixed pingbacks anti-spam test.
1332
+
1333
+ = 2.44 2014-05-12 =
1334
+ * Added: Anti-spam protection for S2Member framework.
1335
+ * Improved: JavaScript anti-spam test.
1336
+ * Improved: Plugin load time for backend and frontend.
1337
+ * Fixed: PHP warning mb_convert_encoding()
1338
+
1339
+ = 2.42 2014-04-29 =
1340
+ * Fixed: JavaScript anti-spam test for comments.
1341
+
1342
+ = 2.40 2014-04-25 =
1343
+ * New: Fast Secure Contact form support.
1344
+ * New: WordPress Landing Pages support
1345
+
1346
+ = 2.38 2014-03-27 =
1347
+ * Fixed: Registraion form submit time spam test.
1348
+
1349
+ = 2.36 2014-03-12 =
1350
+ * Reversed to patches from old revisions.
1351
+
1352
+ = 2.35 2014-03-12 =
1353
+ * New: Notifications about disabled account
1354
+ * New: Improved JavaScript spam test.
1355
+ * Fixed: Code optimization
1356
+ * Fixed: JavaScript test for signups.
1357
+
1358
+ = 2.33 2014-02-12 =
1359
+ * Fixed: CURLOPT_FOLLOWLOCATION bug at admin notice
1360
+
1361
+ = 2.32 2014-02-04 =
1362
+ * New: Added notice about automatically approved comment. The notice shows only for first approved comment and only for new commentators (without approved comments) of the blog.
1363
+ * New: At WordPress console added banner for notices.
1364
+ * Changed: Screenshots updated.
1365
+
1366
+ = 2.31 2014-01-24 =
1367
+ * New: Added spam protection for JetPack comments
1368
+ * Fixed: cURL connection issue "Expect: 100-continue"
1369
+
1370
+ = 2.30 2014-01-13 =
1371
+ * Changed: Improved servers connection logic.
1372
+ * Fixed: Antispam test for Fomidable forms.
1373
+
1374
+ = 2.28 2013-12-19 =
1375
+ * New: Added protection against spam bots for WooCommerce review form.
1376
+ * Fixed: JavaScript anti-spam logic for WooCommerce review form.
1377
+
1378
+ = 2.27 2013-12-06 =
1379
+ * New: Added protection against spam bots for JetPack Contact form.
1380
+ * Fixed: JavaScript anti-spam logic for registrations and Contact form 7.
1381
+
1382
+ = 2.25 2013-11-27 =
1383
+ * New: Added protection against spam bots for BuddyPress registrations.
1384
+ * New: Added protection against spam bots for Contact form 7.
1385
+ * New: Added Spanish (es_ES) translation.
1386
+
1387
+ = 2.23 2013-11-20 =
1388
+ * New: Added automatic training blacklists on spam bot account deletion.
1389
+ * New: Added URL to project homepage at plugin options.
1390
+ * Changed: Improved anti-spam logic.
1391
+
1392
+ = 2.21 2013-11-13 =
1393
+ * Changed: WordPress blacklists settings get priority over plugin's anti-spam settings
1394
+ * Changed: Disabled management approval comments for regular commentators of the blog. Automatically approved for publication only the comments of the new blog authors.
1395
+ * Changed: Removed form submit time test. Imporved JavaScript spam test.
1396
+ * Changed: PHP code optimizations
1397
+
1398
+ = 2.19 2013-11-08 =
1399
+ * New: Antispam protection from spam bots at the registration form
1400
+ * Changed: Russian localization for admin panel
1401
+ * Changed: PHP code optimizations
1402
+
1403
+ = 2.5.18 2013-11-01 =
1404
+ * Fixed: Bug with selection of the last comments for post
1405
+ * New: Antispam protection for Formidable feedback forms
1406
+ * New: Automatic deletion of outdated spam comments
1407
+ * New: On/Off option for comments spam filtration
1408
+ * Tested with WordPress 3.7.1
1409
+
1410
+ = 2.4.15 2013-09-26 =
1411
+ * Fixed: Bug with mass comments deletion
1412
+ * Changed: Russian localization for admin panel
1413
+ * Tested with mulitsite setup (WordPress network or WPMU)
1414
+
1415
+ = 2.4.14 2013-08-29 =
1416
+ * Changed: Removed feedback requests to the servers for banned (spam) comments.
1417
+
1418
+ = 2.4.13 2013-08-19 =
1419
+ * Changed: Switched HTTP requests from file_get_contents() to CURL. Added file_get_contens() as backup connection to the servers.
1420
+ * Changed: Removed feedback requests for comments moved to trash.
1421
+ * Fixed: "Fail connect to servers..." error on hostings with disabled 'allow_url_fopen' PHP option.
1422
+
1423
+ = 2.4.12 2013-08-12 =
1424
+ * Removed RPC::XML library from plugin.
1425
+ * Switched plugin to HTTP+JSON connection with servers.
1426
+ * Fixed bug with comments anti-spam tests with non UTF8 codepage.
1427
+
1428
+ = 2.4.11 2013-08-02 =
1429
+ * Removed spam tests for self-made pingbacks
1430
+ * Tested up to WP 3.6
1431
+
1432
+ = 2.4.10 2013-07-24 =
1433
+ * Fixed warning in PHP 5.4
1434
+ * Fixed bug with disabling comments test for Administrators, Authors and Editors
1435
+ * "Stop words" settings moved to <a href="http://cleantalk.org/my">Control panel</a> of the service
1436
+ * "Response language" settings moved <a href="http://cleantalk.org/my">Control panel</a> of the service
1437
+
1438
+ = 2.4.9 =
1439
+ * Fixed extra debugging in base class
1440
+
1441
+ = 2.4.8 =
1442
+ * Enabled convertion to UTF8 for comment and example text
1443
+ * Optimized PHP code
1444
+
1445
+ = 2.3.8 =
1446
+ * Enabled selection the fastest server in the pool
1447
+ * Fixed work server in plugin's config
1448
+
1449
+ = 2.2.3 =
1450
+ * Secured md5 string for JavaScript test
1451
+ * Added requests's timestamp to calculate request work time
1452
+ * Update base CleanTalk's PHP class
1453
+
1454
+ = 2.1.2 =
1455
+ * Improved perfomance for processing large comments (over 32kb size)
1456
+ * Improved perfomance for bulk operations with comments in Comments panel
1457
+ * Added feedback request with URL to approved comment
1458
+
1459
+ = 2.0.2 =
1460
+ * Fixed bug with JavaScript test and WordPress cache plugins
1461
+
1462
+ = 2.0.1 =
1463
+ * Added option "Publicate relevant comments" to plugin's options.
1464
+ * Added descriptions to plugin options
1465
+
1466
+ = 1.5.4 =
1467
+ * Fixed HTTP_REFERER transmission to the servers
1468
+ * Improved JavaScript spam test
1469
+ * Optimized PHP code
1470
+
1471
+ = 1.4.4 =
1472
+ * Pingback, trackback comments has moved to manual moderataion
1473
+ * Added transmission to the serves comment type and URL
1474
+ * Post title, body and comments separated into individual data elements
1475
+ * Added priority for matched words in the comment with post title
1476
+ * Enabled stop words filtration as default option
1477
+
1478
+ = 1.3.4 =
1479
+ * Removed PHP debugging.
1480
+
1481
+ = 1.3.3 =
1482
+ * Added notice at admin panel about empty Access key in plugin settings
1483
+ * Removed HTTP link to the site project from post page
1484
+ * Removed unused options from settings page
1485
+ * Tested up to WordPress 3.5
1486
+
1487
+ = 1.2.3 =
1488
+ * Fixed bug with session_start.
1489
+
1490
+ = 1.2.2 =
1491
+ * Plugin rename to CleanTalk. Spam prevent plugin
1492
+ * Integration Base Class version 0.7
1493
+ * Added fast submit check
1494
+ * Added check website in form
1495
+ * Added feedbacks for change comment status (Not spam, unapprove)
1496
+ * Added function move comment in spam folder if CleanTalk say is spam
1497
+ * Disable checking for user groups Administrator, Author, Editor
1498
+ * Marked red color bad words
1499
+
1500
+ = 1.1.2 =
1501
+ * Addition: Title of the post attached to the example text in auto publication tool.
1502
+ * Tested with WordPress 3.4.1.
1503
+
1504
+ = 1.1.1 =
1505
+ * HTTP_REFERER bug fixed
1506
+
1507
+ = 1.1.1 =
1508
+ * Added user locale support, tested up to WP 3.4
1509
+
1510
+ = 1.1.0 =
1511
+ * First version
1512
+
1513
+
1514
+ == Upgrade Notice ==
1515
+ = 5.130 November 14 2019 =
1516
+ * Fix: JetPack contact form JS check.
1517
+ * FIx: Iphorm AJAX form.
1518
+ * Fix: Paid Memberships Pro fix.
1519
+ * Fix: Divi theme contact form fix.
1520
+ * Integration: Paid Memberships Pro.
1521
+ * Integration: Elementor Pro page builder forms.
1522
+ * Improved: Compatibility with different server.
1523
+
1524
+ = 5.129.1 November 5 2019 =
1525
+ * Fix: WooCommerce order detecting.
1526
+
1527
+ = 5.129 October 30 2019 =
1528
+ * Upd: Localize updated.
1529
+ * Fix: Direct $_SERVER access replaced.
1530
+ * Integration: The 7 theme contact form.
1531
+ * Fix: Minor improvements and bug fixes.
1532
+ * Mod: Putting site in maintenance mode during plugin update.
1533
+
1534
+ = 5.128.1 October 23 2019 =
1535
+ * Fix: Fatal error when using buffer output.
1536
+ * Fix: Translate domain for errors.
1537
+ * Code: Fix spelling in function name.
1538
+ * Fix: JS disabled error.
1539
+ * Upd: Comment edit screen updated.
1540
+ * Fix: Cleantalk\Arr::search() fixed.
1541
+
1542
+ = 5.128 October 17 2019 =
1543
+ * Mod: Users check - functionality updated.
1544
+ * Fix: Users check - dates format updated.
1545
+ * Mod: Comments check - functionality updated.
1546
+ * Fix: Comments check - dates format updated.
1547
+ * Fix: Fields exclusion fixed.
1548
+ * Fix: Notice fixed.
1549
+ * Fix: Cleantalk/Antispam/API.
1550
+ * Fix: Minor improvements and bug fixes.
1551
+
1552
+ = 5.127.4 October 13 2019 =
1553
+ * Mod: Automatically decrease amount of checked users by one request if an error occurs.
1554
+ * Fix: Security issue.
1555
+ * Fix: Static JS key.
1556
+
1557
+ = 5.127.3 October 8 2019 =
1558
+ * Fix: Errors during registration.
1559
+
1560
+ = 5.127.2 October 8 2019 =
1561
+ * Integration: SeedProd Coming Soon Page Pro.
1562
+ * Fix: WooCommerce double reuqests.
1563
+ * Fix: Static JS key.
1564
+
1565
+ = 5.127.1 October 7 2019 =
1566
+ * Fix: WPMS settings logic.
1567
+ * Using default database storage engine for tables.
1568
+
1569
+ = 5.127 September 30 2019 =
1570
+ * Fix: Delete redirect notice on external forms
1571
+ * Fix: Storing spam for 15 days.
1572
+ * Fix: correct DiVi display message.
1573
+ * Integration: Ultimate Members.
1574
+ * Mod: Setting "Use static JS key" switched to "Auto" if it was "No". Default is "Auto".
1575
+ * Mod: Moving White Label option to main site settings.
1576
+ * New: Use static JS key if cache plugin detected.
1577
+ * New: Settings for URLs, fields, roles exclusions.
1578
+ * New: Regular Expressions support in URLs, fields exclusions.
1579
+ * New: Send validation errors on standard registration form.
1580
+ * Updater: Move exclusions from global variable to settings.
1581
+ * Deprecated: IP exclusions.
1582
+
1583
+ = 5.126 September 9 2019 =
1584
+ * Spam protection improved!
1585
+ * Integration: Option wheel.
1586
+ * Mod: Improved Email detection.
1587
+ * Mod: Improved IP detection.
1588
+ * Fix: Too large database table with alternative sessions.
1589
+ * Fix: Exception for WooCommerce AJAX.
1590
+ * Fix: API key validation.
1591
+ * Minor fixes.
1592
+
1593
+ = 5.125 August 26 2019 =
1594
+ * Fix: PHP Notices.
1595
+ * Fix: Auto update.
1596
+ * Fix: Displaying protection status for IP license.
1597
+ * Fix: prevent capturing buffer for XMLRPC requests (check_external functionality).
1598
+ * Fix: API key validating.
1599
+ * New: Complete deactivation setting.
1600
+
1601
+ = 5.124.1 August 8 2019 =
1602
+ * Fix: Error on PHP 5.3.
1603
+
1604
+ = 5.124 August 8 2019 =
1605
+ * Spam protection improved.
1606
+ * Fix: SpamFireWall local database counter on Multisite.
1607
+ * Fix: Caldera Forms integration.
1608
+ * Fix: Settings "Use AJAX for JS check" description.
1609
+ * Fix: Formidable integration.
1610
+ * New: External forms check now independed from JavaScript.
1611
+ * New: Setting Protect external - capture buffer.
1612
+ * New: QuForm integration.
1613
+
1614
+ = 5.123 July 25 2019 =
1615
+ * Fix: Plenty of minor fixes.
1616
+ * Fix: wpDiscuz integration.
1617
+ * Fix: Integration with bbPress.
1618
+ * Fix: New comment email notification.
1619
+ * New: Follow-Up Emails integration.
1620
+ * Fix: Woocommerce integration.
1621
+ * Fix: Spelling.
1622
+
1623
+ = 5.122 July 10 2019 =
1624
+ * Spam Protection improved.
1625
+ * Fix: Error while checking account status.
1626
+ * Fix: Conflict with Elementor Pro.
1627
+ * Fix: Integration with Ninja Forms.
1628
+ * Fix: Integration with Formidable.
1629
+ * New: Detecting mobile devices.
1630
+ * New: Integration for Easy Forms for Mailchimp.
1631
+
1632
+ = 5.121 June 26 2019 =
1633
+ * Fix: Translation typos.
1634
+ * Fix: Woocommerce integration.
1635
+ * Fix: Catching admin in AJAX queries.
1636
+ * Mod: Session table (cleantalk_sessions) issue.
1637
+ * Mod: Spam protection improved.
1638
+ * Integration: Wilcity theme custom registration validation enabled
1639
+ * New: Option "Use static JS key".
1640
+
1641
+ = 5.120.2 June 17 2019 =
1642
+ * Fix: WPForms integration.
1643
+ * Fix: Translation and spelling.
1644
+ * Fix: Minor PHP error
1645
+
1646
+ = 5.120.1 June 6 2019 =
1647
+ * Mod: Description for Search form protection.
1648
+ * Fix: CSS and JS attachment.
1649
+ * Fix: Undefined index error.
1650
+
1651
+ = 5.120 June 5 2019 =
1652
+ * Fix: bbPress false positives.
1653
+ * Fix: SpamFireWall check condition.
1654
+ * Fix: SpamFireWall block page.
1655
+ * Fix: Catch admin action via search form test.
1656
+ * Fix: Catch admin action (AJAX).
1657
+ * Mod: Using minified version of JS and CSS.
1658
+ * Mod: Date format in statistics.
1659
+
1660
+
1661
+ = 5.119.1 May 30 2019 =
1662
+ * Fix: Helper class error.
1663
+
1664
+ = 5.119 May 30 2019 =
1665
+ * Fix: No more second request after registration.
1666
+ * Fix: Activation hook.
1667
+ * Fix: Alternative sessions. Clear table.
1668
+ * Fix: Stop capchuring AJAX requests in admin area.
1669
+ * Fix: Spelling.
1670
+ * Fix: Registration cookies set.
1671
+ * Mod: SFW exdtended die page when testing.
1672
+ * Mod: User-agent modified.
1673
+ * New: Test search queries for spam.
1674
+ * New: Gathering and output statistics.
1675
+
1676
+ = 5.118.4 May 13 2019 =
1677
+ * Fix: SFW cookie. Set correct domain for subdomains.
1678
+ * Fix: SFW update.
1679
+ * Fix: IP detection.
1680
+ * Fix: Triggering AJAX check in backend.
1681
+ * Fix: Zero submit time on few forms.
1682
+
1683
+ = 5.118.3 April 29 2019 =
1684
+ * Fix: Spam statistics in dashboard widget.
1685
+ * Fix: IP detection.
1686
+ * Fix: Double check AJAX integrated forms like Ninja Forms.
1687
+ * Fix: Use url exclusions for AJAX forms.
1688
+
1689
+ = 5.118.2 April 25 2019 =
1690
+ * Mod: Spam filtration quality improved.
1691
+ * Mod: Store SFW cookie for 30 days.
1692
+ * Mod: Server IP added to connection report.
1693
+ * Fix: spam_stat is not defined.
1694
+
1695
+ = 5.118.1 April 19 2019 =
1696
+ * Fix: Fatal error.
1697
+ * Mod: Spam protection improved on registrations.
1698
+
1699
+ = 5.118 April 19 2019 =
1700
+ * Fix: Cookies on registration page.
1701
+ * Fix: Update fix.
1702
+ * Fix: Wordpress built-in API.
1703
+ * Fix: WooCommerce checkout form.
1704
+ * Fix: UpdraftPlus. Saving settings.
1705
+ * Fix: Convert Pro saving settings.
1706
+ * Fix: UTF-8 Converting.
1707
+ * Fix: GDPR notice.
1708
+ * Fix: cleantalk_sessions table size reduced.
1709
+ * Mod: Localization.
1710
+ * Mod: Performance improved.
1711
+ * Mod: SpamFierWall improvments.
1712
+ * Mod: IP detection improved.
1713
+ * Mod: JavaScript check rewised.
1714
+ * New: Setting "Use alternative mechanism for cookies".
1715
+
1716
+ = 5.117.1 April 5 2019 =
1717
+ * Fix: GDPR notice.
1718
+ * Fix: noCacheJS localization.
1719
+ * Fix: Fatal error when updating.
1720
+
1721
+ = 5.117 March 27 2019 =
1722
+ * New: Update logic runs on all pages.
1723
+ * New: Integration for Ajax Contact Forms plugin.
1724
+ * New: Notification for users groups about new comments.
1725
+ * New: SFW die page. Show browser and page creation time.
1726
+ * Fix: Huge bug in Cleantalk.php connected with servers changing.
1727
+ * Fix: Check AJAX requests for logged in users.
1728
+ * Fix: Deleting debug in JS.
1729
+ * Fix: Validating settings before saving.
1730
+
1731
+ = 5.116.3 March 14 2019 =
1732
+ * Fix: "Headers already sent" error.
1733
+ * Fix: Images paths.
1734
+ * Fix: IP detection.
1735
+ * Fix: Skip lost password form check
1736
+ * Fix: Skip mobile requests (push settings)
1737
+ * Fix: PHP notice when detecting BuddyPress template.
1738
+
1739
+ = 5.116.2 March 7 2019 =
1740
+ * Fix: Creating tables in MariaDB.
1741
+
1742
+ = 5.116.1 March 6 2019 =
1743
+ * Fix: Creating tables in DB.
1744
+ * Fix: PHP Warning in spam statistics widget.
1745
+
1746
+ = 5.116 March 6 2019 =
1747
+ * Spam filtration quality improved.
1748
+ * New: Storing visited URLs.
1749
+ * New: Check before validation Contact Form 7, Comments, Jetpack comments.
1750
+ * New: Get validation result for Contact Form 7, Comments, Jetpack comments.
1751
+ * Fix: ES add subscriber.
1752
+ * Fix: IP detection.
1753
+
1754
+ = 5.115.2 February 27 2019 =
1755
+ * Fix: False positives spam detection in WP Forms and Contact Form 7.
1756
+
1757
+ = 5.115.1 February 16 2019 =
1758
+ * Fix: SpamFireWall's false positives.
1759
+
1760
+ = 5.115 February 14 2019 =
1761
+ * Fix: Http_only flag for backend cookies.
1762
+ * Fix: Spam filtration improved.
1763
+ * New: IP detection improved.
1764
+ * Fix: SpamFirewall update speeded up.
1765
+ * New: False positives with caching solutions decreased.
1766
+ * New: Opportunity to use Wordpress HTTP API to connect with Cloud.
1767
+
1768
+ = 5.114 January 31 2019 =
1769
+ * New: Setting "Use Wordpress HTTP API" as alternative to CURL. Disabled by default.
1770
+ * Fix: Formidable: Adding small JS check when adding JS_key.
1771
+ * Mod: layout of settings page.
1772
+ * Mod: Banner logic altered.
1773
+
1774
+ = 5.113.2 January 18 2019 =
1775
+ * Fix: "Settings" link returns to plugin page.
1776
+
1777
+ = 5.113.1 January 17 2019 =
1778
+ * Fix: Conflict with CityTours theme.
1779
+ * Fix: Error for Wordperss lower 4.7.
1780
+ * Add: Spam protection: "Validate email for existance".
1781
+
1782
+ = 5.113 January 16 2019 =
1783
+ * Fix: Fast and Simple Contact Form.
1784
+ * Fix: Settings layout.
1785
+ * Fix: Error with WooCommerce Quickview.
1786
+ * Fix: Bitrix24 contact form.
1787
+ * Fix: Request time decreased.
1788
+ * Fix: Requesting account status when activating for IP licenses.
1789
+ * Add: Precise AJAX request detection.
1790
+ * Spam protection improved.
1791
+
1792
+ = 5.112 December 21 2018 =
1793
+ * Fix: Woocommerce AJAX checkout form.
1794
+ * Fix: Profile Builder Pro.
1795
+ * Fix: DB structure improvements for WPMS.
1796
+ * Spam filtering quality improved.
1797
+ * Minor fixes.
1798
+
1799
+ = 5.111 December 13 2018 =
1800
+ * Fix: Double request in JetPack contact form.
1801
+ * Fix: Email notification about spam registration.
1802
+ * Fix: Links button for feedback comments.
1803
+ * Fix: Mail notification about plugin error.
1804
+ * Fix: Key field output.
1805
+ * Minor fixes.
1806
+
1807
+ = 5.110 November 29 2018 =
1808
+ * Integration: BuddyPress ActivityWall spam protection.
1809
+ * Add: Support different BuddyPress templates on activity wall.
1810
+ * Fix: Admin/moderator checking for validate post data.
1811
+ * Add: GDPR setting for shortcode.
1812
+ * Fix: Increase timeout for spam_check_cms to 15.
1813
+
1814
+ = 5.109 November 15 2018 =
1815
+ * Fix: Added URL and IP exclusions to Contact Form 7.
1816
+ * Fix: js error when responseText is not exists
1817
+ * Fix: Sitename when getting key automatically under WPMS.
1818
+ * Mod: SpamFireWall is now fully compatible with WPMS.
1819
+ * Mod: Setting 'Tell others about CleanTalk' was deleted.
1820
+ * Mod: Protection from spam improved.
1821
+
1822
+ = 5.108.1 November 8 2018 =
1823
+ * Fix: Errors with integration class.
1824
+
1825
+ = 5.108 November 7 2018 =
1826
+ * Fix: White label mode.
1827
+ * Fix: SpamFireWall now can be disabled.
1828
+ * Fix: Layout.
1829
+ * Integration: WPForms.
1830
+ * Add: Message about block for all no integrated AJAX forms.
1831
+ * Add: Displaying account name near api key.
1832
+
1833
+ = 5.107 October 29 2018 =
1834
+ * Fix: Ninja Forms integration.
1835
+ * Fix: Cookie usage.
1836
+ * Add: Capturing AJAX responses from non integrated forms.
1837
+ * Spam protection improved.
1838
+ * Minor fixes.
1839
+
1840
+ = 5.106 October 11 2018 =
1841
+ * Spam filtration improved.
1842
+ * New: White Label mode.
1843
+ * Modification: Warning message about test on SpamFireWall die page.
1844
+ * Integration: WP Maintenance Mode.
1845
+ * Fix: S2Member.
1846
+ * Fix: JavaScript attachments reconsidered.
1847
+ * Fix: Admin banners layout.
1848
+ * Fix: Minor layout fixes.
1849
+
1850
+ = 5.105 September 26 2018 =
1851
+ * Integration: Now bloking spam for QAEngine questions.
1852
+ * Fix: Async http__request call.
1853
+ * Fix: Unnecessary get_antispam_report_breif method call.
1854
+ * Layout: Hide "Do you like Cleantlak?" when key is not ok.
1855
+ * Layout: Minor fixes.
1856
+
1857
+ = 5.104 September 18 2018 =
1858
+ * Fix: Error when saving settings.
1859
+ * Fix: Trying update plugin plugin for the first installation.
1860
+ * Fix: Update system.
1861
+ * Fix: Errors output.
1862
+ * Fix: Plugin's settings under WPMS.
1863
+ * Fix: SpamFireWall update.
1864
+ * Fix: The server change system repaired.
1865
+ * Mod: Cron saving tasks improved.
1866
+
1867
+ = 5.103.1 September 14 2018 =
1868
+ * Fix: Error when saving settings.
1869
+ * Fix: Error when getting key automatically.
1870
+
1871
+ = 5.103 September 13 2018 =
1872
+ * Fix: Gravity Forms response message.
1873
+ * Fix: SpamFireWall redirect to 404 page.
1874
+ * Major anti-spam plugin improvement.
1875
+ * Recombined setting page.
1876
+ * Added error notification.
1877
+ * Mod: S2 Members integration.
1878
+ * Mod: Improved remote calls.
1879
+
1880
+ = 5.102 August 29 2018 =
1881
+ * Fix: Users and comments check.
1882
+ * Fix: Update from 5.70 or previous versions.
1883
+ * Fix: GDPR public JS-script.
1884
+ * Fix: Dashboard widget JS scripts attachment.
1885
+ * Fix: WooCommerce "Place order" action.
1886
+ * Mod: Notification logic altered.
1887
+ * Mod: Users check table now has 'Signed up' column.
1888
+ * Minor fixes.
1889
+
1890
+ = 5.101 August 10 2018 =
1891
+ * Fix: Set cookie only for non-dashboard pages.
1892
+ * Fix: Dashboard widget JS error.
1893
+ * Fix: JavaScript error for some environment.
1894
+ * Mod: Antispam protection accelerated for some pages.
1895
+
1896
+ = 5.100 July 30 2018 =
1897
+ * Fix: JavaScript dependencies.
1898
+
1899
+ = 5.99.1 July 17 2018 =
1900
+ * IP detection fixed and improved.
1901
+
1902
+ = 5.99 July 10 2018 =
1903
+ * Fix: WooCommerce false positives.
1904
+ * Fix: SpamFireWall IP detection.
1905
+ * Minor fixes.
1906
+
1907
+ = 5.98 June 27 2018 =
1908
+ * Fix: WooCommerce: Exclusion.
1909
+ * Fix: Public GDPR JS code.
1910
+ * Minor fixes.
1911
+
1912
+ = 5.97 June 7 2018 =
1913
+ * Fix: Update system.
1914
+ * Fix: Feedback from public page (admin only).
1915
+ * Fix: Users and comment check: API error.
1916
+ * Fix: Too many negative reports. (Too big ct_data option)
1917
+ * Fix: SpamFireWall: Infinite redirection on the blocking page.
1918
+ * Minor fixes.
1919
+
1920
+ = 5.96 May 22 2018 =
1921
+ * Fix: Update system.
1922
+ * Mod: Reset all counters button in admin bar.
1923
+ * Mod: GDPR compliance.
1924
+ * Minor fixes.
1925
+
1926
+ = 5.95.1 May 3 2018 =
1927
+ * Fix: "Get key automatically" button display logic.
1928
+ * Fix: PHP notices.
1929
+
1930
+ = 5.95 May 2 2018 =
1931
+ * Spam filtration improved.
1932
+ * Fix: Public widget layout.
1933
+ * Fix: Connection reports output.
1934
+ * Minor fixes.
1935
+
1936
+ = 5.94 April 23 2018 =
1937
+ * Mod: Async load option for JS.
1938
+ * Mod: JS scripts loading is conditional.
1939
+ * Fix: IP detection.
1940
+ * Fix: IP detection.
1941
+ * Fix: Javascript error.
1942
+
1943
+ = 5.93.1 April 9 2018 =
1944
+ * Fix: Fatal error on PHP 5.5 or lower.
1945
+
1946
+ = 5.93 April 9 2018 =
1947
+ * Fix: SpamFirewall IP detection.
1948
+ * Fix: Contact Form 7. False positives.
1949
+ * Mod: Autoupdate function improved.
1950
+ * Minor fixes.
1951
+
1952
+ = 5.92.2 March 23 2018 =
1953
+ * Fix: Error if cURL extension is disabled.
1954
+
1955
+ = 5.92.1 March 23 2018 =
1956
+ * Fix: Spelling
1957
+ * Fix: Fatal error if cURL extension is disabled.
1958
+
1959
+ = 5.92 March 22 2018 =
1960
+ * IP detection improved.
1961
+ * Fix: SSL connection.
1962
+ * Fix: False positives spam detection in Contact Form 7.
1963
+ * Minor fixes.
1964
+
1965
+ = 5.91 March 15 2018 =
1966
+ * Fix: Errors for PHP compiled without XML support.
1967
+ * Fix: Spelling and translation.
1968
+ * Stability increased.
1969
+ * Minor fixes.
1970
+
1971
+ = 5.90 March 7 2018 =
1972
+ * Improvement: Better IP recognition in Spam FireWall.
1973
+ * Fix: Gravity Froms blocking message.
1974
+ * Security improvments.
1975
+ * Minor fixes.
1976
+
1977
+ = 5.89 February 21 2018 =
1978
+ * Improved spam filtration quality.
1979
+ * Improved compatibility.
1980
+ * Public widget: Styles and referral link added.
1981
+ * Dashboard widget: revised and fixed.
1982
+ * Minor fixes.
1983
+
1984
+ = 5.88 February 12 2018 =
1985
+ * Integration: ConvertPro.
1986
+ * Improvement: Search for visitor's names in request.
1987
+ * Fix: Contact Form 7 message recognition.
1988
+ * Preparation for the remote plugin update.
1989
+ * Minor fixes.
1990
+
1991
+ = 5.87 February 2 2018 =
1992
+ * Filtration quality improved.
1993
+ * Fix: WP Foto Vote downloading images.
1994
+ * Fix: Fatal error for unsupported PHP 5.2.
1995
+ * Fix: Formidable Forms improved spam filtration.
1996
+
1997
+ = 5.86 January 25 2018 =
1998
+ * Fix: High CPU load with wp-ajax.php.
1999
+ * Fix: Mailpoet: Newsletter.
2000
+ * Fix: Gravity: Forms standardization for input fields.
2001
+ * Fix: ajax hook checks data for contact form.
2002
+ * Fix: UTF8 character in requests.
2003
+
2004
+ = 5.85 January 11 2018 =
2005
+ * Fix: Fast Secure contact form spam block message.
2006
+ * Fix: IP license status.
2007
+ * Layout: Dashboard widget description altered.
2008
+
2009
+ = 5.84 December 26 2017 =
2010
+ * Integration: PeepSo contact form
2011
+ * Repared: Feedback from comments page.
2012
+ * Fix: mb_* functions used only if exists.
2013
+ * Fix: Gravity forms: Multi-page form logic repared.
2014
+ * Fix: Gravity forms: AJAX form logic repared.
2015
+ * Minor fixes.
2016
+
2017
+ = 5.83.2 December 19 2017 =
2018
+ * Fix: Error in base class.
2019
+
2020
+ = 5.83.1 December 19 2017 =
2021
+ * Fix: CDN IP detection.
2022
+
2023
+ = 5.83 December 19 2017 =
2024
+ * Improving: Stability and compatibility.
2025
+ * Improving: Spam protection.
2026
+ * Fix: Comments logic filtration.
2027
+ * Fix: Admin bar counter.
2028
+ * Minor errors fixes.
2029
+
2030
+ = 5.82.1 December 7 2017 =
2031
+ * Fixed minor error with attaching JS and CSS files.
2032
+
2033
+ = 5.82 December 4 2017 =
2034
+ * Plugin doesn't use PHP sessions anymore.
2035
+ * Bug fixes.
2036
+ * Improved update logic.
2037
+
2038
+ = 5.81 November 22 2017 =
2039
+ * Fixed error with "Show/Hide key" button.
2040
+ * Slightly improved spam protection for all forms.
2041
+ * Small errors fixes.
2042
+
2043
+ = 5.80 November 3 2017 =
2044
+ * Spam protection improved.
2045
+ * Improved filtration quality for WooCommerce checkout.
2046
+ * Minor fixes for Spam FireWall.
2047
+
2048
+ = 5.79 October 26 2017 =
2049
+ * Spam protection improved.
2050
+ * Fixed issue with existing spam comments check.
2051
+ * Added posibility to exclude IP from check.
2052
+ * Minor fixes.
2053
+
2054
+ = 5.78 October 16 2017 =
2055
+ * Improved compatibility with themes. Changed core functions prefix.
2056
+ * Fixed issue with WooCommerce checkout.
2057
+ * Spam protection improved.
2058
+ * Minor fixes.
2059
+
2060
+ = 5.77 October 2 2017 =
2061
+ * Connection report's system.
2062
+ * Integration for CouponXXL Theme.
2063
+ * Fixed issue with mb_* functions.
2064
+ * Banners logic updated.
2065
+
2066
+ = 5.76 September 20 2017 =
2067
+ * Fixed issue with Spam FireWall and caching plugins.
2068
+ * Banners logic updated.
2069
+
2070
+ = 5.75 September 15 2017 =
2071
+ * Pause feature for users/comments spam check.
2072
+ * Improved protection from spam.
2073
+ * Small fixes.
2074
+
2075
+ = 5.74.2 September 2 2017 =
2076
+ * Fix for users spam check for PHP 5.3 and lower.
2077
+
2078
+ = 5.74.1 September 2 2017 =
2079
+ * Fix for the update system and cloud communication.
2080
+ * Added possibility to check users and comments for spam with a specific date range.
2081
+
2082
+ = 5.74 August 31 2017 =
2083
+ * Users and comments spam check: Two check types (fast and accurate).
2084
+ * Fix for WooCommerce checkout test.
2085
+ * Minor fixes.
2086
+
2087
+ = 5.73 August 11 2017 =
2088
+ * Fix for spam check for already existed users and comments.
2089
+ * Spam FireWall updated.
2090
+ * Layout fix for BT Comments.
2091
+ * Minor fixes.
2092
+
2093
+ = 5.72 July 27 2017 =
2094
+ * Improved spam check for existed users and comments.
2095
+ * Minor fixes.
2096
+
2097
+ = 5.71 July 20 2017 =
2098
+ * Improved spam protection for external forms.
2099
+ * Optimization.
2100
+ * Minor fixes.
2101
+
2102
+ = 5.70.2 July 17 2017 =
2103
+ * Fix for Spam FireWall for Multisite.
2104
+
2105
+ = 5.70.1 July 17 2017 =
2106
+ * Fix for Spam FireWall.
2107
+ * Spam detection improved.
2108
+
2109
+ = 5.70 July 13 2017 =
2110
+ * New updater logic.
2111
+ * Self cron system.
2112
+ * Improved AMP compatibility.
2113
+ * Optimization.
2114
+ * Fixed users and comments spam check.
2115
+ * Fixed layout for Comment's feedback from public page.
2116
+ * Updated Spam FireWall.
2117
+ * SFW: Spam FireWall counter now work in real-time.
2118
+ * SFW: Improved compatibility with different Data Bases.
2119
+
2120
+ = 5.69 July 3 2017 =
2121
+ * Reviewer - integration.
2122
+ * Optimization for Users and Comments check for big databases.
2123
+ * Errors fixes.
2124
+ * Improved protection from spam.
2125
+
2126
+ = 5.68 June 22 2017 =
2127
+ * Contact Form for WordPress - Ultimate Form Builder Lite - integration.
2128
+ * Contact Bank - Contact Forms Builder - integration.
2129
+ * Smart Forms - integration.
2130
+ * cformsII - integration.
2131
+ * Contact Form by Web-Settler - integration.
2132
+ * Error fixes.
2133
+
2134
+ = 5.67.3 June 9 2017 =
2135
+ * Fixed JS attachment error.
2136
+
2137
+ = 5.67.2 June 5 2017 =
2138
+ * Fixed error with IP determination.
2139
+
2140
+ = 5.67.1 June 4 2017 =
2141
+ * Fixed JS error in 5.67 version.
2142
+ * Integrations: Enfold theme, Convertplug.
2143
+ * Links to check for Emails/IP for spam.
2144
+ * Control comments and feedback about them from public post's page.
2145
+ * Improved connection stability with cloud service.
2146
+ * Spam protection improved.
2147
+ * Other small fixes.
2148
+
2149
+ = 5.67 June 1 2017 =
2150
+ * Integrations: Enfold theme, Convertplug.
2151
+ * Links to check for Emails/IP for spam.
2152
+ * Control comments and feedback about them from public post's page.
2153
+ * Improved connection stability with cloud service.
2154
+ * Spam protection improved.
2155
+ * Other small fixes.
2156
+
2157
+ = 5.66 May 23 2017 =
2158
+ * Spam protection improved.
2159
+ * Major fixes for users and comments spam check.
2160
+ * Added feedback from Wordpress comments list.
2161
+ * Fix for "internal forms check" option.
2162
+ * Fixed issue with caching Spam FireWall die page.
2163
+ * Other small fixes.
2164
+
2165
+ = 5.65 May 16 2017 =
2166
+ * Fix for PayPal redirecton.
2167
+ * Fixed issue with empty query for bulk comments test.
2168
+ * Added protection for Enfold contact form.
2169
+ * Ninja forms integration.
2170
+
2171
+ = 5.64 April 26 2017 =
2172
+ * Integration for Facebook registrations.
2173
+ * Small fixes for WPMS.
2174
+ * Fix for Activecampaign service.
2175
+ * Fix for check spam users.
2176
+ * Fixed rare notice Notice: Undefined index: REQUEST_URI
2177
+
2178
+ = 5.63 April 20 2017 =
2179
+ * Fix for the dashboard spam stat widget.
2180
+ * Added translation posibility for all text.
2181
+
2182
+ = 5.62 April 17 2017 =
2183
+ * Fix for the dashboard spam statistics widget.
2184
+ * Fix for users spam check.
2185
+ * Small appearance changes.
2186
+
2187
+ = 5.61 April 6 2017 =
2188
+ * Improved filtration.
2189
+ * Additional logic for the form recognizing.
2190
+ * Integration: Divi Theme Contact Form.
2191
+ * Fix: Gravity Forms multipages forms.
2192
+ * Stat Widget: Minor fixes.
2193
+ * Added possibility to download results of the users check in CSV format.
2194
+ * Alteration for settings page (footer).
2195
+
2196
+ = 5.60.1 March 29 2017 =
2197
+ * Fixed error function 'locale_get_display_region' no exists.
2198
+
2199
+ = 5.60 March 29 2017 =
2200
+ * Added main dashboard widget with spam sctivity stats.
2201
+ * Mailster - integration.
2202
+ * Base class updated.
2203
+
2204
+ = 5.59 March 24 2017 =
2205
+ * Users/comments check fix.
2206
+ * Plugin's name changed to Anti-Spam by CleanTalk.
2207
+ * Trial banner is dismissable. Disapear for 24h or till logout.
2208
+ * Settings modified (Auto testing failed warning).
2209
+ * Mailing(inactive key) interval increased to 6 hours.
2210
+
2211
+ = 5.58.6 March 16 2017 =
2212
+ * Fix for Ninja forms (protection updated).
2213
+ * Fix for QA Theme.
2214
+ * Fix for RSVP form.
2215
+ * Setting changes (Spam FireWall).
2216
+ * Improved debug section.
2217
+ * Improved gathering data function.
2218
+ * Minor fixes.
2219
+
2220
+ = 5.58.5 March 6 2017 =
2221
+ * Minor backend fix.
2222
+
2223
+ = 5.58.4 March 6 2017 =
2224
+ * Users check fix (redirect after the check).
2225
+ * Fixed PHP Notice "HTTP_REFERER" is unset.
2226
+ * Updated Notice logic.
2227
+
2228
+ = 5.58.3 February 28 2017 =
2229
+ * Bitrix24 Contact form integration.
2230
+ * Users/comments check fix.
2231
+ * Spam sorting updated.
2232
+ * Banner showing logic.
2233
+
2234
+ = 5.58.2 February 17 2017 =
2235
+ * Cron fix for daily report.
2236
+
2237
+ = 5.58.1 February 16 2017 =
2238
+ * Minor fixes.
2239
+
2240
+ = 5.58 February 15 2017 =
2241
+ * Work without access key
2242
+ * Bitrix24 contact integration
2243
+ * Issues fixes
2244
+
2245
+ = 5.57.1 February 8 2017 =
2246
+ * Fix for notice logic.
2247
+
2248
+ = 5.57 February 8 2017 =
2249
+ * Setting page changes.
2250
+ * Bug fixes for WooCommerce.
2251
+ * Spam FireWall filters only GET requests.
2252
+ * Optimization.
2253
+ * Minor and major fixes.
2254
+
2255
+ = 5.56.1 January 25 2017 =
2256
+ * Minor fixes
2257
+
2258
+ = 5.56 January 19 2017 =
2259
+ * Integrations: MailChimp Premium, Profile Press.
2260
+ * Changes comments flow.
2261
+ * FireWall updater fix.
2262
+ * Users check optimization.
2263
+
2264
+ = 5.55 December 23 2016 =
2265
+ * Integrations: Caldera Forms, Visual Form Builder.
2266
+ * Fix for different 'cookies' header names.
2267
+ * Fixed user deletion.
2268
+
2269
+ = 5.54 December 12 2016 =
2270
+ * Integrations: AmoForms, Contact Form Clean and Simple.
2271
+ * Comments check logic refreshed.
2272
+ * Registration JS error fix.
2273
+ * Users check fix.
2274
+ * Fix for translation system.
2275
+ * Minor fixes.
2276
+
2277
+ = 5.53.1 December 9 2016 =
2278
+ * Minor layout fixes.
2279
+
2280
+ = 5.53 November 28 2016 =
2281
+ * Addition warning before deleting users.
2282
+ * Spam FireWall is enabled by default.
2283
+ * Usernoise modal feedback / contact form : integration.
2284
+ * Translations.
2285
+ * Optimization.
2286
+ * Fixes.
2287
+
2288
+ = 5.52.1 November 14 2016 =
2289
+ * Users and comments check: Using new API method.
2290
+ * Quick Contact From: Integration via "Custom Contact Forms" setting.
2291
+ * JavaScript filtration improved.
2292
+ * Translation changes.
2293
+ * Optimized JavaScript code.
2294
+
2295
+ = 5.51 November 2 2016 =
2296
+ * Added protection for internal forms
2297
+ * Immediate spam check for comments and users from WP dashboard
2298
+ * Optimized code
2299
+
2300
+ = 5.50.1 October 24 2016 =
2301
+ * Improved filtration in contact forms.
2302
+ * Spam FireWall: Fixed issue with SFW logs
2303
+ * Skipping service fields: Fast Secure Contact Froms, QU Forms, Custom Contact Forms
2304
+
2305
+ = 5.50 October 20 2016 =
2306
+ * Custom contact forms: integration.
2307
+ * Pirate Forms: integration.
2308
+ * PHP 7 compatibility: Deleted third-party JSON library and dependences.
2309
+ * PHP 7 compatibility: Fixed end of lines.
2310
+ * YOAST Seo: Fixed PHP warnings.
2311
+ * Spam FireWall: Minor fix for Spam FireWall counter.
2312
+ * Only admin could access to CleanTalk dashboard (exclude Authors an Editors).
2313
+ * Improved filtration in contact forms.
2314
+
2315
+ = 5.49.2 October 5 2016 =
2316
+ * Second Fix for database error. Stable version.
2317
+
2318
+ = 5.49.1 October 5 2016 =
2319
+ * Fixed database error.
2320
+
2321
+ = 5.49 October 3 2016 =
2322
+ * Spam FireWall feature: Class upgraded.
2323
+ * New feature: Delete links from approved comments.
2324
+ * Settings: Grouped.
2325
+ * Settings: Altered description fixed spelling mistakes.
2326
+ * Settings: Added indicator for Spam FireWall.
2327
+ * Admin bar: Added Spam FireWall counter
2328
+ * Clean and Simple Contact Form: Direct integration.
2329
+ * WooCommerce: Don't check password recovery form.
2330
+ * WooCommerce Wishlists: Issue with check for Google bots.
2331
+ * JetPack: contact form fix.
2332
+ * Fixed and created the defaults for all CleanTalk options.
2333
+ * Fixed spelling mistakes.
2334
+
2335
+ = 5.48 September 15 2016 =
2336
+ * buddyPress: Added private messages filtering. Doesn't check user if he has 3 or more messages in the "sentbox" and "inbox" folders.
2337
+ * buddyPress: Added option in settings for private messages check.
2338
+ * WooCommerce Wishlist: Added check for wishlists.
2339
+ * Fixed issue with "check all post data" option.
2340
+ * Improved filtering for Gravity Forms
2341
+ * Mobile Assistant Connector fix
2342
+ * Minor fixes.
2343
+
2344
+ = 5.47 September 5 2016 =
2345
+ * WooCommerce: direct integration for checkout form.
2346
+ * WooCommerce Sensei: login form fix.
2347
+ * bbPress: Added the check for topics and comments with stop_words
2348
+ * bbPress: Skip check for admin in comments and topics
2349
+ * UserPro: fixes. Request without field "shortcode"
2350
+ * Contact Form 7: Bug fix.
2351
+ * Spam FireWall: Optimized logs rotation.
2352
+ * Updated inner functions (compatibility fix for PHP 5.4+)
2353
+ * Fixed output of counters (without spamfirewall stats)
2354
+ * Fixed spelling in settings
2355
+ * Added "Delete from the list" button in comments spam check page
2356
+ * Minor fixes.
2357
+
2358
+ = 5.46 August 17 2016 =
2359
+ * Fixed issue with admin bar links in WP Multi Network mode.
2360
+ * Added "All time counter" and "Daily counter" into admin bar.
2361
+ * Added settings to disable counters in admin bar.
2362
+ * New style for "Get access key manually" button.
2363
+
2364
+ = 5.45.2 August 4 2016 =
2365
+ * Added Anti-Spam protection for Quick Event Manager.
2366
+ * Improved bulk spam test for users. Now the plugin does not mark as Spam user, if the user IP address has spam activity more then 30 days ago.
2367
+ * Fixed bulk spam test for comments. Previous version had a conflict between spam history for IP and Email.
2368
+ * Minor fix function to get the API key.
2369
+
2370
+ = 5.45.1 July 26 2016 =
2371
+ * Fixed issue with missed spam messages, subscriptions.
2372
+ * Improved bulk spam test for comments. Now the plugin will not mark as Spam comments, if a comment sender (IP address) has spam activity more then 30 days ago.
2373
+
2374
+ = 5.45 July 21 2016 =
2375
+ * Optimized bulk spam comments deletion.
2376
+ * Turned off JavaScript anti-spam cookies if the option 'Set cookies' is turned off. It helps to avoid issues with Varnish.
2377
+ * Added links to bulk spam comments&users removal tool.
2378
+
2379
+ = 5.44.1 July 13 2016 =
2380
+ * Optimized options getting code.
2381
+ * Added the option 'Protect Logged in users' to do anti-spam tests for submissions by logged in users.
2382
+
2383
+ = 5.43.2 June 30 2016 =
2384
+ * Optimized anti-spam code for AJAX based contact forms.
2385
+ * Fixed CSS layout of counters in Admin bar (issue with layout in IE11).
2386
+
2387
+ = 5.43.1 June 23 2016 =
2388
+ * Added agent version in requests to test a connection between the website and servers.
2389
+ * Fixed issue with PHP notices in cleantalk-admin.php.
2390
+
2391
+ = 5.43 June 22 2016 =
2392
+ * Added spam protection for registrations via 'Login with AJAX' plug-in.
2393
+ * Added a new counter to Admin bar that allows to count spam and approved submissions since last reset.
2394
+ * Update the code that tests a connection between a website and CleanTalk's servers. New version doesn't generate submissions with email good@cleantalk.org.
2395
+ * Fixed issue with spam protection for nested forms by Formidable plug-in.
2396
+
2397
+ = 5.42 2016-06-15 =
2398
+ * Added anti-spam protection for UserPro.
2399
+ * Improved protection for Formidable forms + Varnish.
2400
+ * Improved bulk search for spam accounts.
2401
+ * Fixed spam protection for pages that contain multiple Formidable forms with same HTML ID.
2402
+ * Optimized PHP code to be compatible with PHP 5.4 and above. The patch has been applied to Formidable forms spam protection.
2403
+ * Minor fixes in plugin backend.
2404
+
2405
+ = 5.41 2016-05-31 =
2406
+ * Added HTTP response in plugin response if an network issue was happend.
2407
+ * Optimized JavaScript anti-spam test for Formidable forms.
2408
+ * Re-stored the option to auto redirect to plugn settings after plugin activation.
2409
+ * Fixed issue with nasted fields in Formidable forms.
2410
+
2411
+ = 5.40.3 2016-05-26 =
2412
+ * Added option to encrypt (SSL) connection to CleanTalk anti-spam servers.
2413
+ * Added JSON encoding for AJAX forms.
2414
+ * Obfuscated private data for Custom contact forms option.
2415
+ * Optimized bulk users check for spam over blacklists database.
2416
+ * Fixed issue with lost connection to servers and JavaScript anti-spam test.
2417
+ * Fixed issue with WordFence and collect_details.
2418
+
2419
+ = 5.40.2 2016-05-11 =
2420
+ * Improved account status check logic.
2421
+ * Fixed issue with double anti-spam tests for FastSecure contact forms.
2422
+ * Fixed issue with nulled JavaScript variables assigned from backend. This issue might me occurred on standart WordPress registration form and with failed JavaScript spam test.
2423
+ * Fixed issue with session_start() with PHP sessions stored in memcache.
2424
+
2425
+ = 5.40.1 2016-04-28 =
2426
+ * Fixed issue with Super Socializer.
2427
+ * Fixed issue with spam filtration for logged in users and Formidable forms.
2428
+ * Added logging of all submitted fields for FastSecure contact form.
2429
+
2430
+ = 5.40 2016-04-19 =
2431
+ * Added JSON encoding for posts that were protected via Custom contact forms option. It allows show anti-spam logs in the Dashboard in more comfortable view.
2432
+ * Minor fix in plugin settings.
2433
+ * Fixed pagination for bulk users spam test.
2434
+ * Fixed issue with unknown _SESSION.
2435
+ * Fixed issue with double Spam FireWall database upload.
2436
+
2437
+ = 5.39.1 2016-04-04 =
2438
+ * Improved AJAX based anti-spam test with HTTPS backends.
2439
+ * Added fix to avoid issue with empty ct_info_flag on JavaScript side.
2440
+ * Added logic to exclude caching for Spam FireWall.
2441
+ * Removed a condition to skip accounts with 127.0.0.1 IP in spam test for registered acconts.
2442
+
2443
+ = 5.38.1 2016-03-24 =
2444
+ * Fixed issue with PHP sessions and 'The session id is too long or contains illegal characters'.
2445
+ * Removed Spam FireWall protection on /feed page.
2446
+ * Disabled anti-spam tests for AJAX calls if the option 'Custom contact forms' is turned off.
2447
+ * Added reject notice for spam submissions on Gravity forms with AJAX calls.
2448
+
2449
+ = 5.37.3 2016-03-10 =
2450
+ * Minor bug fixes. Added an option to support Varnish cache.
2451
+
2452
+ = 5.36.1 2016-02-05 =
2453
+ * Fixed bug, when users receive error after logging in
2454
+
2455
+ = 5.36 2016-02-04 =
2456
+ * Improved JavaScript anti spam protection
2457
+ * Improvements for avoiding blocking requests from payment systems
2458
+
2459
+ = 5.35 2016-01-14 =
2460
+ * Added support for IP licensing
2461
+ * Some anti-spam protection improvements
2462
+ * Small backend interface fixes
2463
+
2464
+ = 5.34.1 2015-12-17 =
2465
+ * Fixed trackback antispam protection: improved checking mechanism
2466
+ * Fixed problem with blocking MailPoet: added exclusions in spam checking algorithm
2467
+
2468
+ = 5.34 2015-12-10 =
2469
+ * Improved spam checking mechanism
2470
+ * Added "Collect browser details" option for better antispam protection
2471
+ * Fixed custom contact forms checking
2472
+ * Minor translations fixes
2473
+
2474
+ = 5.33.1 2015-12-04 =
2475
+ * Fixed issue with BBPress
2476
+ * Fixed anti-spam comments checking
2477
+ * Fixed bulk checking
2478
+ * Fixed trackback and pingback checking
2479
+
2480
+ = 5.33 2015-12-01 =
2481
+ * Backend interface fixes
2482
+ * Improved Spam FireWall efficiency
2483
+ * Improved performance of anti spam checking
2484
+
2485
+ = 5.32 2015-11-26 =
2486
+ * Added improvements for manual spam detection
2487
+ * Fixed errors in backend
2488
+ * Fixed bulk users anti spam checking
2489
+ * Added indicator for bulk spam checking
2490
+ * Added "Get access key automatically" feature
2491
+
2492
+ = 5.31 2015-11-11 =
2493
+ * Improved backend performance
2494
+ * Fixed counter of approved/blocked spam attacks
2495
+ * Fixed Spam Firewall logging
2496
+
2497
+ = 5.30 2015-11-05 =
2498
+ * Improved anti-spam checking
2499
+ * Optimized performance
2500
+ * Fixed blocking email preview in MailPoet
2501
+ * Interface fixes
2502
+ * WPMU interface fixes
2503
+
2504
+ = 5.29 2015-10-27 =
2505
+ * Optimized performance
2506
+ * Fixed bugs in custom contact forms spam checking
2507
+
2508
+ = 5.28.7 2015-10-23 =
2509
+ * Major backend peromance fix.
2510
+
2511
+ = 5.28 2015-10-16 =
2512
+ * Fixed errors in anti-spam checking
2513
+ * Restored options for spam checking registrations and cpmmon contact forms
2514
+ * Improved anti spam defence
2515
+ * Fixed problems with AJAX functionality in MailPoet, WooCommerce and other AJAX plugins
2516
+
2517
+ = 5.27 2015-10-13 =
2518
+ * Improvements in Spam FireWall feature
2519
+ * Code optimization
2520
+ * Backend interface fixes
2521
+
2522
+ = 5.26 2015-10-05 =
2523
+ * Added WordPress Language Pack support
2524
+ * Removed spam checking for some autorisation plugins
2525
+ * New experimental feature: Spam FireWall
2526
+
2527
+ = 5.25.2 2015-09-28 =
2528
+ * Fixed backend bug
2529
+
2530
+ = 5.25.1 2015-09-28 =
2531
+ * Added widget with anti-spam stats
2532
+ * Added information about blocked spam attacks in admin dashboard and CleanTalk settings
2533
+ * Added ability not to check comments for users with 3 or above allowed comments
2534
+ * Added an option 'Help others known CleanTalk' to show information for site visitors, that your site is protected from spam by us
2535
+ * Some backend interface settings
2536
+ * Removed "CleanTalk connection test" query
2537
+
2538
+ = 5.24.1 2015-09-16 =
2539
+ * Fixed some errors in frontend
2540
+ * Fixed access key saving
2541
+
2542
+ = 5.24 2015-09-14 =
2543
+ * Backend interface fixes
2544
+ * Improvement for AJAX JavaScript spam checking
2545
+
2546
+ = 5.23 2015-09-01 =
2547
+ * Fixed BuddyPress profile search false positivities of anti-spam protection.
2548
+ * Some interface fixes of bulk users & comments spam checking
2549
+
2550
+ = 5.22 2015-08-26 =
2551
+ * Fixed possible XSS issue for anti-spam test on third-party forms.
2552
+
2553
+ = 5.21 2015-08-21 =
2554
+ * Fixed bug with skipping spam submissions
2555
+ * Fixed bug with receiving old user_token for viewing anti-spam stats
2556
+ * Small backend fixes
2557
+
2558
+ = 5.20 2015-08-15 =
2559
+ * Fixed anti-spam stats in admin bar
2560
+ * Fixed issue with skipping spam submissions
2561
+ * Added some PHP-constants for advanced users
2562
+
2563
+ = 5.19 2015-08-11 =
2564
+ * New feature: anti-spam checking for registered users
2565
+ * Fixed issue with AJAX JavaScript checking
2566
+ * Fixed issue with SEO Yoast xml sitemaps.
2567
+
2568
+ = 5.18 2015-08-04 =
2569
+ * Fixed issue with user_token
2570
+ * Added anti-spam API, see our FAQ
2571
+
2572
+ = 5.17 2015-07-23 =
2573
+ * Fixed infinite redirection after activation
2574
+ * Minor backend fixes
2575
+
2576
+ = 5.16 2015-07-22 =
2577
+ * Fixed external services checking
2578
+ * Fixed mass comments deletion
2579
+ * Fixed AJAX anti-spam protection
2580
+
2581
+ = 5.15 2015-07-16 =
2582
+ * New feature: anti-spam protection for forms, that uses external services
2583
+
2584
+ = 5.14 2015-07-03 =
2585
+ * Added anti-spam protection for some themes and plugins
2586
+ * Some backend fixes
2587
+
2588
+ = 5.13 2015-06-12 =
2589
+ * Closing notification for anti-spam renew
2590
+ * Fixed bulk anti spam comment checking
2591
+
2592
+ = 5.12 2015-06-01 =
2593
+ * Added option for checking all post data for spam
2594
+ * Some JavaScript protection improvements
2595
+ * Added option for old JavaScript check (without AJAX)
2596
+
2597
+ = 5.10 2015-05-25 =
2598
+ * Fixed Javascript error on some forms
2599
+
2600
+ = 5.9 2015-05-21 =
2601
+ * Fixed Javascript error on CF7 and JetPack
2602
+ * Some backend and frontent fixes
2603
+
2604
+ = 5.8 2015-05-18 =
2605
+ * Minor fixes
2606
+
2607
+ = 5.7 2015-05-18 =
2608
+ * Fixed French translation
2609
+ * Fixed protection algorithm
2610
+
2611
+ = 5.6 2015-05-11 =
2612
+ * Fixed translation
2613
+ * Fixed bulk comments anti-spam checking
2614
+ * Added option for disabling anti spam stats in adminbar
2615
+ * Some security fixes
2616
+
2617
+ = 5.5 2015-04-29
2618
+ * Fixed security issue
2619
+
2620
+ = 5.4 2015-04-27 =
2621
+ * Some interface and functionality changes in plugin settings page
2622
+ * Added counter for anti-spam stats in admin bar
2623
+
2624
+ = 5.3 2015-04-13 =
2625
+ * Added anti-spam protection for Divi theme contact forms
2626
+ * Added anti-spam protection for MyMail contact forms
2627
+ * Added anti-spam protection for MailPoet Newsletters
2628
+ * Some interface and functionality changes in backend
2629
+
2630
+ = 5.2 2015-04-01 =
2631
+ * Added link for anti-spam stats
2632
+ * Added WP User Frontend Pro registration form protection
2633
+
2634
+ = 5.10 2015-03-24 =
2635
+ * Fixed site crash after installing 5.0 on some websites
2636
+
2637
+ = 5.00 2015-03-24 =
2638
+ * Added bulk comments checking for spam via CleanTalk blacklists
2639
+ * Added anti-spam form protection for 'Ajax Login & Register'
2640
+ * Fixed JetPack form protection
2641
+
2642
+ = 4.24 2015-03-20 =
2643
+ Added immediate spam protection activation.
2644
+
2645
+ = 4.22 2015-03-17 =
2646
+ * Added button for automatic spam protection key getting.
2647
+
2648
+ = 4.21 2015-03-11 =
2649
+ * Added license renew notification.
2650
+
2651
+ = 4.20 2015-03-03 =
2652
+ * German, Italian, Polish, Portuguese translations, minor code fixes.
2653
+
2654
+ = 4.19 2015-02-24 =
2655
+ * Increased JS keys lifetime.
2656
+
2657
+ = 4.18 2015-02-17 =
2658
+ * Bugfix - fixed bug with comments approvement, PayPal 'payment_status' and Akismet 'spam' status processing.
2659
+
2660
+ = 4.17 2015-02-12 =
2661
+ * New base class, divided code to 3 separate files - common, public and admin.
2662
+
2663
+ = 4.16 2015-02-05 =
2664
+ * New base class, fixed JetPack filters logics, optimized Formidable, bbPress, BuddyPress filters.
2665
+
2666
+ = 4.15 2015-01-29 =
2667
+ * Support of Contact Form 7 versions before 3.0.0, fixed global JS-vars and online notice cookie logics.
2668
+
2669
+ = 4.14 2015-01-19 =
2670
+ * Removed deprecated option from comment approvement code.
2671
+
2672
+ = 4.13 2014-12-29 =
2673
+ * Not spam comments auto approvement bug fix.
2674
+
2675
+ = 4.12 2014-12-29 =
2676
+ * Plugin backend minfor bug fixes.
2677
+
2678
+ = 4.11 2014-12-22 =
2679
+ * Major changes in spam protection algorithms.
2680
+
2681
+ = 4.10 2014-12-10 =
2682
+ * Minor improvements for custom contact/registration/subscribe forms.
2683
+
2684
+ = 4.9 2014-11-24 =
2685
+ * Minor bug fix for Contact form 7.
2686
+
2687
+ = 4.8 2014-11-19 =
2688
+ * Improved anti-spam protection for BuddyPress registrations and custom contact forms.
2689
+
2690
+ = 4.7 2014-11-16 =
2691
+ * Fixed JavaScript antispam test for FastSecure contact form.
2692
+
2693
+ = 4.6 2014-11-11 =
2694
+ * Minor changes in anti-spam logic for BuddyPress registrations, contact forms and bbPress guest posting.
2695
+
2696
+ = 4.5 2014-11-04 =
2697
+ * Bug fixes for Contact form 7 and bbPress guests posting.
2698
+
2699
+ = 4.4 2014-10-29 =
2700
+ * Improved JS checking for CF7.
2701
+
2702
+ = 4.2 2014-10-20 =
2703
+ * Increased plugin perfomance for BuddyPress registrations.
2704
+
2705
+ = 4.1 2014-10-13 =
2706
+ * Minor anti-spam improvements for contacts, registration and contact forms.
2707
+
2708
+ = 4.0 2014-10-06 =
2709
+ * Major anti-spam improvements for registration and contact forms.
2710
+
2711
+ = 3.9 2014-10-01 =
2712
+ * Did exception to do not break to create new user in WordPress backend.
2713
+
2714
+ = 3.8 2014-09-19 =
2715
+ * Bug fix release. Minor fixes in API class and JavaScript anti-spam test.
2716
+
2717
+ = 3.6 2014-09-15 =
2718
+ * Minor fixes in anti-spam protection for Formidable and custom contact forms.
2719
+
2720
+ = 3.4 2014-09-04 =
2721
+ * Spam comments rotation. Custom (themes) contact forms support.
2722
+
2723
+ = 3.2 2014-08-27 =
2724
+ * Minor changes in spam filtration logic.
2725
+
2726
+ = 3.1 2014-08-19 =
2727
+ * Major changes for comments antispam logic. Improved plugin speed.
2728
+
2729
+ = 2.59 2014-08-14 =
2730
+ * Antispam protection for bbPress guests posts. Improvement for JetPack comments and PHP API update.
2731
+
2732
+ = 2.58 2014-08-06 =
2733
+ * Added anti-spam protection for signups posted via WooCommerce order form.
2734
+ * Improved anti-spam protection for Contact Form 7.
2735
+ * Improved anti-spam protection for registrations. Now the plugin looking for JavaScript antispam test results not only in POST array, but in COOKIES array too. This improvement allows protect signup forms for any untested signups plugins and themes.
2736
+ * Updated PHP API. No the plugin can resolve sender IP for websites behind proxy servers. If the proxy servers uses private IP address.
2737
+
2738
+ = 2.57 2014-07-29 =
2739
+ * Improved anti-spam protection for comments. The plugin now proccessing website url in the comments form.
2740
+ * Fixed sign remove logic for approved comments. Previous version doesn't cut sign for comments approved via AJAX call in WordPress backend.
2741
+ * Fixed switching to SSL for comments. Previous version doesn't use secured connection for comments.
2742
+
2743
+ = 2.56 2014-07-21 =
2744
+ * Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
2745
+
2746
+ = 2.55 2014-07-11 =
2747
+ * Fixed bug with account status function. In backend the plugin showed notice 'Please don't forget to disable CAPTCHA if you have it on every page.
2748
+
2749
+ = 2.54 2014-07-11 =
2750
+ * Fixed signup anti-spam protection logic for BuddyPress registrations.
2751
+ * Fixed anti-spam protection for JetPack contact form.
2752
+ * Changed account status check logic.
2753
+
2754
+ = 2.53 2014-06-27 =
2755
+ * Fixed anit-spam protection bug for signups.
2756
+ * Changed anti-spam functions (comments and signups) priority.
2757
+
2758
+ = 2.52 2014-06-25 =
2759
+ * Fixed 'Fatal error: Call to a member function get_error_code()' issue with signups via BuddyPress.
2760
+
2761
+ = 2.51 2014-06-23 =
2762
+ * Added spam protection for registrations via plugin New User Approve by Josh Harrison. If the CleanTalk matched signup as spam this signup will be denied to placing in pending queue.
2763
+ * Added option "Use secure (SSL) connection to CleanTalk cloud". If the option enabled plugin will communicate with CleanTalk severs via 128bit encrypted data channel. So, if you have SSL protected webforms on website you can use this option to be sure that visitors personal data safely transmits to CleanTalk servers.
2764
+ * Fixed minor bug with loading backend functions.
2765
+
2766
+ = 2.49 2014-06-10 =
2767
+ * Added spam protection for S2Member Auth.net forms.
2768
+ * Added spam protection for multisite signup form.
2769
+ * Optimized account status check function.
2770
+
2771
+ = 2.46 2014-05-19 =
2772
+ * Added: HTML notice about the need to enable JavaScript.
2773
+ * Fixed: Fixed pingbacks anti-spam test.
2774
+
2775
+ = 2.44 2014-05-12 =
2776
+ * Added: Anti-spam protection for S2Member framework.
2777
+ * Improved: Plugin load time for backend and frontend.
2778
+ * Improved: JavaScript anti-spam test.
2779
+ * Fixed: PHP warning mb_convert_encoding()
2780
+
2781
+ = 2.42 2014-04-29 =
2782
+ * Fixed: JavaScript anti-spam test for comments.
2783
+
2784
+ = 2.38 2014-03-27 =
2785
+ * Fixed: Registraion form submit time spam test.
2786
+
2787
+ = 2.36 2014-03-12 =
2788
+ * Reversed to patches from old revisions.
2789
+
2790
+ = 2.35 2014-03-12 =
2791
+ * New: Notifications about disabled account
2792
+ * New: Improved JavaScript spam test.
2793
+ * Fixed: Code optimization
2794
+ * Fixed: JavaScript test for signups.
2795
+
2796
+ = 2.33 2014-02-12 =
2797
+ * Fixed: CURLOPT_FOLLOWLOCATION bug at admin notice
2798
+
2799
+ = 2.32 2014-02-04 =
2800
+ * New: Added notice about automatically approved comment. The notice shows only for first approved comment and only for new commentators (without approved comments) of the blog.
2801
+ * New: At WordPress console added banner for notices.
2802
+ * Changed: Screenshots updated.
cleantalk.php CHANGED
@@ -1,2097 +1,2104 @@
1
- <?php
2
- /*
3
- Plugin Name: Anti-Spam by CleanTalk
4
- Plugin URI: https://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.143
7
- Author: СleanTalk <welcome@cleantalk.org>
8
- Author URI: https://cleantalk.org
9
- Text Domain: cleantalk-spam-protect
10
- Domain Path: /i18n
11
- */
12
-
13
- use Cleantalk\ApbctWP\CleantalkUpgrader;
14
- use Cleantalk\ApbctWP\CleantalkUpgraderSkin;
15
- use Cleantalk\ApbctWP\CleantalkUpgraderSkin_Deprecated;
16
- use Cleantalk\ApbctWP\Cron;
17
-
18
- $cleantalk_executed = false;
19
-
20
- // Getting version form main file (look above)
21
- $plugin_info = get_file_data(__FILE__, array('Version' => 'Version', 'Name' => 'Plugin Name',));
22
-
23
- // Common params
24
- define('APBCT_NAME', $plugin_info['Name']);
25
- define('APBCT_VERSION', $plugin_info['Version']);
26
- define('APBCT_URL_PATH', plugins_url('', __FILE__)); //HTTP path. Plugin root folder without '/'.
27
- define('APBCT_DIR_PATH', dirname(__FILE__ ) . '/'); //System path. Plugin root folder with '/'.
28
- define('APBCT_PLUGIN_BASE_NAME', plugin_basename(__FILE__)); //Plugin base name.
29
- define('APBCT_CASERT_PATH', file_exists(ABSPATH . WPINC . '/certificates/ca-bundle.crt') ? ABSPATH . WPINC . '/certificates/ca-bundle.crt' : ''); // SSL Serttificate path
30
-
31
- // API params
32
- define('APBCT_AGENT', 'wordpress-'.str_replace('.', '', $plugin_info['Version']));
33
- define('APBCT_MODERATE_URL', 'http://moderate.cleantalk.org'); //Api URL
34
-
35
- // Option names
36
- define('APBCT_DATA', 'cleantalk_data'); //Option name with different plugin data.
37
- define('APBCT_SETTINGS', 'cleantalk_settings'); //Option name with plugin settings.
38
- define('APBCT_NETWORK_SETTINGS', 'cleantalk_network_settings'); //Option name with plugin network settings.
39
- define('APBCT_DEBUG', 'cleantalk_debug'); //Option name with a debug data. Empty by default.
40
-
41
- // Multisite
42
- define('APBCT_WPMS', (is_multisite() ? true : false)); // WMPS is enabled
43
-
44
- // Sessions
45
- define('APBCT_SEESION__LIVE_TIME', 86400*2);
46
- define('APBCT_SEESION__CHANCE_TO_CLEAN', 100);
47
-
48
- // Different params
49
- define('APBCT_REMOTE_CALL_SLEEP', 5); // Minimum time between remote call
50
-
51
- if( !defined( 'CLEANTALK_PLUGIN_DIR' ) ){
52
-
53
- define('CLEANTALK_PLUGIN_DIR', dirname(__FILE__ ) . '/');
54
-
55
- // PHP functions patches
56
- require_once(CLEANTALK_PLUGIN_DIR . 'lib/cleantalk-php-patch.php'); // Pathces fpr different functions which not exists
57
-
58
- // Base classes
59
- require_once(CLEANTALK_PLUGIN_DIR . 'lib/autoloader.php'); // Autoloader
60
-
61
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-pluggable.php'); // Pluggable functions
62
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-common.php');
63
-
64
- // Global ArrayObject with settings and other global varables
65
- global $apbct;
66
- $apbct = new \Cleantalk\ApbctWP\State('cleantalk', array('settings', 'data', 'debug', 'errors', 'remote_calls', 'stats'));
67
-
68
- $apbct->base_name = 'cleantalk-spam-protect/cleantalk.php';
69
-
70
- $apbct->logo = plugin_dir_url(__FILE__) . 'inc/images/logo.png';
71
- $apbct->logo__small = plugin_dir_url(__FILE__) . 'inc/images/logo_small.png';
72
- $apbct->logo__small__colored = plugin_dir_url(__FILE__) . 'inc/images/logo_color.png';
73
-
74
- // Customize \Cleantalk\ApbctWP\State
75
- // Account status
76
-
77
- $apbct->white_label = $apbct->network_settings['white_label'];
78
- $apbct->allow_custom_key = $apbct->network_settings['allow_custom_key'];
79
- $apbct->plugin_name = $apbct->network_settings['white_label__plugin_name'] ? $apbct->network_settings['white_label__plugin_name'] : APBCT_NAME;
80
- $apbct->api_key = !APBCT_WPMS || $apbct->allow_custom_key || $apbct->white_label ? $apbct->settings['apikey'] : $apbct->network_settings['apikey'];
81
- $apbct->key_is_ok = !APBCT_WPMS || $apbct->allow_custom_key || $apbct->white_label ? $apbct->data['key_is_ok'] : $apbct->network_data['key_is_ok'];
82
- $apbct->moderate = !APBCT_WPMS || $apbct->allow_custom_key || $apbct->white_label ? $apbct->data['moderate'] : $apbct->network_data['moderate'];
83
-
84
- $apbct->data['user_counter']['since'] = isset($apbct->data['user_counter']['since']) ? $apbct->data['user_counter']['since'] : date('d M');
85
- $apbct->data['connection_reports']['since'] = isset($apbct->data['connection_reports']['since']) ? $apbct->data['user_counter']['since'] : date('d M');
86
-
87
- $apbct->settings_link = is_network_admin() ? 'settings.php?page=cleantalk' : 'options-general.php?page=cleantalk';
88
-
89
- if(!$apbct->white_label){
90
- require_once( CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-widget.php');
91
- }
92
-
93
- // Disabling comments
94
- if($apbct->settings['disable_comments__all'] || $apbct->settings['disable_comments__posts'] || $apbct->settings['disable_comments__pages'] || $apbct->settings['disable_comments__media']){
95
- \Cleantalk\Antispam\DisableComments::getInstance();
96
- }
97
-
98
- // Passing JS key to frontend
99
- add_action('wp_ajax_apbct_js_keys__get', 'apbct_js_keys__get__ajax');
100
- add_action('wp_ajax_nopriv_apbct_js_keys__get', 'apbct_js_keys__get__ajax');
101
-
102
- // Database prefix
103
- global $wpdb;
104
- $apbct->db_prefix = !APBCT_WPMS || $apbct->allow_custom_key || $apbct->white_label ? $wpdb->prefix : $wpdb->base_prefix;
105
- $apbct->db_prefix = !$apbct->white_label && defined('CLEANTALK_ACCESS_KEY') ? $wpdb->base_prefix : $wpdb->prefix;
106
- // Database constants
107
- define('APBCT_TBL_FIREWALL_DATA', $apbct->db_prefix . 'cleantalk_sfw'); // Table with firewall data.
108
- define('APBCT_TBL_FIREWALL_LOG', $apbct->db_prefix . 'cleantalk_sfw_logs'); // Table with firewall logs.
109
- define('APBCT_TBL_AC_LOG', $apbct->db_prefix . 'cleantalk_ac_log'); // Table with firewall logs.
110
- define('APBCT_TBL_SESSIONS', $apbct->db_prefix . 'cleantalk_sessions'); // Table with session data.
111
- define('APBCT_SPAMSCAN_LOGS', $apbct->db_prefix . 'cleantalk_spamscan_logs'); // Table with session data.
112
- define('APBCT_SELECT_LIMIT', 5000); // Select limit for logs.
113
- define('APBCT_WRITE_LIMIT', 5000); // Write limit for firewall data.
114
-
115
- /** @todo HARDCODE FIX */
116
- if($apbct->plugin_version === '1.0.0')
117
- $apbct->plugin_version = '5.100';
118
-
119
- // Do update actions if version is changed
120
- apbct_update_actions();
121
-
122
- // Self cron
123
- if(!defined('DOING_CRON') || (defined('DOING_CRON') && DOING_CRON !== true)){
124
-
125
- $ct_cron = new Cron();
126
- $ct_cron->checkTasks();
127
-
128
- if(!empty($ct_cron->tasks_to_run)){
129
-
130
- define('CT_CRON', true); // Letting know functions that they are running under CT_CRON
131
- $ct_cron->runTasks();
132
- unset($ct_cron);
133
-
134
- }
135
- }
136
-
137
- //Delete cookie for admin trial notice
138
- add_action('wp_logout', 'apbct__hook__wp_logout__delete_trial_notice_cookie');
139
-
140
- // Set cookie only for public pages and for non-AJAX requests
141
- if (!is_admin() && !apbct_is_ajax() && !defined('DOING_CRON')
142
- && empty($_POST['ct_checkjs_register_form']) // Buddy press registration fix
143
- && empty($_GET['ct_checkjs_search_default']) // Search form fix
144
- && empty($_POST['action']) //bbPress
145
- ){
146
- add_action('template_redirect','apbct_cookie', 2);
147
- add_action('template_redirect','apbct_store__urls', 2);
148
- if (empty($_POST) && empty($_GET)){
149
- apbct_cookie();
150
- apbct_store__urls();
151
- }
152
- }
153
-
154
- // Early checks
155
-
156
- // Iphorm
157
- if( isset( $_POST['iphorm_ajax'], $_POST['iphorm_id'], $_POST['iphorm_uid'] ) ){
158
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
159
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-ajax.php');
160
- ct_ajax_hook();
161
- }
162
-
163
- // Facebook
164
- if ($apbct->settings['general_contact_forms_test'] == 1
165
- && (!empty($_POST['action']) && $_POST['action'] == 'fb_intialize')
166
- && !empty($_POST['FB_userdata'])
167
- ){
168
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
169
- if (apbct_is_user_enable()){
170
- $ct_check_post_result=false;
171
- ct_registration_errors(null);
172
- }
173
-
174
- }
175
-
176
- $apbct_active_integrations = array(
177
- 'ContactBank' => array( 'hook' => 'contact_bank_frontend_ajax_call', 'ajax' => true ),
178
- 'FluentForm' => array( 'hook' => 'fluentform_before_insert_submission', 'ajax' => false ),
179
- 'ElfsightContactForm' => array( 'hook' => 'elfsight_contact_form_mail', 'ajax' => true ),
180
- 'SimpleMembership' => array( 'hook' => 'swpm_front_end_registration_complete_user_data', 'ajax' => false )
181
- );
182
- new \Cleantalk\Antispam\Integrations( $apbct_active_integrations );
183
-
184
- // Ninja Forms. Making GET action to POST action
185
- if( apbct_is_in_uri( 'admin-ajax.php' ) && sizeof($_POST) > 0 && isset($_GET['action']) && $_GET['action']=='ninja_forms_ajax_submit' )
186
- $_POST['action']='ninja_forms_ajax_submit';
187
-
188
- add_action( 'wp_ajax_nopriv_ninja_forms_ajax_submit', 'apbct_form__ninjaForms__testSpam', 1);
189
- add_action( 'wp_ajax_ninja_forms_ajax_submit', 'apbct_form__ninjaForms__testSpam', 1);
190
- add_action( 'wp_ajax_nopriv_nf_ajax_submit', 'apbct_form__ninjaForms__testSpam', 1);
191
- add_action( 'wp_ajax_nf_ajax_submit', 'apbct_form__ninjaForms__testSpam', 1);
192
- add_action( 'ninja_forms_process', 'apbct_form__ninjaForms__testSpam', 1); // Depricated ?
193
-
194
- // SeedProd Coming Soon Page Pro integration
195
- add_action( 'wp_ajax_seed_cspv5_subscribe_callback', 'apbct_form__seedprod_coming_soon__testSpam', 1 );
196
- add_action( 'wp_ajax_nopriv_seed_cspv5_subscribe_callback', 'apbct_form__seedprod_coming_soon__testSpam', 1 );
197
- add_action( 'wp_ajax_seed_cspv5_contactform_callback', 'apbct_form__seedprod_coming_soon__testSpam', 1 );
198
- add_action( 'wp_ajax_nopriv_seed_cspv5_contactform_callback', 'apbct_form__seedprod_coming_soon__testSpam', 1 );
199
-
200
- // The 7 theme contact form integration
201
- add_action( 'wp_ajax_nopriv_dt_send_mail', 'apbct_form__the7_contact_form', 1 );
202
- add_action( 'wp_ajax_dt_send_mail', 'apbct_form__the7_contact_form', 1 );
203
-
204
- // Elementor Pro page builder forms
205
- add_action( 'wp_ajax_elementor_pro_forms_send_form', 'apbct_form__elementor_pro__testSpam' );
206
- add_action( 'wp_ajax_nopriv_elementor_pro_forms_send_form', 'apbct_form__elementor_pro__testSpam' );
207
-
208
- // Custom register form (ticket_id=13668)
209
- add_action('website_neotrends_signup_fields_check',function( $username, $fields ){
210
- $ip = \Cleantalk\ApbctWP\Helper::ip__get( array('real'), false );
211
- $ct_result = ct_test_registration( $username, $fields['email'], $ip );
212
- if( $ct_result['allow'] == 0 ) {
213
- ct_die_extended( $ct_result['comment'] );
214
- }
215
- }, 1, 2);
216
-
217
- // INEVIO theme integration
218
- add_action( 'wp_ajax_contact_form_handler', 'apbct_form__inevio__testSpam', 1 );
219
- add_action( 'wp_ajax_nopriv_contact_form_handler', 'apbct_form__inevio__testSpam', 1 );
220
-
221
- // Enfold Theme contact form
222
- add_filter( 'avf_form_send', 'apbct_form__enfold_contact_form__test_spam', 4, 10 );
223
-
224
- //Hooks for updating/adding settings
225
- //add_action ('added_option', 'apbct_after_options_added', 10, 2);
226
- //add_action ('updated_option', 'apbct_after_options_updated', 10, 3);
227
-
228
- // Public actions
229
- if(!is_admin() && !apbct_is_ajax()){
230
-
231
- // Default search
232
- //add_filter( 'get_search_form', 'apbct_forms__search__addField' );
233
- add_filter( 'get_search_query', 'apbct_forms__search__testSpam' );
234
- add_action( 'wp_head', 'apbct_search_add_noindex', 1 );
235
-
236
- // Remote calls
237
- if(isset($_GET['spbc_remote_call_token'], $_GET['spbc_remote_call_action'], $_GET['plugin_name']) && in_array($_GET['plugin_name'], array('antispam','anti-spam', 'apbct'))){
238
- apbct_remote_call__perform();
239
- }
240
-
241
- // SpamFireWall check
242
- if( $apbct->plugin_version == APBCT_VERSION && // Do not call with first start
243
- $apbct->settings['spam_firewall'] == 1 &&
244
- apbct_is_get() &&
245
- ! apbct_wp_doing_cron()
246
- ){
247
- apbct_sfw__check();
248
- }
249
-
250
- }
251
-
252
-
253
- // Activation/deactivation functions must be in main plugin file.
254
- // http://codex.wordpress.org/Function_Reference/register_activation_hook
255
- register_activation_hook( __FILE__, 'apbct_activation' );
256
- register_deactivation_hook( __FILE__, 'apbct_deactivation' );
257
-
258
- // Hook for newly added blog
259
- add_action('wpmu_new_blog', 'apbct_activation__new_blog', 10, 6);
260
-
261
- // Async loading for JavaScript
262
- add_filter('script_loader_tag', 'apbct_add_async_attribute', 10, 3);
263
-
264
- // Redirect admin to plugin settings.
265
- if(!defined('WP_ALLOW_MULTISITE') || defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE == false)
266
- add_action('admin_init', 'apbct_plugin_redirect');
267
-
268
- // Deleting SFW tables when deleting websites
269
- if(defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE === true)
270
- add_action( 'delete_blog', 'apbct_sfw__delete_tables', 10, 2 );
271
-
272
- // After plugin loaded - to load locale as described in manual
273
- add_action('plugins_loaded', 'apbct_plugin_loaded' );
274
-
275
- if( !empty($apbct->settings['use_ajax']) &&
276
- ! apbct_is_in_uri( '.xml' ) &&
277
- ! apbct_is_in_uri( '.xsl' ) )
278
- {
279
- add_action( 'wp_ajax_nopriv_ct_get_cookie', 'ct_get_cookie',1 );
280
- add_action( 'wp_ajax_ct_get_cookie', 'ct_get_cookie',1 );
281
- }
282
-
283
- // Admin panel actions
284
- if (is_admin() || is_network_admin()){
285
-
286
- require_once( CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-find-spam.php' );
287
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-admin.php');
288
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-settings.php');
289
-
290
- add_action( 'admin_init', 'apbct_admin__init___ajax_actions' );
291
-
292
- if (!(defined( 'DOING_AJAX' ) && DOING_AJAX)){
293
-
294
- add_action('admin_enqueue_scripts', 'apbct_admin__enqueue_scripts');
295
-
296
- add_action('admin_init', 'apbct_admin__init', 1);
297
- add_action('admin_menu', 'apbct_settings_add_page');
298
- add_action('network_admin_menu', 'apbct_settings_add_page');
299
- add_action('admin_notices', 'apbct_admin__notice_message');
300
- add_action('network_admin_notices', 'apbct_admin__notice_message');
301
-
302
- //Show widget only if enables and not IP license
303
- if( $apbct->settings['dashboard_widget__show'] && ! $apbct->moderate_ip )
304
- add_action('wp_dashboard_setup', 'ct_dashboard_statistics_widget' );
305
- }
306
-
307
- if(apbct_is_ajax() || isset($_POST['cma-action'])){
308
-
309
- $cleantalk_hooked_actions = array();
310
- $cleantalk_ajax_actions_to_check = array();
311
-
312
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
313
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-ajax.php');
314
-
315
- // Feedback for comments
316
- if(isset($_POST['action']) && $_POST['action'] == 'ct_feedback_comment'){
317
- add_action( 'wp_ajax_nopriv_ct_feedback_comment', 'apbct_comment__send_feedback',1 );
318
- add_action( 'wp_ajax_ct_feedback_comment', 'apbct_comment__send_feedback',1 );
319
- }
320
- if(isset($_POST['action']) && $_POST['action'] == 'ct_feedback_user'){
321
- add_action( 'wp_ajax_nopriv_ct_feedback_user', 'apbct_user__send_feedback',1 );
322
- add_action( 'wp_ajax_ct_feedback_user', 'apbct_user__send_feedback',1 );
323
- }
324
-
325
- // Check AJAX requests
326
- // if User is not logged in
327
- // if Unknown action or Known action with mandatory check
328
- if( ( ! apbct_is_user_logged_in() || $apbct->settings['protect_logged_in'] == 1) &&
329
- isset( $_POST['action'] ) &&
330
- ( ! in_array( $_POST['action'], $cleantalk_hooked_actions ) || in_array( $_POST['action'], $cleantalk_ajax_actions_to_check ) ) &&
331
- ! array_search( $_POST['action'], array_column( $apbct_active_integrations, 'hook' ) )
332
- ){
333
- ct_ajax_hook();
334
- }
335
-
336
- //QAEngine Theme answers
337
- if (intval($apbct->settings['general_contact_forms_test']))
338
- add_filter('et_pre_insert_question', 'ct_ajax_hook', 1, 1); // Questions
339
- add_filter('et_pre_insert_answer', 'ct_ajax_hook', 1, 1); // Answers
340
-
341
- // Formidable
342
- add_filter( 'frm_entries_before_create', 'apbct_rorm__formidable__testSpam', 10, 2 );
343
- add_action( 'frm_entries_footer_scripts', 'apbct_rorm__formidable__footerScripts', 20, 2 );
344
-
345
- // Some of plugins to register a users use AJAX context.
346
- add_filter('registration_errors', 'ct_registration_errors', 1, 3);
347
- add_filter('registration_errors', 'ct_check_registration_erros', 999999, 3);
348
- add_action('user_register', 'apbct_user_register');
349
-
350
- if(class_exists('BuddyPress')){
351
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
352
- add_filter('bp_activity_is_spam_before_save', 'apbct_integration__buddyPres__activityWall', 999 ,2); /* ActivityWall */
353
- add_action('bp_locate_template', 'apbct_integration__buddyPres__getTemplateName', 10, 6);
354
- }
355
-
356
- }
357
-
358
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
359
- //Bitrix24 contact form
360
- if ($apbct->settings['general_contact_forms_test'] == 1 &&
361
- !empty($_POST['your-phone']) &&
362
- !empty($_POST['your-email']) &&
363
- !empty($_POST['your-message'])
364
- ){
365
- $ct_check_post_result=false;
366
- ct_contact_form_validate();
367
- }
368
-
369
- // Sends feedback to the cloud about comments
370
- // add_action('wp_set_comment_status', 'ct_comment_send_feedback', 10, 2);
371
-
372
- // Sends feedback to the cloud about deleted users
373
- global $pagenow;
374
- if($pagenow=='users.php')
375
- add_action('delete_user', 'apbct_user__delete__hook', 10, 2);
376
-
377
- if( $pagenow=='plugins.php' || apbct_is_in_uri( 'plugins.php' ) ){
378
-
379
- add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'apbct_admin__plugin_action_links', 10, 2);
380
- add_filter('network_admin_plugin_action_links_'.plugin_basename(__FILE__), 'apbct_admin__plugin_action_links', 10, 2);
381
-
382
- add_filter('plugin_row_meta', 'apbct_admin__register_plugin_links', 10, 2);
383
- }
384
-
385
- // Public pages actions
386
- }else{
387
-
388
- require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
389
-
390
-
391
-
392
- add_action('wp_enqueue_scripts', 'ct_enqueue_scripts_public');
393
-
394
- // Init action.
395
- add_action('plugins_loaded', 'apbct_init', 1);
396
-
397
- // Comments
398
- add_filter('preprocess_comment', 'ct_preprocess_comment', 1, 1); // param - comment data array
399
- add_filter('comment_text', 'ct_comment_text' );
400
- add_filter('wp_die_handler', 'apbct_comment__sanitize_data__before_wp_die', 1); // Check comments after validation
401
-
402
- // Registrations
403
- if(!isset($_POST['wp-submit'])){
404
- add_action('login_form_register', 'apbct_cookie');
405
- add_action('login_form_register', 'apbct_store__urls');
406
- }
407
- add_action('login_enqueue_scripts', 'apbct_login__scripts');
408
- add_action('register_form', 'ct_register_form');
409
- add_filter('registration_errors', 'ct_registration_errors', 1, 3);
410
- add_filter('registration_errors', 'ct_check_registration_erros', 999999, 3);
411
- add_action('user_register', 'apbct_user_register');
412
-
413
- // Multisite registrations
414
- add_action('signup_extra_fields','ct_register_form');
415
- add_filter('wpmu_validate_user_signup', 'ct_registration_errors_wpmu', 10, 3);
416
-
417
- // Login form - for notifications only
418
- add_filter('login_message', 'ct_login_message');
419
-
420
- // Comments output hook
421
- add_filter('wp_list_comments_args', 'ct_wp_list_comments_args');
422
-
423
- // Ait-Themes fix
424
- if(isset($_GET['ait-action']) && $_GET['ait-action']=='register'){
425
- $tmp=$_POST['redirect_to'];
426
- unset($_POST['redirect_to']);
427
- ct_contact_form_validate();
428
- $_POST['redirect_to']=$tmp;
429
- }
430
- }
431
-
432
- // Short code for GDPR
433
- if($apbct->settings['gdpr_enabled'])
434
- add_shortcode('cleantalk_gdpr_form', 'apbct_shrotcode_handler__GDPR_public_notice__form');
435
-
436
- }
437
-
438
- /**
439
- * Hook for updating settings
440
- */
441
- function apbct_after_options_updated( $option, $old_value, $value ) {
442
- apbct_sfw_actions( $option, $value );
443
- }
444
-
445
- /**
446
- * Hook for adding settings
447
- */
448
- function apbct_after_options_added( $option, $value ) {
449
- apbct_sfw_actions( $option, $value );
450
- }
451
-
452
- function apbct_sfw_actions( $option, $value ) {
453
-
454
- global $apbct;
455
-
456
- if ( $option == 'cleantalk_settings' ) {
457
-
458
- $api_key = ! empty( $value['apikey'] ) || $apbct->moderate_ip ? $value['apikey'] : $apbct->api_key;
459
-
460
- // SFW actions
461
- if( $value['spam_firewall'] == 1 ){
462
-
463
- $result = ct_sfw_update( true, $api_key );
464
- if( ! empty( $result['error'] ) )
465
- $apbct->error_add( 'sfw_update', $result['error'] );
466
-
467
- $result = ct_sfw_send_logs( true, $api_key );
468
- if( ! empty( $result['error'] ) )
469
- $apbct->error_add( 'sfw_send_logs', $result['error'] );
470
-
471
- }
472
- }
473
-
474
- }
475
-
476
- /**
477
- * Function preforms remote call
478
- */
479
- function apbct_remote_call__perform()
480
- {
481
- global $apbct;
482
-
483
- $remote_action = $_GET['spbc_remote_call_action'];
484
-
485
- if( isset( $apbct->remote_calls[$remote_action] ) ){
486
- if(time() - $apbct->remote_calls[$remote_action]['last_call'] > APBCT_REMOTE_CALL_SLEEP || ($remote_action == 'sfw_update' && isset($_GET['file_urls']))) {
487
-
488
- $apbct->remote_calls[$remote_action]['last_call'] = time();
489
- $apbct->save('remote_calls');
490
-
491
- if(strtolower($_GET['spbc_remote_call_token']) == strtolower(md5($apbct->api_key))){
492
-
493
- // Flag to let plugin know that Remote Call is running.
494
- $apbct->rc_running = true;
495
-
496
- switch ($remote_action) {
497
-
498
- // Close renew banner
499
- case 'close_renew_banner':
500
- $apbct->data['notice_trial'] = 0;
501
- $apbct->data['notice_renew'] = 0;
502
- $apbct->saveData();
503
- Cron::updateTask('check_account_status', 'ct_account_status_check', 86400);
504
- die('OK');
505
- break;
506
-
507
- // SFW update
508
- case 'sfw_update':
509
- $result = ct_sfw_update(true);
510
- /**
511
- * @todo CRUNCH
512
- */
513
- if(is_string($result) && strpos($result, 'FAIL') !== false){
514
- $result = json_decode(substr($result, 5), true);
515
- }
516
- die(empty($result['error']) ? 'OK' : 'FAIL '.json_encode(array('error' => $result['error'])));
517
- break;
518
-
519
- // SFW send logs
520
- case 'sfw_send_logs':
521
- $result = ct_sfw_send_logs();
522
- die(empty($result['error']) ? 'OK' : 'FAIL '.json_encode(array('error' => $result['error'])));
523
- break;
524
-
525
- // Update plugin
526
- case 'update_plugin':
527
- add_action('wp', 'apbct_rc__update', 1);
528
- break;
529
-
530
- // Install plugin
531
- case 'install_plugin':
532
- add_action('wp', 'apbct_rc__install_plugin', 1);
533
- break;
534
- // Activate plugin
535
- case 'activate_plugin':
536
- $result = apbct_rc__activate_plugin($_GET['plugin']);
537
- die(empty($result['error'])
538
- ? 'OK'
539
- : 'FAIL '.json_encode(array('error' => $result['error'])));
540
- break;
541
-
542
- // Insert API key
543
- case 'insert_auth_key':
544
- $result = apbct_rc__insert_auth_key($_GET['auth_key'], $_GET['plugin']);
545
- die(empty($result['error'])
546
- ? 'OK'
547
- : 'FAIL '.json_encode(array('error' => $result['error'])));
548
- break;
549
-
550
- // Update settins
551
- case 'update_settings':
552
- $result = apbct_rc__update_settings($_GET);
553
- die(empty($result['error'])
554
- ? 'OK'
555
- : 'FAIL '.json_encode(array('error' => $result['error'])));
556
- break;
557
- // Deactivate plugin
558
- case 'deactivate_plugin':
559
- add_action('plugins_loaded', 'apbct_rc__deactivate_plugin', 1);
560
- break;
561
-
562
- // Uninstall plugin
563
- case 'uninstall_plugin':
564
- add_action('plugins_loaded', 'apbct_rc__uninstall_plugin', 1);
565
- break;
566
- // No action found
567
- default:
568
- die('FAIL '.json_encode(array('error' => 'UNKNOWN_ACTION_2')));
569
- break;
570
- }
571
-
572
- }else
573
- die('FAIL '.json_encode(array('error' => 'WRONG_TOKEN')));
574
- }else
575
- die('FAIL '.json_encode(array('error' => 'TOO_MANY_ATTEMPTS')));
576
- }else
577
- die('FAIL '.json_encode(array('error' => 'UNKNOWN_ACTION')));
578
- }
579
-
580
- /**
581
- * Function for SpamFireWall check
582
- */
583
- function apbct_sfw__check()
584
- {
585
- global $apbct, $spbc, $cleantalk_url_exclusions;
586
-
587
- // Turn off the SpamFireWall if current url in the exceptions list and WordPress core pages
588
- if (!empty($cleantalk_url_exclusions) && is_array($cleantalk_url_exclusions)) {
589
- $core_page_to_skip_check = array('/feed');
590
- foreach (array_merge($cleantalk_url_exclusions, $core_page_to_skip_check) as $v) {
591
- if ( apbct_is_in_uri( $v ) ) {
592
- return;
593
- }
594
- }
595
- }
596
-
597
- // Skip the check
598
- if(!empty($_GET['access'])){
599
- $spbc_settings = get_option('spbc_settings');
600
- $spbc_key = !empty($spbc_settings['spbc_key']) ? $spbc_settings['spbc_key'] : false;
601
- if($_GET['access'] === $apbct->api_key || ($spbc_key !== false && $_GET['access'] === $spbc_key)){
602
- \Cleantalk\Common\Helper::apbct_cookie__set('spbc_firewall_pass_key', md5(apbct_get_server_variable( 'REMOTE_ADDR' ) . $spbc_key), time()+1200, '/', '');
603
- \Cleantalk\Common\Helper::apbct_cookie__set('ct_sfw_pass_key', md5(apbct_get_server_variable( 'REMOTE_ADDR' ) . $apbct->api_key), time()+1200, '/', null);
604
- return;
605
- }
606
- unset($spbc_settings, $spbc_key);
607
- }
608
-
609
- // Turn off the SpamFireWall if Remote Call is in progress
610
- if($apbct->rc_running || (!empty($spbc) && $spbc->rc_running))
611
- return;
612
-
613
- $fw_init_options = array(
614
- 'set_cookies' => $apbct->settings['set_cookies']
615
- );
616
-
617
- $firewall = new \Cleantalk\Common\Firewall(
618
- \Cleantalk\ApbctWP\DB::getInstance()
619
- );
620
-
621
- $firewall->load_fw_module( new \Cleantalk\ApbctWP\Firewall\SFW(
622
- APBCT_TBL_FIREWALL_LOG,
623
- APBCT_TBL_FIREWALL_DATA,
624
- array(
625
- 'sfw_counter' => $apbct->settings['sfw_counter'],
626
- 'api_key' => $apbct->api_key,
627
- 'apbct' => $apbct,
628
- 'cookie_domain' => parse_url( get_option( 'siteurl' ), PHP_URL_HOST ),
629
- 'set_cookies' => $apbct->settings['set_cookies'],
630
- )
631
- ) );
632
-
633
- if( $apbct->settings['sfw__anti_crawler'] ){
634
- $firewall->load_fw_module( new \Cleantalk\ApbctWP\Firewall\AntiCrawler(
635
- APBCT_TBL_FIREWALL_LOG,
636
- APBCT_TBL_AC_LOG,
637
- array(
638
- 'api_key' => $apbct->api_key,
639
- 'apbct' => $apbct,
640
- )
641
- ) );
642
- }
643
-
644
- if( $apbct->settings['sfw__anti_flood'] ){
645
- $firewall->load_fw_module( new \Cleantalk\ApbctWP\Firewall\AntiFlood(
646
- APBCT_TBL_FIREWALL_LOG,
647
- APBCT_TBL_AC_LOG,
648
- array(
649
- 'api_key' => $apbct->api_key,
650
- 'view_limit' => $apbct->settings['sfw__anti_flood__view_limit'],
651
- 'apbct' => $apbct,
652
- )
653
- ) );
654
- }
655
-
656
- $firewall->run();
657
-
658
- }
659
-
660
- /**
661
- * On activation, set a time, frequency and name of an action hook to be scheduled.
662
- */
663
- function apbct_activation( $network = false ) {
664
-
665
- global $wpdb;
666
-
667
- // SFW data
668
- $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw` (
669
- `network` int(11) unsigned NOT NULL,
670
- `mask` int(11) unsigned NOT NULL,
671
- `status` TINYINT(1) NOT NULL DEFAULT 0,
672
- INDEX ( `network` , `mask` )
673
- );';
674
-
675
- // SFW log
676
- $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw_logs` (
677
- `id` VARCHAR(40) NOT NULL,
678
- `ip` VARCHAR(15) NOT NULL,
679
- `status` ENUM(\'PASS_SFW\',\'DENY_SFW\',\'PASS_SFW__BY_WHITELIST\',\'PASS_SFW__BY_COOKIE\',\'DENY_ANTICRAWLER\',\'PASS_ANTICRAWLER\',\'DENY_ANTIFLOOD\',\'PASS_ANTIFLOOD\') NULL DEFAULT NULL,
680
- `all_entries` INT NOT NULL,
681
- `blocked_entries` INT NOT NULL,
682
- `entries_timestamp` INT NOT NULL,
683
- PRIMARY KEY (`id`));';
684
-
685
- $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ac_log` (
686
- `id` VARCHAR(40) NOT NULL,
687
- `ip` VARCHAR(40) NOT NULL,
688
- `entries` INT DEFAULT 0,
689
- `interval_start` INT NOT NULL,
690
- PRIMARY KEY (`id`));';
691
-
692
- // Sessions
693
- $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sessions` (
694
- `id` VARCHAR(64) NOT NULL,
695
- `name` VARCHAR(40) NOT NULL,
696
- `value` TEXT NULL DEFAULT NULL,
697
- `last_update` DATETIME NULL DEFAULT NULL,
698
- PRIMARY KEY (`name`(40), `id`(64)));';
699
-
700
- $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_spamscan_logs` (
701
- `id` int(11) NOT NULL AUTO_INCREMENT,
702
- `scan_type` varchar(11) NOT NULL,
703
- `start_time` datetime NOT NULL,
704
- `finish_time` datetime NOT NULL,
705
- `count_to_scan` int(11) DEFAULT NULL,
706
- `found_spam` int(11) DEFAULT NULL,
707
- `found_bad` int(11) DEFAULT NULL,
708
- PRIMARY KEY (`id`));';
709
-
710
- if($network && !defined('CLEANTALK_ACCESS_KEY')){
711
- $initial_blog = get_current_blog_id();
712
- $blogs = array_keys($wpdb->get_results('SELECT blog_id FROM '. $wpdb->blogs, OBJECT_K));
713
- foreach ($blogs as $blog) {
714
- switch_to_blog($blog);
715
- apbct_activation__create_tables($sqls);
716
- // Cron tasks
717
- Cron::addTask('check_account_status', 'ct_account_status_check', 3600, time() + 1800); // Checks account status
718
- Cron::addTask('delete_spam_comments', 'ct_delete_spam_comments', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
719
- Cron::addTask('send_feedback', 'ct_send_feedback', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
720
- Cron::addTask('sfw_update', 'ct_sfw_update', 86400, time() + 300); // SFW update
721
- Cron::addTask('send_sfw_logs', 'ct_sfw_send_logs', 3600, time() + 1800); // SFW send logs
722
- Cron::addTask('get_brief_data', 'cleantalk_get_brief_data', 86400, time() + 3500); // Get data for dashboard widget
723
- Cron::addTask('send_connection_report','ct_mail_send_connection_report', 86400, time() + 3500); // Send connection report to welcome@cleantalk.org
724
- }
725
- switch_to_blog($initial_blog);
726
- }else{
727
-
728
- // Cron tasks
729
- Cron::addTask('check_account_status', 'ct_account_status_check', 3600, time() + 1800); // Checks account status
730
- Cron::addTask('delete_spam_comments', 'ct_delete_spam_comments', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
731
- Cron::addTask('send_feedback', 'ct_send_feedback', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
732
- Cron::addTask('sfw_update', 'ct_sfw_update', 86400, time() + 600); // SFW update
733
- Cron::addTask('send_sfw_logs', 'ct_sfw_send_logs', 3600, time() + 1800); // SFW send logs
734
- Cron::addTask('get_brief_data', 'cleantalk_get_brief_data', 86400, time() + 3500); // Get data for dashboard widget
735
- Cron::addTask('send_connection_report','ct_mail_send_connection_report', 86400, time() + 3500); // Send connection report to welcome@cleantalk.org
736
-
737
- apbct_activation__create_tables($sqls);
738
- ct_account_status_check(null, false);
739
- ct_sfw_update(); // Updating SFW
740
- }
741
-
742
- // Additional options
743
- add_option('ct_plugin_do_activation_redirect', true);
744
- }
745
-
746
- function apbct_activation__create_tables( $sqls, $db_prefix = '' ) {
747
-
748
- global $wpdb;
749
-
750
- $db_prefix = $db_prefix ? $db_prefix : $wpdb->prefix;
751
-
752
- $wpdb->show_errors = false;
753
- foreach($sqls as $sql){
754
- $sql = sprintf($sql, $db_prefix); // Adding current blog prefix
755
- $result = $wpdb->query($sql);
756
- if($result === false)
757
- $errors[] = "Failed.\nQuery: {$wpdb->last_query}\nError: {$wpdb->last_error}";
758
- }
759
- $wpdb->show_errors = true;
760
-
761
- // Logging errors
762
- if(!empty($errors))
763
- apbct_log($errors);
764
- }
765
-
766
- function apbct_activation__new_blog($blog_id, $user_id, $domain, $path, $site_id, $meta) {
767
- if (apbct_is_plugin_active_for_network('cleantalk-spam-protect/cleantalk.php')){
768
-
769
- $settings = get_option('cleantalk_settings');
770
-
771
- switch_to_blog($blog_id);
772
-
773
- global $wpdb;
774
-
775
- // SFW data
776
- $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw` (
777
- `network` int(11) unsigned NOT NULL,
778
- `mask` int(11) unsigned NOT NULL,
779
- INDEX ( `network` , `mask` )
780
- );';
781
-
782
- // SFW log
783
- $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw_logs` (
784
- `id` VARCHAR(40) NOT NULL,
785
- `ip` VARCHAR(15) NOT NULL,
786
- `status` ENUM(\'PASS_SFW\',\'DENY_SFW\',\'PASS_SFW__BY_WHITELIST\',\'PASS_SFW__BY_COOKIE\',\'DENY_ANTICRAWLER\',\'PASS_ANTICRAWLER\',\'DENY_ANTIFLOOD\',\'PASS_ANTIFLOOD\') NULL DEFAULT NULL,
787
- `all_entries` INT NOT NULL,
788
- `blocked_entries` INT NOT NULL,
789
- `entries_timestamp` INT NOT NULL,
790
- PRIMARY KEY (`id`));';
791
-
792
- $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ac_log` (
793
- `id` VARCHAR(40) NOT NULL,
794
- `ip` VARCHAR(40) NOT NULL,
795
- `entries` INT DEFAULT 0,
796
- `interval_start` INT NOT NULL,
797
- PRIMARY KEY (`id`));';
798
-
799
- // Sessions
800
- $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sessions` (
801
- `id` VARCHAR(64) NOT NULL,
802
- `name` TEXT NOT NULL,
803
- `value` TEXT NULL DEFAULT NULL,
804
- `last_update` DATETIME NULL DEFAULT NULL,
805
- PRIMARY KEY (`id`(64), `name`(64)));';
806
-
807
- $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_spamscan_logs` (
808
- `id` int(11) NOT NULL AUTO_INCREMENT,
809
- `scan_type` varchar(11) NOT NULL,
810
- `start_time` datetime NOT NULL,
811
- `finish_time` datetime NOT NULL,
812
- `count_to_scan` int(11) DEFAULT NULL,
813
- `found_spam` int(11) DEFAULT NULL,
814
- `found_bad` int(11) DEFAULT NULL,
815
- PRIMARY KEY (`id`));';
816
-
817
- // Cron tasks
818
- Cron::addTask('check_account_status', 'ct_account_status_check', 3600, time() + 1800); // Checks account status
819
- Cron::addTask('delete_spam_comments', 'ct_delete_spam_comments', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
820
- Cron::addTask('send_feedback', 'ct_send_feedback', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
821
- Cron::addTask('sfw_update', 'ct_sfw_update', 86400, time() + 600); // SFW update
822
- Cron::addTask('send_sfw_logs', 'ct_sfw_send_logs', 3600, time() + 1800); // SFW send logs
823
- Cron::addTask('get_brief_data', 'cleantalk_get_brief_data', 86400, time() + 3500); // Get data for dashboard widget
824
- Cron::addTask('send_connection_report','ct_mail_send_connection_report', 86400, time() + 3500); // Send connection report to welcome@cleantalk.org
825
- apbct_activation__create_tables($sqls);
826
- ct_sfw_update(); // Updating SFW
827
- ct_account_status_check(null, false);
828
-
829
- if (isset($settings['use_settings_template_apply_for_new']) && $settings['use_settings_template_apply_for_new'] == 1) {
830
- update_option('cleantalk_settings', $settings);
831
- }
832
- restore_current_blog();
833
- }
834
- }
835
-
836
- /**
837
- * On deactivation, clear schedule.
838
- */
839
- function apbct_deactivation( $network ) {
840
-
841
- global $apbct, $wpdb;
842
-
843
- // Deactivation for network
844
- if(is_multisite() && $network){
845
-
846
- $initial_blog = get_current_blog_id();
847
- $blogs = array_keys($wpdb->get_results('SELECT blog_id FROM '. $wpdb->blogs, OBJECT_K));
848
- foreach ($blogs as $blog) {
849
- switch_to_blog($blog);
850
- apbct_deactivation__delete_blog_tables();
851
- delete_option('cleantalk_cron'); // Deleting cron entries
852
-
853
- if($apbct->settings['complete_deactivation']){
854
- apbct_deactivation__delete_all_options();
855
- apbct_deactivation__delete_meta();
856
- apbct_deactivation__delete_all_options__in_network();
857
- }
858
-
859
- }
860
- switch_to_blog($initial_blog);
861
-
862
- // Deactivation for blog
863
- }elseif(is_multisite()){
864
-
865
- apbct_deactivation__delete_common_tables();
866
- delete_option('cleantalk_cron'); // Deleting cron entries
867
-
868
- if($apbct->settings['complete_deactivation']) {
869
- apbct_deactivation__delete_all_options();
870
- apbct_deactivation__delete_meta();
871
- }
872
-
873
- // Deactivation on standalone blog
874
- }elseif(!is_multisite()){
875
-
876
- apbct_deactivation__delete_common_tables();
877
- delete_option('cleantalk_cron'); // Deleting cron entries
878
-
879
- if($apbct->settings['complete_deactivation']) {
880
- apbct_deactivation__delete_all_options();
881
- apbct_deactivation__delete_meta();
882
- }
883
-
884
- }
885
- }
886
-
887
- /**
888
- * Delete all cleantalk_* entries from _options table
889
- */
890
- function apbct_deactivation__delete_all_options(){
891
- delete_option('cleantalk_settings');
892
- delete_option('cleantalk_data');
893
- delete_option('cleantalk_cron');
894
- delete_option('cleantalk_errors');
895
- delete_option('cleantalk_remote_calls');
896
- delete_option('cleantalk_server');
897
- delete_option('cleantalk_stats');
898
- delete_option('cleantalk_timelabel_reg');
899
- delete_option('cleantalk_debug');
900
- }
901
-
902
- /**
903
- * Delete all cleantalk_* entries from _sitemeta table
904
- */
905
- function apbct_deactivation__delete_all_options__in_network(){
906
- delete_site_option('cleantalk_network_settings');
907
- delete_site_option('cleantalk_network_data');
908
- }
909
-
910
- function apbct_deactivation__delete_common_tables() {
911
- global $wpdb;
912
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->base_prefix.'cleantalk_sfw`;'); // Deleting SFW data
913
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->base_prefix.'cleantalk_sfw_logs`;'); // Deleting SFW logs
914
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->base_prefix.'cleantalk_ac_log`;'); // Deleting SFW logs
915
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->base_prefix.'cleantalk_sessions`;'); // Deleting session table
916
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->base_prefix.'cleantalk_spamscan_logs`;'); // Deleting user/comments scan result table
917
- }
918
-
919
- function apbct_deactivation__delete_blog_tables() {
920
- global $wpdb;
921
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_sfw`;'); // Deleting SFW data
922
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_sfw_logs`;'); // Deleting SFW logs
923
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_ac_log`;'); // Deleting SFW logs
924
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_sessions`;'); // Deleting session table
925
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_spamscan_logs`;'); // Deleting user/comments scan result table
926
- }
927
-
928
- function apbct_deactivation__delete_meta(){
929
- global $wpdb;
930
- $wpdb->query("DELETE FROM {$wpdb->usermeta} WHERE meta_key IN ('ct_bad', 'ct_checked', 'ct_checked_now', 'ct_marked_as_spam', 'ct_hash');");
931
- }
932
-
933
- /**
934
- * Redirects admin to plugin settings after activation.
935
- */
936
- function apbct_plugin_redirect()
937
- {
938
- global $apbct;
939
- if (get_option('ct_plugin_do_activation_redirect', false) && !isset($_GET['activate-multi'])){
940
- delete_option('ct_plugin_do_activation_redirect');
941
- ct_account_status_check(null, false);
942
- ct_sfw_update(); // Updating SFW
943
- wp_redirect($apbct->settings_link);
944
- }
945
- }
946
-
947
- function ct_add_event($event_type)
948
- {
949
- global $apbct, $cleantalk_executed;
950
-
951
- //
952
- // To migrate on the new version of ct_add_event().
953
- //
954
- switch ($event_type) {
955
- case '0': $event_type = 'no';break;
956
- case '1': $event_type = 'yes';break;
957
- }
958
-
959
- $current_hour = intval(date('G'));
960
-
961
- // Updating current hour
962
- if($current_hour!=$apbct->data['current_hour']){
963
- $apbct->data['current_hour'] = $current_hour;
964
- $apbct->data['array_accepted'][$current_hour] = 0;
965
- $apbct->data['array_blocked'][$current_hour] = 0;
966
- }
967
-
968
- //Add 1 to counters
969
- if($event_type=='yes'){
970
- $apbct->data['array_accepted'][$current_hour]++;
971
- $apbct->data['all_time_counter']['accepted']++;
972
- $apbct->data['user_counter']['accepted']++;
973
- }
974
- if($event_type=='no'){
975
- $apbct->data['array_blocked'][$current_hour]++;
976
- $apbct->data['all_time_counter']['blocked']++;
977
- $apbct->data['user_counter']['blocked']++;
978
- }
979
-
980
- $apbct->saveData();
981
-
982
- $cleantalk_executed=true;
983
- }
984
-
985
- /**
986
- * return new cookie value
987
- */
988
- function ct_get_cookie()
989
- {
990
- global $ct_checkjs_def;
991
- $ct_checkjs_key = ct_get_checkjs_value();
992
- print $ct_checkjs_key;
993
- die();
994
- }
995
-
996
- function ct_sfw_update($api_key = '', $immediate = false){
997
-
998
- global $apbct;
999
-
1000
- $api_key = !empty($apbct->api_key) ? $apbct->api_key : $api_key;
1001
-
1002
- if( $apbct->settings['spam_firewall'] == 1 && ( ! empty($api_key) || $apbct->data['moderate_ip'] ) ) {
1003
-
1004
- $file_urls = isset($_GET['file_urls']) ? urldecode( $_GET['file_urls'] ) : null;
1005
- $file_urls = isset($file_urls) ? explode(',', $file_urls) : null;
1006
-
1007
- if( ! $file_urls ){
1008
-
1009
- //Reset previous entries count
1010
- $apbct->stats['sfw']['entries'] = 0;
1011
- $apbct->save('stats');
1012
-
1013
- $result = \Cleantalk\ApbctWP\Firewall\SFW::update(
1014
- \Cleantalk\ApbctWP\DB::getInstance(),
1015
- APBCT_TBL_FIREWALL_DATA,
1016
- $api_key,
1017
- null,
1018
- $immediate
1019
- );
1020
-
1021
- return ! empty( $result['error'] )
1022
- ? $result
1023
- : true;
1024
-
1025
- }elseif( is_array( $file_urls ) && count( $file_urls ) ){
1026
-
1027
- $result = \Cleantalk\ApbctWP\Firewall\SFW::update(
1028
- \Cleantalk\ApbctWP\DB::getInstance(),
1029
- APBCT_TBL_FIREWALL_DATA,
1030
- $api_key,
1031
- $file_urls[0],
1032
- $immediate
1033
- );
1034
-
1035
- if( empty( $result['error'] ) ){
1036
-
1037
- array_shift($file_urls);
1038
-
1039
- //Increment sfw entries
1040
- $apbct->stats['sfw']['entries'] += $result;
1041
- $apbct->save('stats');
1042
-
1043
- if (count($file_urls)) {
1044
- \Cleantalk\ApbctWP\Helper::http__request(
1045
- get_option('siteurl'),
1046
- array(
1047
- 'spbc_remote_call_token' => md5($api_key),
1048
- 'spbc_remote_call_action' => 'sfw_update',
1049
- 'plugin_name' => 'apbct',
1050
- 'file_urls' => implode(',', $file_urls),
1051
- ),
1052
- array('get', 'async')
1053
- );
1054
- } else {
1055
- //Files array is empty update sfw time
1056
- $apbct->stats['sfw']['last_update_time'] = time();
1057
- $apbct->save('stats');
1058
- // Delete update errors
1059
- $apbct->error_delete( 'sfw_update', 'save_settings' );
1060
-
1061
- return $result;
1062
- }
1063
- }else
1064
- return $result;
1065
- }else
1066
- return array('error' => 'SFW_UPDATE WRONG_FILE_URLS');
1067
- }
1068
-
1069
- return array('error' => 'SFW_DISABLED');
1070
- }
1071
-
1072
- function ct_sfw_send_logs($api_key = '')
1073
- {
1074
- global $apbct;
1075
-
1076
- $api_key = !empty($apbct->api_key) ? $apbct->api_key : $api_key;
1077
-
1078
- if( $apbct->settings['spam_firewall'] == 1 && ( ! empty($api_key) || $apbct->data['moderate_ip'] ) ) {
1079
-
1080
- $result = \Cleantalk\ApbctWP\Firewall\SFW::send_log(
1081
- \Cleantalk\ApbctWP\DB::getInstance(),
1082
- APBCT_TBL_FIREWALL_LOG,
1083
- $api_key
1084
- );
1085
-
1086
- if(empty($result['error'])){
1087
- $apbct->stats['sfw']['last_send_time'] = time();
1088
- $apbct->stats['sfw']['last_send_amount'] = $result['rows'];
1089
- $apbct->save('stats');
1090
- $apbct->error_delete( 'sfw_send_logs', 'save_settings' );
1091
- }
1092
-
1093
- return $result;
1094
-
1095
- }
1096
-
1097
- return array('error' => 'SFW_DISABLED');
1098
- }
1099
-
1100
- /**
1101
- * Wrapper for Cleantalk's remote calls
1102
- *
1103
- * @param string $action What you want to do?
1104
- * @param array $additional_params Additional GET parameters for RC
1105
- * @param string $presets Presets for \Cleantalk\ApbctWP\Helper::http__request(). 'async' maybe?
1106
- * @param string $plugin_name Plugin name 'antispam' by default
1107
- * @param string $call_token RC securirty token
1108
- * @param string $url Current site URL by default
1109
- *
1110
- * @return array|bool
1111
- */
1112
- function apbct_rc__send($action, $additional_params = array(), $presets = 'get', $plugin_name = 'antispam', $call_token = '', $url = ''){
1113
-
1114
- global $apbct;
1115
-
1116
- $default_params = array(
1117
- 'plugin_name' => $plugin_name,
1118
- 'spbc_remote_call_token' => $call_token ? $call_token : md5($apbct->api_key),
1119
- 'spbc_remote_call_action' => $action,
1120
- );
1121
-
1122
- $params = array_merge($additional_params, $default_params);
1123
-
1124
- return apbct_rc__parse_result(
1125
- \Cleantalk\ApbctWP\Helper::http__request(
1126
- $url ? $url : get_option('siteurl'),
1127
- $params,
1128
- $presets
1129
- )
1130
- );
1131
- }
1132
-
1133
- /**
1134
- * Parse different types of remote call results
1135
- *
1136
- * @param array|string $rc_result
1137
- * string - 'FAIL {"some":"result}'
1138
- * string - 'OK {"some":"result}'
1139
- *
1140
- * @return array|string
1141
- */
1142
- function apbct_rc__parse_result($rc_result){
1143
- if(is_string($rc_result)){
1144
- $rc_result = preg_replace('/^(OK\s?|FAIL\s?)(.*)/', '$2', $rc_result, 1);
1145
- $rc_result = json_decode($rc_result, true);
1146
- $rc_result = $rc_result
1147
- ? $rc_result
1148
- : array('error' => 'FAIL_TO_PARSE_RC_RESULT');
1149
- }
1150
- return $rc_result;
1151
- }
1152
-
1153
- /**
1154
- * Install plugin from wordpress catalog
1155
- *
1156
- * @param WP $wp
1157
- * @param string $plugin_slug
1158
- */
1159
- function apbct_rc__install_plugin($wp = null, $plugin = null){
1160
- global $wp_version;
1161
-
1162
- $plugin = $plugin ? $plugin : (isset($_GET['plugin']) ? $_GET['plugin'] : null);
1163
-
1164
- if($plugin){
1165
-
1166
- if(preg_match('/[a-zA-Z-\d]+[\/\\][a-zA-Z-\d]+\.php/', $plugin)){
1167
-
1168
- $plugin_slug = preg_replace('@([a-zA-Z-\d]+)[\\\/].*@', '$1', $plugin);
1169
-
1170
- if($plugin_slug){
1171
-
1172
- require_once(ABSPATH.'wp-admin/includes/plugin-install.php');
1173
- $result = plugins_api(
1174
- 'plugin_information',
1175
- array(
1176
- 'slug' => $plugin_slug,
1177
- 'fileds' => array('version' => true, 'download_link' => true,),
1178
- )
1179
- );
1180
-
1181
- if(!is_wp_error($result)){
1182
-
1183
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1184
- include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
1185
- include_once( ABSPATH . 'wp-admin/includes/file.php' );
1186
- include_once( ABSPATH . 'wp-admin/includes/misc.php' );
1187
-
1188
- if (version_compare(PHP_VERSION, '5.6.0') >= 0 && version_compare($wp_version, '5.3') >= 0) {
1189
- $installer= new CleantalkUpgrader( new CleantalkUpgraderSkin() );
1190
- } else {
1191
- $installer= new CleantalkUpgrader( new CleantalkUpgraderSkin_Deprecated() );
1192
- }
1193
-
1194
- $installer->install($result->download_link);
1195
-
1196
- if($installer->apbct_result === 'OK'){
1197
- die('OK');
1198
-
1199
- }else
1200
- die('FAIL '. json_encode(array('error' => $installer->apbct_result)));
1201
- }else
1202
- die('FAIL '. json_encode(array('error' => 'FAIL_TO_GET_LATEST_VERSION', 'details' => $result->get_error_message(),)));
1203
- }else
1204
- die('FAIL '. json_encode(array('error' => 'PLUGIN_SLUG_INCORRECT')));
1205
- }else
1206
- die('FAIL '. json_encode(array('error' => 'PLUGIN_NAME_IS_INCORRECT')));
1207
- }else
1208
- die('FAIL '. json_encode(array('error' => 'PLUGIN_NAME_IS_UNSET')));
1209
- }
1210
-
1211
- function apbct_rc__activate_plugin($plugin){
1212
-
1213
- $plugin = $plugin ? $plugin : (isset($_GET['plugin']) ? $_GET['plugin'] : null);
1214
-
1215
- if($plugin){
1216
-
1217
- if(preg_match('@[a-zA-Z-\d]+[\\\/][a-zA-Z-\d]+\.php@', $plugin)){
1218
-
1219
- require_once (ABSPATH .'/wp-admin/includes/plugin.php');
1220
-
1221
- $result = activate_plugins($plugin);
1222
-
1223
- if($result && !is_wp_error($result)){
1224
- return array('success' => true);
1225
- }else
1226
- return array('error' => 'FAIL_TO_ACTIVATE', 'details' => (is_wp_error($result) ? ' '.$result->get_error_message() : ''));
1227
- }else
1228
- return array('error' => 'PLUGIN_NAME_IS_INCORRECT');
1229
- }else
1230
- return array('error' => 'PLUGIN_NAME_IS_UNSET');
1231
- }
1232
-
1233
- /**
1234
- * Uninstall plugin from wordpress catalog
1235
- *
1236
- * @param null $plugin_name
1237
- */
1238
- function apbct_rc__deactivate_plugin($plugin = null){
1239
-
1240
- global $apbct;
1241
-
1242
- $plugin = $plugin ? $plugin : (isset($_GET['plugin']) ? $_GET['plugin'] : null);
1243
-
1244
- if($plugin){
1245
-
1246
- // Switching complete deactivation for security
1247
- if($plugin == 'security-malware-firewall/security-malware-firewall.php' && !empty($_GET['complete_deactivation'])){
1248
- $spbc_settings = get_option('spbc_settings');
1249
- $spbc_settings['complete_deactivation'] = intval($_GET['complete_deactivation']);
1250
- update_option('spbc_settings', $spbc_settings);
1251
- }
1252
-
1253
- require_once (ABSPATH .'/wp-admin/includes/plugin.php');
1254
-
1255
- if(is_plugin_active( $plugin )){
1256
- // Hook to set flag if the plugin is deactivated
1257
- add_action( 'deactivate_'.$plugin, 'apbct_rc__uninstall_plugin__check_deactivate' );
1258
- deactivate_plugins($plugin, false, is_multisite() ? true : false);
1259
- }else{
1260
- $apbct->plugin_deactivated = true;
1261
- }
1262
-
1263
- // Hook to set flag if the plugin is deactivated
1264
- add_action( 'deactivate_'.$plugin, 'apbct_rc__uninstall_plugin__check_deactivate' );
1265
- deactivate_plugins($plugin, false, is_multisite() ? true : false);
1266
-
1267
- if($apbct->plugin_deactivated){
1268
- die('OK');
1269
- }else
1270
- die('FAIL '. json_encode(array('error' => 'PLUGIN_STILL_ACTIVE')));
1271
- }else
1272
- die('FAIL '. json_encode(array('error' => 'PLUGIN_NAME_IS_UNSET')));
1273
- }
1274
-
1275
-
1276
- /**
1277
- * Uninstall plugin from wordpress. Delete files.
1278
- *
1279
- * @param null $plugin
1280
- */
1281
- function apbct_rc__uninstall_plugin($plugin = null){
1282
-
1283
- global $apbct;
1284
-
1285
- $plugin = $plugin ? $plugin : (isset($_GET['plugin']) ? $_GET['plugin'] : null);
1286
-
1287
- if($plugin){
1288
-
1289
- // Switching complete deactivation for security
1290
- if($plugin == 'security-malware-firewall/security-malware-firewall.php' && !empty($_GET['complete_deactivation'])){
1291
- $spbc_settings = get_option('spbc_settings');
1292
- $spbc_settings['complete_deactivation'] = intval($_GET['complete_deactivation']);
1293
- update_option('spbc_settings', $spbc_settings);
1294
- }
1295
-
1296
- require_once (ABSPATH .'/wp-admin/includes/plugin.php');
1297
-
1298
- if(is_plugin_active( $plugin )){
1299
- // Hook to set flag if the plugin is deactivated
1300
- add_action( 'deactivate_'.$plugin, 'apbct_rc__uninstall_plugin__check_deactivate' );
1301
- deactivate_plugins($plugin, false, is_multisite() ? true : false);
1302
- }else{
1303
- $apbct->plugin_deactivated = true;
1304
- }
1305
-
1306
- if($apbct->plugin_deactivated){
1307
-
1308
- require_once (ABSPATH .'/wp-admin/includes/file.php');
1309
-
1310
- $result = delete_plugins(array($plugin));
1311
-
1312
- if($result && !is_wp_error($result)){
1313
- die('OK');
1314
- }else
1315
- die('FAIL '. json_encode(array('error' => 'PLUGIN_STILL_EXISTS', 'details' => (is_wp_error($result) ? ' '.$result->get_error_message() : ''))));
1316
- }else
1317
- die('FAIL '. json_encode(array('error' => 'PLUGIN_STILL_ACTIVE')));
1318
- }else
1319
- die('FAIL '. json_encode(array('error' => 'PLUGIN_NAME_IS_UNSET')));
1320
- }
1321
-
1322
- function apbct_rc__uninstall_plugin__check_deactivate(){
1323
- global $apbct;
1324
- $apbct->plugin_deactivated = true;
1325
- }
1326
-
1327
- function apbct_rc__update(){
1328
- global $wp_version;
1329
-
1330
- //Upgrade params
1331
- $plugin = 'cleantalk-spam-protect/cleantalk.php';
1332
- $plugin_slug = 'cleantalk-spam-protect';
1333
- $title = __('Update Plugin');
1334
- $nonce = 'upgrade-plugin_' . $plugin;
1335
- $url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );
1336
- $activate_for_network = false;
1337
- if( APBCT_WPMS && is_main_site() && array_key_exists( $plugin, get_site_option( 'active_sitewide_plugins' ) ) ) {
1338
- $activate_for_network = true;
1339
- }
1340
-
1341
- $prev_version = APBCT_VERSION;
1342
-
1343
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1344
- include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
1345
- include_once( ABSPATH . 'wp-admin/includes/file.php' );
1346
- include_once( ABSPATH . 'wp-admin/includes/misc.php' );
1347
-
1348
- apbct_maintance_mode__enable( 30 );
1349
-
1350
- if (version_compare(PHP_VERSION, '5.6.0') >= 0 && version_compare($wp_version, '5.3') >= 0){
1351
- $upgrader = new CleantalkUpgrader( new CleantalkUpgraderSkin( compact('title', 'nonce', 'url', 'plugin') ) );
1352
- }else{
1353
- $upgrader = new CleantalkUpgrader( new CleantalkUpgraderSkin_Deprecated( compact('title', 'nonce', 'url', 'plugin') ) );
1354
- }
1355
-
1356
- $upgrader->upgrade($plugin);
1357
-
1358
- apbct_maintance_mode__disable();
1359
-
1360
- $result = activate_plugins( $plugin, '', $activate_for_network );
1361
-
1362
- // Changing response UP_TO_DATE to OK
1363
- if($upgrader->apbct_result === 'UP_TO_DATE')
1364
- $upgrader->apbct_result = 'OK';
1365
-
1366
- if($upgrader->apbct_result === 'OK'){
1367
-
1368
- if(is_wp_error($result)){
1369
- die('FAIL '. json_encode(array('error' => 'COULD_NOT_ACTIVATE', 'wp_error' => $result->get_error_message())));
1370
- }
1371
-
1372
- $httpResponseCode = \Cleantalk\ApbctWP\Helper::http__request(get_option('siteurl'), array(), 'get_code');
1373
-
1374
- if( strpos($httpResponseCode, '200') === false ){
1375
-
1376
- apbct_maintance_mode__enable( 30 );
1377
-
1378
- // Rollback
1379
- if (version_compare(PHP_VERSION, '5.6.0') >= 0 && version_compare($wp_version, '5.3') >= 0)
1380
- $rollback = new CleantalkUpgrader( new CleantalkUpgraderSkin( compact('title', 'nonce', 'url', 'plugin_slug', 'prev_version') ) );
1381
- else
1382
- $rollback = new CleantalkUpgrader( new CleantalkUpgraderSkin_Deprecated( compact('title', 'nonce', 'url', 'plugin_slug', 'prev_version') ) );
1383
- $rollback->rollback($plugin);
1384
-
1385
- apbct_maintance_mode__disable();
1386
-
1387
- // @todo add execution time
1388
-
1389
- $response = array(
1390
- 'error' => 'BAD_HTTP_CODE',
1391
- 'http_code' => $httpResponseCode,
1392
- 'output' => substr(file_get_contents(get_option('siteurl')), 0, 900),
1393
- 'rollback_result' => $rollback->apbct_result,
1394
- );
1395
-
1396
- die('FAIL '.json_encode($response));
1397
- }
1398
-
1399
- $plugin_data = get_plugin_data(__FILE__);
1400
- $apbct_agent = 'wordpress-'.str_replace('.', '', $plugin_data['Version']);
1401
- ct_send_feedback('0:' . $apbct_agent);
1402
-
1403
- die('OK '.json_encode(array('agent' => $apbct_agent)));
1404
-
1405
- }else{
1406
- die('FAIL '. json_encode(array('error' => $upgrader->apbct_result)));
1407
- }
1408
- }
1409
-
1410
- function apbct_rc__update_settings($source) {
1411
-
1412
- global $apbct;
1413
-
1414
- foreach($apbct->def_settings as $setting => $def_value){
1415
- if(array_key_exists($setting, $source)){
1416
- $var = $source[$setting];
1417
- $type = gettype($def_value);
1418
- settype($var, $type);
1419
- if($type == 'string')
1420
- $var = preg_replace(array('/=/', '/`/'), '', $var);
1421
- $apbct->settings[$setting] = $var;
1422
- }
1423
- }
1424
-
1425
- $apbct->save('settings');
1426
-
1427
- return true;
1428
- }
1429
-
1430
- function apbct_rc__insert_auth_key($key, $plugin){
1431
-
1432
- global $apbct;
1433
-
1434
- if($plugin === 'security-malware-firewall/security-malware-firewall.php'){
1435
-
1436
- require_once (ABSPATH .'/wp-admin/includes/plugin.php');
1437
-
1438
- if(is_plugin_active( $plugin )){
1439
-
1440
- $key = trim($key);
1441
-
1442
- if($key && preg_match('/^[a-z\d]{3,15}$/', $key)){
1443
-
1444
- $result = \Cleantalk\ApbctWP\API::method__notice_paid_till(
1445
- $key,
1446
- preg_replace('/http[s]?:\/\//', '', get_option('siteurl'), 1), // Site URL
1447
- 'security'
1448
- );
1449
-
1450
- if( empty( $result['error'] ) ) {
1451
-
1452
- if( $result['valid'] ){
1453
-
1454
- // Set account params
1455
- $data = get_option('spbc_data', array());
1456
- $data['user_token'] = $result['user_token'];
1457
- $data['notice_show'] = $result['show_notice'];
1458
- $data['notice_renew'] = $result['renew'];
1459
- $data['notice_trial'] = $result['trial'];
1460
- $data['auto_update_app'] = isset($result['show_auto_update_notice']) ? $result['show_auto_update_notice'] : 0;
1461
- $data['service_id'] = $result['service_id'];
1462
- $data['moderate'] = $result['moderate'];
1463
- $data['auto_update_app '] = isset($result['auto_update_app']) ? $result['auto_update_app'] : 0;
1464
- $data['license_trial'] = isset($result['license_trial']) ? $result['license_trial'] : 0;
1465
- $data['account_name_ob'] = isset($result['account_name_ob']) ? $result['account_name_ob'] : '';
1466
- $data['key_is_ok'] = true;
1467
- update_option('spbc_data', $data);
1468
-
1469
- // Set key
1470
- $settings = get_option('spbc_settings', array());
1471
- $settings['spbc_key'] = $key;
1472
- update_option('spbc_settings', $settings);
1473
-
1474
- return 'OK';
1475
- }else
1476
- return array('error' => 'KEY_IS_NOT_VALID');
1477
- }else
1478
- return array('error' => $result);
1479
- }else
1480
- return array('error' => 'KEY_IS_NOT_CORRECT');
1481
- }else
1482
- return array('error' => 'PLUGIN_IS_NOT_ACTIVE_OR_NOT_INSTALLED');
1483
- }else
1484
- return array('error' => 'PLUGIN_SLUG_INCORRECT');
1485
- }
1486
-
1487
- /**
1488
- * Putting Wordpress to maintenance mode.
1489
- * For given duration in seconds
1490
- *
1491
- * @param $duration
1492
- *
1493
- * @return bool
1494
- */
1495
- function apbct_maintance_mode__enable( $duration ) {
1496
- apbct_maintance_mode__disable();
1497
- $content = "<?php\n\n"
1498
- . '$upgrading = ' . (time() - ( 60 * 10 ) + $duration) . ';';
1499
-
1500
- return (bool)file_put_contents( ABSPATH . '.maintenance', $content );
1501
- }
1502
-
1503
- /**
1504
- * Disabling maintenance mode by deleting .maintenance file.
1505
- *
1506
- * @return void
1507
- */
1508
- function apbct_maintance_mode__disable() {
1509
- $maintenance_file = ABSPATH . '.maintenance';
1510
- if ( file_exists( $maintenance_file ) ) {
1511
- unlink( $maintenance_file );
1512
- }
1513
- }
1514
-
1515
- function cleantalk_get_brief_data(){
1516
-
1517
- global $apbct;
1518
-
1519
- $apbct->data['brief_data'] = \Cleantalk\ApbctWP\API::method__get_antispam_report_breif($apbct->api_key);
1520
- $apbct->saveData();
1521
-
1522
- return;
1523
- }
1524
-
1525
- //Delete cookie for admin trial notice
1526
- function apbct__hook__wp_logout__delete_trial_notice_cookie(){
1527
- if(!headers_sent())
1528
- setcookie('ct_trial_banner_closed', '', time()-3600);
1529
- }
1530
-
1531
- function apbct_alt_session__id__get(){
1532
- $id = \Cleantalk\ApbctWP\Helper::ip__get(array('real'))
1533
- .apbct_get_server_variable( 'HTTP_USER_AGENT' )
1534
- .apbct_get_server_variable( 'HTTP_ACCEPT_LANGUAGE' );
1535
- return hash('sha256', $id);
1536
- }
1537
-
1538
- function apbct_alt_sessions__remove_old(){
1539
- if(rand(0, 1000) < APBCT_SEESION__CHANCE_TO_CLEAN){
1540
- global $wpdb;
1541
- $wpdb->query(
1542
- 'DELETE
1543
- FROM `'. APBCT_TBL_SESSIONS .'`
1544
- WHERE last_update < NOW() - INTERVAL '. APBCT_SEESION__LIVE_TIME .' SECOND
1545
- LIMIT 100000;'
1546
- );
1547
- }
1548
- }
1549
-
1550
- function apbct_alt_session__save($name, $value){
1551
-
1552
- global $wpdb;
1553
-
1554
- $session_id = apbct_alt_session__id__get();
1555
-
1556
- $wpdb->query(
1557
- $wpdb->prepare(
1558
- 'INSERT INTO '. APBCT_TBL_SESSIONS .'
1559
- (id, name, value, last_update)
1560
- VALUES (%s, %s, %s, %s)
1561
- ON DUPLICATE KEY UPDATE
1562
- value = %s,
1563
- last_update = %s',
1564
- $session_id, $name, $value, date('Y-m-d H:i:s'), $value, date('Y-m-d H:i:s')
1565
- )
1566
- );
1567
-
1568
- }
1569
-
1570
- function apbct_alt_session__get($name){
1571
- global $wpdb;
1572
- $session_id = apbct_alt_session__id__get();
1573
- $result = $wpdb->get_row(
1574
- $wpdb->prepare(
1575
- 'SELECT value
1576
- FROM `'. APBCT_TBL_SESSIONS .'`
1577
- WHERE id = %s AND name = %s;',
1578
- $session_id, $name
1579
- ),
1580
- OBJECT
1581
- );
1582
-
1583
- $result = isset($result->value)
1584
- ? strpos($result->value, '{') === 0
1585
- ? (array)json_decode($result->value, true) // JSON
1586
- : $result->value
1587
- : false;
1588
-
1589
- return $result ? $result : null;
1590
- }
1591
-
1592
- function apbct_store__urls(){
1593
-
1594
- global $apbct;
1595
-
1596
- if($apbct->settings['store_urls'] && empty($apbct->flags__url_stored) && !headers_sent()){
1597
-
1598
- // URLs HISTORY
1599
- // Get current url
1600
- $current_url = apbct_get_server_variable( 'HTTP_HOST' ) . apbct_get_server_variable( 'REQUEST_URI' );
1601
-
1602
- $current_url = $current_url ? substr($current_url, 0,256) : 'UNKNOWN';
1603
-
1604
- // Get already stored URLs
1605
- $urls = $apbct->settings['store_urls__sessions']
1606
- ? (array)apbct_alt_session__get('apbct_urls')
1607
- : (array)json_decode(filter_input(INPUT_COOKIE, 'apbct_urls'), true);
1608
-
1609
- $urls[$current_url][] = time();
1610
-
1611
- // Rotating. Saving only latest 10
1612
- $urls[$current_url] = count($urls[$current_url]) > 10 ? array_slice($urls[$current_url], 1, 10) : $urls[$current_url];
1613
- $urls = count($urls) > 10 ? array_slice($urls, 1, 10) : $urls;
1614
-
1615
- // Saving
1616
- $apbct->settings['store_urls__sessions']
1617
- ? apbct_alt_session__save('apbct_urls', json_encode($urls))
1618
- : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_urls', json_encode($urls), time()+86400*3, '/', parse_url(get_option('siteurl'),PHP_URL_HOST), false, true, 'Lax');
1619
-
1620
- // REFERER
1621
- // Get current fererer
1622
- $new_site_referer = apbct_get_server_variable( 'HTTP_REFERER' );
1623
- $new_site_referer = $new_site_referer ? $new_site_referer : 'UNKNOWN';
1624
-
1625
- // Get already stored referer
1626
- $site_referer = $apbct->settings['store_urls__sessions']
1627
- ? apbct_alt_session__get('apbct_site_referer')
1628
- : filter_input(INPUT_COOKIE, 'apbct_site_referer');
1629
-
1630
- // Save if empty
1631
- if( !$site_referer || parse_url($new_site_referer, PHP_URL_HOST) !== apbct_get_server_variable( 'HTTP_HOST' ) ){
1632
-
1633
- $apbct->settings['store_urls__sessions']
1634
- ? apbct_alt_session__save('apbct_site_referer', $new_site_referer)
1635
- : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_site_referer', $new_site_referer, time()+86400*3, '/', parse_url(get_option('siteurl'),PHP_URL_HOST), false, true, 'Lax');
1636
- }
1637
-
1638
- $apbct->flags__url_stored = true;
1639
-
1640
- }
1641
- }
1642
-
1643
- /**
1644
- * Universal method to adding cookies.
1645
- * Use \Cleantalk\Common\Helper::apbct_cookie__set() instead.
1646
- * @deprecated
1647
- */
1648
- function apbct_cookie__set($name, $value = '', $expires = 0, $path = '', $domain = null, $secure = false, $httponly = false, $samesite = 'Lax' ){
1649
-
1650
- // For PHP 7.3+ and above
1651
- if( version_compare( phpversion(), '7.3.0', '>=' ) ){
1652
-
1653
- $params = array(
1654
- 'expires' => $expires,
1655
- 'path' => $path,
1656
- 'domain' => $domain,
1657
- 'secure' => $secure,
1658
- 'httponly' => $httponly,
1659
- );
1660
-
1661
- if($samesite)
1662
- $params['samesite'] = $samesite;
1663
-
1664
- setcookie( $name, $value, $params );
1665
-
1666
- // For PHP 5.6 - 7.2
1667
- }else {
1668
- if($samesite)
1669
- $path = $path . '; samesite=' . $samesite;
1670
- setcookie( $name, $value, $expires, $path, $domain, $secure, $httponly );
1671
- }
1672
-
1673
- }
1674
-
1675
- /*
1676
- * Set Cookies test for cookie test
1677
- * Sets cookies with pararms timestamp && landing_timestamp && pervious_referer
1678
- * Sets test cookie with all other cookies
1679
- */
1680
- function apbct_cookie(){
1681
-
1682
- global $apbct;
1683
-
1684
- if($apbct->settings['store_urls__sessions'] || $apbct->settings['set_cookies__sessions'])
1685
- apbct_alt_sessions__remove_old();
1686
-
1687
- if(
1688
- empty($apbct->settings['set_cookies']) || // Do not set cookies if option is disabled (for Varnish cache).
1689
- !empty($apbct->flags__cookies_setuped) || // Cookies already set
1690
- !empty($apbct->headers_sent) // Headers sent
1691
- )
1692
- return false;
1693
-
1694
- // Prevent headers sent error
1695
- if(headers_sent($file, $line)){
1696
- $apbct->headers_sent = true;
1697
- $apbct->headers_sent__hook = current_action();
1698
- $apbct->headers_sent__where = $file.':'.$line;
1699
- return false;
1700
- }
1701
-
1702
-
1703
- // Cookie names to validate
1704
- $cookie_test_value = array(
1705
- 'cookies_names' => array(),
1706
- 'check_value' => $apbct->api_key,
1707
- );
1708
-
1709
- // We need to skip the domain attribute for prevent including the dot to the cookie's domain on the client.
1710
- $domain = null;
1711
-
1712
- // Submit time
1713
- if(empty($_POST['ct_multipage_form'])){ // Do not start/reset page timer if it is multipage form (Gravitiy forms))
1714
- $apbct_timestamp = time();
1715
- $apbct->settings['set_cookies__sessions']
1716
- ? apbct_alt_session__save('apbct_timestamp', $apbct_timestamp)
1717
- : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_timestamp', $apbct_timestamp, 0, '/', $domain, false, true, 'Lax' );
1718
- $cookie_test_value['cookies_names'][] = 'apbct_timestamp';
1719
- $cookie_test_value['check_value'] .= $apbct_timestamp;
1720
- }
1721
-
1722
- // Pervious referer
1723
- if(apbct_get_server_variable( 'HTTP_REFERER' )){
1724
- $apbct->settings['set_cookies__sessions']
1725
- ? apbct_alt_session__save('apbct_prev_referer', apbct_get_server_variable( 'HTTP_REFERER' ))
1726
- : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_prev_referer', apbct_get_server_variable( 'HTTP_REFERER' ), 0, '/', $domain, false, true, 'Lax' );
1727
- $cookie_test_value['cookies_names'][] = 'apbct_prev_referer';
1728
- $cookie_test_value['check_value'] .= apbct_get_server_variable( 'HTTP_REFERER' );
1729
- }
1730
-
1731
- // Landing time
1732
- $site_landing_timestamp = $apbct->settings['set_cookies__sessions']
1733
- ? apbct_alt_session__get('apbct_site_landing_ts')
1734
- : filter_input(INPUT_COOKIE, 'apbct_site_landing_ts');
1735
- if(!$site_landing_timestamp){
1736
- $site_landing_timestamp = time();
1737
- $apbct->settings['set_cookies__sessions']
1738
- ? apbct_alt_session__save('apbct_site_landing_ts', $site_landing_timestamp)
1739
- : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_site_landing_ts', $site_landing_timestamp, 0, '/', $domain, false, true, 'Lax' );
1740
- }
1741
- $cookie_test_value['cookies_names'][] = 'apbct_site_landing_ts';
1742
- $cookie_test_value['check_value'] .= $site_landing_timestamp;
1743
-
1744
- // Page hits
1745
- // Get
1746
- $page_hits = $apbct->settings['set_cookies__sessions']
1747
- ? apbct_alt_session__get('apbct_page_hits')
1748
- : filter_input(INPUT_COOKIE, 'apbct_page_hits');
1749
- // Set / Increase
1750
- $page_hits = intval($page_hits) ? $page_hits + 1 : 1;
1751
-
1752
- $apbct->settings['set_cookies__sessions']
1753
- ? apbct_alt_session__save('apbct_page_hits', $page_hits)
1754
- : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_page_hits', $page_hits, 0, '/', $domain, false, true, 'Lax' );
1755
-
1756
- $cookie_test_value['cookies_names'][] = 'apbct_page_hits';
1757
- $cookie_test_value['check_value'] .= $page_hits;
1758
-
1759
- // Cookies test
1760
- $cookie_test_value['check_value'] = md5($cookie_test_value['check_value']);
1761
- if(!$apbct->settings['set_cookies__sessions'])
1762
- \Cleantalk\Common\Helper::apbct_cookie__set('apbct_cookies_test', urlencode(json_encode($cookie_test_value)), 0, '/', $domain, false, true, 'Lax' );
1763
-
1764
- $apbct->flags__cookies_setuped = true;
1765
-
1766
- }
1767
-
1768
- /**
1769
- * Cookies test for sender
1770
- * Also checks for valid timestamp in $_COOKIE['apbct_timestamp'] and other apbct_ COOKIES
1771
- * @return null|0|1;
1772
- */
1773
- function apbct_cookies_test()
1774
- {
1775
- global $apbct;
1776
-
1777
- if($apbct->settings['set_cookies__sessions'])
1778
- return 1;
1779
-
1780
- if(isset($_COOKIE['apbct_cookies_test'])){
1781
-
1782
- $cookie_test = json_decode(urldecode($_COOKIE['apbct_cookies_test']),true);
1783
-
1784
- if(!is_array($cookie_test))
1785
- return 0;
1786
-
1787
- $check_srting = $apbct->api_key;
1788
- foreach($cookie_test['cookies_names'] as $cookie_name){
1789
- $check_srting .= isset($_COOKIE[$cookie_name]) ? $_COOKIE[$cookie_name] : '';
1790
- } unset($cookie_name);
1791
-
1792
- if($cookie_test['check_value'] == md5($check_srting)){
1793
- return 1;
1794
- }else{
1795
- return 0;
1796
- }
1797
- }else{
1798
- return null;
1799
- }
1800
- }
1801
-
1802
- function apbct_cookies__delete($cookie){
1803
- if(isset($_COOKIE[$cookie]))
1804
- setcookie($cookie, '', time()-3600);
1805
- }
1806
-
1807
- function apbct_cookies__delete_all(){
1808
- if(count($_COOKIE)){
1809
- foreach($_COOKIE as $key => $val){
1810
- if(preg_match("/apbct_|ct_/", $key)){
1811
- setcookie($key, '', time()-3600);
1812
- }
1813
- } unset($key, $val);
1814
- }
1815
- return false;
1816
- }
1817
-
1818
- /**
1819
- * Gets submit time
1820
- * Uses Cookies with check via apbct_cookies_test()
1821
- * @return null|int;
1822
- */
1823
- function apbct_get_submit_time()
1824
- {
1825
- global $apbct;
1826
- $apbct_timestamp = $apbct->settings['set_cookies__sessions']
1827
- ? apbct_alt_session__get('apbct_timestamp')
1828
- : filter_input(INPUT_COOKIE, 'apbct_timestamp');
1829
- return apbct_cookies_test() == 1 ? time() - (int)$apbct_timestamp : null;
1830
- }
1831
-
1832
- /*
1833
- * Inner function - Account status check
1834
- * Scheduled in 1800 seconds for default!
1835
- */
1836
- function ct_account_status_check($api_key = null, $process_errors = true){
1837
-
1838
- global $apbct;
1839
-
1840
- $api_key = $api_key ? $api_key : $apbct->api_key;
1841
- $result = \Cleantalk\ApbctWP\API::method__notice_paid_till(
1842
- $api_key,
1843
- preg_replace('/http[s]?:\/\//', '', get_option('siteurl'), 1),
1844
- ! is_main_site() && $apbct->white_label ? 'anti-spam-hosting' : 'antispam'
1845
- );
1846
-
1847
- if(empty($result['error']) || !empty($result['valid'])){
1848
-
1849
- // Notices
1850
- $apbct->data['notice_show'] = isset($result['show_notice']) ? (int)$result['show_notice'] : 0;
1851
- $apbct->data['notice_renew'] = isset($result['renew']) ? (int)$result['renew'] : 0;
1852
- $apbct->data['notice_trial'] = isset($result['trial']) ? (int)$result['trial'] : 0;
1853
- $apbct->data['notice_review'] = isset($result['show_review']) ? (int)$result['show_review'] : 0;
1854
- $apbct->data['notice_auto_update'] = isset($result['show_auto_update_notice']) ? (int)$result['show_auto_update_notice'] : 0;
1855
-
1856
- // Other
1857
- $apbct->data['service_id'] = isset($result['service_id']) ? (int)$result['service_id'] : 0;
1858
- $apbct->data['valid'] = isset($result['valid']) ? (int)$result['valid'] : 0;
1859
- $apbct->data['moderate'] = isset($result['moderate']) ? (int)$result['moderate'] : 0;
1860
- $apbct->data['ip_license'] = isset($result['ip_license']) ? (int)$result['ip_license'] : 0;
1861
- $apbct->data['moderate_ip'] = isset($result['moderate_ip'], $result['ip_license']) ? (int)$result['moderate_ip'] : 0;
1862
- $apbct->data['spam_count'] = isset($result['spam_count']) ? (int)$result['spam_count'] : 0;
1863
- $apbct->data['auto_update'] = isset($result['auto_update_app']) ? (int)$result['auto_update_app'] : 0;
1864
- $apbct->data['user_token'] = isset($result['user_token']) ? (string)$result['user_token'] : '';
1865
- $apbct->data['license_trial'] = isset($result['license_trial']) ? (int)$result['license_trial'] : 0;
1866
- $apbct->data['account_name_ob'] = isset($result['account_name_ob']) ? (string)$result['account_name_ob'] : '';
1867
-
1868
- Cron::updateTask('check_account_status', 'ct_account_status_check', 86400);
1869
-
1870
- $apbct->error_delete('account_check', 'save');
1871
-
1872
- $apbct->saveData();
1873
-
1874
- }elseif($process_errors){
1875
- $apbct->error_add('account_check', $result);
1876
- }
1877
-
1878
- if(!empty($result['valid'])){
1879
- $apbct->data['key_is_ok'] = true;
1880
- $result = true;
1881
- }else{
1882
- $apbct->data['key_is_ok'] = false;
1883
- $result = false;
1884
- }
1885
-
1886
- return $result;
1887
- }
1888
-
1889
- function ct_mail_send_connection_report() {
1890
-
1891
- global $apbct;
1892
-
1893
- if (($apbct->settings['send_connection_reports'] == 1 && $apbct->connection_reports['negative'] > 0) || !empty($_GET['ct_send_connection_report']))
1894
- {
1895
- $to = "welcome@cleantalk.org" ;
1896
- $subject = "Connection report for " . apbct_get_server_variable( 'HTTP_HOST' );
1897
- $message = '
1898
- <html>
1899
- <head>
1900
- <title></title>
1901
- </head>
1902
- <body>
1903
- <p>From '.$apbct->connection_reports['since'].' to '.date('d M').' has been made '.($apbct->connection_reports['success']+$apbct->connection_reports['negative']).' calls, where '.$apbct->connection_reports['success'].' were success and '.$apbct->connection_reports['negative'].' were negative</p>
1904
- <p>Negative report:</p>
1905
- <table> <tr>
1906
- <td>&nbsp;</td>
1907
- <td><b>Date</b></td>
1908
- <td><b>Page URL</b></td>
1909
- <td><b>Library report</b></td>
1910
- <td><b>Server IP</b></td>
1911
- </tr>
1912
- ';
1913
- foreach ($apbct->connection_reports['negative_report'] as $key => $report)
1914
- {
1915
- $message.= '<tr>'
1916
- . '<td>'.($key+1).'.</td>'
1917
- . '<td>'.$report['date'].'</td>'
1918
- . '<td>'.$report['page_url'].'</td>'
1919
- . '<td>'.$report['lib_report'].'</td>'
1920
- . '<td>'.$report['work_url'].'</td>'
1921
- . '</tr>';
1922
- }
1923
- $message.='</table></body></html>';
1924
-
1925
- $headers = 'Content-type: text/html; charset=windows-1251 \r\n';
1926
- $headers .= 'From: '.get_option('admin_email');
1927
- mail($to, $subject, $message, $headers);
1928
- }
1929
-
1930
- $apbct->data['connection_reports'] = $apbct->def_data['connection_reports'];
1931
- $apbct->data['connection_reports']['since'] = date('d M');
1932
- $apbct->saveData();
1933
- }
1934
-
1935
- //* Write $message to the plugin's debug option
1936
- function apbct_log($message = 'empty', $func = null, $params = array())
1937
- {
1938
- global $apbct;
1939
-
1940
- $debug = get_option( APBCT_DEBUG );
1941
-
1942
- $function = $func ? $func : '';
1943
- $cron = in_array('cron', $params) ? true : false;
1944
- $data = in_array('data', $params) ? true : false;
1945
- $settings = in_array('settings', $params) ? true : false;
1946
-
1947
- if(is_array($message) or is_object($message))
1948
- $message = print_r($message, true);
1949
-
1950
- if($message) $debug[date("H:i:s", microtime(true))."_ACTION_".strval(current_action())."_FUNCTION_".strval($func)] = $message;
1951
- if($cron) $debug[date("H:i:s", microtime(true))."_ACTION_".strval(current_action())."_FUNCTION_".strval($func).'_cron'] = $apbct->cron;
1952
- if($data) $debug[date("H:i:s", microtime(true))."_ACTION_".strval(current_action())."_FUNCTION_".strval($func).'_data'] = $apbct->data;
1953
- if($settings) $debug[date("H:i:s", microtime(true))."_ACTION_".strval(current_action())."_FUNCTION_".strval($func).'_settings'] = $apbct->settings;
1954
-
1955
- update_option(APBCT_DEBUG, $debug);
1956
- }
1957
-
1958
- function apbct_sfw__delete_tables( $blog_id, $drop ) {
1959
-
1960
- global $wpdb;
1961
-
1962
- $initial_blog = get_current_blog_id();
1963
-
1964
- switch_to_blog($blog_id);
1965
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_sfw`;'); // Deleting SFW data
1966
- $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_sfw_logs`;'); // Deleting SFW logs
1967
-
1968
- switch_to_blog($initial_blog);
1969
- }
1970
-
1971
- /**
1972
- * Is enable for user group
1973
- *
1974
- * @param WP_User $user
1975
- *
1976
- * @return boolean
1977
- */
1978
- function apbct_is_user_enable($user = null) {
1979
-
1980
- global $current_user;
1981
-
1982
- $user = !empty($user) ? $user : $current_user;
1983
-
1984
- return apbct_is_user_role_in(array('administrator', 'editor', 'author'), $user)
1985
- ? false
1986
- : true;
1987
- }
1988
-
1989
- /**
1990
- * Checks if the current user has role
1991
- *
1992
- * @param array $roles array of strings
1993
- * @param int|string|WP_User|mixed $user User ID to check|user_login|WP_User
1994
- *
1995
- * @return boolean Does the user has this role|roles
1996
- */
1997
- function apbct_is_user_role_in( $roles, $user = false ){
1998
-
1999
- if( is_numeric($user) && function_exists('get_userdata')) $user = get_userdata( $user );
2000
- if( is_string($user) && function_exists('get_user_by')) $user = get_user_by('login', $user );
2001
- if( ! $user && function_exists('wp_get_current_user')) $user = wp_get_current_user();
2002
- if( ! $user ) $user = apbct_wp_get_current_user();
2003
-
2004
- if( empty($user->ID) )
2005
- return false;
2006
-
2007
- foreach( (array) $roles as $role ){
2008
- if( isset($user->caps[ strtolower($role) ]) || in_array(strtolower($role), $user->roles) )
2009
- return true;
2010
- }
2011
-
2012
- return false;
2013
- }
2014
-
2015
- /**
2016
- * Update and rotate statistics with requests exection time
2017
- *
2018
- * @param $exec_time
2019
- */
2020
- function apbct_statistics__rotate($exec_time){
2021
-
2022
- global $apbct;
2023
-
2024
- // Delete old stats
2025
- if(min(array_keys($apbct->stats['requests'])) < time() - (86400 * 7))
2026
- unset($apbct->stats['requests'][min(array_keys($apbct->stats['requests']))]);
2027
-
2028
- // Create new if newest older than 1 day
2029
- if(empty($apbct->stats['requests']) || max(array_keys($apbct->stats['requests'])) < time() - (86400 * 1))
2030
- $apbct->stats['requests'][time()] = array('amount' => 0, 'average_time' => 0);
2031
-
2032
- // Update all existing stats
2033
- foreach($apbct->stats['requests'] as &$weak_stat){
2034
- $weak_stat['average_time'] = ($weak_stat['average_time'] * $weak_stat['amount'] + $exec_time) / ++$weak_stat['amount'];
2035
- }
2036
-
2037
- $apbct->save('stats');
2038
- }
2039
-
2040
- /**
2041
- * Runs update actions for new version.
2042
- *
2043
- * @global \Cleantalk\ApbctWP\State $apbct
2044
- */
2045
- function apbct_update_actions(){
2046
-
2047
- global $apbct;
2048
-
2049
- // Update logic
2050
- if($apbct->plugin_version != APBCT_VERSION){
2051
-
2052
- // Main blog
2053
- if(is_main_site()){
2054
-
2055
- require_once(CLEANTALK_PLUGIN_DIR.'inc/cleantalk-updater.php');
2056
-
2057
- $result = apbct_run_update_actions($apbct->plugin_version, APBCT_VERSION);
2058
-
2059
- //If update is successfull
2060
- if($result === true)
2061
- apbct_update__set_version__from_plugin('from_plugin');
2062
-
2063
- ct_send_feedback('0:' . APBCT_AGENT ); // Send feedback to let cloud know about updated version.
2064
-
2065
- // Side blogs
2066
- }else{
2067
- apbct_update__set_version__from_plugin('from_plugin');
2068
- }
2069
- }
2070
-
2071
- }
2072
-
2073
- /**
2074
- * Set version of plugin in database
2075
- *
2076
- * @param string $ver
2077
- *
2078
- * @return bool
2079
- * @global \Cleantalk\ApbctWP\State $apbct
2080
- *
2081
- */
2082
- function apbct_update__set_version__from_plugin($ver){
2083
- global $apbct;
2084
- switch (true){
2085
- case $ver === 'from_plugin':
2086
- $apbct->data['plugin_version'] = APBCT_VERSION;
2087
- break;
2088
- case preg_match('/^\d+\.\d+(\.\d+)?(-[a-zA-Z0-9-_]+)?$/', $ver) === 1;
2089
- $apbct->data['plugin_version'] = $ver;
2090
- break;
2091
- default:
2092
- return false;
2093
- break;
2094
- }
2095
- $apbct->saveData();
2096
- return true;
2097
- }
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Anti-Spam by CleanTalk
4
+ Plugin URI: https://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.143.1
7
+ Author: СleanTalk <welcome@cleantalk.org>
8
+ Author URI: https://cleantalk.org
9
+ Text Domain: cleantalk-spam-protect
10
+ Domain Path: /i18n
11
+ */
12
+
13
+ use Cleantalk\ApbctWP\CleantalkUpgrader;
14
+ use Cleantalk\ApbctWP\CleantalkUpgraderSkin;
15
+ use Cleantalk\ApbctWP\CleantalkUpgraderSkin_Deprecated;
16
+ use Cleantalk\ApbctWP\Cron;
17
+
18
+ $cleantalk_executed = false;
19
+
20
+ // Getting version form main file (look above)
21
+ $plugin_info = get_file_data(__FILE__, array('Version' => 'Version', 'Name' => 'Plugin Name',));
22
+
23
+ // Common params
24
+ define('APBCT_NAME', $plugin_info['Name']);
25
+ define('APBCT_VERSION', $plugin_info['Version']);
26
+ define('APBCT_URL_PATH', plugins_url('', __FILE__)); //HTTP path. Plugin root folder without '/'.
27
+ define('APBCT_DIR_PATH', dirname(__FILE__ ) . '/'); //System path. Plugin root folder with '/'.
28
+ define('APBCT_PLUGIN_BASE_NAME', plugin_basename(__FILE__)); //Plugin base name.
29
+ define('APBCT_CASERT_PATH', file_exists(ABSPATH . WPINC . '/certificates/ca-bundle.crt') ? ABSPATH . WPINC . '/certificates/ca-bundle.crt' : ''); // SSL Serttificate path
30
+
31
+ // API params
32
+ define('APBCT_AGENT', 'wordpress-'.str_replace('.', '', $plugin_info['Version']));
33
+ define('APBCT_MODERATE_URL', 'http://moderate.cleantalk.org'); //Api URL
34
+
35
+ // Option names
36
+ define('APBCT_DATA', 'cleantalk_data'); //Option name with different plugin data.
37
+ define('APBCT_SETTINGS', 'cleantalk_settings'); //Option name with plugin settings.
38
+ define('APBCT_NETWORK_SETTINGS', 'cleantalk_network_settings'); //Option name with plugin network settings.
39
+ define('APBCT_DEBUG', 'cleantalk_debug'); //Option name with a debug data. Empty by default.
40
+
41
+ // Multisite
42
+ define('APBCT_WPMS', (is_multisite() ? true : false)); // WMPS is enabled
43
+
44
+ // Sessions
45
+ define('APBCT_SEESION__LIVE_TIME', 86400*2);
46
+ define('APBCT_SEESION__CHANCE_TO_CLEAN', 100);
47
+
48
+ // Different params
49
+ define('APBCT_REMOTE_CALL_SLEEP', 5); // Minimum time between remote call
50
+
51
+ if( !defined( 'CLEANTALK_PLUGIN_DIR' ) ){
52
+
53
+ define('CLEANTALK_PLUGIN_DIR', dirname(__FILE__ ) . '/');
54
+
55
+ // PHP functions patches
56
+ require_once(CLEANTALK_PLUGIN_DIR . 'lib/cleantalk-php-patch.php'); // Pathces fpr different functions which not exists
57
+
58
+ // Base classes
59
+ require_once(CLEANTALK_PLUGIN_DIR . 'lib/autoloader.php'); // Autoloader
60
+
61
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-pluggable.php'); // Pluggable functions
62
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-common.php');
63
+
64
+ // Global ArrayObject with settings and other global varables
65
+ global $apbct;
66
+ $apbct = new \Cleantalk\ApbctWP\State('cleantalk', array('settings', 'data', 'debug', 'errors', 'remote_calls', 'stats'));
67
+
68
+ $apbct->base_name = 'cleantalk-spam-protect/cleantalk.php';
69
+
70
+ $apbct->logo = plugin_dir_url(__FILE__) . 'inc/images/logo.png';
71
+ $apbct->logo__small = plugin_dir_url(__FILE__) . 'inc/images/logo_small.png';
72
+ $apbct->logo__small__colored = plugin_dir_url(__FILE__) . 'inc/images/logo_color.png';
73
+
74
+ // Customize \Cleantalk\ApbctWP\State
75
+ // Account status
76
+
77
+ $apbct->white_label = $apbct->network_settings['white_label'];
78
+ $apbct->allow_custom_key = $apbct->network_settings['allow_custom_key'];
79
+ $apbct->plugin_name = $apbct->network_settings['white_label__plugin_name'] ? $apbct->network_settings['white_label__plugin_name'] : APBCT_NAME;
80
+ $apbct->api_key = !APBCT_WPMS || $apbct->allow_custom_key || $apbct->white_label ? $apbct->settings['apikey'] : $apbct->network_settings['apikey'];
81
+ $apbct->key_is_ok = !APBCT_WPMS || $apbct->allow_custom_key || $apbct->white_label ? $apbct->data['key_is_ok'] : $apbct->network_data['key_is_ok'];
82
+ $apbct->moderate = !APBCT_WPMS || $apbct->allow_custom_key || $apbct->white_label ? $apbct->data['moderate'] : $apbct->network_data['moderate'];
83
+
84
+ $apbct->data['user_counter']['since'] = isset($apbct->data['user_counter']['since']) ? $apbct->data['user_counter']['since'] : date('d M');
85
+ $apbct->data['connection_reports']['since'] = isset($apbct->data['connection_reports']['since']) ? $apbct->data['user_counter']['since'] : date('d M');
86
+
87
+ $apbct->settings_link = is_network_admin() ? 'settings.php?page=cleantalk' : 'options-general.php?page=cleantalk';
88
+
89
+ if(!$apbct->white_label){
90
+ require_once( CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-widget.php');
91
+ }
92
+
93
+ // Disabling comments
94
+ if($apbct->settings['disable_comments__all'] || $apbct->settings['disable_comments__posts'] || $apbct->settings['disable_comments__pages'] || $apbct->settings['disable_comments__media']){
95
+ \Cleantalk\Antispam\DisableComments::getInstance();
96
+ }
97
+
98
+ // Passing JS key to frontend
99
+ add_action('wp_ajax_apbct_js_keys__get', 'apbct_js_keys__get__ajax');
100
+ add_action('wp_ajax_nopriv_apbct_js_keys__get', 'apbct_js_keys__get__ajax');
101
+
102
+ // Database prefix
103
+ global $wpdb;
104
+ $apbct->db_prefix = !APBCT_WPMS || $apbct->allow_custom_key || $apbct->white_label ? $wpdb->prefix : $wpdb->base_prefix;
105
+ $apbct->db_prefix = !$apbct->white_label && defined('CLEANTALK_ACCESS_KEY') ? $wpdb->base_prefix : $wpdb->prefix;
106
+ // Database constants
107
+ define('APBCT_TBL_FIREWALL_DATA', $apbct->db_prefix . 'cleantalk_sfw'); // Table with firewall data.
108
+ define('APBCT_TBL_FIREWALL_LOG', $apbct->db_prefix . 'cleantalk_sfw_logs'); // Table with firewall logs.
109
+ define('APBCT_TBL_AC_LOG', $apbct->db_prefix . 'cleantalk_ac_log'); // Table with firewall logs.
110
+ define('APBCT_TBL_SESSIONS', $apbct->db_prefix . 'cleantalk_sessions'); // Table with session data.
111
+ define('APBCT_SPAMSCAN_LOGS', $apbct->db_prefix . 'cleantalk_spamscan_logs'); // Table with session data.
112
+ define('APBCT_SELECT_LIMIT', 5000); // Select limit for logs.
113
+ define('APBCT_WRITE_LIMIT', 5000); // Write limit for firewall data.
114
+
115
+ /** @todo HARDCODE FIX */
116
+ if($apbct->plugin_version === '1.0.0')
117
+ $apbct->plugin_version = '5.100';
118
+
119
+ // Do update actions if version is changed
120
+ apbct_update_actions();
121
+
122
+ // Self cron
123
+ if(!defined('DOING_CRON') || (defined('DOING_CRON') && DOING_CRON !== true)){
124
+
125
+ $ct_cron = new Cron();
126
+ $ct_cron->checkTasks();
127
+
128
+ if(!empty($ct_cron->tasks_to_run)){
129
+
130
+ define('CT_CRON', true); // Letting know functions that they are running under CT_CRON
131
+ $ct_cron->runTasks();
132
+ unset($ct_cron);
133
+
134
+ }
135
+ }
136
+
137
+ //Delete cookie for admin trial notice
138
+ add_action('wp_logout', 'apbct__hook__wp_logout__delete_trial_notice_cookie');
139
+
140
+ // Set cookie only for public pages and for non-AJAX requests
141
+ if (!is_admin() && !apbct_is_ajax() && !defined('DOING_CRON')
142
+ && empty($_POST['ct_checkjs_register_form']) // Buddy press registration fix
143
+ && empty($_GET['ct_checkjs_search_default']) // Search form fix
144
+ && empty($_POST['action']) //bbPress
145
+ ){
146
+ add_action('template_redirect','apbct_cookie', 2);
147
+ add_action('template_redirect','apbct_store__urls', 2);
148
+ if (empty($_POST) && empty($_GET)){
149
+ apbct_cookie();
150
+ apbct_store__urls();
151
+ }
152
+ }
153
+
154
+ // Early checks
155
+
156
+ // Iphorm
157
+ if( isset( $_POST['iphorm_ajax'], $_POST['iphorm_id'], $_POST['iphorm_uid'] ) ){
158
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
159
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-ajax.php');
160
+ ct_ajax_hook();
161
+ }
162
+
163
+ // Facebook
164
+ if ($apbct->settings['general_contact_forms_test'] == 1
165
+ && (!empty($_POST['action']) && $_POST['action'] == 'fb_intialize')
166
+ && !empty($_POST['FB_userdata'])
167
+ ){
168
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
169
+ if (apbct_is_user_enable()){
170
+ $ct_check_post_result=false;
171
+ ct_registration_errors(null);
172
+ }
173
+
174
+ }
175
+
176
+ $apbct_active_integrations = array(
177
+ 'ContactBank' => array( 'hook' => 'contact_bank_frontend_ajax_call', 'ajax' => true ),
178
+ 'FluentForm' => array( 'hook' => 'fluentform_before_insert_submission', 'ajax' => false ),
179
+ 'ElfsightContactForm' => array( 'hook' => 'elfsight_contact_form_mail', 'ajax' => true ),
180
+ 'SimpleMembership' => array( 'hook' => 'swpm_front_end_registration_complete_user_data', 'ajax' => false )
181
+ );
182
+ new \Cleantalk\Antispam\Integrations( $apbct_active_integrations );
183
+
184
+ // Ninja Forms. Making GET action to POST action
185
+ if( apbct_is_in_uri( 'admin-ajax.php' ) && sizeof($_POST) > 0 && isset($_GET['action']) && $_GET['action']=='ninja_forms_ajax_submit' )
186
+ $_POST['action']='ninja_forms_ajax_submit';
187
+
188
+ add_action( 'wp_ajax_nopriv_ninja_forms_ajax_submit', 'apbct_form__ninjaForms__testSpam', 1);
189
+ add_action( 'wp_ajax_ninja_forms_ajax_submit', 'apbct_form__ninjaForms__testSpam', 1);
190
+ add_action( 'wp_ajax_nopriv_nf_ajax_submit', 'apbct_form__ninjaForms__testSpam', 1);
191
+ add_action( 'wp_ajax_nf_ajax_submit', 'apbct_form__ninjaForms__testSpam', 1);
192
+ add_action( 'ninja_forms_process', 'apbct_form__ninjaForms__testSpam', 1); // Depricated ?
193
+
194
+ // SeedProd Coming Soon Page Pro integration
195
+ add_action( 'wp_ajax_seed_cspv5_subscribe_callback', 'apbct_form__seedprod_coming_soon__testSpam', 1 );
196
+ add_action( 'wp_ajax_nopriv_seed_cspv5_subscribe_callback', 'apbct_form__seedprod_coming_soon__testSpam', 1 );
197
+ add_action( 'wp_ajax_seed_cspv5_contactform_callback', 'apbct_form__seedprod_coming_soon__testSpam', 1 );
198
+ add_action( 'wp_ajax_nopriv_seed_cspv5_contactform_callback', 'apbct_form__seedprod_coming_soon__testSpam', 1 );
199
+
200
+ // The 7 theme contact form integration
201
+ add_action( 'wp_ajax_nopriv_dt_send_mail', 'apbct_form__the7_contact_form', 1 );
202
+ add_action( 'wp_ajax_dt_send_mail', 'apbct_form__the7_contact_form', 1 );
203
+
204
+ // Elementor Pro page builder forms
205
+ add_action( 'wp_ajax_elementor_pro_forms_send_form', 'apbct_form__elementor_pro__testSpam' );
206
+ add_action( 'wp_ajax_nopriv_elementor_pro_forms_send_form', 'apbct_form__elementor_pro__testSpam' );
207
+
208
+ // Custom register form (ticket_id=13668)
209
+ add_action('website_neotrends_signup_fields_check',function( $username, $fields ){
210
+ $ip = \Cleantalk\ApbctWP\Helper::ip__get( array('real'), false );
211
+ $ct_result = ct_test_registration( $username, $fields['email'], $ip );
212
+ if( $ct_result['allow'] == 0 ) {
213
+ ct_die_extended( $ct_result['comment'] );
214
+ }
215
+ }, 1, 2);
216
+
217
+ // INEVIO theme integration
218
+ add_action( 'wp_ajax_contact_form_handler', 'apbct_form__inevio__testSpam', 1 );
219
+ add_action( 'wp_ajax_nopriv_contact_form_handler', 'apbct_form__inevio__testSpam', 1 );
220
+
221
+ // Enfold Theme contact form
222
+ add_filter( 'avf_form_send', 'apbct_form__enfold_contact_form__test_spam', 4, 10 );
223
+
224
+ //Hooks for updating/adding settings
225
+ //add_action ('added_option', 'apbct_after_options_added', 10, 2);
226
+ //add_action ('updated_option', 'apbct_after_options_updated', 10, 3);
227
+
228
+ // Public actions
229
+ if(!is_admin() && !apbct_is_ajax()){
230
+
231
+ // Default search
232
+ //add_filter( 'get_search_form', 'apbct_forms__search__addField' );
233
+ add_filter( 'get_search_query', 'apbct_forms__search__testSpam' );
234
+ add_action( 'wp_head', 'apbct_search_add_noindex', 1 );
235
+
236
+ // Remote calls
237
+ if(isset($_GET['spbc_remote_call_token'], $_GET['spbc_remote_call_action'], $_GET['plugin_name']) && in_array($_GET['plugin_name'], array('antispam','anti-spam', 'apbct'))){
238
+ apbct_remote_call__perform();
239
+ }
240
+
241
+ // SpamFireWall check
242
+ if( $apbct->plugin_version == APBCT_VERSION && // Do not call with first start
243
+ $apbct->settings['spam_firewall'] == 1 &&
244
+ apbct_is_get() &&
245
+ ! apbct_wp_doing_cron()
246
+ ){
247
+ apbct_sfw__check();
248
+ }
249
+
250
+ }
251
+
252
+
253
+ // Activation/deactivation functions must be in main plugin file.
254
+ // http://codex.wordpress.org/Function_Reference/register_activation_hook
255
+ register_activation_hook( __FILE__, 'apbct_activation' );
256
+ register_deactivation_hook( __FILE__, 'apbct_deactivation' );
257
+
258
+ // Hook for newly added blog
259
+ add_action('wpmu_new_blog', 'apbct_activation__new_blog', 10, 6);
260
+
261
+ // Async loading for JavaScript
262
+ add_filter('script_loader_tag', 'apbct_add_async_attribute', 10, 3);
263
+
264
+ // Redirect admin to plugin settings.
265
+ if(!defined('WP_ALLOW_MULTISITE') || defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE == false)
266
+ add_action('admin_init', 'apbct_plugin_redirect');
267
+
268
+ // Deleting SFW tables when deleting websites
269
+ if(defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE === true)
270
+ add_action( 'delete_blog', 'apbct_sfw__delete_tables', 10, 2 );
271
+
272
+ // After plugin loaded - to load locale as described in manual
273
+ add_action('plugins_loaded', 'apbct_plugin_loaded' );
274
+
275
+ if( !empty($apbct->settings['use_ajax']) &&
276
+ ! apbct_is_in_uri( '.xml' ) &&
277
+ ! apbct_is_in_uri( '.xsl' ) )
278
+ {
279
+ add_action( 'wp_ajax_nopriv_ct_get_cookie', 'ct_get_cookie',1 );
280
+ add_action( 'wp_ajax_ct_get_cookie', 'ct_get_cookie',1 );
281
+ }
282
+
283
+ // Admin panel actions
284
+ if (is_admin() || is_network_admin()){
285
+
286
+ require_once( CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-find-spam.php' );
287
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-admin.php');
288
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-settings.php');
289
+
290
+ add_action( 'admin_init', 'apbct_admin__init___ajax_actions' );
291
+
292
+ if (!(defined( 'DOING_AJAX' ) && DOING_AJAX)){
293
+
294
+ add_action('admin_enqueue_scripts', 'apbct_admin__enqueue_scripts');
295
+
296
+ add_action('admin_init', 'apbct_admin__init', 1);
297
+ add_action('admin_menu', 'apbct_settings_add_page');
298
+ add_action('network_admin_menu', 'apbct_settings_add_page');
299
+ add_action('admin_notices', 'apbct_admin__notice_message');
300
+ add_action('network_admin_notices', 'apbct_admin__notice_message');
301
+
302
+ //Show widget only if enables and not IP license
303
+ if( $apbct->settings['dashboard_widget__show'] && ! $apbct->moderate_ip )
304
+ add_action('wp_dashboard_setup', 'ct_dashboard_statistics_widget' );
305
+ }
306
+
307
+ if(apbct_is_ajax() || isset($_POST['cma-action'])){
308
+
309
+ $cleantalk_hooked_actions = array();
310
+ $cleantalk_ajax_actions_to_check = array();
311
+
312
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
313
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-ajax.php');
314
+
315
+ // Feedback for comments
316
+ if(isset($_POST['action']) && $_POST['action'] == 'ct_feedback_comment'){
317
+ add_action( 'wp_ajax_nopriv_ct_feedback_comment', 'apbct_comment__send_feedback',1 );
318
+ add_action( 'wp_ajax_ct_feedback_comment', 'apbct_comment__send_feedback',1 );
319
+ }
320
+ if(isset($_POST['action']) && $_POST['action'] == 'ct_feedback_user'){
321
+ add_action( 'wp_ajax_nopriv_ct_feedback_user', 'apbct_user__send_feedback',1 );
322
+ add_action( 'wp_ajax_ct_feedback_user', 'apbct_user__send_feedback',1 );
323
+ }
324
+
325
+ // Check AJAX requests
326
+ // if User is not logged in
327
+ // if Unknown action or Known action with mandatory check
328
+ if( ( ! apbct_is_user_logged_in() || $apbct->settings['protect_logged_in'] == 1) &&
329
+ isset( $_POST['action'] ) &&
330
+ ( ! in_array( $_POST['action'], $cleantalk_hooked_actions ) || in_array( $_POST['action'], $cleantalk_ajax_actions_to_check ) ) &&
331
+ ! array_search( $_POST['action'], array_column( $apbct_active_integrations, 'hook' ) )
332
+ ){
333
+ ct_ajax_hook();
334
+ }
335
+
336
+ //QAEngine Theme answers
337
+ if (intval($apbct->settings['general_contact_forms_test']))
338
+ add_filter('et_pre_insert_question', 'ct_ajax_hook', 1, 1); // Questions
339
+ add_filter('et_pre_insert_answer', 'ct_ajax_hook', 1, 1); // Answers
340
+
341
+ // Formidable
342
+ add_filter( 'frm_entries_before_create', 'apbct_rorm__formidable__testSpam', 10, 2 );
343
+ add_action( 'frm_entries_footer_scripts', 'apbct_rorm__formidable__footerScripts', 20, 2 );
344
+
345
+ // Some of plugins to register a users use AJAX context.
346
+ add_filter('registration_errors', 'ct_registration_errors', 1, 3);
347
+ add_filter('registration_errors', 'ct_check_registration_erros', 999999, 3);
348
+ add_action('user_register', 'apbct_user_register');
349
+
350
+ if(class_exists('BuddyPress')){
351
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
352
+ add_filter('bp_activity_is_spam_before_save', 'apbct_integration__buddyPres__activityWall', 999 ,2); /* ActivityWall */
353
+ add_action('bp_locate_template', 'apbct_integration__buddyPres__getTemplateName', 10, 6);
354
+ }
355
+
356
+ }
357
+
358
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
359
+ //Bitrix24 contact form
360
+ if ($apbct->settings['general_contact_forms_test'] == 1 &&
361
+ !empty($_POST['your-phone']) &&
362
+ !empty($_POST['your-email']) &&
363
+ !empty($_POST['your-message'])
364
+ ){
365
+ $ct_check_post_result=false;
366
+ ct_contact_form_validate();
367
+ }
368
+
369
+ // Sends feedback to the cloud about comments
370
+ // add_action('wp_set_comment_status', 'ct_comment_send_feedback', 10, 2);
371
+
372
+ // Sends feedback to the cloud about deleted users
373
+ global $pagenow;
374
+ if($pagenow=='users.php')
375
+ add_action('delete_user', 'apbct_user__delete__hook', 10, 2);
376
+
377
+ if( $pagenow=='plugins.php' || apbct_is_in_uri( 'plugins.php' ) ){
378
+
379
+ add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'apbct_admin__plugin_action_links', 10, 2);
380
+ add_filter('network_admin_plugin_action_links_'.plugin_basename(__FILE__), 'apbct_admin__plugin_action_links', 10, 2);
381
+
382
+ add_filter('plugin_row_meta', 'apbct_admin__register_plugin_links', 10, 2);
383
+ }
384
+
385
+ // Public pages actions
386
+ }else{
387
+
388
+ require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
389
+
390
+
391
+
392
+ add_action('wp_enqueue_scripts', 'ct_enqueue_scripts_public');
393
+
394
+ // Init action.
395
+ add_action('plugins_loaded', 'apbct_init', 1);
396
+
397
+ // Comments
398
+ add_filter('preprocess_comment', 'ct_preprocess_comment', 1, 1); // param - comment data array
399
+ add_filter('comment_text', 'ct_comment_text' );
400
+ add_filter('wp_die_handler', 'apbct_comment__sanitize_data__before_wp_die', 1); // Check comments after validation
401
+
402
+ // Registrations
403
+ if(!isset($_POST['wp-submit'])){
404
+ add_action('login_form_register', 'apbct_cookie');
405
+ add_action('login_form_register', 'apbct_store__urls');
406
+ }
407
+ add_action('login_enqueue_scripts', 'apbct_login__scripts');
408
+ add_action('register_form', 'ct_register_form');
409
+ add_filter('registration_errors', 'ct_registration_errors', 1, 3);
410
+ add_filter('registration_errors', 'ct_check_registration_erros', 999999, 3);
411
+ add_action('user_register', 'apbct_user_register');
412
+
413
+ // Multisite registrations
414
+ add_action('signup_extra_fields','ct_register_form');
415
+ add_filter('wpmu_validate_user_signup', 'ct_registration_errors_wpmu', 10, 3);
416
+
417
+ // Login form - for notifications only
418
+ add_filter('login_message', 'ct_login_message');
419
+
420
+ // Comments output hook
421
+ add_filter('wp_list_comments_args', 'ct_wp_list_comments_args');
422
+
423
+ // Ait-Themes fix
424
+ if(isset($_GET['ait-action']) && $_GET['ait-action']=='register'){
425
+ $tmp=$_POST['redirect_to'];
426
+ unset($_POST['redirect_to']);
427
+ ct_contact_form_validate();
428
+ $_POST['redirect_to']=$tmp;
429
+ }
430
+ }
431
+
432
+ // Short code for GDPR
433
+ if($apbct->settings['gdpr_enabled'])
434
+ add_shortcode('cleantalk_gdpr_form', 'apbct_shrotcode_handler__GDPR_public_notice__form');
435
+
436
+ }
437
+
438
+ /**
439
+ * Hook for updating settings
440
+ */
441
+ function apbct_after_options_updated( $option, $old_value, $value ) {
442
+ apbct_sfw_actions( $option, $value );
443
+ }
444
+
445
+ /**
446
+ * Hook for adding settings
447
+ */
448
+ function apbct_after_options_added( $option, $value ) {
449
+ apbct_sfw_actions( $option, $value );
450
+ }
451
+
452
+ function apbct_sfw_actions( $option, $value ) {
453
+
454
+ global $apbct;
455
+
456
+ if ( $option == 'cleantalk_settings' ) {
457
+
458
+ $api_key = ! empty( $value['apikey'] ) || $apbct->moderate_ip ? $value['apikey'] : $apbct->api_key;
459
+
460
+ // SFW actions
461
+ if( $value['spam_firewall'] == 1 ){
462
+
463
+ $result = ct_sfw_update( true, $api_key );
464
+ if( ! empty( $result['error'] ) )
465
+ $apbct->error_add( 'sfw_update', $result['error'] );
466
+
467
+ $result = ct_sfw_send_logs( true, $api_key );
468
+ if( ! empty( $result['error'] ) )
469
+ $apbct->error_add( 'sfw_send_logs', $result['error'] );
470
+
471
+ }
472
+ }
473
+
474
+ }
475
+
476
+ /**
477
+ * Function preforms remote call
478
+ */
479
+ function apbct_remote_call__perform()
480
+ {
481
+ global $apbct;
482
+
483
+ $remote_action = $_GET['spbc_remote_call_action'];
484
+
485
+ if( isset( $apbct->remote_calls[$remote_action] ) ){
486
+ if(time() - $apbct->remote_calls[$remote_action]['last_call'] > APBCT_REMOTE_CALL_SLEEP || ($remote_action == 'sfw_update' && isset($_GET['file_urls']))) {
487
+
488
+ $apbct->remote_calls[$remote_action]['last_call'] = time();
489
+ $apbct->save('remote_calls');
490
+
491
+ if(strtolower($_GET['spbc_remote_call_token']) == strtolower(md5($apbct->api_key))){
492
+
493
+ // Flag to let plugin know that Remote Call is running.
494
+ $apbct->rc_running = true;
495
+
496
+ switch ($remote_action) {
497
+
498
+ // Close renew banner
499
+ case 'close_renew_banner':
500
+ $apbct->data['notice_trial'] = 0;
501
+ $apbct->data['notice_renew'] = 0;
502
+ $apbct->saveData();
503
+ Cron::updateTask('check_account_status', 'ct_account_status_check', 86400);
504
+ die('OK');
505
+ break;
506
+
507
+ // SFW update
508
+ case 'sfw_update':
509
+ $result = ct_sfw_update( $apbct->api_key, true);
510
+ /**
511
+ * @todo CRUNCH
512
+ */
513
+ if(is_string($result) && strpos($result, 'FAIL') !== false){
514
+ $result = json_decode(substr($result, 5), true);
515
+ }
516
+ die(empty($result['error']) ? 'OK' : 'FAIL '.json_encode(array('error' => $result['error'])));
517
+ break;
518
+
519
+ // SFW send logs
520
+ case 'sfw_send_logs':
521
+ $result = ct_sfw_send_logs();
522
+ die(empty($result['error']) ? 'OK' : 'FAIL '.json_encode(array('error' => $result['error'])));
523
+ break;
524
+
525
+ // Update plugin
526
+ case 'update_plugin':
527
+ add_action('wp', 'apbct_rc__update', 1);
528
+ break;
529
+
530
+ // Install plugin
531
+ case 'install_plugin':
532
+ add_action('wp', 'apbct_rc__install_plugin', 1);
533
+ break;
534
+ // Activate plugin
535
+ case 'activate_plugin':
536
+ $result = apbct_rc__activate_plugin($_GET['plugin']);
537
+ die(empty($result['error'])
538
+ ? 'OK'
539
+ : 'FAIL '.json_encode(array('error' => $result['error'])));
540
+ break;
541
+
542
+ // Insert API key
543
+ case 'insert_auth_key':
544
+ $result = apbct_rc__insert_auth_key($_GET['auth_key'], $_GET['plugin']);
545
+ die(empty($result['error'])
546
+ ? 'OK'
547
+ : 'FAIL '.json_encode(array('error' => $result['error'])));
548
+ break;
549
+
550
+ // Update settins
551
+ case 'update_settings':
552
+ $result = apbct_rc__update_settings($_GET);
553
+ die(empty($result['error'])
554
+ ? 'OK'
555
+ : 'FAIL '.json_encode(array('error' => $result['error'])));
556
+ break;
557
+ // Deactivate plugin
558
+ case 'deactivate_plugin':
559
+ add_action('plugins_loaded', 'apbct_rc__deactivate_plugin', 1);
560
+ break;
561
+
562
+ // Uninstall plugin
563
+ case 'uninstall_plugin':
564
+ add_action('plugins_loaded', 'apbct_rc__uninstall_plugin', 1);
565
+ break;
566
+ // No action found
567
+ default:
568
+ die('FAIL '.json_encode(array('error' => 'UNKNOWN_ACTION_2')));
569
+ break;
570
+ }
571
+
572
+ }else
573
+ die('FAIL '.json_encode(array('error' => 'WRONG_TOKEN')));
574
+ }else
575
+ die('FAIL '.json_encode(array('error' => 'TOO_MANY_ATTEMPTS')));
576
+ }else
577
+ die('FAIL '.json_encode(array('error' => 'UNKNOWN_ACTION')));
578
+ }
579
+
580
+ /**
581
+ * Function for SpamFireWall check
582
+ */
583
+ function apbct_sfw__check()
584
+ {
585
+ global $apbct, $spbc, $cleantalk_url_exclusions;
586
+
587
+ // Turn off the SpamFireWall if current url in the exceptions list and WordPress core pages
588
+ if (!empty($cleantalk_url_exclusions) && is_array($cleantalk_url_exclusions)) {
589
+ $core_page_to_skip_check = array('/feed');
590
+ foreach (array_merge($cleantalk_url_exclusions, $core_page_to_skip_check) as $v) {
591
+ if ( apbct_is_in_uri( $v ) ) {
592
+ return;
593
+ }
594
+ }
595
+ }
596
+
597
+ // Skip the check
598
+ if(!empty($_GET['access'])){
599
+ $spbc_settings = get_option('spbc_settings');
600
+ $spbc_key = !empty($spbc_settings['spbc_key']) ? $spbc_settings['spbc_key'] : false;
601
+ if($_GET['access'] === $apbct->api_key || ($spbc_key !== false && $_GET['access'] === $spbc_key)){
602
+ \Cleantalk\Common\Helper::apbct_cookie__set('spbc_firewall_pass_key', md5(apbct_get_server_variable( 'REMOTE_ADDR' ) . $spbc_key), time()+1200, '/', '');
603
+ \Cleantalk\Common\Helper::apbct_cookie__set('ct_sfw_pass_key', md5(apbct_get_server_variable( 'REMOTE_ADDR' ) . $apbct->api_key), time()+1200, '/', null);
604
+ return;
605
+ }
606
+ unset($spbc_settings, $spbc_key);
607
+ }
608
+
609
+ // Turn off the SpamFireWall if Remote Call is in progress
610
+ if($apbct->rc_running || (!empty($spbc) && $spbc->rc_running))
611
+ return;
612
+
613
+ $fw_init_options = array(
614
+ 'set_cookies' => $apbct->settings['set_cookies']
615
+ );
616
+
617
+ $firewall = new \Cleantalk\Common\Firewall(
618
+ \Cleantalk\ApbctWP\DB::getInstance()
619
+ );
620
+
621
+ $firewall->load_fw_module( new \Cleantalk\ApbctWP\Firewall\SFW(
622
+ APBCT_TBL_FIREWALL_LOG,
623
+ APBCT_TBL_FIREWALL_DATA,
624
+ array(
625
+ 'sfw_counter' => $apbct->settings['sfw_counter'],
626
+ 'api_key' => $apbct->api_key,
627
+ 'apbct' => $apbct,
628
+ 'cookie_domain' => parse_url( get_option( 'siteurl' ), PHP_URL_HOST ),
629
+ 'set_cookies' => $apbct->settings['set_cookies'],
630
+ )
631
+ ) );
632
+
633
+ if( $apbct->settings['sfw__anti_crawler'] ){
634
+ $firewall->load_fw_module( new \Cleantalk\ApbctWP\Firewall\AntiCrawler(
635
+ APBCT_TBL_FIREWALL_LOG,
636
+ APBCT_TBL_AC_LOG,
637
+ array(
638
+ 'api_key' => $apbct->api_key,
639
+ 'apbct' => $apbct,
640
+ )
641
+ ) );
642
+ }
643
+
644
+ if( $apbct->settings['sfw__anti_flood'] ){
645
+ $firewall->load_fw_module( new \Cleantalk\ApbctWP\Firewall\AntiFlood(
646
+ APBCT_TBL_FIREWALL_LOG,
647
+ APBCT_TBL_AC_LOG,
648
+ array(
649
+ 'api_key' => $apbct->api_key,
650
+ 'view_limit' => $apbct->settings['sfw__anti_flood__view_limit'],
651
+ 'apbct' => $apbct,
652
+ )
653
+ ) );
654
+ }
655
+
656
+ $firewall->run();
657
+
658
+ }
659
+
660
+ /**
661
+ * On activation, set a time, frequency and name of an action hook to be scheduled.
662
+ */
663
+ function apbct_activation( $network = false ) {
664
+
665
+ global $wpdb;
666
+
667
+ // SFW data
668
+ $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw` (
669
+ `network` int(11) unsigned NOT NULL,
670
+ `mask` int(11) unsigned NOT NULL,
671
+ `status` TINYINT(1) NOT NULL DEFAULT 0,
672
+ INDEX ( `network` , `mask` )
673
+ );';
674
+
675
+ // SFW log
676
+ $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw_logs` (
677
+ `id` VARCHAR(40) NOT NULL,
678
+ `ip` VARCHAR(15) NOT NULL,
679
+ `status` ENUM(\'PASS_SFW\',\'DENY_SFW\',\'PASS_SFW__BY_WHITELIST\',\'PASS_SFW__BY_COOKIE\',\'DENY_ANTICRAWLER\',\'PASS_ANTICRAWLER\',\'DENY_ANTIFLOOD\',\'PASS_ANTIFLOOD\') NULL DEFAULT NULL,
680
+ `all_entries` INT NOT NULL,
681
+ `blocked_entries` INT NOT NULL,
682
+ `entries_timestamp` INT NOT NULL,
683
+ PRIMARY KEY (`id`));';
684
+
685
+ $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ac_log` (
686
+ `id` VARCHAR(40) NOT NULL,
687
+ `ip` VARCHAR(40) NOT NULL,
688
+ `entries` INT DEFAULT 0,
689
+ `interval_start` INT NOT NULL,
690
+ PRIMARY KEY (`id`));';
691
+
692
+ // Sessions
693
+ $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sessions` (
694
+ `id` VARCHAR(64) NOT NULL,
695
+ `name` VARCHAR(40) NOT NULL,
696
+ `value` TEXT NULL DEFAULT NULL,
697
+ `last_update` DATETIME NULL DEFAULT NULL,
698
+ PRIMARY KEY (`name`(40), `id`(64)));';
699
+
700
+ $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_spamscan_logs` (
701
+ `id` int(11) NOT NULL AUTO_INCREMENT,
702
+ `scan_type` varchar(11) NOT NULL,
703
+ `start_time` datetime NOT NULL,
704
+ `finish_time` datetime NOT NULL,
705
+ `count_to_scan` int(11) DEFAULT NULL,
706
+ `found_spam` int(11) DEFAULT NULL,
707
+ `found_bad` int(11) DEFAULT NULL,
708
+ PRIMARY KEY (`id`));';
709
+
710
+ if($network && !defined('CLEANTALK_ACCESS_KEY')){
711
+ $initial_blog = get_current_blog_id();
712
+ $blogs = array_keys($wpdb->get_results('SELECT blog_id FROM '. $wpdb->blogs, OBJECT_K));
713
+ foreach ($blogs as $blog) {
714
+ switch_to_blog($blog);
715
+ apbct_activation__create_tables($sqls);
716
+ // Cron tasks
717
+ Cron::addTask('check_account_status', 'ct_account_status_check', 3600, time() + 1800); // Checks account status
718
+ Cron::addTask('delete_spam_comments', 'ct_delete_spam_comments', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
719
+ Cron::addTask('send_feedback', 'ct_send_feedback', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
720
+ Cron::addTask('sfw_update', 'ct_sfw_update', 86400, time() + 300); // SFW update
721
+ Cron::addTask('send_sfw_logs', 'ct_sfw_send_logs', 3600, time() + 1800); // SFW send logs
722
+ Cron::addTask('get_brief_data', 'cleantalk_get_brief_data', 86400, time() + 3500); // Get data for dashboard widget
723
+ Cron::addTask('send_connection_report','ct_mail_send_connection_report', 86400, time() + 3500); // Send connection report to welcome@cleantalk.org
724
+ }
725
+ switch_to_blog($initial_blog);
726
+ }else{
727
+
728
+ // Cron tasks
729
+ Cron::addTask('check_account_status', 'ct_account_status_check', 3600, time() + 1800); // Checks account status
730
+ Cron::addTask('delete_spam_comments', 'ct_delete_spam_comments', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
731
+ Cron::addTask('send_feedback', 'ct_send_feedback', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
732
+ Cron::addTask('sfw_update', 'ct_sfw_update', 86400, time() + 600); // SFW update
733
+ Cron::addTask('send_sfw_logs', 'ct_sfw_send_logs', 3600, time() + 1800); // SFW send logs
734
+ Cron::addTask('get_brief_data', 'cleantalk_get_brief_data', 86400, time() + 3500); // Get data for dashboard widget
735
+ Cron::addTask('send_connection_report','ct_mail_send_connection_report', 86400, time() + 3500); // Send connection report to welcome@cleantalk.org
736
+
737
+ apbct_activation__create_tables($sqls);
738
+ ct_account_status_check(null, false);
739
+ ct_sfw_update(); // Updating SFW
740
+ }
741
+
742
+ // Additional options
743
+ add_option('ct_plugin_do_activation_redirect', true);
744
+ }
745
+
746
+ function apbct_activation__create_tables( $sqls, $db_prefix = '' ) {
747
+
748
+ global $wpdb;
749
+
750
+ $db_prefix = $db_prefix ? $db_prefix : $wpdb->prefix;
751
+
752
+ $wpdb->show_errors = false;
753
+ foreach($sqls as $sql){
754
+ $sql = sprintf($sql, $db_prefix); // Adding current blog prefix
755
+ $result = $wpdb->query($sql);
756
+ if($result === false)
757
+ $errors[] = "Failed.\nQuery: {$wpdb->last_query}\nError: {$wpdb->last_error}";
758
+ }
759
+ $wpdb->show_errors = true;
760
+
761
+ // Logging errors
762
+ if(!empty($errors))
763
+ apbct_log($errors);
764
+ }
765
+
766
+ function apbct_activation__new_blog($blog_id, $user_id, $domain, $path, $site_id, $meta) {
767
+ if (apbct_is_plugin_active_for_network('cleantalk-spam-protect/cleantalk.php')){
768
+
769
+ $settings = get_option('cleantalk_settings');
770
+
771
+ switch_to_blog($blog_id);
772
+
773
+ global $wpdb;
774
+
775
+ // SFW data
776
+ $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw` (
777
+ `network` int(11) unsigned NOT NULL,
778
+ `mask` int(11) unsigned NOT NULL,
779
+ INDEX ( `network` , `mask` )
780
+ );';
781
+
782
+ // SFW log
783
+ $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw_logs` (
784
+ `id` VARCHAR(40) NOT NULL,
785
+ `ip` VARCHAR(15) NOT NULL,
786
+ `status` ENUM(\'PASS_SFW\',\'DENY_SFW\',\'PASS_SFW__BY_WHITELIST\',\'PASS_SFW__BY_COOKIE\',\'DENY_ANTICRAWLER\',\'PASS_ANTICRAWLER\',\'DENY_ANTIFLOOD\',\'PASS_ANTIFLOOD\') NULL DEFAULT NULL,
787
+ `all_entries` INT NOT NULL,
788
+ `blocked_entries` INT NOT NULL,
789
+ `entries_timestamp` INT NOT NULL,
790
+ PRIMARY KEY (`id`));';
791
+
792
+ $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ac_log` (
793
+ `id` VARCHAR(40) NOT NULL,
794
+ `ip` VARCHAR(40) NOT NULL,
795
+ `entries` INT DEFAULT 0,
796
+ `interval_start` INT NOT NULL,
797
+ PRIMARY KEY (`id`));';
798
+
799
+ // Sessions
800
+ $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sessions` (
801
+ `id` VARCHAR(64) NOT NULL,
802
+ `name` TEXT NOT NULL,
803
+ `value` TEXT NULL DEFAULT NULL,
804
+ `last_update` DATETIME NULL DEFAULT NULL,
805
+ PRIMARY KEY (`id`(64), `name`(64)));';
806
+
807
+ $sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_spamscan_logs` (
808
+ `id` int(11) NOT NULL AUTO_INCREMENT,
809
+ `scan_type` varchar(11) NOT NULL,
810
+ `start_time` datetime NOT NULL,
811
+ `finish_time` datetime NOT NULL,
812
+ `count_to_scan` int(11) DEFAULT NULL,
813
+ `found_spam` int(11) DEFAULT NULL,
814
+ `found_bad` int(11) DEFAULT NULL,
815
+ PRIMARY KEY (`id`));';
816
+
817
+ // Cron tasks
818
+ Cron::addTask('check_account_status', 'ct_account_status_check', 3600, time() + 1800); // Checks account status
819
+ Cron::addTask('delete_spam_comments', 'ct_delete_spam_comments', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
820
+ Cron::addTask('send_feedback', 'ct_send_feedback', 3600, time() + 3500); // Formerly ct_hourly_event_hook()
821
+ Cron::addTask('sfw_update', 'ct_sfw_update', 86400, time() + 600); // SFW update
822
+ Cron::addTask('send_sfw_logs', 'ct_sfw_send_logs', 3600, time() + 1800); // SFW send logs
823
+ Cron::addTask('get_brief_data', 'cleantalk_get_brief_data', 86400, time() + 3500); // Get data for dashboard widget
824
+ Cron::addTask('send_connection_report','ct_mail_send_connection_report', 86400, time() + 3500); // Send connection report to welcome@cleantalk.org
825
+ apbct_activation__create_tables($sqls);
826
+ ct_sfw_update(); // Updating SFW
827
+ ct_account_status_check(null, false);
828
+
829
+ if (isset($settings['use_settings_template_apply_for_new']) && $settings['use_settings_template_apply_for_new'] == 1) {
830
+ update_option('cleantalk_settings', $settings);
831
+ }
832
+ restore_current_blog();
833
+ }
834
+ }
835
+
836
+ /**
837
+ * On deactivation, clear schedule.
838
+ */
839
+ function apbct_deactivation( $network ) {
840
+
841
+ global $apbct, $wpdb;
842
+
843
+ // Deactivation for network
844
+ if(is_multisite() && $network){
845
+
846
+ $initial_blog = get_current_blog_id();
847
+ $blogs = array_keys($wpdb->get_results('SELECT blog_id FROM '. $wpdb->blogs, OBJECT_K));
848
+ foreach ($blogs as $blog) {
849
+ switch_to_blog($blog);
850
+ apbct_deactivation__delete_blog_tables();
851
+ delete_option('cleantalk_cron'); // Deleting cron entries
852
+
853
+ if($apbct->settings['complete_deactivation']){
854
+ apbct_deactivation__delete_all_options();
855
+ apbct_deactivation__delete_meta();
856
+ apbct_deactivation__delete_all_options__in_network();
857
+ }
858
+
859
+ }
860
+ switch_to_blog($initial_blog);
861
+
862
+ // Deactivation for blog
863
+ }elseif(is_multisite()){
864
+
865
+ apbct_deactivation__delete_common_tables();
866
+ delete_option('cleantalk_cron'); // Deleting cron entries
867
+
868
+ if($apbct->settings['complete_deactivation']) {
869
+ apbct_deactivation__delete_all_options();
870
+ apbct_deactivation__delete_meta();
871
+ }
872
+
873
+ // Deactivation on standalone blog
874
+ }elseif(!is_multisite()){
875
+
876
+ apbct_deactivation__delete_common_tables();
877
+ delete_option('cleantalk_cron'); // Deleting cron entries
878
+
879
+ if($apbct->settings['complete_deactivation']) {
880
+ apbct_deactivation__delete_all_options();
881
+ apbct_deactivation__delete_meta();
882
+ }
883
+
884
+ }
885
+ }
886
+
887
+ /**
888
+ * Delete all cleantalk_* entries from _options table
889
+ */
890
+ function apbct_deactivation__delete_all_options(){
891
+ delete_option('cleantalk_settings');
892
+ delete_option('cleantalk_data');
893
+ delete_option('cleantalk_cron');
894
+ delete_option('cleantalk_errors');
895
+ delete_option('cleantalk_remote_calls');
896
+ delete_option('cleantalk_server');
897
+ delete_option('cleantalk_stats');
898
+ delete_option('cleantalk_timelabel_reg');
899
+ delete_option('cleantalk_debug');
900
+ }
901
+
902
+ /**
903
+ * Delete all cleantalk_* entries from _sitemeta table
904
+ */
905
+ function apbct_deactivation__delete_all_options__in_network(){
906
+ delete_site_option('cleantalk_network_settings');
907
+ delete_site_option('cleantalk_network_data');
908
+ }
909
+
910
+ function apbct_deactivation__delete_common_tables() {
911
+ global $wpdb;
912
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->base_prefix.'cleantalk_sfw`;'); // Deleting SFW data
913
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->base_prefix.'cleantalk_sfw_logs`;'); // Deleting SFW logs
914
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->base_prefix.'cleantalk_ac_log`;'); // Deleting SFW logs
915
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->base_prefix.'cleantalk_sessions`;'); // Deleting session table
916
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->base_prefix.'cleantalk_spamscan_logs`;'); // Deleting user/comments scan result table
917
+ }
918
+
919
+ function apbct_deactivation__delete_blog_tables() {
920
+ global $wpdb;
921
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_sfw`;'); // Deleting SFW data
922
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_sfw_logs`;'); // Deleting SFW logs
923
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_ac_log`;'); // Deleting SFW logs
924
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_sessions`;'); // Deleting session table
925
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_spamscan_logs`;'); // Deleting user/comments scan result table
926
+ }
927
+
928
+ function apbct_deactivation__delete_meta(){
929
+ global $wpdb;
930
+ $wpdb->query("DELETE FROM {$wpdb->usermeta} WHERE meta_key IN ('ct_bad', 'ct_checked', 'ct_checked_now', 'ct_marked_as_spam', 'ct_hash');");
931
+ }
932
+
933
+ /**
934
+ * Redirects admin to plugin settings after activation.
935
+ */
936
+ function apbct_plugin_redirect()
937
+ {
938
+ global $apbct;
939
+ if (get_option('ct_plugin_do_activation_redirect', false) && !isset($_GET['activate-multi'])){
940
+ delete_option('ct_plugin_do_activation_redirect');
941
+ ct_account_status_check(null, false);
942
+ ct_sfw_update(); // Updating SFW
943
+ wp_redirect($apbct->settings_link);
944
+ }
945
+ }
946
+
947
+ function ct_add_event($event_type)
948
+ {
949
+ global $apbct, $cleantalk_executed;
950
+
951
+ //
952
+ // To migrate on the new version of ct_add_event().
953
+ //
954
+ switch ($event_type) {
955
+ case '0': $event_type = 'no';break;
956
+ case '1': $event_type = 'yes';break;
957
+ }
958
+
959
+ $current_hour = intval(date('G'));
960
+
961
+ // Updating current hour
962
+ if($current_hour!=$apbct->data['current_hour']){
963
+ $apbct->data['current_hour'] = $current_hour;
964
+ $apbct->data['array_accepted'][$current_hour] = 0;
965
+ $apbct->data['array_blocked'][$current_hour] = 0;
966
+ }
967
+
968
+ //Add 1 to counters
969
+ if($event_type=='yes'){
970
+ $apbct->data['array_accepted'][$current_hour]++;
971
+ $apbct->data['all_time_counter']['accepted']++;
972
+ $apbct->data['user_counter']['accepted']++;
973
+ }
974
+ if($event_type=='no'){
975
+ $apbct->data['array_blocked'][$current_hour]++;
976
+ $apbct->data['all_time_counter']['blocked']++;
977
+ $apbct->data['user_counter']['blocked']++;
978
+ }
979
+
980
+ $apbct->saveData();
981
+
982
+ $cleantalk_executed=true;
983
+ }
984
+
985
+ /**
986
+ * return new cookie value
987
+ */
988
+ function ct_get_cookie()
989
+ {
990
+ global $ct_checkjs_def;
991
+ $ct_checkjs_key = ct_get_checkjs_value();
992
+ print $ct_checkjs_key;
993
+ die();
994
+ }
995
+
996
+ function ct_sfw_update($api_key = '', $immediate = false){
997
+
998
+ global $apbct;
999
+
1000
+ $api_key = !empty($apbct->api_key) ? $apbct->api_key : $api_key;
1001
+
1002
+ if( $apbct->settings['spam_firewall'] == 1 && ( ! empty($api_key) || $apbct->data['moderate_ip'] ) ) {
1003
+
1004
+ $file_urls = isset($_GET['file_urls']) ? urldecode( $_GET['file_urls'] ) : null;
1005
+ $url_count = isset($_GET['url_count']) ? urldecode( $_GET['url_count'] ) : null;
1006
+ $current_url = isset($_GET['current_url']) ? urldecode( $_GET['current_url'] ) : null;
1007
+
1008
+ if( ! $file_urls ){
1009
+
1010
+ // @ToDo we have to implement a flag to checking is the updating is in progress
1011
+ // @ToDo this is the temporary solution: Setting update time at the updating start to prevent running several update processes
1012
+ $apbct->stats['sfw']['last_update_time'] = time();
1013
+
1014
+ //Reset previous entries count
1015
+ $apbct->stats['sfw']['entries'] = 0;
1016
+ $apbct->save('stats');
1017
+
1018
+ $result = \Cleantalk\ApbctWP\Firewall\SFW::update(
1019
+ \Cleantalk\ApbctWP\DB::getInstance(),
1020
+ APBCT_TBL_FIREWALL_DATA,
1021
+ $api_key,
1022
+ null,
1023
+ $immediate
1024
+ );
1025
+
1026
+ return ! empty( $result['error'] )
1027
+ ? $result
1028
+ : true;
1029
+
1030
+ }elseif( $file_urls && $url_count >= $current_url ){
1031
+
1032
+ $result = \Cleantalk\ApbctWP\Firewall\SFW::update(
1033
+ \Cleantalk\ApbctWP\DB::getInstance(),
1034
+ APBCT_TBL_FIREWALL_DATA,
1035
+ $api_key,
1036
+ str_replace( 'multifiles', $current_url, $file_urls ),
1037
+ $immediate
1038
+ );
1039
+
1040
+ if( empty( $result['error'] ) ){
1041
+
1042
+ $current_url++;
1043
+
1044
+ //Increment sfw entries
1045
+ $apbct->stats['sfw']['entries'] += $result;
1046
+ $apbct->save('stats');
1047
+
1048
+ if ( $url_count >= $current_url ) {
1049
+ \Cleantalk\ApbctWP\Helper::http__request(
1050
+ get_option('siteurl'),
1051
+ array(
1052
+ 'spbc_remote_call_token' => md5($api_key),
1053
+ 'spbc_remote_call_action' => 'sfw_update',
1054
+ 'plugin_name' => 'apbct',
1055
+ 'file_urls' => $file_urls,
1056
+ 'url_count' => $url_count,
1057
+ 'current_url' => $current_url,
1058
+ ),
1059
+ array('get', 'async')
1060
+ );
1061
+ } else {
1062
+ //Files array is empty update sfw time
1063
+ $apbct->stats['sfw']['last_update_time'] = time();
1064
+ $apbct->save('stats');
1065
+ // Delete update errors
1066
+ $apbct->error_delete( 'sfw_update', 'save_settings' );
1067
+
1068
+ return $result;
1069
+ }
1070
+ }else
1071
+ return $result;
1072
+ }else
1073
+ return array('error' => 'SFW_UPDATE WRONG_FILE_URLS');
1074
+ }
1075
+
1076
+ return array('error' => 'SFW_DISABLED');
1077
+ }
1078
+
1079
+ function ct_sfw_send_logs($api_key = '')
1080
+ {
1081
+ global $apbct;
1082
+
1083
+ $api_key = !empty($apbct->api_key) ? $apbct->api_key : $api_key;
1084
+
1085
+ if( $apbct->settings['spam_firewall'] == 1 && ( ! empty($api_key) || $apbct->data['moderate_ip'] ) ) {
1086
+
1087
+ $result = \Cleantalk\ApbctWP\Firewall\SFW::send_log(
1088
+ \Cleantalk\ApbctWP\DB::getInstance(),
1089
+ APBCT_TBL_FIREWALL_LOG,
1090
+ $api_key
1091
+ );
1092
+
1093
+ if(empty($result['error'])){
1094
+ $apbct->stats['sfw']['last_send_time'] = time();
1095
+ $apbct->stats['sfw']['last_send_amount'] = $result['rows'];
1096
+ $apbct->save('stats');
1097
+ $apbct->error_delete( 'sfw_send_logs', 'save_settings' );
1098
+ }
1099
+
1100
+ return $result;
1101
+
1102
+ }
1103
+
1104
+ return array('error' => 'SFW_DISABLED');
1105
+ }
1106
+
1107
+ /**
1108
+ * Wrapper for Cleantalk's remote calls
1109
+ *
1110
+ * @param string $action What you want to do?
1111
+ * @param array $additional_params Additional GET parameters for RC
1112
+ * @param string $presets Presets for \Cleantalk\ApbctWP\Helper::http__request(). 'async' maybe?
1113
+ * @param string $plugin_name Plugin name 'antispam' by default
1114
+ * @param string $call_token RC securirty token
1115
+ * @param string $url Current site URL by default
1116
+ *
1117
+ * @return array|bool
1118
+ */
1119
+ function apbct_rc__send($action, $additional_params = array(), $presets = 'get', $plugin_name = 'antispam', $call_token = '', $url = ''){
1120
+
1121
+ global $apbct;
1122
+
1123
+ $default_params = array(
1124
+ 'plugin_name' => $plugin_name,
1125
+ 'spbc_remote_call_token' => $call_token ? $call_token : md5($apbct->api_key),
1126
+ 'spbc_remote_call_action' => $action,
1127
+ );
1128
+
1129
+ $params = array_merge($additional_params, $default_params);
1130
+
1131
+ return apbct_rc__parse_result(
1132
+ \Cleantalk\ApbctWP\Helper::http__request(
1133
+ $url ? $url : get_option('siteurl'),
1134
+ $params,
1135
+ $presets
1136
+ )
1137
+ );
1138
+ }
1139
+
1140
+ /**
1141
+ * Parse different types of remote call results
1142
+ *
1143
+ * @param array|string $rc_result
1144
+ * string - 'FAIL {"some":"result}'
1145
+ * string - 'OK {"some":"result}'
1146
+ *
1147
+ * @return array|string
1148
+ */
1149
+ function apbct_rc__parse_result($rc_result){
1150
+ if(is_string($rc_result)){
1151
+ $rc_result = preg_replace('/^(OK\s?|FAIL\s?)(.*)/', '$2', $rc_result, 1);
1152
+ $rc_result = json_decode($rc_result, true);
1153
+ $rc_result = $rc_result
1154
+ ? $rc_result
1155
+ : array('error' => 'FAIL_TO_PARSE_RC_RESULT');
1156
+ }
1157
+ return $rc_result;
1158
+ }
1159
+
1160
+ /**
1161
+ * Install plugin from wordpress catalog
1162
+ *
1163
+ * @param WP $wp
1164
+ * @param string $plugin_slug
1165
+ */
1166
+ function apbct_rc__install_plugin($wp = null, $plugin = null){
1167
+ global $wp_version;
1168
+
1169
+ $plugin = $plugin ? $plugin : (isset($_GET['plugin']) ? $_GET['plugin'] : null);
1170
+
1171
+ if($plugin){
1172
+
1173
+ if(preg_match('/[a-zA-Z-\d]+[\/\\][a-zA-Z-\d]+\.php/', $plugin)){
1174
+
1175
+ $plugin_slug = preg_replace('@([a-zA-Z-\d]+)[\\\/].*@', '$1', $plugin);
1176
+
1177
+ if($plugin_slug){
1178
+
1179
+ require_once(ABSPATH.'wp-admin/includes/plugin-install.php');
1180
+ $result = plugins_api(
1181
+ 'plugin_information',
1182
+ array(
1183
+ 'slug' => $plugin_slug,
1184
+ 'fileds' => array('version' => true, 'download_link' => true,),
1185
+ )
1186
+ );
1187
+
1188
+ if(!is_wp_error($result)){
1189
+
1190
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1191
+ include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
1192
+ include_once( ABSPATH . 'wp-admin/includes/file.php' );
1193
+ include_once( ABSPATH . 'wp-admin/includes/misc.php' );
1194
+
1195
+ if (version_compare(PHP_VERSION, '5.6.0') >= 0 && version_compare($wp_version, '5.3') >= 0) {
1196
+ $installer= new CleantalkUpgrader( new CleantalkUpgraderSkin() );
1197
+ } else {
1198
+ $installer= new CleantalkUpgrader( new CleantalkUpgraderSkin_Deprecated() );
1199
+ }
1200
+
1201
+ $installer->install($result->download_link);
1202
+
1203
+ if($installer->apbct_result === 'OK'){
1204
+ die('OK');
1205
+
1206
+ }else
1207
+ die('FAIL '. json_encode(array('error' => $installer->apbct_result)));
1208
+ }else
1209
+ die('FAIL '. json_encode(array('error' => 'FAIL_TO_GET_LATEST_VERSION', 'details' => $result->get_error_message(),)));
1210
+ }else
1211
+ die('FAIL '. json_encode(array('error' => 'PLUGIN_SLUG_INCORRECT')));
1212
+ }else
1213
+ die('FAIL '. json_encode(array('error' => 'PLUGIN_NAME_IS_INCORRECT')));
1214
+ }else
1215
+ die('FAIL '. json_encode(array('error' => 'PLUGIN_NAME_IS_UNSET')));
1216
+ }
1217
+
1218
+ function apbct_rc__activate_plugin($plugin){
1219
+
1220
+ $plugin = $plugin ? $plugin : (isset($_GET['plugin']) ? $_GET['plugin'] : null);
1221
+
1222
+ if($plugin){
1223
+
1224
+ if(preg_match('@[a-zA-Z-\d]+[\\\/][a-zA-Z-\d]+\.php@', $plugin)){
1225
+
1226
+ require_once (ABSPATH .'/wp-admin/includes/plugin.php');
1227
+
1228
+ $result = activate_plugins($plugin);
1229
+
1230
+ if($result && !is_wp_error($result)){
1231
+ return array('success' => true);
1232
+ }else
1233
+ return array('error' => 'FAIL_TO_ACTIVATE', 'details' => (is_wp_error($result) ? ' '.$result->get_error_message() : ''));
1234
+ }else
1235
+ return array('error' => 'PLUGIN_NAME_IS_INCORRECT');
1236
+ }else
1237
+ return array('error' => 'PLUGIN_NAME_IS_UNSET');
1238
+ }
1239
+
1240
+ /**
1241
+ * Uninstall plugin from wordpress catalog
1242
+ *
1243
+ * @param null $plugin_name
1244
+ */
1245
+ function apbct_rc__deactivate_plugin($plugin = null){
1246
+
1247
+ global $apbct;
1248
+
1249
+ $plugin = $plugin ? $plugin : (isset($_GET['plugin']) ? $_GET['plugin'] : null);
1250
+
1251
+ if($plugin){
1252
+
1253
+ // Switching complete deactivation for security
1254
+ if($plugin == 'security-malware-firewall/security-malware-firewall.php' && !empty($_GET['complete_deactivation'])){
1255
+ $spbc_settings = get_option('spbc_settings');
1256
+ $spbc_settings['complete_deactivation'] = intval($_GET['complete_deactivation']);
1257
+ update_option('spbc_settings', $spbc_settings);
1258
+ }
1259
+
1260
+ require_once (ABSPATH .'/wp-admin/includes/plugin.php');
1261
+
1262
+ if(is_plugin_active( $plugin )){
1263
+ // Hook to set flag if the plugin is deactivated
1264
+ add_action( 'deactivate_'.$plugin, 'apbct_rc__uninstall_plugin__check_deactivate' );
1265
+ deactivate_plugins($plugin, false, is_multisite() ? true : false);
1266
+ }else{
1267
+ $apbct->plugin_deactivated = true;
1268
+ }
1269
+
1270
+ // Hook to set flag if the plugin is deactivated
1271
+ add_action( 'deactivate_'.$plugin, 'apbct_rc__uninstall_plugin__check_deactivate' );
1272
+ deactivate_plugins($plugin, false, is_multisite() ? true : false);
1273
+
1274
+ if($apbct->plugin_deactivated){
1275
+ die('OK');
1276
+ }else
1277
+ die('FAIL '. json_encode(array('error' => 'PLUGIN_STILL_ACTIVE')));
1278
+ }else
1279
+ die('FAIL '. json_encode(array('error' => 'PLUGIN_NAME_IS_UNSET')));
1280
+ }
1281
+
1282
+
1283
+ /**
1284
+ * Uninstall plugin from wordpress. Delete files.
1285
+ *
1286
+ * @param null $plugin
1287
+ */
1288
+ function apbct_rc__uninstall_plugin($plugin = null){
1289
+
1290
+ global $apbct;
1291
+
1292
+ $plugin = $plugin ? $plugin : (isset($_GET['plugin']) ? $_GET['plugin'] : null);
1293
+
1294
+ if($plugin){
1295
+
1296
+ // Switching complete deactivation for security
1297
+ if($plugin == 'security-malware-firewall/security-malware-firewall.php' && !empty($_GET['complete_deactivation'])){
1298
+ $spbc_settings = get_option('spbc_settings');
1299
+ $spbc_settings['complete_deactivation'] = intval($_GET['complete_deactivation']);
1300
+ update_option('spbc_settings', $spbc_settings);
1301
+ }
1302
+
1303
+ require_once (ABSPATH .'/wp-admin/includes/plugin.php');
1304
+
1305
+ if(is_plugin_active( $plugin )){
1306
+ // Hook to set flag if the plugin is deactivated
1307
+ add_action( 'deactivate_'.$plugin, 'apbct_rc__uninstall_plugin__check_deactivate' );
1308
+ deactivate_plugins($plugin, false, is_multisite() ? true : false);
1309
+ }else{
1310
+ $apbct->plugin_deactivated = true;
1311
+ }
1312
+
1313
+ if($apbct->plugin_deactivated){
1314
+
1315
+ require_once (ABSPATH .'/wp-admin/includes/file.php');
1316
+
1317
+ $result = delete_plugins(array($plugin));
1318
+
1319
+ if($result && !is_wp_error($result)){
1320
+ die('OK');
1321
+ }else
1322
+ die('FAIL '. json_encode(array('error' => 'PLUGIN_STILL_EXISTS', 'details' => (is_wp_error($result) ? ' '.$result->get_error_message() : ''))));
1323
+ }else
1324
+ die('FAIL '. json_encode(array('error' => 'PLUGIN_STILL_ACTIVE')));
1325
+ }else
1326
+ die('FAIL '. json_encode(array('error' => 'PLUGIN_NAME_IS_UNSET')));
1327
+ }
1328
+
1329
+ function apbct_rc__uninstall_plugin__check_deactivate(){
1330
+ global $apbct;
1331
+ $apbct->plugin_deactivated = true;
1332
+ }
1333
+
1334
+ function apbct_rc__update(){
1335
+ global $wp_version;
1336
+
1337
+ //Upgrade params
1338
+ $plugin = 'cleantalk-spam-protect/cleantalk.php';
1339
+ $plugin_slug = 'cleantalk-spam-protect';
1340
+ $title = __('Update Plugin');
1341
+ $nonce = 'upgrade-plugin_' . $plugin;
1342
+ $url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );
1343
+ $activate_for_network = false;
1344
+ if( APBCT_WPMS && is_main_site() && array_key_exists( $plugin, get_site_option( 'active_sitewide_plugins' ) ) ) {
1345
+ $activate_for_network = true;
1346
+ }
1347
+
1348
+ $prev_version = APBCT_VERSION;
1349
+
1350
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1351
+ include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
1352
+ include_once( ABSPATH . 'wp-admin/includes/file.php' );
1353
+ include_once( ABSPATH . 'wp-admin/includes/misc.php' );
1354
+
1355
+ apbct_maintance_mode__enable( 30 );
1356
+
1357
+ if (version_compare(PHP_VERSION, '5.6.0') >= 0 && version_compare($wp_version, '5.3') >= 0){
1358
+ $upgrader = new CleantalkUpgrader( new CleantalkUpgraderSkin( compact('title', 'nonce', 'url', 'plugin') ) );
1359
+ }else{
1360
+ $upgrader = new CleantalkUpgrader( new CleantalkUpgraderSkin_Deprecated( compact('title', 'nonce', 'url', 'plugin') ) );
1361
+ }
1362
+
1363
+ $upgrader->upgrade($plugin);
1364
+
1365
+ apbct_maintance_mode__disable();
1366
+
1367
+ $result = activate_plugins( $plugin, '', $activate_for_network );
1368
+
1369
+ // Changing response UP_TO_DATE to OK
1370
+ if($upgrader->apbct_result === 'UP_TO_DATE')
1371
+ $upgrader->apbct_result = 'OK';
1372
+
1373
+ if($upgrader->apbct_result === 'OK'){
1374
+
1375
+ if(is_wp_error($result)){
1376
+ die('FAIL '. json_encode(array('error' => 'COULD_NOT_ACTIVATE', 'wp_error' => $result->get_error_message())));
1377
+ }
1378
+
1379
+ $httpResponseCode = \Cleantalk\ApbctWP\Helper::http__request(get_option('siteurl'), array(), 'get_code');
1380
+
1381
+ if( strpos($httpResponseCode, '200') === false ){
1382
+
1383
+ apbct_maintance_mode__enable( 30 );
1384
+
1385
+ // Rollback
1386
+ if (version_compare(PHP_VERSION, '5.6.0') >= 0 && version_compare($wp_version, '5.3') >= 0)
1387
+ $rollback = new CleantalkUpgrader( new CleantalkUpgraderSkin( compact('title', 'nonce', 'url', 'plugin_slug', 'prev_version') ) );
1388
+ else
1389
+ $rollback = new CleantalkUpgrader( new CleantalkUpgraderSkin_Deprecated( compact('title', 'nonce', 'url', 'plugin_slug', 'prev_version') ) );
1390
+ $rollback->rollback($plugin);
1391
+
1392
+ apbct_maintance_mode__disable();
1393
+
1394
+ // @todo add execution time
1395
+
1396
+ $response = array(
1397
+ 'error' => 'BAD_HTTP_CODE',
1398
+ 'http_code' => $httpResponseCode,
1399
+ 'output' => substr(file_get_contents(get_option('siteurl')), 0, 900),
1400
+ 'rollback_result' => $rollback->apbct_result,
1401
+ );
1402
+
1403
+ die('FAIL '.json_encode($response));
1404
+ }
1405
+
1406
+ $plugin_data = get_plugin_data(__FILE__);
1407
+ $apbct_agent = 'wordpress-'.str_replace('.', '', $plugin_data['Version']);
1408
+ ct_send_feedback('0:' . $apbct_agent);
1409
+
1410
+ die('OK '.json_encode(array('agent' => $apbct_agent)));
1411
+
1412
+ }else{
1413
+ die('FAIL '. json_encode(array('error' => $upgrader->apbct_result)));
1414
+ }
1415
+ }
1416
+
1417
+ function apbct_rc__update_settings($source) {
1418
+
1419
+ global $apbct;
1420
+
1421
+ foreach($apbct->def_settings as $setting => $def_value){
1422
+ if(array_key_exists($setting, $source)){
1423
+ $var = $source[$setting];
1424
+ $type = gettype($def_value);
1425
+ settype($var, $type);
1426
+ if($type == 'string')
1427
+ $var = preg_replace(array('/=/', '/`/'), '', $var);
1428
+ $apbct->settings[$setting] = $var;
1429
+ }
1430
+ }
1431
+
1432
+ $apbct->save('settings');
1433
+
1434
+ return true;
1435
+ }
1436
+
1437
+ function apbct_rc__insert_auth_key($key, $plugin){
1438
+
1439
+ global $apbct;
1440
+
1441
+ if($plugin === 'security-malware-firewall/security-malware-firewall.php'){
1442
+
1443
+ require_once (ABSPATH .'/wp-admin/includes/plugin.php');
1444
+
1445
+ if(is_plugin_active( $plugin )){
1446
+
1447
+ $key = trim($key);
1448
+
1449
+ if($key && preg_match('/^[a-z\d]{3,15}$/', $key)){
1450
+
1451
+ $result = \Cleantalk\ApbctWP\API::method__notice_paid_till(
1452
+ $key,
1453
+ preg_replace('/http[s]?:\/\//', '', get_option('siteurl'), 1), // Site URL
1454
+ 'security'
1455
+ );
1456
+
1457
+ if( empty( $result['error'] ) ) {
1458
+
1459
+ if( $result['valid'] ){
1460
+
1461
+ // Set account params
1462
+ $data = get_option('spbc_data', array());
1463
+ $data['user_token'] = $result['user_token'];
1464
+ $data['notice_show'] = $result['show_notice'];
1465
+ $data['notice_renew'] = $result['renew'];
1466
+ $data['notice_trial'] = $result['trial'];
1467
+ $data['auto_update_app'] = isset($result['show_auto_update_notice']) ? $result['show_auto_update_notice'] : 0;
1468
+ $data['service_id'] = $result['service_id'];
1469
+ $data['moderate'] = $result['moderate'];
1470
+ $data['auto_update_app '] = isset($result['auto_update_app']) ? $result['auto_update_app'] : 0;
1471
+ $data['license_trial'] = isset($result['license_trial']) ? $result['license_trial'] : 0;
1472
+ $data['account_name_ob'] = isset($result['account_name_ob']) ? $result['account_name_ob'] : '';
1473
+ $data['key_is_ok'] = true;
1474
+ update_option('spbc_data', $data);
1475
+
1476
+ // Set key
1477
+ $settings = get_option('spbc_settings', array());
1478
+ $settings['spbc_key'] = $key;
1479
+ update_option('spbc_settings', $settings);
1480
+
1481
+ return 'OK';
1482
+ }else
1483
+ return array('error' => 'KEY_IS_NOT_VALID');
1484
+ }else
1485
+ return array('error' => $result);
1486
+ }else
1487
+ return array('error' => 'KEY_IS_NOT_CORRECT');
1488
+ }else
1489
+ return array('error' => 'PLUGIN_IS_NOT_ACTIVE_OR_NOT_INSTALLED');
1490
+ }else
1491
+ return array('error' => 'PLUGIN_SLUG_INCORRECT');
1492
+ }
1493
+
1494
+ /**
1495
+ * Putting Wordpress to maintenance mode.
1496
+ * For given duration in seconds
1497
+ *
1498
+ * @param $duration
1499
+ *
1500
+ * @return bool
1501
+ */
1502
+ function apbct_maintance_mode__enable( $duration ) {
1503
+ apbct_maintance_mode__disable();
1504
+ $content = "<?php\n\n"
1505
+ . '$upgrading = ' . (time() - ( 60 * 10 ) + $duration) . ';';
1506
+
1507
+ return (bool)file_put_contents( ABSPATH . '.maintenance', $content );
1508
+ }
1509
+
1510
+ /**
1511
+ * Disabling maintenance mode by deleting .maintenance file.
1512
+ *
1513
+ * @return void
1514
+ */
1515
+ function apbct_maintance_mode__disable() {
1516
+ $maintenance_file = ABSPATH . '.maintenance';
1517
+ if ( file_exists( $maintenance_file ) ) {
1518
+ unlink( $maintenance_file );
1519
+ }
1520
+ }
1521
+
1522
+ function cleantalk_get_brief_data(){
1523
+
1524
+ global $apbct;
1525
+
1526
+ $apbct->data['brief_data'] = \Cleantalk\ApbctWP\API::method__get_antispam_report_breif($apbct->api_key);
1527
+ $apbct->saveData();
1528
+
1529
+ return;
1530
+ }
1531
+
1532
+ //Delete cookie for admin trial notice
1533
+ function apbct__hook__wp_logout__delete_trial_notice_cookie(){
1534
+ if(!headers_sent())
1535
+ setcookie('ct_trial_banner_closed', '', time()-3600);
1536
+ }
1537
+
1538
+ function apbct_alt_session__id__get(){
1539
+ $id = \Cleantalk\ApbctWP\Helper::ip__get(array('real'))
1540
+ .apbct_get_server_variable( 'HTTP_USER_AGENT' )
1541
+ .apbct_get_server_variable( 'HTTP_ACCEPT_LANGUAGE' );
1542
+ return hash('sha256', $id);
1543
+ }
1544
+
1545
+ function apbct_alt_sessions__remove_old(){
1546
+ if(rand(0, 1000) < APBCT_SEESION__CHANCE_TO_CLEAN){
1547
+ global $wpdb;
1548
+ $wpdb->query(
1549
+ 'DELETE
1550
+ FROM `'. APBCT_TBL_SESSIONS .'`
1551
+ WHERE last_update < NOW() - INTERVAL '. APBCT_SEESION__LIVE_TIME .' SECOND
1552
+ LIMIT 100000;'
1553
+ );
1554
+ }
1555
+ }
1556
+
1557
+ function apbct_alt_session__save($name, $value){
1558
+
1559
+ global $wpdb;
1560
+
1561
+ $session_id = apbct_alt_session__id__get();
1562
+
1563
+ $wpdb->query(
1564
+ $wpdb->prepare(
1565
+ 'INSERT INTO '. APBCT_TBL_SESSIONS .'
1566
+ (id, name, value, last_update)
1567
+ VALUES (%s, %s, %s, %s)
1568
+ ON DUPLICATE KEY UPDATE
1569
+ value = %s,
1570
+ last_update = %s',
1571
+ $session_id, $name, $value, date('Y-m-d H:i:s'), $value, date('Y-m-d H:i:s')
1572
+ )
1573
+ );
1574
+
1575
+ }
1576
+
1577
+ function apbct_alt_session__get($name){
1578
+ global $wpdb;
1579
+ $session_id = apbct_alt_session__id__get();
1580
+ $result = $wpdb->get_row(
1581
+ $wpdb->prepare(
1582
+ 'SELECT value
1583
+ FROM `'. APBCT_TBL_SESSIONS .'`
1584
+ WHERE id = %s AND name = %s;',
1585
+ $session_id, $name
1586
+ ),
1587
+ OBJECT
1588
+ );
1589
+
1590
+ $result = isset($result->value)
1591
+ ? strpos($result->value, '{') === 0
1592
+ ? (array)json_decode($result->value, true) // JSON
1593
+ : $result->value
1594
+ : false;
1595
+
1596
+ return $result ? $result : null;
1597
+ }
1598
+
1599
+ function apbct_store__urls(){
1600
+
1601
+ global $apbct;
1602
+
1603
+ if($apbct->settings['store_urls'] && empty($apbct->flags__url_stored) && !headers_sent()){
1604
+
1605
+ // URLs HISTORY
1606
+ // Get current url
1607
+ $current_url = apbct_get_server_variable( 'HTTP_HOST' ) . apbct_get_server_variable( 'REQUEST_URI' );
1608
+
1609
+ $current_url = $current_url ? substr($current_url, 0,256) : 'UNKNOWN';
1610
+
1611
+ // Get already stored URLs
1612
+ $urls = $apbct->settings['store_urls__sessions']
1613
+ ? (array)apbct_alt_session__get('apbct_urls')
1614
+ : (array)json_decode(filter_input(INPUT_COOKIE, 'apbct_urls'), true);
1615
+
1616
+ $urls[$current_url][] = time();
1617
+
1618
+ // Rotating. Saving only latest 10
1619
+ $urls[$current_url] = count($urls[$current_url]) > 10 ? array_slice($urls[$current_url], 1, 10) : $urls[$current_url];
1620
+ $urls = count($urls) > 10 ? array_slice($urls, 1, 10) : $urls;
1621
+
1622
+ // Saving
1623
+ $apbct->settings['store_urls__sessions']
1624
+ ? apbct_alt_session__save('apbct_urls', json_encode($urls))
1625
+ : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_urls', json_encode($urls), time()+86400*3, '/', parse_url(get_option('siteurl'),PHP_URL_HOST), false, true, 'Lax');
1626
+
1627
+ // REFERER
1628
+ // Get current fererer
1629
+ $new_site_referer = apbct_get_server_variable( 'HTTP_REFERER' );
1630
+ $new_site_referer = $new_site_referer ? $new_site_referer : 'UNKNOWN';
1631
+
1632
+ // Get already stored referer
1633
+ $site_referer = $apbct->settings['store_urls__sessions']
1634
+ ? apbct_alt_session__get('apbct_site_referer')
1635
+ : filter_input(INPUT_COOKIE, 'apbct_site_referer');
1636
+
1637
+ // Save if empty
1638
+ if( !$site_referer || parse_url($new_site_referer, PHP_URL_HOST) !== apbct_get_server_variable( 'HTTP_HOST' ) ){
1639
+
1640
+ $apbct->settings['store_urls__sessions']
1641
+ ? apbct_alt_session__save('apbct_site_referer', $new_site_referer)
1642
+ : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_site_referer', $new_site_referer, time()+86400*3, '/', parse_url(get_option('siteurl'),PHP_URL_HOST), false, true, 'Lax');
1643
+ }
1644
+
1645
+ $apbct->flags__url_stored = true;
1646
+
1647
+ }
1648
+ }
1649
+
1650
+ /**
1651
+ * Universal method to adding cookies.
1652
+ * Use \Cleantalk\Common\Helper::apbct_cookie__set() instead.
1653
+ * @deprecated
1654
+ */
1655
+ function apbct_cookie__set($name, $value = '', $expires = 0, $path = '', $domain = null, $secure = false, $httponly = false, $samesite = 'Lax' ){
1656
+
1657
+ // For PHP 7.3+ and above
1658
+ if( version_compare( phpversion(), '7.3.0', '>=' ) ){
1659
+
1660
+ $params = array(
1661
+ 'expires' => $expires,
1662
+ 'path' => $path,
1663
+ 'domain' => $domain,
1664
+ 'secure' => $secure,
1665
+ 'httponly' => $httponly,
1666
+ );
1667
+
1668
+ if($samesite)
1669
+ $params['samesite'] = $samesite;
1670
+
1671
+ setcookie( $name, $value, $params );
1672
+
1673
+ // For PHP 5.6 - 7.2
1674
+ }else {
1675
+ if($samesite)
1676
+ $path = $path . '; samesite=' . $samesite;
1677
+ setcookie( $name, $value, $expires, $path, $domain, $secure, $httponly );
1678
+ }
1679
+
1680
+ }
1681
+
1682
+ /*
1683
+ * Set Cookies test for cookie test
1684
+ * Sets cookies with pararms timestamp && landing_timestamp && pervious_referer
1685
+ * Sets test cookie with all other cookies
1686
+ */
1687
+ function apbct_cookie(){
1688
+
1689
+ global $apbct;
1690
+
1691
+ if($apbct->settings['store_urls__sessions'] || $apbct->settings['set_cookies__sessions'])
1692
+ apbct_alt_sessions__remove_old();
1693
+
1694
+ if(
1695
+ empty($apbct->settings['set_cookies']) || // Do not set cookies if option is disabled (for Varnish cache).
1696
+ !empty($apbct->flags__cookies_setuped) || // Cookies already set
1697
+ !empty($apbct->headers_sent) // Headers sent
1698
+ )
1699
+ return false;
1700
+
1701
+ // Prevent headers sent error
1702
+ if(headers_sent($file, $line)){
1703
+ $apbct->headers_sent = true;
1704
+ $apbct->headers_sent__hook = current_action();
1705
+ $apbct->headers_sent__where = $file.':'.$line;
1706
+ return false;
1707
+ }
1708
+
1709
+
1710
+ // Cookie names to validate
1711
+ $cookie_test_value = array(
1712
+ 'cookies_names' => array(),
1713
+ 'check_value' => $apbct->api_key,
1714
+ );
1715
+
1716
+ // We need to skip the domain attribute for prevent including the dot to the cookie's domain on the client.
1717
+ $domain = null;
1718
+
1719
+ // Submit time
1720
+ if(empty($_POST['ct_multipage_form'])){ // Do not start/reset page timer if it is multipage form (Gravitiy forms))
1721
+ $apbct_timestamp = time();
1722
+ $apbct->settings['set_cookies__sessions']
1723
+ ? apbct_alt_session__save('apbct_timestamp', $apbct_timestamp)
1724
+ : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_timestamp', $apbct_timestamp, 0, '/', $domain, false, true, 'Lax' );
1725
+ $cookie_test_value['cookies_names'][] = 'apbct_timestamp';
1726
+ $cookie_test_value['check_value'] .= $apbct_timestamp;
1727
+ }
1728
+
1729
+ // Pervious referer
1730
+ if(apbct_get_server_variable( 'HTTP_REFERER' )){
1731
+ $apbct->settings['set_cookies__sessions']
1732
+ ? apbct_alt_session__save('apbct_prev_referer', apbct_get_server_variable( 'HTTP_REFERER' ))
1733
+ : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_prev_referer', apbct_get_server_variable( 'HTTP_REFERER' ), 0, '/', $domain, false, true, 'Lax' );
1734
+ $cookie_test_value['cookies_names'][] = 'apbct_prev_referer';
1735
+ $cookie_test_value['check_value'] .= apbct_get_server_variable( 'HTTP_REFERER' );
1736
+ }
1737
+
1738
+ // Landing time
1739
+ $site_landing_timestamp = $apbct->settings['set_cookies__sessions']
1740
+ ? apbct_alt_session__get('apbct_site_landing_ts')
1741
+ : filter_input(INPUT_COOKIE, 'apbct_site_landing_ts');
1742
+ if(!$site_landing_timestamp){
1743
+ $site_landing_timestamp = time();
1744
+ $apbct->settings['set_cookies__sessions']
1745
+ ? apbct_alt_session__save('apbct_site_landing_ts', $site_landing_timestamp)
1746
+ : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_site_landing_ts', $site_landing_timestamp, 0, '/', $domain, false, true, 'Lax' );
1747
+ }
1748
+ $cookie_test_value['cookies_names'][] = 'apbct_site_landing_ts';
1749
+ $cookie_test_value['check_value'] .= $site_landing_timestamp;
1750
+
1751
+ // Page hits
1752
+ // Get
1753
+ $page_hits = $apbct->settings['set_cookies__sessions']
1754
+ ? apbct_alt_session__get('apbct_page_hits')
1755
+ : filter_input(INPUT_COOKIE, 'apbct_page_hits');
1756
+ // Set / Increase
1757
+ $page_hits = intval($page_hits) ? $page_hits + 1 : 1;
1758
+
1759
+ $apbct->settings['set_cookies__sessions']
1760
+ ? apbct_alt_session__save('apbct_page_hits', $page_hits)
1761
+ : \Cleantalk\Common\Helper::apbct_cookie__set('apbct_page_hits', $page_hits, 0, '/', $domain, false, true, 'Lax' );
1762
+
1763
+ $cookie_test_value['cookies_names'][] = 'apbct_page_hits';
1764
+ $cookie_test_value['check_value'] .= $page_hits;
1765
+
1766
+ // Cookies test
1767
+ $cookie_test_value['check_value'] = md5($cookie_test_value['check_value']);
1768
+ if(!$apbct->settings['set_cookies__sessions'])
1769
+ \Cleantalk\Common\Helper::apbct_cookie__set('apbct_cookies_test', urlencode(json_encode($cookie_test_value)), 0, '/', $domain, false, true, 'Lax' );
1770
+
1771
+ $apbct->flags__cookies_setuped = true;
1772
+
1773
+ }
1774
+
1775
+ /**
1776
+ * Cookies test for sender
1777
+ * Also checks for valid timestamp in $_COOKIE['apbct_timestamp'] and other apbct_ COOKIES
1778
+ * @return null|0|1;
1779
+ */
1780
+ function apbct_cookies_test()
1781
+ {
1782
+ global $apbct;
1783
+
1784
+ if($apbct->settings['set_cookies__sessions'])
1785
+ return 1;
1786
+
1787
+ if(isset($_COOKIE['apbct_cookies_test'])){
1788
+
1789
+ $cookie_test = json_decode(urldecode($_COOKIE['apbct_cookies_test']),true);
1790
+
1791
+ if(!is_array($cookie_test))
1792
+ return 0;
1793
+
1794
+ $check_srting = $apbct->api_key;
1795
+ foreach($cookie_test['cookies_names'] as $cookie_name){
1796
+ $check_srting .= isset($_COOKIE[$cookie_name]) ? $_COOKIE[$cookie_name] : '';
1797
+ } unset($cookie_name);
1798
+
1799
+ if($cookie_test['check_value'] == md5($check_srting)){
1800
+ return 1;
1801
+ }else{
1802
+ return 0;
1803
+ }
1804
+ }else{
1805
+ return null;
1806
+ }
1807
+ }
1808
+
1809
+ function apbct_cookies__delete($cookie){
1810
+ if(isset($_COOKIE[$cookie]))
1811
+ setcookie($cookie, '', time()-3600);
1812
+ }
1813
+
1814
+ function apbct_cookies__delete_all(){
1815
+ if(count($_COOKIE)){
1816
+ foreach($_COOKIE as $key => $val){
1817
+ if(preg_match("/apbct_|ct_/", $key)){
1818
+ setcookie($key, '', time()-3600);
1819
+ }
1820
+ } unset($key, $val);
1821
+ }
1822
+ return false;
1823
+ }
1824
+
1825
+ /**
1826
+ * Gets submit time
1827
+ * Uses Cookies with check via apbct_cookies_test()
1828
+ * @return null|int;
1829
+ */
1830
+ function apbct_get_submit_time()
1831
+ {
1832
+ global $apbct;
1833
+ $apbct_timestamp = $apbct->settings['set_cookies__sessions']
1834
+ ? apbct_alt_session__get('apbct_timestamp')
1835
+ : filter_input(INPUT_COOKIE, 'apbct_timestamp');
1836
+ return apbct_cookies_test() == 1 ? time() - (int)$apbct_timestamp : null;
1837
+ }
1838
+
1839
+ /*
1840
+ * Inner function - Account status check
1841
+ * Scheduled in 1800 seconds for default!
1842
+ */
1843
+ function ct_account_status_check($api_key = null, $process_errors = true){
1844
+
1845
+ global $apbct;
1846
+
1847
+ $api_key = $api_key ? $api_key : $apbct->api_key;
1848
+ $result = \Cleantalk\ApbctWP\API::method__notice_paid_till(
1849
+ $api_key,
1850
+ preg_replace('/http[s]?:\/\//', '', get_option('siteurl'), 1),
1851
+ ! is_main_site() && $apbct->white_label ? 'anti-spam-hosting' : 'antispam'
1852
+ );
1853
+
1854
+ if(empty($result['error']) || !empty($result['valid'])){
1855
+
1856
+ // Notices
1857
+ $apbct->data['notice_show'] = isset($result['show_notice']) ? (int)$result['show_notice'] : 0;
1858
+ $apbct->data['notice_renew'] = isset($result['renew']) ? (int)$result['renew'] : 0;
1859
+ $apbct->data['notice_trial'] = isset($result['trial']) ? (int)$result['trial'] : 0;
1860
+ $apbct->data['notice_review'] = isset($result['show_review']) ? (int)$result['show_review'] : 0;
1861
+ $apbct->data['notice_auto_update'] = isset($result['show_auto_update_notice']) ? (int)$result['show_auto_update_notice'] : 0;
1862
+
1863
+ // Other
1864
+ $apbct->data['service_id'] = isset($result['service_id']) ? (int)$result['service_id'] : 0;
1865
+ $apbct->data['valid'] = isset($result['valid']) ? (int)$result['valid'] : 0;
1866
+ $apbct->data['moderate'] = isset($result['moderate']) ? (int)$result['moderate'] : 0;
1867
+ $apbct->data['ip_license'] = isset($result['ip_license']) ? (int)$result['ip_license'] : 0;
1868
+ $apbct->data['moderate_ip'] = isset($result['moderate_ip'], $result['ip_license']) ? (int)$result['moderate_ip'] : 0;
1869
+ $apbct->data['spam_count'] = isset($result['spam_count']) ? (int)$result['spam_count'] : 0;
1870
+ $apbct->data['auto_update'] = isset($result['auto_update_app']) ? (int)$result['auto_update_app'] : 0;
1871
+ $apbct->data['user_token'] = isset($result['user_token']) ? (string)$result['user_token'] : '';
1872
+ $apbct->data['license_trial'] = isset($result['license_trial']) ? (int)$result['license_trial'] : 0;
1873
+ $apbct->data['account_name_ob'] = isset($result['account_name_ob']) ? (string)$result['account_name_ob'] : '';
1874
+
1875
+ Cron::updateTask('check_account_status', 'ct_account_status_check', 86400);
1876
+
1877
+ $apbct->error_delete('account_check', 'save');
1878
+
1879
+ $apbct->saveData();
1880
+
1881
+ }elseif($process_errors){
1882
+ $apbct->error_add('account_check', $result);
1883
+ }
1884
+
1885
+ if(!empty($result['valid'])){
1886
+ $apbct->data['key_is_ok'] = true;
1887
+ $result = true;
1888
+ }else{
1889
+ $apbct->data['key_is_ok'] = false;
1890
+ $result = false;
1891
+ }
1892
+
1893
+ return $result;
1894
+ }
1895
+
1896
+ function ct_mail_send_connection_report() {
1897
+
1898
+ global $apbct;
1899
+
1900
+ if (($apbct->settings['send_connection_reports'] == 1 && $apbct->connection_reports['negative'] > 0) || !empty($_GET['ct_send_connection_report']))
1901
+ {
1902
+ $to = "welcome@cleantalk.org" ;
1903
+ $subject = "Connection report for " . apbct_get_server_variable( 'HTTP_HOST' );
1904
+ $message = '
1905
+ <html>
1906
+ <head>
1907
+ <title></title>
1908
+ </head>
1909
+ <body>
1910
+ <p>From '.$apbct->connection_reports['since'].' to '.date('d M').' has been made '.($apbct->connection_reports['success']+$apbct->connection_reports['negative']).' calls, where '.$apbct->connection_reports['success'].' were success and '.$apbct->connection_reports['negative'].' were negative</p>
1911
+ <p>Negative report:</p>
1912
+ <table> <tr>
1913
+ <td>&nbsp;</td>
1914
+ <td><b>Date</b></td>
1915
+ <td><b>Page URL</b></td>
1916
+ <td><b>Library report</b></td>
1917
+ <td><b>Server IP</b></td>
1918
+ </tr>
1919
+ ';
1920
+ foreach ($apbct->connection_reports['negative_report'] as $key => $report)
1921
+ {
1922
+ $message.= '<tr>'
1923
+ . '<td>'.($key+1).'.</td>'
1924
+ . '<td>'.$report['date'].'</td>'
1925
+ . '<td>'.$report['page_url'].'</td>'
1926
+ . '<td>'.$report['lib_report'].'</td>'
1927
+ . '<td>'.$report['work_url'].'</td>'
1928
+ . '</tr>';
1929
+ }
1930
+ $message.='</table></body></html>';
1931
+
1932
+ $headers = 'Content-type: text/html; charset=windows-1251 \r\n';
1933
+ $headers .= 'From: '.get_option('admin_email');
1934
+ mail($to, $subject, $message, $headers);
1935
+ }
1936
+
1937
+ $apbct->data['connection_reports'] = $apbct->def_data['connection_reports'];
1938
+ $apbct->data['connection_reports']['since'] = date('d M');
1939
+ $apbct->saveData();
1940
+ }
1941
+
1942
+ //* Write $message to the plugin's debug option
1943
+ function apbct_log($message = 'empty', $func = null, $params = array())
1944
+ {
1945
+ global $apbct;
1946
+
1947
+ $debug = get_option( APBCT_DEBUG );
1948
+
1949
+ $function = $func ? $func : '';
1950
+ $cron = in_array('cron', $params) ? true : false;
1951
+ $data = in_array('data', $params) ? true : false;
1952
+ $settings = in_array('settings', $params) ? true : false;
1953
+
1954
+ if(is_array($message) or is_object($message))
1955
+ $message = print_r($message, true);
1956
+
1957
+ if($message) $debug[date("H:i:s", microtime(true))."_ACTION_".strval(current_action())."_FUNCTION_".strval($func)] = $message;
1958
+ if($cron) $debug[date("H:i:s", microtime(true))."_ACTION_".strval(current_action())."_FUNCTION_".strval($func).'_cron'] = $apbct->cron;
1959
+ if($data) $debug[date("H:i:s", microtime(true))."_ACTION_".strval(current_action())."_FUNCTION_".strval($func).'_data'] = $apbct->data;
1960
+ if($settings) $debug[date("H:i:s", microtime(true))."_ACTION_".strval(current_action())."_FUNCTION_".strval($func).'_settings'] = $apbct->settings;
1961
+
1962
+ update_option(APBCT_DEBUG, $debug);
1963
+ }
1964
+
1965
+ function apbct_sfw__delete_tables( $blog_id, $drop ) {
1966
+
1967
+ global $wpdb;
1968
+
1969
+ $initial_blog = get_current_blog_id();
1970
+
1971
+ switch_to_blog($blog_id);
1972
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_sfw`;'); // Deleting SFW data
1973
+ $wpdb->query('DROP TABLE IF EXISTS `'. $wpdb->prefix.'cleantalk_sfw_logs`;'); // Deleting SFW logs
1974
+
1975
+ switch_to_blog($initial_blog);
1976
+ }
1977
+
1978
+ /**
1979
+ * Is enable for user group
1980
+ *
1981
+ * @param WP_User $user
1982
+ *
1983
+ * @return boolean
1984
+ */
1985
+ function apbct_is_user_enable($user = null) {
1986
+
1987
+ global $current_user;
1988
+
1989
+ $user = !empty($user) ? $user : $current_user;
1990
+
1991
+ return apbct_is_user_role_in(array('administrator', 'editor', 'author'), $user)
1992
+ ? false
1993
+ : true;
1994
+ }
1995
+
1996
+ /**
1997
+ * Checks if the current user has role
1998
+ *
1999
+ * @param array $roles array of strings
2000
+ * @param int|string|WP_User|mixed $user User ID to check|user_login|WP_User
2001
+ *
2002
+ * @return boolean Does the user has this role|roles
2003
+ */
2004
+ function apbct_is_user_role_in( $roles, $user = false ){
2005
+
2006
+ if( is_numeric($user) && function_exists('get_userdata')) $user = get_userdata( $user );
2007
+ if( is_string($user) && function_exists('get_user_by')) $user = get_user_by('login', $user );
2008
+ if( ! $user && function_exists('wp_get_current_user')) $user = wp_get_current_user();
2009
+ if( ! $user ) $user = apbct_wp_get_current_user();
2010
+
2011
+ if( empty($user->ID) )
2012
+ return false;
2013
+
2014
+ foreach( (array) $roles as $role ){
2015
+ if( isset($user->caps[ strtolower($role) ]) || in_array(strtolower($role), $user->roles) )
2016
+ return true;
2017
+ }
2018
+
2019
+ return false;
2020
+ }
2021
+
2022
+ /**
2023
+ * Update and rotate statistics with requests exection time
2024
+ *
2025
+ * @param $exec_time
2026
+ */
2027
+ function apbct_statistics__rotate($exec_time){
2028
+
2029
+ global $apbct;
2030
+
2031
+ // Delete old stats
2032
+ if(min(array_keys($apbct->stats['requests'])) < time() - (86400 * 7))
2033
+ unset($apbct->stats['requests'][min(array_keys($apbct->stats['requests']))]);
2034
+
2035
+ // Create new if newest older than 1 day
2036
+ if(empty($apbct->stats['requests']) || max(array_keys($apbct->stats['requests'])) < time() - (86400 * 1))
2037
+ $apbct->stats['requests'][time()] = array('amount' => 0, 'average_time' => 0);
2038
+
2039
+ // Update all existing stats
2040
+ foreach($apbct->stats['requests'] as &$weak_stat){
2041
+ $weak_stat['average_time'] = ($weak_stat['average_time'] * $weak_stat['amount'] + $exec_time) / ++$weak_stat['amount'];
2042
+ }
2043
+
2044
+ $apbct->save('stats');
2045
+ }
2046
+
2047
+ /**
2048
+ * Runs update actions for new version.
2049
+ *
2050
+ * @global \Cleantalk\ApbctWP\State $apbct
2051
+ */
2052
+ function apbct_update_actions(){
2053
+
2054
+ global $apbct;
2055
+
2056
+ // Update logic
2057
+ if($apbct->plugin_version != APBCT_VERSION){
2058
+
2059
+ // Main blog
2060
+ if(is_main_site()){
2061
+
2062
+ require_once(CLEANTALK_PLUGIN_DIR.'inc/cleantalk-updater.php');
2063
+
2064
+ $result = apbct_run_update_actions($apbct->plugin_version, APBCT_VERSION);
2065
+
2066
+ //If update is successfull
2067
+ if($result === true)
2068
+ apbct_update__set_version__from_plugin('from_plugin');
2069
+
2070
+ ct_send_feedback('0:' . APBCT_AGENT ); // Send feedback to let cloud know about updated version.
2071
+
2072
+ // Side blogs
2073
+ }else{
2074
+ apbct_update__set_version__from_plugin('from_plugin');
2075
+ }
2076
+ }
2077
+
2078
+ }
2079
+
2080
+ /**
2081
+ * Set version of plugin in database
2082
+ *
2083
+ * @param string $ver
2084
+ *
2085
+ * @return bool
2086
+ * @global \Cleantalk\ApbctWP\State $apbct
2087
+ *
2088
+ */
2089
+ function apbct_update__set_version__from_plugin($ver){
2090
+ global $apbct;
2091
+ switch (true){
2092
+ case $ver === 'from_plugin':
2093
+ $apbct->data['plugin_version'] = APBCT_VERSION;
2094
+ break;
2095
+ case preg_match('/^\d+\.\d+(\.\d+)?(-[a-zA-Z0-9-_]+)?$/', $ver) === 1;
2096
+ $apbct->data['plugin_version'] = $ver;
2097
+ break;
2098
+ default:
2099
+ return false;
2100
+ break;
2101
+ }
2102
+ $apbct->saveData();
2103
+ return true;
2104
+ }
inc/cleantalk-autoloader.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
-
3
- /**
4
- * Autoloader for \Cleantalk\* classes
5
- *
6
- * @param string $class
7
- *
8
- * @return void
9
- */
10
- function apbct_autoloader( $class ){
11
- // Register class auto loader
12
- // Custom modules
13
- if( strpos( $class, 'cleantalk-spam-protect') !== false && ! class_exists( '\\' . $class )) {
14
- $class_file = CLEANTALK_PLUGIN_DIR . 'lib' . DIRECTORY_SEPARATOR . $class . '.php';
15
- if( file_exists( $class_file ) ){
16
- require_once( $class_file );
17
- }
18
- }
19
- }
20
-
21
- spl_autoload_register( 'apbct_autoloader' );
1
+ <?php
2
+
3
+ /**
4
+ * Autoloader for \Cleantalk\* classes
5
+ *
6
+ * @param string $class
7
+ *
8
+ * @return void
9
+ */
10
+ function apbct_autoloader( $class ){
11
+ // Register class auto loader
12
+ // Custom modules
13
+ if( strpos( $class, 'cleantalk-spam-protect') !== false && ! class_exists( '\\' . $class )) {
14
+ $class_file = CLEANTALK_PLUGIN_DIR . 'lib' . DIRECTORY_SEPARATOR . $class . '.php';
15
+ if( file_exists( $class_file ) ){
16
+ require_once( $class_file );
17
+ }
18
+ }
19
+ }
20
+
21
+ spl_autoload_register( 'apbct_autoloader' );
lib/Cleantalk/Antispam/Integrations.php CHANGED
@@ -1,87 +1,87 @@
1
- <?php
2
-
3
-
4
- namespace Cleantalk\Antispam;
5
-
6
-
7
- class Integrations
8
- {
9
-
10
- private $integrations = array();
11
-
12
- private $integration;
13
-
14
- public function __construct( $integrations )
15
- {
16
- $this->integrations = $integrations;
17
-
18
- foreach( $this->integrations as $integration_name => $integration_info ) {
19
- if( $integration_info['ajax'] ) {
20
- add_action( 'wp_ajax_' . $integration_info['hook'], array( $this, 'checkSpam' ), 1 );
21
- add_action( 'wp_ajax_nopriv_' . $integration_info['hook'], array( $this, 'checkSpam' ), 1 );
22
- } else {
23
- add_action( $integration_info['hook'], array( $this, 'checkSpam' ) );
24
- }
25
- }
26
- }
27
-
28
- public function checkSpam( $argument )
29
- {
30
- global $cleantalk_executed;
31
-
32
- // Getting current integration name
33
- $current_integration = $this->get_current_integration_triggered( current_action() );
34
- if( $current_integration ) {
35
- // Instantiate the integration object
36
- $class = '\\Cleantalk\\Antispam\\Integrations\\' . $current_integration;
37
- if( class_exists( $class )) {
38
- $this->integration = new $class();
39
- if( ! ( $this->integration instanceof \Cleantalk\Antispam\Integrations\IntegrationBase ) ) {
40
- // @ToDo have to handle an error
41
- do_action( 'apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, array('Integration is not instanse of IntegrationBase class.') );
42
- return;
43
- }
44
- // Run data collecting for spam checking
45
- $data = $this->integration->getDataForChecking( $argument );
46
- if( ! is_null( $data ) ) {
47
- // Go spam checking
48
- $base_call_result = apbct_base_call(
49
- array(
50
- 'message' => !empty( $data['message'] ) ? json_encode( $data['message'] ) : '',
51
- 'sender_email' => !empty( $data['email'] ) ? $data['email'] : '',
52
- 'sender_nickname' => !empty( $data['nickname'] ) ? $data['nickname'] : '',
53
- 'post_info' => array(
54
- 'comment_type' => 'contact_form_wordpress_' . strtolower($current_integration),
55
- 'post_url' => apbct_get_server_variable( 'HTTP_REFERER' ), // Page URL must be an previous page
56
- ),
57
- )
58
- );
59
-
60
- $ct_result = $base_call_result['ct_result'];
61
-
62
- $cleantalk_executed = true;
63
-
64
- if ($ct_result->allow == 0) {
65
- // Do blocking if it is a spam
66
- $this->integration->doBlock( $ct_result->comment );
67
- }
68
- } else {
69
- // @ToDo have to handle an error
70
- return;
71
- }
72
- }
73
- }
74
- }
75
-
76
- private function get_current_integration_triggered( $hook )
77
- {
78
- if( $hook !== false ) {
79
- foreach( $this->integrations as $integration_name => $integration_info ) {
80
- if( strpos( $hook, $integration_info['hook'] ) !== false ) {
81
- return $integration_name;
82
- }
83
- }
84
- }
85
- return false;
86
- }
87
  }
1
+ <?php
2
+
3
+
4
+ namespace Cleantalk\Antispam;
5
+
6
+
7
+ class Integrations
8
+ {
9
+
10
+ private $integrations = array();
11
+
12
+ private $integration;
13
+
14
+ public function __construct( $integrations )
15
+ {
16
+ $this->integrations = $integrations;
17
+
18
+ foreach( $this->integrations as $integration_name => $integration_info ) {
19
+ if( $integration_info['ajax'] ) {
20
+ add_action( 'wp_ajax_' . $integration_info['hook'], array( $this, 'checkSpam' ), 1 );
21
+ add_action( 'wp_ajax_nopriv_' . $integration_info['hook'], array( $this, 'checkSpam' ), 1 );
22
+ } else {
23
+ add_action( $integration_info['hook'], array( $this, 'checkSpam' ) );
24
+ }
25
+ }
26
+ }
27
+
28
+ public function checkSpam( $argument )
29
+ {
30
+ global $cleantalk_executed;
31
+
32
+ // Getting current integration name
33
+ $current_integration = $this->get_current_integration_triggered( current_action() );
34
+ if( $current_integration ) {
35
+ // Instantiate the integration object
36
+ $class = '\\Cleantalk\\Antispam\\Integrations\\' . $current_integration;
37
+ if( class_exists( $class )) {
38
+ $this->integration = new $class();
39
+ if( ! ( $this->integration instanceof \Cleantalk\Antispam\Integrations\IntegrationBase ) ) {
40
+ // @ToDo have to handle an error
41
+ do_action( 'apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, array('Integration is not instanse of IntegrationBase class.') );
42
+ return;
43
+ }
44
+ // Run data collecting for spam checking
45
+ $data = $this->integration->getDataForChecking( $argument );
46
+ if( ! is_null( $data ) ) {
47
+ // Go spam checking
48
+ $base_call_result = apbct_base_call(
49
+ array(
50
+ 'message' => !empty( $data['message'] ) ? json_encode( $data['message'] ) : '',
51
+ 'sender_email' => !empty( $data['email'] ) ? $data['email'] : '',
52
+ 'sender_nickname' => !empty( $data['nickname'] ) ? $data['nickname'] : '',
53
+ 'post_info' => array(
54
+ 'comment_type' => 'contact_form_wordpress_' . strtolower($current_integration),
55
+ 'post_url' => apbct_get_server_variable( 'HTTP_REFERER' ), // Page URL must be an previous page
56
+ ),
57
+ )
58
+ );
59
+
60
+ $ct_result = $base_call_result['ct_result'];
61
+
62
+ $cleantalk_executed = true;
63
+
64
+ if ($ct_result->allow == 0) {
65
+ // Do blocking if it is a spam
66
+ $this->integration->doBlock( $ct_result->comment );
67
+ }
68
+ } else {
69
+ // @ToDo have to handle an error
70
+ return;
71
+ }
72
+ }
73
+ }
74
+ }
75
+
76
+ private function get_current_integration_triggered( $hook )
77
+ {
78
+ if( $hook !== false ) {
79
+ foreach( $this->integrations as $integration_name => $integration_info ) {
80
+ if( strpos( $hook, $integration_info['hook'] ) !== false ) {
81
+ return $integration_name;
82
+ }
83
+ }
84
+ }
85
+ return false;
86
+ }
87
  }
lib/Cleantalk/Antispam/Integrations/ContactBank.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
-
3
-
4
- namespace Cleantalk\Antispam\Integrations;
5
-
6
-
7
- class ContactBank extends IntegrationBase
8
- {
9
-
10
- function getDataForChecking( $argument )
11
- {
12
- if( isset( $_REQUEST['param'] ) ) {
13
- parse_str( isset( $_REQUEST['data'] ) ? base64_decode( $_REQUEST['data'] ) : '', $form_data );
14
- return ct_get_fields_any($form_data);
15
- }
16
- return null;
17
- }
18
-
19
- function doBlock( $message )
20
- {
21
- die(json_encode(array('apbct' => array('blocked' => true, 'comment' => $message,))));
22
- }
23
  }
1
+ <?php
2
+
3
+
4
+ namespace Cleantalk\Antispam\Integrations;
5
+
6
+
7
+ class ContactBank extends IntegrationBase
8
+ {
9
+
10
+ function getDataForChecking( $argument )
11
+ {
12
+ if( isset( $_REQUEST['param'] ) ) {
13
+ parse_str( isset( $_REQUEST['data'] ) ? base64_decode( $_REQUEST['data'] ) : '', $form_data );
14
+ return ct_get_fields_any($form_data);
15
+ }
16
+ return null;
17
+ }
18
+
19
+ function doBlock( $message )
20
+ {
21
+ die(json_encode(array('apbct' => array('blocked' => true, 'comment' => $message,))));
22
+ }
23
  }
lib/Cleantalk/Antispam/Integrations/FluentForm.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
-
4
- namespace Cleantalk\Antispam\Integrations;
5
-
6
-
7
- class FluentForm extends IntegrationBase
8
- {
9
-
10
- function getDataForChecking( $argument )
11
- {
12
- if( isset( $_POST['data'] ) ) {
13
- parse_str( $_POST['data'], $form_data );
14
- return ct_get_fields_any($form_data);
15
- }
16
- return null;
17
- }
18
-
19
- function doBlock($message)
20
- {
21
- wp_send_json(
22
- array(
23
- 'errors' => array(
24
- 'restricted' => array(
25
- $message
26
- )
27
- )
28
- ), 422
29
- );
30
- }
31
  }
1
+ <?php
2
+
3
+
4
+ namespace Cleantalk\Antispam\Integrations;
5
+
6
+
7
+ class FluentForm extends IntegrationBase
8
+ {
9
+
10
+ function getDataForChecking( $argument )
11
+ {
12
+ if( isset( $_POST['data'] ) ) {
13
+ parse_str( $_POST['data'], $form_data );
14
+ return ct_get_fields_any($form_data);
15
+ }
16
+ return null;
17
+ }
18
+
19
+ function doBlock($message)
20
+ {
21
+ wp_send_json(
22
+ array(
23
+ 'errors' => array(
24
+ 'restricted' => array(
25
+ $message
26
+ )
27
+ )
28
+ ), 422
29
+ );
30
+ }
31
  }
lib/Cleantalk/Antispam/Integrations/IntegrationBase.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
-
3
-
4
- namespace Cleantalk\Antispam\Integrations;
5
-
6
-
7
- abstract class IntegrationBase
8
- {
9
- abstract function getDataForChecking( $argument );
10
- abstract function doBlock( $message );
11
  }
1
+ <?php
2
+
3
+
4
+ namespace Cleantalk\Antispam\Integrations;
5
+
6
+
7
+ abstract class IntegrationBase
8
+ {
9
+ abstract function getDataForChecking( $argument );
10
+ abstract function doBlock( $message );
11
  }
lib/Cleantalk/ApbctWP/Firewall/SFW.php CHANGED
@@ -1,524 +1,526 @@
1
- <?php
2
-
3
- namespace Cleantalk\ApbctWP\Firewall;
4
-
5
- use Cleantalk\ApbctWP\Helper as Helper;
6
- use Cleantalk\Variables\Cookie;
7
- use Cleantalk\Variables\Get;
8
- use Cleantalk\Variables\Server;
9
-
10
- class SFW extends \Cleantalk\Common\Firewall\FirewallModule {
11
-
12
- /**
13
- * @var bool
14
- */
15
- private $test;
16
-
17
- // Additional params
18
- private $sfw_counter = false;
19
- private $api_key = false;
20
- private $apbct = array();
21
- private $set_cookies = false;
22
- private $cookie_domain = false;
23
-
24
- public $module_name = 'SFW';
25
-
26
- private $real_ip;
27
- private $debug;
28
- private $debug_data = '';
29
-
30
- /**
31
- * FireWall_module constructor.
32
- * Use this method to prepare any data for the module working.
33
- *
34
- * @param string $log_table
35
- * @param string $data_table
36
- * @param $params
37
- */
38
- public function __construct( $log_table, $data_table, $params = array() ){
39
-
40
- $this->db__table__data = $data_table ?: null;
41
- $this->db__table__logs = $log_table ?: null;
42
-
43
- foreach( $params as $param_name => $param ){
44
- $this->$param_name = isset( $this->$param_name ) ? $param : false;
45
- }
46
-
47
- $this->debug = (bool) Get::get( 'debug' );
48
-
49
- }
50
-
51
- /**
52
- * @param $ips
53
- */
54
- public function ip__append_additional( &$ips ){
55
-
56
- $this->real_ip = isset($ips['real']) ? $ips['real'] : null;
57
-
58
- if( Get::get( 'sfw_test_ip' ) ){
59
- if( Helper::ip__validate( Get::get( 'sfw_test_ip' ) ) !== false ){
60
- $ips['sfw_test'] = Get::get( 'sfw_test_ip' );
61
- $this->test_ip = Get::get( 'sfw_test_ip' );
62
- $this->test = true;
63
- }
64
- }
65
-
66
-
67
- }
68
-
69
- /**
70
- * Use this method to execute main logic of the module.
71
- *
72
- * @return array Array of the check results
73
- */
74
- public function check(){
75
-
76
- $results = array();
77
-
78
- // Skip by cookie
79
- foreach( $this->ip_array as $current_ip ){
80
-
81
- if( Cookie::get( 'ct_sfw_pass_key' ) == md5( $current_ip . $this->api_key ) ){
82
-
83
- if( Cookie::get( 'ct_sfw_passed' ) ){
84
-
85
- if( ! headers_sent() ){
86
- \Cleantalk\Common\Helper::apbct_cookie__set( 'ct_sfw_passed', '0', time() + 86400 * 3, '/', null, false, true, 'Lax' );
87
- }
88
-
89
- $results[] = array( 'ip' => $current_ip, 'is_personal' => false, 'status' => 'PASS_SFW__BY_COOKIE', );
90
-
91
- if( $this->sfw_counter ){
92
- $this->apbct->data['sfw_counter']['all'] ++;
93
- $this->apbct->saveData();
94
- }
95
-
96
- }
97
-
98
- return $results;
99
- }
100
- }
101
-
102
- // Common check
103
- foreach($this->ip_array as $origin => $current_ip){
104
-
105
- $current_ip_v4 = sprintf("%u", ip2long($current_ip));
106
- for ( $needles = array(), $m = 6; $m <= 32; $m ++ ) {
107
- $mask = sprintf( "%u", ip2long( long2ip( - 1 << ( 32 - (int) $m ) ) ) );
108
- $needles[] = bindec( decbin( $mask ) & decbin( $current_ip_v4 ) );
109
- }
110
- $needles = array_unique( $needles );
111
-
112
- $db_results = $this->db->fetch_all("SELECT
113
- network, mask, status
114
- FROM " . $this->db__table__data . "
115
- WHERE network IN (". implode( ',', $needles ) .")
116
- AND network = " . $current_ip_v4 . " & mask");
117
-
118
- if( ! empty( $db_results ) ){
119
-
120
- foreach( $db_results as $db_result ){
121
-
122
- if( $db_result['status'] == 1 )
123
- $results[] = array('ip' => $current_ip, 'is_personal' => false, 'status' => 'PASS_SFW__BY_WHITELIST',);
124
- else
125
- $results[] = array('ip' => $current_ip, 'is_personal' => false, 'status' => 'DENY_SFW',);
126
-
127
- }
128
-
129
- }else{
130
-
131
- $results[] = array( 'ip' => $current_ip, 'is_personal' => false, 'status' => 'PASS_SFW' );
132
-
133
- }
134
- }
135
-
136
- return $results;
137
- }
138
-
139
- /**
140
- * Add entry to SFW log.
141
- * Writes to database.
142
- *
143
- * @param string $ip
144
- * @param $status
145
- */
146
- public function update_log( $ip, $status ) {
147
-
148
- if( in_array( $status, array( 'PASS_SFW__BY_WHITELIST', 'PASS_SFW' ) ) ){
149
- return;
150
- }
151
-
152
- $id = md5( $ip );
153
- $time = time();
154
-
155
- $query = "INSERT INTO " . $this->db__table__logs . "
156
- SET
157
- id = '$id',
158
- ip = '$ip',
159
- status = '$status',
160
- all_entries = 1,
161
- blocked_entries = 1,
162
- entries_timestamp = '" . $time . "'
163
- ON DUPLICATE KEY
164
- UPDATE
165
- status = '$status',
166
- all_entries = all_entries + 1,
167
- blocked_entries = blocked_entries" . ( strpos( $status, 'DENY' ) !== false ? ' + 1' : '' ) . ",
168
- entries_timestamp = '" . intval( $time ) . "'";
169
-
170
- $this->db->execute( $query );
171
- }
172
-
173
- public function actions_for_denied( $result ){
174
-
175
- if( $this->sfw_counter ){
176
- $this->apbct->data['sfw_counter']['blocked']++;
177
- $this->apbct->saveData();
178
- }
179
-
180
- }
181
-
182
- public function actions_for_passed( $result ){
183
- if( $this->set_cookies && ! headers_sent() )
184
- \Cleantalk\ApbctWP\Helper::apbct_cookie__set( 'ct_sfw_pass_key', md5( $result['ip'] . $this->api_key ), time() + 86400 * 30, '/', null, false );
185
- }
186
-
187
- /**
188
- * Shows DIE page.
189
- * Stops script executing.
190
- *
191
- * @param $result
192
- */
193
- public function _die( $result ){
194
-
195
- parent::_die( $result );
196
-
197
- // Statistics
198
- if(!empty($this->blocked_ips)){
199
- reset($this->blocked_ips);
200
- $this->apbct->stats['last_sfw_block']['time'] = time();
201
- $this->apbct->stats['last_sfw_block']['ip'] = $result['ip'];
202
- $this->apbct->save('stats');
203
- }
204
-
205
- // File exists?
206
- if(file_exists(CLEANTALK_PLUGIN_DIR . "lib/Cleantalk/ApbctWP/Firewall/die_page__SFW.html")){
207
-
208
- $sfw_die_page = file_get_contents(CLEANTALK_PLUGIN_DIR . "lib/Cleantalk/ApbctWP/Firewall/die_page__SFW.html");
209
-
210
- // Translation
211
- $replaces = array(
212
- '{SFW_DIE_NOTICE_IP}' => __('SpamFireWall is activated for your IP ', 'cleantalk-spam-protect'),
213
- '{SFW_DIE_MAKE_SURE_JS_ENABLED}' => __( 'To continue working with web site, please make sure that you have enabled JavaScript.', 'cleantalk-spam-protect' ),
214
- '{SFW_DIE_CLICK_TO_PASS}' => __('Please click the link below to pass the protection,', 'cleantalk-spam-protect'),
215
- '{SFW_DIE_YOU_WILL_BE_REDIRECTED}' => sprintf(__('Or you will be automatically redirected to the requested page after %d seconds.', 'cleantalk-spam-protect'), 3),
216
- '{CLEANTALK_TITLE}' => ($this->test ? __('This is the testing page for SpamFireWall', 'cleantalk-spam-protect') : ''),
217
- '{REMOTE_ADDRESS}' => $result['ip'],
218
- '{SERVICE_ID}' => $this->apbct->data['service_id'],
219
- '{HOST}' => Server::get( 'HTTP_HOST' ),
220
- '{GENERATED}' => '<p>The page was generated at&nbsp;' . date( 'D, d M Y H:i:s' ) . "</p>",
221
- '{REQUEST_URI}' => Server::get( 'REQUEST_URI' ),
222
-
223
- // Cookie
224
- '{COOKIE_PREFIX}' => '',
225
- '{COOKIE_DOMAIN}' => $this->cookie_domain,
226
- '{COOKIE_SFW}' => $this->test ? $this->test_ip : md5( $result['ip'] . $this->api_key ),
227
- '{COOKIE_ANTICRAWLER}' => md5( $this->api_key . $result['ip'] ),
228
-
229
- // Test
230
- '{TEST_TITLE}' => '',
231
- '{REAL_IP__HEADER}' => '',
232
- '{TEST_IP__HEADER}' => '',
233
- '{TEST_IP}' => '',
234
- '{REAL_IP}' => '',
235
- );
236
-
237
- // Test
238
- if($this->test){
239
- $replaces['{TEST_TITLE}'] = __( 'This is the testing page for SpamFireWall', 'cleantalk-spam-protect' );
240
- $replaces['{REAL_IP__HEADER}'] = 'Real IP:';
241
- $replaces['{TEST_IP__HEADER}'] = 'Test IP:';
242
- $replaces['{TEST_IP}'] = $this->test_ip;
243
- $replaces['{REAL_IP}'] = $this->real_ip;
244
- }
245
-
246
- // Debug
247
- if($this->debug){
248
- $debug = '<h1>Headers</h1>'
249
- . var_export(apache_request_headers(), true)
250
- . '<h1>REMOTE_ADDR</h1>'
251
- . Server::get( 'REMOTE_ADDR' )
252
- . '<h1>SERVER_ADDR</h1>'
253
- . Server::get( 'REMOTE_ADDR' )
254
- . '<h1>IP_ARRAY</h1>'
255
- . var_export($this->ip_array, true)
256
- . '<h1>ADDITIONAL</h1>'
257
- . var_export($this->debug_data, true);
258
- }
259
- $replaces['{DEBUG}'] = isset( $debug ) ? $debug : '';
260
-
261
- foreach( $replaces as $place_holder => $replace ){
262
- $sfw_die_page = str_replace( $place_holder, $replace, $sfw_die_page );
263
- }
264
-
265
- wp_die($sfw_die_page, "Blacklisted", Array('response'=>403));
266
-
267
- }else{
268
- wp_die("IP BLACKLISTED", "Blacklisted", Array('response'=>403));
269
- }
270
-
271
- }
272
-
273
- /**
274
- * Sends and wipe SFW log
275
- *
276
- * @param $db
277
- * @param $log_table
278
- * @param string $ct_key API key
279
- *
280
- * @return array|bool array('error' => STRING)
281
- */
282
- public static function send_log( $db, $log_table, $ct_key ) {
283
-
284
- //Getting logs
285
- $query = "SELECT * FROM " . $log_table . ";";
286
- $db->fetch_all( $query );
287
-
288
- if( count( $db->result ) ){
289
-
290
- //Compile logs
291
- $data = array();
292
- foreach( $db->result as $key => $value ){
293
-
294
- // Converting statuses to API format
295
- $value['status'] = $value['status'] === 'DENY_ANTICRAWLER' ? 'BOT_PROTECTION' : $value['status'];
296
- $value['status'] = $value['status'] === 'PASS_ANTICRAWLER' ? 'BOT_PROTECTION' : $value['status'];
297
-
298
- $value['status'] = $value['status'] === 'DENY_ANTIFLOOD' ? 'FLOOD_PROTECTION' : $value['status'];
299
- $value['status'] = $value['status'] === 'PASS_ANTIFLOOD' ? 'FLOOD_PROTECTION' : $value['status'];
300
-
301
- $value['status'] = $value['status'] === 'PASS_SFW__BY_COOKIE' ? null : $value['status'];
302
- $value['status'] = $value['status'] === 'DENY_SFW' ? null : $value['status'];
303
-
304
- $row = array(
305
- trim( $value['ip'] ),
306
- $value['all_entries'],
307
- $value['all_entries'] - $value['blocked_entries'],
308
- $value['entries_timestamp'],
309
- );
310
-
311
- if( $value['status'] )
312
- $row[] = $value['status'];
313
-
314
- $data[] = $row;
315
-
316
- }
317
- unset( $key, $value );
318
-
319
- //Sending the request
320
- $result = \Cleantalk\Common\API::method__sfw_logs( $ct_key, $data );
321
- //Checking answer and deleting all lines from the table
322
- if( empty( $result['error'] ) ){
323
- if( $result['rows'] == count( $data ) ){
324
- $db->execute( "TRUNCATE TABLE " . $log_table . ";" );
325
-
326
- return $result;
327
- }
328
-
329
- return array( 'error' => 'SENT_AND_RECEIVED_LOGS_COUNT_DOESNT_MACH' );
330
- } else{
331
- return $result;
332
- }
333
-
334
- } else{
335
- return $result = array( 'rows' => 0 );
336
- }
337
- }
338
-
339
-
340
- /**
341
- * Updates SFW local base
342
- *
343
- * @param $db
344
- * @param $db__table__data
345
- * @param string $ct_key API key
346
- * @param null|string $file_url File URL with SFW data.
347
- * @param bool $immediate Requires immmediate update. Without remote call
348
- *
349
- * @return array|bool array('error' => STRING)
350
- */
351
- public static function update( $db, $db__table__data, $ct_key, $file_url = null, $immediate = false){
352
-
353
- // Getting remote file name
354
- if(!$file_url){
355
-
356
- $result = \Cleantalk\Common\API::method__get_2s_blacklists_db($ct_key, 'multifiles', '2_0');
357
-
358
- sleep(4);
359
-
360
- if( empty( $result['error'] ) ){
361
-
362
- if( ! empty( $result['file_url'] ) ){
363
-
364
- $file_url = trim( $result['file_url'] );
365
-
366
- $response_code = Helper::http__request__get_response_code( $file_url );
367
-
368
- if( empty( $response_code['error'] ) ){
369
-
370
- if( $response_code == 200 ){
371
-
372
- $gz_data = Helper::http__request__get_content( $file_url );
373
-
374
- if( empty( $gz_data['error'] ) ){
375
-
376
- if( Helper::get_mime_type( $gz_data, 'application/x-gzip' ) ){
377
-
378
- if( function_exists( 'gzdecode' ) ){
379
-
380
- $data = gzdecode( $gz_data );
381
-
382
- if( $data !== false ){
383
-
384
- $result__clear_db = self::clear_data_table( $db, $db__table__data );
385
-
386
- if( empty( $result__clear_db['error'] ) ){
387
-
388
- $lines = Helper::buffer__parse__csv( $data );
389
-
390
- $file_urls = array();
391
-
392
- while( current( $lines ) !== false ){
393
- $file_urls[] = current( $lines )[0];
394
- next( $lines );
395
- }
396
-
397
- $patterns = array();
398
- $patterns[] = 'get';
399
-
400
- if( ! $immediate ){
401
- $patterns[] = 'async';
402
- }
403
-
404
- return Helper::http__request(
405
- get_option( 'siteurl' ),
406
- array(
407
- 'spbc_remote_call_token' => md5( $ct_key ),
408
- 'spbc_remote_call_action' => 'sfw_update',
409
- 'plugin_name' => 'apbct',
410
- 'file_urls' => implode( ',', $file_urls ),
411
- ),
412
- $patterns
413
- );
414
-
415
- }else
416
- return $result__clear_db;
417
- }else
418
- return array('error' => 'COULD_DECODE_MULTIFILE');
419
- }else
420
- return array('error' => 'FUNCTION_GZ_DECODE_DOES_NOT_EXIST');
421
- }else
422
- return array('error' => 'WRONG_MULTIFILE_MIME_TYPE');
423
- }else
424
- return array('error' => 'COULD_NOT_GET_MULTIFILE: ' . $gz_data['error'] );
425
- }else
426
- return array('error' => 'MULTIFILE_BAD_RESPONSE_CODE: '. (int) $response_code );
427
- }else
428
- return array('error' => 'MULTIFILE_COULD_NOT_GET_RESPONSE_CODE: '. $response_code['error'] );
429
- }else
430
- return array('error' => 'NO_REMOTE_MULTIFILE_FOUND: ' . $result['file_url'] );
431
- }else
432
- return $result;
433
- }else{
434
-
435
- $response_code = Helper::http__request($file_url, array(), 'get_code');
436
-
437
- if( empty( $response_code['error'] ) ){
438
-
439
- if($response_code == 200){ // Check if it's there
440
-
441
- $gz_data = Helper::http__request__get_content( $file_url );
442
-
443
- if( empty( $gz_data['error'] ) ){
444
-
445
- if( Helper::get_mime_type( $gz_data, 'application/x-gzip' ) ){
446
-
447
- if( function_exists( 'gzdecode' ) ){
448
-
449
- $data = gzdecode( $gz_data );
450
-
451
- if( $data !== false ){
452
-
453
- $lines = Helper::buffer__parse__csv( $data );
454
-
455
- }else
456
- return array('error' => 'COULD_DECODE_FILE');
457
- }else
458
- return array('error' => 'FUNCTION_GZ_DECODE_DOES_NOT_EXIST');
459
- }else
460
- return array('error' => 'WRONG_FILE_MIME_TYPE');
461
-
462
- for( $count_result = 0; current($lines) !== false; ) {
463
-
464
- $query = "INSERT INTO ".$db__table__data." VALUES ";
465
-
466
- for( $i = 0, $values = array(); APBCT_WRITE_LIMIT !== $i && current( $lines ) !== false; $i ++, $count_result ++, next( $lines ) ){
467
-
468
- $entry = current($lines);
469
-
470
- if(empty($entry))
471
- continue;
472
-
473
- if ( APBCT_WRITE_LIMIT !== $i ) {
474
-
475
- // Cast result to int
476
- $ip = preg_replace('/[^\d]*/', '', $entry[0]);
477
- $mask = preg_replace('/[^\d]*/', '', $entry[1]);
478
- $private = isset($entry[2]) ? $entry[2] : 0;
479
-
480
- }
481
-
482
- $values[] = '('. $ip .','. $mask .','. $private .')';
483
-
484
- }
485
-
486
- if( ! empty( $values ) ){
487
- $query = $query . implode( ',', $values ) . ';';
488
- $db->execute( $query );
489
- }
490
-
491
- }
492
-
493
- return $count_result;
494
-
495
- }else
496
- return array('error' => 'COULD_NOT_GET_FILE: ' . $gz_data['error'] );
497
- }else
498
- return array('error' => 'FILE_BAD_RESPONSE_CODE: '. (int) $response_code );
499
- }else
500
- return array('error' => 'FILE_COULD_NOT_GET_RESPONSE_CODE: '. $response_code['error'] );
501
- }
502
- }
503
-
504
- /**
505
- * Clear SFW table
506
- *
507
- * @param $db
508
- * @param $db__table__data
509
- *
510
- * @return string[]
511
- */
512
- public static function clear_data_table( $db, $db__table__data ) {
513
-
514
- $db->execute( "TRUNCATE TABLE {$db__table__data};" );
515
- $db->set_query( "SELECT COUNT(network) as cnt FROM {$db__table__data};" )->fetch(); // Check if it is clear
516
- if( $db->result['cnt'] != 0 ){
517
- $db->execute( "DELETE FROM {$db__table__data};" ); // Truncate table
518
- $db->set_query( "SELECT COUNT(network) as cnt FROM {$db__table__data};" )->fetch(); // Check if it is clear
519
- if( $db->result['cnt'] != 0 ){
520
- return array( 'error' => 'COULD_NOT_CLEAR_SFW_TABLE' ); // throw an error
521
- }
522
- }
523
- }
 
 
524
  }
1
+ <?php
2
+
3
+ namespace Cleantalk\ApbctWP\Firewall;
4
+
5
+ use Cleantalk\ApbctWP\Helper as Helper;
6
+ use Cleantalk\Variables\Cookie;
7
+ use Cleantalk\Variables\Get;
8
+ use Cleantalk\Variables\Server;
9
+
10
+ class SFW extends \Cleantalk\Common\Firewall\FirewallModule {
11
+
12
+ /**
13
+ * @var bool
14
+ */
15
+ private $test;
16
+
17
+ // Additional params
18
+ private $sfw_counter = false;
19
+ private $api_key = false;
20
+ private $apbct = array();
21
+ private $set_cookies = false;
22
+ private $cookie_domain = false;
23
+
24
+ public $module_name = 'SFW';
25
+
26
+ private $real_ip;
27
+ private $debug;
28
+ private $debug_data = '';
29
+
30
+ /**
31
+ * FireWall_module constructor.
32
+ * Use this method to prepare any data for the module working.
33
+ *
34
+ * @param string $log_table
35
+ * @param string $data_table
36
+ * @param $params
37
+ */
38
+ public function __construct( $log_table, $data_table, $params = array() ){
39
+
40
+ $this->db__table__data = $data_table ?: null;
41
+ $this->db__table__logs = $log_table ?: null;
42
+
43
+ foreach( $params as $param_name => $param ){
44
+ $this->$param_name = isset( $this->$param_name ) ? $param : false;
45
+ }
46
+
47
+ $this->debug = (bool) Get::get( 'debug' );
48
+
49
+ }
50
+
51
+ /**
52
+ * @param $ips
53
+ */
54
+ public function ip__append_additional( &$ips ){
55
+
56
+ $this->real_ip = isset($ips['real']) ? $ips['real'] : null;
57
+
58
+ if( Get::get( 'sfw_test_ip' ) ){
59
+ if( Helper::ip__validate( Get::get( 'sfw_test_ip' ) ) !== false ){
60
+ $ips['sfw_test'] = Get::get( 'sfw_test_ip' );
61
+ $this->test_ip = Get::get( 'sfw_test_ip' );
62
+ $this->test = true;
63
+ }
64
+ }
65
+
66
+
67
+ }
68
+
69
+ /**
70
+ * Use this method to execute main logic of the module.
71
+ *
72
+ * @return array Array of the check results
73
+ */
74
+ public function check(){
75
+
76
+ $results = array();
77
+
78
+ // Skip by cookie
79
+ foreach( $this->ip_array as $current_ip ){
80
+
81
+ if( Cookie::get( 'ct_sfw_pass_key' ) == md5( $current_ip . $this->api_key ) ){
82
+
83
+ if( Cookie::get( 'ct_sfw_passed' ) ){
84
+
85
+ if( ! headers_sent() ){
86
+ \Cleantalk\Common\Helper::apbct_cookie__set( 'ct_sfw_passed', '0', time() + 86400 * 3, '/', null, false, true, 'Lax' );
87
+ }
88
+
89
+ $results[] = array( 'ip' => $current_ip, 'is_personal' => false, 'status' => 'PASS_SFW__BY_COOKIE', );
90
+
91
+ if( $this->sfw_counter ){
92
+ $this->apbct->data['sfw_counter']['all'] ++;
93
+ $this->apbct->saveData();
94
+ }
95
+
96
+ }
97
+
98
+ return $results;
99
+ }
100
+ }
101
+
102
+ // Common check
103
+ foreach($this->ip_array as $origin => $current_ip){
104
+
105
+ $current_ip_v4 = sprintf("%u", ip2long($current_ip));
106
+ for ( $needles = array(), $m = 6; $m <= 32; $m ++ ) {
107
+ $mask = sprintf( "%u", ip2long( long2ip( - 1 << ( 32 - (int) $m ) ) ) );
108
+ $needles[] = bindec( decbin( $mask ) & decbin( $current_ip_v4 ) );
109
+ }
110
+ $needles = array_unique( $needles );
111
+
112
+ $db_results = $this->db->fetch_all("SELECT
113
+ network, mask, status
114
+ FROM " . $this->db__table__data . "
115
+ WHERE network IN (". implode( ',', $needles ) .")
116
+ AND network = " . $current_ip_v4 . " & mask");
117
+
118
+ if( ! empty( $db_results ) ){
119
+
120
+ foreach( $db_results as $db_result ){
121
+
122
+ if( $db_result['status'] == 1 )
123
+ $results[] = array('ip' => $current_ip, 'is_personal' => false, 'status' => 'PASS_SFW__BY_WHITELIST',);
124
+ else
125
+ $results[] = array('ip' => $current_ip, 'is_personal' => false, 'status' => 'DENY_SFW',);
126
+
127
+ }
128
+
129
+ }else{
130
+
131
+ $results[] = array( 'ip' => $current_ip, 'is_personal' => false, 'status' => 'PASS_SFW' );
132
+
133
+ }
134
+ }
135
+
136
+ return $results;
137
+ }
138
+
139
+ /**
140
+ * Add entry to SFW log.
141
+ * Writes to database.
142
+ *
143
+ * @param string $ip
144
+ * @param $status
145
+ */
146
+ public function update_log( $ip, $status ) {
147
+
148
+ if( in_array( $status, array( 'PASS_SFW__BY_WHITELIST', 'PASS_SFW' ) ) ){
149
+ return;
150
+ }
151
+
152
+ $id = md5( $ip );
153
+ $time = time();
154
+
155
+ $query = "INSERT INTO " . $this->db__table__logs . "
156
+ SET
157
+ id = '$id',
158
+ ip = '$ip',
159
+ status = '$status',
160
+ all_entries = 1,
161
+ blocked_entries = 1,
162
+ entries_timestamp = '" . $time . "'
163
+ ON DUPLICATE KEY
164
+ UPDATE
165
+ status = '$status',
166
+ all_entries = all_entries + 1,
167
+ blocked_entries = blocked_entries" . ( strpos( $status, 'DENY' ) !== false ? ' + 1' : '' ) . ",
168
+ entries_timestamp = '" . intval( $time ) . "'";
169
+
170
+ $this->db->execute( $query );
171
+ }
172
+
173
+ public function actions_for_denied( $result ){
174
+
175
+ if( $this->sfw_counter ){
176
+ $this->apbct->data['sfw_counter']['blocked']++;
177
+ $this->apbct->saveData();
178
+ }
179
+
180
+ }
181
+
182
+ public function actions_for_passed( $result ){
183
+ if( $this->set_cookies && ! headers_sent() )
184
+ \Cleantalk\ApbctWP\Helper::apbct_cookie__set( 'ct_sfw_pass_key', md5( $result['ip'] . $this->api_key ), time() + 86400 * 30, '/', null, false );
185
+ }
186
+
187
+ /**
188
+ * Shows DIE page.
189
+ * Stops script executing.
190
+ *
191
+ * @param $result
192
+ */
193
+ public function _die( $result ){
194
+
195
+ parent::_die( $result );
196
+
197
+ // Statistics
198
+ if(!empty($this->blocked_ips)){
199
+ reset($this->blocked_ips);
200
+ $this->apbct->stats['last_sfw_block']['time'] = time();
201
+ $this->apbct->stats['last_sfw_block']['ip'] = $result['ip'];
202
+ $this->apbct->save('stats');
203
+ }
204
+
205
+ // File exists?
206
+ if(file_exists(CLEANTALK_PLUGIN_DIR . "lib/Cleantalk/ApbctWP/Firewall/die_page__SFW.html")){
207
+
208
+ $sfw_die_page = file_get_contents(CLEANTALK_PLUGIN_DIR . "lib/Cleantalk/ApbctWP/Firewall/die_page__SFW.html");
209
+
210
+ // Translation
211
+ $replaces = array(
212
+ '{SFW_DIE_NOTICE_IP}' => __('SpamFireWall is activated for your IP ', 'cleantalk-spam-protect'),
213
+ '{SFW_DIE_MAKE_SURE_JS_ENABLED}' => __( 'To continue working with web site, please make sure that you have enabled JavaScript.', 'cleantalk-spam-protect' ),
214
+ '{SFW_DIE_CLICK_TO_PASS}' => __('Please click the link below to pass the protection,', 'cleantalk-spam-protect'),
215
+ '{SFW_DIE_YOU_WILL_BE_REDIRECTED}' => sprintf(__('Or you will be automatically redirected to the requested page after %d seconds.', 'cleantalk-spam-protect'), 3),
216
+ '{CLEANTALK_TITLE}' => ($this->test ? __('This is the testing page for SpamFireWall', 'cleantalk-spam-protect') : ''),
217
+ '{REMOTE_ADDRESS}' => $result['ip'],
218
+ '{SERVICE_ID}' => $this->apbct->data['service_id'],
219
+ '{HOST}' => Server::get( 'HTTP_HOST' ),
220
+ '{GENERATED}' => '<p>The page was generated at&nbsp;' . date( 'D, d M Y H:i:s' ) . "</p>",
221
+ '{REQUEST_URI}' => Server::get( 'REQUEST_URI' ),
222
+
223
+ // Cookie
224
+ '{COOKIE_PREFIX}' => '',
225
+ '{COOKIE_DOMAIN}' => $this->cookie_domain,
226
+ '{COOKIE_SFW}' => $this->test ? $this->test_ip : md5( $result['ip'] . $this->api_key ),
227
+ '{COOKIE_ANTICRAWLER}' => md5( $this->api_key . $result['ip'] ),
228
+
229
+ // Test
230
+ '{TEST_TITLE}' => '',
231
+ '{REAL_IP__HEADER}' => '',
232
+ '{TEST_IP__HEADER}' => '',
233
+ '{TEST_IP}' => '',
234
+ '{REAL_IP}' => '',
235
+ );
236
+
237
+ // Test
238
+ if($this->test){
239
+ $replaces['{TEST_TITLE}'] = __( 'This is the testing page for SpamFireWall', 'cleantalk-spam-protect' );
240
+ $replaces['{REAL_IP__HEADER}'] = 'Real IP:';
241
+ $replaces['{TEST_IP__HEADER}'] = 'Test IP:';
242
+ $replaces['{TEST_IP}'] = $this->test_ip;
243
+ $replaces['{REAL_IP}'] = $this->real_ip;
244
+ }
245
+
246
+ // Debug
247
+ if($this->debug){
248
+ $debug = '<h1>Headers</h1>'
249
+ . var_export(apache_request_headers(), true)
250
+ . '<h1>REMOTE_ADDR</h1>'
251
+ . Server::get( 'REMOTE_ADDR' )
252
+ . '<h1>SERVER_ADDR</h1>'
253
+ . Server::get( 'REMOTE_ADDR' )
254
+ . '<h1>IP_ARRAY</h1>'
255
+ . var_export($this->ip_array, true)
256
+ . '<h1>ADDITIONAL</h1>'
257
+ . var_export($this->debug_data, true);
258
+ }
259
+ $replaces['{DEBUG}'] = isset( $debug ) ? $debug : '';
260
+
261
+ foreach( $replaces as $place_holder => $replace ){
262
+ $sfw_die_page = str_replace( $place_holder, $replace, $sfw_die_page );
263
+ }
264
+
265
+ wp_die($sfw_die_page, "Blacklisted", Array('response'=>403));
266
+
267
+ }else{
268
+ wp_die("IP BLACKLISTED", "Blacklisted", Array('response'=>403));
269
+ }
270
+
271
+ }
272
+
273
+ /**
274
+ * Sends and wipe SFW log
275
+ *
276
+ * @param $db
277
+ * @param $log_table
278
+ * @param string $ct_key API key
279
+ *
280
+ * @return array|bool array('error' => STRING)
281
+ */
282
+ public static function send_log( $db, $log_table, $ct_key ) {
283
+
284
+ //Getting logs
285
+ $query = "SELECT * FROM " . $log_table . ";";
286
+ $db->fetch_all( $query );
287
+
288
+ if( count( $db->result ) ){
289
+
290
+ //Compile logs
291
+ $data = array();
292
+ foreach( $db->result as $key => $value ){
293
+
294
+ // Converting statuses to API format
295
+ $value['status'] = $value['status'] === 'DENY_ANTICRAWLER' ? 'BOT_PROTECTION' : $value['status'];
296
+ $value['status'] = $value['status'] === 'PASS_ANTICRAWLER' ? 'BOT_PROTECTION' : $value['status'];
297
+
298
+ $value['status'] = $value['status'] === 'DENY_ANTIFLOOD' ? 'FLOOD_PROTECTION' : $value['status'];
299
+ $value['status'] = $value['status'] === 'PASS_ANTIFLOOD' ? 'FLOOD_PROTECTION' : $value['status'];
300
+
301
+ $value['status'] = $value['status'] === 'PASS_SFW__BY_COOKIE' ? null : $value['status'];
302
+ $value['status'] = $value['status'] === 'DENY_SFW' ? null : $value['status'];
303
+
304
+ $row = array(
305
+ trim( $value['ip'] ),
306
+ $value['all_entries'],
307
+ $value['all_entries'] - $value['blocked_entries'],
308
+ $value['entries_timestamp'],
309
+ );
310
+
311
+ if( $value['status'] )
312
+ $row[] = $value['status'];
313
+
314
+ $data[] = $row;
315
+
316
+ }
317
+ unset( $key, $value );
318
+
319
+ //Sending the request
320
+ $result = \Cleantalk\Common\API::method__sfw_logs( $ct_key, $data );
321
+ //Checking answer and deleting all lines from the table
322
+ if( empty( $result['error'] ) ){
323
+ if( $result['rows'] == count( $data ) ){
324
+ $db->execute( "TRUNCATE TABLE " . $log_table . ";" );
325
+
326
+ return $result;
327
+ }
328
+
329
+ return array( 'error' => 'SENT_AND_RECEIVED_LOGS_COUNT_DOESNT_MACH' );
330
+ } else{
331
+ return $result;
332
+ }
333
+
334
+ } else{
335
+ return $result = array( 'rows' => 0 );
336
+ }
337
+ }
338
+
339
+
340
+ /**
341
+ * Updates SFW local base
342
+ *
343
+ * @param $db
344
+ * @param $db__table__data
345
+ * @param string $ct_key API key
346
+ * @param null|string $file_url File URL with SFW data.
347
+ * @param bool $immediate Requires immmediate update. Without remote call
348
+ *
349
+ * @return array|bool array('error' => STRING)
350
+ */
351
+ public static function update( $db, $db__table__data, $ct_key, $file_url = null, $immediate = false){
352
+
353
+ // Getting remote file name
354
+ if(!$file_url){
355
+
356
+ $result = \Cleantalk\Common\API::method__get_2s_blacklists_db($ct_key, 'multifiles', '2_0');
357
+
358
+ sleep(4);
359
+
360
+ if( empty( $result['error'] ) ){
361
+
362
+ if( ! empty( $result['file_url'] ) ){
363
+
364
+ $file_url = trim( $result['file_url'] );
365
+
366
+ $response_code = Helper::http__request__get_response_code( $file_url );
367
+
368
+ if( empty( $response_code['error'] ) ){
369
+
370
+ if( $response_code == 200 ){
371
+
372
+ $gz_data = Helper::http__request__get_content( $file_url );
373
+
374
+ if( empty( $gz_data['error'] ) ){
375
+
376
+ if( Helper::get_mime_type( $gz_data, 'application/x-gzip' ) ){
377
+
378
+ if( function_exists( 'gzdecode' ) ){
379
+
380
+ $data = gzdecode( $gz_data );
381
+
382
+ if( $data !== false ){
383
+
384
+ $result__clear_db = self::clear_data_table( $db, $db__table__data );
385
+
386
+ if( empty( $result__clear_db['error'] ) ){
387
+
388
+ $lines = Helper::buffer__parse__csv( $data );
389
+
390
+ /*$file_urls = array();
391
+
392
+ while( current( $lines ) !== false ){
393
+ $file_urls[] = current( $lines )[0];
394
+ next( $lines );
395
+ }*/
396
+
397
+ $patterns = array();
398
+ $patterns[] = 'get';
399
+
400
+ if( ! $immediate ){
401
+ $patterns[] = 'async';
402
+ }
403
+
404
+ return Helper::http__request(
405
+ get_option( 'siteurl' ),
406
+ array(
407
+ 'spbc_remote_call_token' => md5( $ct_key ),
408
+ 'spbc_remote_call_action' => 'sfw_update',
409
+ 'plugin_name' => 'apbct',
410
+ 'file_urls' => $file_url,
411
+ 'url_count' => count( $lines ),
412
+ 'current_url' => 0,
413
+ ),
414
+ $patterns
415
+ );
416
+
417
+ }else
418
+ return $result__clear_db;
419
+ }else
420
+ return array('error' => 'COULD_DECODE_MULTIFILE');
421
+ }else
422
+ return array('error' => 'FUNCTION_GZ_DECODE_DOES_NOT_EXIST');
423
+ }else
424
+ return array('error' => 'WRONG_MULTIFILE_MIME_TYPE');
425
+ }else
426
+ return array('error' => 'COULD_NOT_GET_MULTIFILE: ' . $gz_data['error'] );
427
+ }else
428
+ return array('error' => 'MULTIFILE_BAD_RESPONSE_CODE: '. (int) $response_code );
429
+ }else
430
+ return array('error' => 'MULTIFILE_COULD_NOT_GET_RESPONSE_CODE: '. $response_code['error'] );
431
+ }else
432
+ return array('error' => 'NO_REMOTE_MULTIFILE_FOUND: ' . $result['file_url'] );
433
+ }else
434
+ return $result;
435
+ }else{
436
+
437
+ $response_code = Helper::http__request($file_url, array(), 'get_code');
438
+
439
+ if( empty( $response_code['error'] ) ){
440
+
441
+ if($response_code == 200){ // Check if it's there
442
+
443
+ $gz_data = Helper::http__request__get_content( $file_url );
444
+
445
+ if( empty( $gz_data['error'] ) ){
446
+
447
+ if( Helper::get_mime_type( $gz_data, 'application/x-gzip' ) ){
448
+
449
+ if( function_exists( 'gzdecode' ) ){
450
+
451
+ $data = gzdecode( $gz_data );
452
+
453
+ if( $data !== false ){
454
+
455
+ $lines = Helper::buffer__parse__csv( $data );
456
+
457
+ }else
458
+ return array('error' => 'COULD_DECODE_FILE');
459
+ }else
460
+ return array('error' => 'FUNCTION_GZ_DECODE_DOES_NOT_EXIST');
461
+ }else
462
+ return array('error' => 'WRONG_FILE_MIME_TYPE');
463
+
464
+ for( $count_result = 0; current($lines) !== false; ) {
465
+
466
+ $query = "INSERT INTO ".$db__table__data." VALUES ";
467
+
468
+ for( $i = 0, $values = array(); APBCT_WRITE_LIMIT !== $i && current( $lines ) !== false; $i ++, $count_result ++, next( $lines ) ){
469
+
470
+ $entry = current($lines);
471
+
472
+ if(empty($entry))
473
+ continue;
474
+
475
+ if ( APBCT_WRITE_LIMIT !== $i ) {
476
+
477
+ // Cast result to int
478
+ $ip = preg_replace('/[^\d]*/', '', $entry[0]);
479
+ $mask = preg_replace('/[^\d]*/', '', $entry[1]);
480
+ $private = isset($entry[2]) ? $entry[2] : 0;
481
+
482
+ }
483
+
484
+ $values[] = '('. $ip .','. $mask .','. $private .')';
485
+
486
+ }
487
+
488
+ if( ! empty( $values ) ){
489
+ $query = $query . implode( ',', $values ) . ';';
490
+ $db->execute( $query );
491
+ }
492
+
493
+ }
494
+
495
+ return $count_result;
496
+
497
+ }else
498
+ return array('error' => 'COULD_NOT_GET_FILE: ' . $gz_data['error'] );
499
+ }else
500
+ return array('error' => 'FILE_BAD_RESPONSE_CODE: '. (int) $response_code );
501
+ }else
502
+ return array('error' => 'FILE_COULD_NOT_GET_RESPONSE_CODE: '. $response_code['error'] );
503
+ }
504
+ }
505
+
506
+ /**
507
+ * Clear SFW table
508
+ *
509
+ * @param $db
510
+ * @param $db__table__data
511
+ *
512
+ * @return string[]
513
+ */
514
+ public static function clear_data_table( $db, $db__table__data ) {
515
+
516
+ $db->execute( "TRUNCATE TABLE {$db__table__data};" );
517
+ $db->set_query( "SELECT COUNT(network) as cnt FROM {$db__table__data};" )->fetch(); // Check if it is clear
518
+ if( $db->result['cnt'] != 0 ){
519
+ $db->execute( "DELETE FROM {$db__table__data};" ); // Truncate table
520
+ $db->set_query( "SELECT COUNT(network) as cnt FROM {$db__table__data};" )->fetch(); // Check if it is clear
521
+ if( $db->result['cnt'] != 0 ){
522
+ return array( 'error' => 'COULD_NOT_CLEAR_SFW_TABLE' ); // throw an error
523
+ }
524
+ }
525
+ }
526
  }
lib/Cleantalk/Common/API.php CHANGED
@@ -1,797 +1,796 @@
1
- <?php
2
-
3
- namespace Cleantalk\Common;
4
-
5
- /**
6
- * CleanTalk API class.
7
- * Mostly contains wrappers for API methods. Check and send mehods.
8
- * Compatible with any CMS.
9
- *
10
- * @version 3.3
11
- * @author Cleantalk team (welcome@cleantalk.org)
12
- * @copyright (C) 2014 CleanTalk team (http://cleantalk.org)
13
- * @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
14
- * @see https://github.com/CleanTalk/php-antispam
15
- */
16
- class API
17
- {
18
- /* Default params */
19
- const URL = 'https://api.cleantalk.org';
20
- const AGENT = 'ct-api-3.2';
21
-
22
- /**
23
- * Wrapper for 2s_blacklists_db API method.
24
- * Gets data for SpamFireWall.
25
- *
26
- * @param string $api_key
27
- * @param null|string $out Data output type (JSON or file URL)
28
- * @param string $version API method version
29
- * @param boolean $do_check
30
- *
31
- * @return mixed|string|array('error' => STRING)
32
- */
33
- static public function method__get_2s_blacklists_db($api_key, $out = null, $version = '1_0', $do_check = true)
34
- {
35
- $request = array(
36
- 'method_name' => '2s_blacklists_db',
37
- 'auth_key' => $api_key,
38
- 'out' => $out,
39
- 'version' => $version,
40
- );
41
-
42
- $result = static::send_request($request);
43
- $result = $do_check ? static::check_response($result, '2s_blacklists_db') : $result;
44
-
45
- return $result;
46
- }
47
-
48
- /**
49
- * Wrapper for get_api_key API method.
50
- * Gets access key automatically.
51
- *
52
- * @param string $product_name Type of product
53
- * @param string $email Website admin email
54
- * @param string $website Website host
55
- * @param string $platform Website platform
56
- * @param string|null $timezone
57
- * @param string|null $language
58
- * @param string|null $user_ip
59
- * @param bool $wpms
60
- * @param bool $white_label
61
- * @param string $hoster_api_key
62
- * @param bool $do_check
63
- *
64
- * @return array|bool|mixed
65
- */
66
- static public function method__get_api_key($product_name, $email, $website, $platform, $timezone = null, $language = null, $user_ip = null, $wpms = false, $white_label = false, $hoster_api_key = '', $do_check = true)
67
- {
68
- $request = array(
69
- 'method_name' => 'get_api_key',
70
- 'product_name' => $product_name,
71
- 'email' => $email,
72
- 'website' => $website,
73
- 'platform' => $platform,
74
- 'timezone' => $timezone,
75
- 'http_accept_language' => $language,
76
- 'user_ip' => $user_ip,
77
- 'wpms_setup' => $wpms,
78
- 'hoster_whitelabel' => $white_label,
79
- 'hoster_api_key' => $hoster_api_key,
80
- );
81
-
82
- $result = static::send_request($request);
83
- $result = $do_check ? static::check_response($result, 'get_api_key') : $result;
84
-
85
- return $result;
86
- }
87
-
88
- /**
89
- * Wrapper for get_antispam_report API method.
90
- * Gets spam report.
91
- *
92
- * @param string $host website host
93
- * @param integer $period report days
94
- * @param boolean $do_check
95
- *
96
- * @return array|bool|mixed
97
- */
98
- static public function method__get_antispam_report($host, $period = 1, $do_check = true)
99
- {
100
- $request = Array(
101
- 'method_name' => 'get_antispam_report',
102
- 'hostname' => $host,
103
- 'period' => $period
104
- );
105
-
106
- $result = static::send_request($request);
107
- $result = $do_check ? static::check_response($result, 'get_antispam_report') : $result;
108
-
109
- return $result;
110
- }
111
-
112
- /**
113
- * Wrapper for get_antispam_report_breif API method.
114
- * Ggets spam statistics.
115
- *
116
- * @param string $api_key
117
- * @param bool $do_check
118
- *
119
- * @return array|bool|mixed
120
- */
121
- static public function method__get_antispam_report_breif($api_key, $do_check = true)
122
- {
123
- $request = array(
124
- 'method_name' => 'get_antispam_report_breif',
125
- 'auth_key' => $api_key,
126
- );
127
-
128
- $result = static::send_request($request);
129
- $result = $do_check ? static::check_response($result, 'get_antispam_report_breif') : $result;
130
-
131
- return $result;
132
- }
133
-
134
- /**
135
- * Wrapper for notice_paid_till API method.
136
- * Gets information about renew notice.
137
- *
138
- * @param string $api_key API key
139
- * @param string $path_to_cms Website URL
140
- * @param string $product_name
141
- * @param bool $do_check
142
- *
143
- * @return array|bool|mixed
144
- */
145
- static public function method__notice_paid_till($api_key, $path_to_cms, $product_name = 'antispam', $do_check = true)
146
- {
147
- $request = array(
148
- 'method_name' => 'notice_paid_till',
149
- 'path_to_cms' => $path_to_cms,
150
- 'auth_key' => $api_key,
151
- );
152
-
153
- $product_id = null;
154
- $product_id = $product_name == 'antispam' ? 1 : $product_id;
155
- $product_id = $product_name == 'anti-spam-hosting' ? 3 : $product_id;
156
- $product_id = $product_name == 'security' ? 4 : $product_id;
157
- if($product_id)
158
- $request['product_id'] = $product_id;
159
-
160
- $result = static::send_request($request);
161
- $result = $do_check ? static::check_response($result, 'notice_paid_till') : $result;
162
-
163
- return $result;
164
- }
165
-
166
- /**
167
- * Wrapper for ip_info API method.
168
- * Gets IP country.
169
- *
170
- * @param string $data
171
- * @param bool $do_check
172
- *
173
- * @return array|bool|mixed
174
- */
175
- static public function method__ip_info($data, $do_check = true)
176
- {
177
- $request = array(
178
- 'method_name' => 'ip_info',
179
- 'data' => $data
180
- );
181
-
182
- $result = static::send_request($request);
183
- $result = $do_check ? static::check_response($result, 'ip_info') : $result;
184
- return $result;
185
- }
186
-
187
- /**
188
- * Wrapper for spam_check_cms API method.
189
- * Checks IP|email via CleanTalk's database.
190
- *
191
- * @param string $api_key
192
- * @param array $data
193
- * @param null|string $date
194
- * @param bool $do_check
195
- *
196
- * @return array|bool|mixed
197
- */
198
- static public function method__spam_check_cms($api_key, $data, $date = null, $do_check = true)
199
- {
200
- $request = Array(
201
- 'method_name' => 'spam_check_cms',
202
- 'auth_key' => $api_key,
203
- 'data' => is_array($data) ? implode(',', $data) : $data,
204
- );
205
-
206
- if($date) $request['date'] = $date;
207
-
208
- $result = static::send_request($request, self::URL, 20);
209
- $result = $do_check ? static::check_response($result, 'spam_check_cms') : $result;
210
-
211
- return $result;
212
- }
213
-
214
- /**
215
- * Wrapper for spam_check API method.
216
- * Checks IP|email via CleanTalk's database.
217
- *
218
- * @param string $api_key
219
- * @param array $data
220
- * @param null|string $date
221
- * @param bool $do_check
222
- *
223
- * @return array|bool|mixed
224
- */
225
- static public function method__spam_check($api_key, $data, $date = null, $do_check = true)
226
- {
227
- $request = Array(
228
- 'method_name' => 'spam_check',
229
- 'auth_key' => $api_key,
230
- 'data' => is_array($data) ? implode(',', $data) : $data,
231
- );
232
-
233
- if($date) $request['date'] = $date;
234
-
235
- $result = static::send_request($request, self::URL, 10);
236
- $result = $do_check ? static::check_response($result, 'spam_check') : $result;
237
-
238
- return $result;
239
- }
240
-
241
- /**
242
- * Wrapper for sfw_logs API method.
243
- * Sends SpamFireWall logs to the cloud.
244
- *
245
- * @param string $api_key
246
- * @param array $data
247
- * @param bool $do_check
248
- *
249
- * @return array|bool|mixed
250
- */
251
- static public function method__sfw_logs($api_key, $data, $do_check = true)
252
- {
253
-
254
- $request = array(
255
- 'auth_key' => $api_key,
256
- 'method_name' => 'sfw_logs',
257
- 'data' => json_encode($data),
258
- 'rows' => count($data),
259
- 'timestamp' => time()
260
- );
261
-
262
- $result = static::send_request($request);
263
- $result = $do_check ? static::check_response($result, 'sfw_logs') : $result;
264
-
265
- return $result;
266
- }
267
-
268
- /**
269
- * Wrapper for security_logs API method.
270
- * Sends security logs to the cloud.
271
- *
272
- * @param string $api_key
273
- * @param array $data
274
- * @param bool $do_check
275
- *
276
- * @return array|bool|mixed
277
- */
278
- static public function method__security_logs($api_key, $data, $do_check = true)
279
- {
280
- $request = array(
281
- 'auth_key' => $api_key,
282
- 'method_name' => 'security_logs',
283
- 'timestamp' => current_time('timestamp'),
284
- 'data' => json_encode($data),
285
- 'rows' => count($data),
286
- );
287
-
288
- $result = static::send_request($request);
289
- $result = $do_check ? static::check_response($result, 'security_logs') : $result;
290
-
291
- return $result;
292
- }
293
-
294
- /**
295
- * Wrapper for security_logs API method.
296
- * Sends Securitty Firewall logs to the cloud.
297
- *
298
- * @param string $api_key
299
- * @param array $data
300
- * @param bool $do_check
301
- *
302
- * @return array|bool|mixed
303
- */
304
- static public function method__security_logs__sendFWData($api_key, $data, $do_check = true)
305
- {
306
-
307
- $request = array(
308
- 'auth_key' => $api_key,
309
- 'method_name' => 'security_logs',
310
- 'timestamp' => current_time('timestamp'),
311
- 'data_fw' => json_encode($data),
312
- 'rows_fw' => count($data),
313
- );
314
-
315
- $result = static::send_request($request);
316
- $result = $do_check ? static::check_response($result, 'security_logs') : $result;
317
-
318
- return $result;
319
- }
320
-
321
- /**
322
- * Wrapper for security_logs API method.
323
- * Sends empty data to the cloud to syncronize version.
324
- *
325
- * @param string $api_key
326
- * @param bool $do_check
327
- *
328
- * @return array|bool|mixed
329
- */
330
- static public function method__security_logs__feedback($api_key, $do_check = true)
331
- {
332
- $request = array(
333
- 'auth_key' => $api_key,
334
- 'method_name' => 'security_logs',
335
- 'data' => '0',
336
- );
337
-
338
- $result = static::send_request($request);
339
- $result = $do_check ? static::check_response($result, 'security_logs') : $result;
340
-
341
- return $result;
342
- }
343
-
344
- /**
345
- * Wrapper for security_firewall_data API method.
346
- * Gets Securitty Firewall data to write to the local database.
347
- *
348
- * @param string $api_key
349
- * @param bool $do_check
350
- *
351
- * @return array|bool|mixed
352
- */
353
- static public function method__security_firewall_data($api_key, $do_check = true)
354
- {
355
-
356
- $request = array(
357
- 'auth_key' => $api_key,
358
- 'method_name' => 'security_firewall_data',
359
- );
360
-
361
- $result = static::send_request($request);
362
- $result = $do_check ? static::check_response($result, 'security_firewall_data') : $result;
363
-
364
- return $result;
365
- }
366
-
367
- /**
368
- * Wrapper for security_firewall_data_file API method.
369
- * Gets URI with security firewall data in .csv.gz file to write to the local database.
370
- *
371
- * @param string $api_key
372
- * @param bool $do_check
373
- *
374
- * @return array|bool|mixed
375
- */
376
- static public function method__security_firewall_data_file($api_key, $do_check = true)
377
- {
378
-
379
- $request = array(
380
- 'auth_key' => $api_key,
381
- 'method_name' => 'security_firewall_data_file',
382
- );
383
-
384
- $result = static::send_request($request);
385
- $result = $do_check ? static::check_response($result, 'security_firewall_data_file') : $result;
386
-
387
- return $result;
388
- }
389
-
390
- /**
391
- * Wrapper for security_linksscan_logs API method.
392
- * Send data to the cloud about scanned links.
393
- *
394
- * @param string $api_key
395
- * @param string $scan_time Datetime of scan
396
- * @param bool $scan_result
397
- * @param int $links_total
398
- * @param array $links_list
399
- * @param bool $do_check
400
- *
401
- * @return array|bool|mixed
402
- */
403
- static public function method__security_linksscan_logs($api_key, $scan_time, $scan_result, $links_total, $links_list, $do_check = true)
404
- {
405
- $request = array(
406
- 'auth_key' => $api_key,
407
- 'method_name' => 'security_linksscan_logs',
408
- 'started' => $scan_time,
409
- 'result' => $scan_result,
410
- 'total_links_found' => $links_total,
411
- 'links_list' => $links_list,
412
- );
413
-
414
- $result = static::send_request($request);
415
- $result = $do_check ? static::check_response($result, 'security_linksscan_logs') : $result;
416
-
417
- return $result;
418
- }
419
-
420
- /**
421
- * Wrapper for security_mscan_logs API method.
422
- * Sends result of file scan to the cloud.
423
- *
424
- * @param string $api_key
425
- * @param int $service_id
426
- * @param string $scan_time Datetime of scan
427
- * @param bool $scan_result
428
- * @param int $scanned_total
429
- * @param array $modified List of modified files with details
430
- * @param array $unknown List of modified files with details
431
- * @param bool $do_check
432
- *
433
- * @return array|bool|mixed
434
- */
435
- static public function method__security_mscan_logs($api_key, $service_id, $scan_time, $scan_result, $scanned_total, $modified, $unknown, $do_check = true)
436
- {
437
- $request = array(
438
- 'method_name' => 'security_mscan_logs',
439
- 'auth_key' => $api_key,
440
- 'service_id' => $service_id,
441
- 'started' => $scan_time,
442
- 'result' => $scan_result,
443
- 'total_core_files' => $scanned_total,
444
- );
445
-
446
- if(!empty($modified)){
447
- $request['failed_files'] = json_encode($modified);
448
- $request['failed_files_rows'] = count($modified);
449
- }
450
- if(!empty($unknown)){
451
- $request['unknown_files'] = json_encode($unknown);
452
- $request['unknown_files_rows'] = count($unknown);
453
- }
454
-
455
- $result = static::send_request($request);
456
- $result = $do_check ? static::check_response($result, 'security_mscan_logs') : $result;
457
-
458
- return $result;
459
- }
460
-
461
- /**
462
- * Wrapper for security_mscan_files API method.
463
- * Sends file to the cloud for analysis.
464
- *
465
- * @param string $api_key
466
- * @param string $file_path Path to the file
467
- * @param array $file File itself
468
- * @param string $file_md5 MD5 hash of file
469
- * @param array $weak_spots List of weak spots found in file
470
- * @param bool $do_check
471
- *
472
- * @return array|bool|mixed
473
- */
474
- static public function method__security_mscan_files($api_key, $file_path, $file, $file_md5, $weak_spots, $do_check = true)
475
- {
476
- $request = array(
477
- 'method_name' => 'security_mscan_files',
478
- 'auth_key' => $api_key,
479
- 'path_to_sfile' => $file_path,
480
- 'attached_sfile' => $file,
481
- 'md5sum_sfile' => $file_md5,
482
- 'dangerous_code' => $weak_spots,
483
- );
484
-
485
- $result = static::send_request($request);
486
- $result = $do_check ? static::check_response($result, 'security_mscan_files') : $result;
487
-
488
- return $result;
489
- }
490
-
491
- /**
492
- * Wrapper for get_antispam_report API method.
493
- * Function gets spam domains report.
494
- *
495
- * @param string $api_key
496
- * @param array|string|mixed $data
497
- * @param string $date
498
- * @param bool $do_check
499
- *
500
- * @return array|bool|mixed
501
- */
502
- static public function method__backlinks_check_cms($api_key, $data, $date = null, $do_check = true)
503
- {
504
- $request = array(
505
- 'method_name' => 'backlinks_check_cms',
506
- 'auth_key' => $api_key,
507
- 'data' => is_array($data) ? implode(',', $data) : $data,
508
- );
509
-
510
- if($date) $request['date'] = $date;
511
-
512
- $result = static::send_request($request);
513
- $result = $do_check ? static::check_response($result, 'backlinks_check_cms') : $result;
514
-
515
- return $result;
516
- }
517
-
518
- /**
519
- * Wrapper for get_antispam_report API method.
520
- * Function gets spam domains report
521
- *
522
- * @param string $api_key
523
- * @param array $logs
524
- * @param bool $do_check
525
- *
526
- * @return array|bool|mixed
527
- */
528
- static public function method__security_backend_logs($api_key, $logs, $do_check = true)
529
- {
530
- $request = array(
531
- 'method_name' => 'security_backend_logs',
532
- 'auth_key' => $api_key,
533
- 'logs' => json_encode($logs),
534
- 'total_logs' => count($logs),
535
- );
536
-
537
- $result = static::send_request($request);
538
- $result = $do_check ? static::check_response($result, 'security_backend_logs') : $result;
539
-
540
- return $result;
541
- }
542
-
543
- /**
544
- * Wrapper for get_antispam_report API method.
545
- * Sends data about auto repairs
546
- *
547
- * @param string $api_key
548
- * @param bool $repair_result
549
- * @param string $repair_comment
550
- * @param $repaired_processed_files
551
- * @param $repaired_total_files_proccessed
552
- * @param $backup_id
553
- * @param bool $do_check
554
- *
555
- * @return array|bool|mixed
556
- */
557
- static public function method__security_mscan_repairs($api_key, $repair_result, $repair_comment, $repaired_processed_files, $repaired_total_files_proccessed, $backup_id, $do_check = true)
558
- {
559
- $request = array(
560
- 'method_name' => 'security_mscan_repairs',
561
- 'auth_key' => $api_key,
562
- 'repair_result' => $repair_result,
563
- 'repair_comment' => $repair_comment,
564
- 'repair_processed_files' => json_encode($repaired_processed_files),
565
- 'repair_total_files_processed' => $repaired_total_files_proccessed,
566
- 'backup_id' => $backup_id,
567
- 'mscan_log_id' => 1,
568
- );
569
-
570
- $result = static::send_request($request);
571
- $result = $do_check ? static::check_response($result, 'security_mscan_repairs') : $result;
572
-
573
- return $result;
574
- }
575
-
576
- /**
577
- * Wrapper for get_antispam_report API method.
578
- * Force server to update checksums for specific plugin\theme
579
- *
580
- * @param string $api_key
581
- * @param string $plugins_and_themes_to_refresh
582
- * @param bool $do_check
583
- *
584
- * @return array|bool|mixed
585
- */
586
- static public function method__request_checksums($api_key, $plugins_and_themes_to_refresh, $do_check = true)
587
- {
588
- $request = array(
589
- 'method_name' => 'request_checksums',
590
- 'auth_key' => $api_key,
591
- 'data' => $plugins_and_themes_to_refresh
592
- );
593
-
594
- $result = static::send_request($request);
595
- $result = $do_check ? static::check_response($result, 'request_checksums') : $result;
596
-
597
- return $result;
598
- }
599
-
600
- /**
601
- * Function sends raw request to API server
602
- *
603
- * @param array $data to send
604
- * @param string $url of API server
605
- * @param integer $timeout timeout in seconds
606
- * @param boolean $ssl use ssl on not
607
- *
608
- * @return array|bool
609
- */
610
- static public function send_request($data, $url = self::URL, $timeout = 10, $ssl = false, $ssl_path = '')
611
- {
612
- // Possibility to switch agent vaersion
613
- $data['agent'] = !empty($data['agent'])
614
- ? $data['agent']
615
- : (defined('CLEANTALK_AGENT') ? CLEANTALK_AGENT : self::AGENT);
616
-
617
- // Make URL string
618
- $data_string = http_build_query($data);
619
- $data_string = str_replace("&amp;", "&", $data_string);
620
-
621
- // For debug purposes
622
- if(defined('CLEANTALK_DEBUG') && CLEANTALK_DEBUG){
623
- global $apbct_debug;
624
- $apbct_debug['sent_data'] = $data;
625
- $apbct_debug['request_string'] = $data_string;
626
- }
627
-
628
- // Possibility to switch API url
629
- $url = defined('CLEANTALK_API_URL') ? CLEANTALK_API_URL : $url;
630
-
631
- if(function_exists('curl_init')){
632
-
633
- $ch = curl_init();
634
-
635
- // Set diff options
636
- curl_setopt($ch, CURLOPT_URL, $url);
637
- curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
638
- curl_setopt($ch, CURLOPT_POST, true);
639
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
640
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
641
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
642
-
643
- $ssl_path = $ssl_path
644
- ? $ssl_path
645
- : (defined('CLEANTALK_CASERT_PATH') ? CLEANTALK_CASERT_PATH : '');
646
-
647
- // Switch on/off SSL
648
- if($ssl && $ssl_path){
649
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
650
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
651
- curl_setopt($ch, CURLOPT_CAINFO, $ssl_path);
652
- }else{
653
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
654
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
655
- }
656
-
657
- // Make a request
658
- $result = curl_exec($ch);
659
- $errors = curl_error($ch);
660
- curl_close($ch);
661
-
662
- // Retry with SSL enabled if failed
663
- if($result === false){
664
- if($ssl === false){
665
- return self::send_request($data, $url, $timeout, true, $ssl_path);
666
- }
667
- if (function_exists('gethostbynamel')) {
668
- $server_ips = gethostbynamel('api.cleantalk.org');
669
- if ($server_ips !== false && is_array($server_ips) && count($server_ips)) {
670
- foreach ($server_ips as $ip) {
671
- $allowed = @fsockopen ($ip, 80, $errno, $errstr, $timeout / 2);
672
- if ($allowed) {
673
- return self::send_request($data, 'https://'.$ip, $timeout, true);
674
- }
675
- }
676
- }
677
- }
678
- }
679
-
680
- }else{
681
- $errors = 'CURL_NOT_INSTALLED';
682
- }
683
-
684
- // Trying to use file_get_contents() to make a API call
685
- if(!empty($errors)){
686
- if(ini_get('allow_url_fopen')){
687
- $opts = array(
688
- 'http' => array(
689
- 'method' => "POST",
690
- 'timeout' => $timeout,
691
- 'content' => $data_string,
692
- ),
693
- );
694
- $context = stream_context_create($opts);
695
- $result = @file_get_contents($url, 0, $context);
696
-
697
- $errors = $result === false
698
- ? $errors . '_FAILED_TO_USE_FILE_GET_CONTENTS'
699
- : false;
700
-
701
- }else{
702
- $errors .= '_AND_ALLOW_URL_FOPEN_IS_DISABLED';
703
- }
704
- }
705
-
706
- return empty($result) || !empty($errors)
707
- ? array('error' => $errors)
708
- : $result;
709
- }
710
-
711
- /**
712
- * Function checks server response
713
- *
714
- * @param array|string $result
715
- * @param string $method_name
716
- *
717
- * @return mixed (array || array('error' => true))
718
- */
719
- static public function check_response($result, $method_name = null)
720
- {
721
- // Errors handling
722
- // Bad connection
723
- if(isset($result['error'])){
724
- $last = error_get_last();
725
- $out = ! empty( $result['error'] )
726
- ? array( 'error' => 'CONNECTION_ERROR : "' . $result['error'] . '"' )
727
- : array( 'error' => 'CONNECTION_ERROR : "Unknown Error. Last error: ' . $last['message'] );
728
- return $out;
729
- }
730
-
731
- // JSON decode errors
732
- $result = json_decode($result, true);
733
- if(empty($result)){
734
- return array(
735
- 'error' => 'JSON_DECODE_ERROR',
736
- );
737
- }
738
-
739
- // Server errors
740
- if($result &&
741
- (isset($result['error_no']) || isset($result['error_message'])) &&
742
- (isset($result['error_no']) && $result['error_no'] != 12)
743
- ){
744
- return array(
745
- 'error' => "SERVER_ERROR NO: {$result['error_no']} MSG: {$result['error_message']}",
746
- 'error_no' => $result['error_no'],
747
- 'error_message' => $result['error_message'],
748
- );
749
- }
750
-
751
- // Pathces for different methods
752
- switch($method_name){
753
-
754
- // notice_paid_till
755
- case 'notice_paid_till':
756
-
757
- $result = isset($result['data']) ? $result['data'] : $result;
758
-
759
- if((isset($result['error_no']) && $result['error_no'] == 12) ||
760
- (
761
- !(isset($result['service_id']) && is_int($result['service_id'])) &&
762
- empty($result['moderate_ip'])
763
- )
764
- )
765
- $result['valid'] = 0;
766
- else
767
- $result['valid'] = 1;
768
-
769
- return $result;
770
-
771
- break;
772
-
773
- // get_antispam_report_breif
774
- case 'get_antispam_report_breif':
775
-
776
- $out = isset($result['data']) && is_array($result['data'])
777
- ? $result['data']
778
- : array('error' => 'NO_DATA');
779
-
780
- for($tmp = array(), $i = 0; $i < 7; $i++){
781
- $tmp[date('Y-m-d', time() - 86400 * 7 + 86400 * $i)] = 0;
782
- }
783
- $out['spam_stat'] = (array)array_merge($tmp, isset($out['spam_stat']) ? $out['spam_stat'] : array());
784
- $out['top5_spam_ip'] = isset($out['top5_spam_ip']) ? $out['top5_spam_ip'] : array();
785
-
786
- return $out;
787
-
788
- break;
789
-
790
- default:
791
- return isset($result['data']) && is_array($result['data'])
792
- ? $result['data']
793
- : array('error' => 'NO_DATA');
794
- break;
795
- }
796
- }
797
  }
1
+ <?php
2
+
3
+ namespace Cleantalk\Common;
4
+
5
+ /**
6
+ * CleanTalk API class.
7
+ * Mostly contains wrappers for API methods. Check and send mehods.
8
+ * Compatible with any CMS.
9
+ *
10
+ * @version 3.3
11
+ * @author Cleantalk team (welcome@cleantalk.org)
12
+ * @copyright (C) 2014 CleanTalk team (http://cleantalk.org)
13
+ * @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
14
+ * @see https://github.com/CleanTalk/php-antispam
15
+ */
16
+ class API
17
+ {
18
+ /* Default params */
19
+ const URL = 'https://api.cleantalk.org';
20
+ const AGENT = 'ct-api-3.2';
21
+
22
+ /**
23
+ * Wrapper for 2s_blacklists_db API method.
24
+ * Gets data for SpamFireWall.
25
+ *
26
+ * @param string $api_key
27
+ * @param null|string $out Data output type (JSON or file URL)
28
+ * @param string $version API method version
29
+ * @param boolean $do_check
30
+ *
31
+ * @return mixed|string|array('error' => STRING)
32
+ */
33
+ static public function method__get_2s_blacklists_db($api_key, $out = null, $version = '1_0', $do_check = true)
34
+ {
35
+ $request = array(
36
+ 'method_name' => '2s_blacklists_db',
37
+ 'auth_key' => $api_key,
38
+ 'out' => $out,
39
+ 'version' => $version,
40
+ );
41
+
42
+ $result = static::send_request($request);
43
+ $result = $do_check ? static::check_response($result, '2s_blacklists_db') : $result;
44
+
45
+ return $result;
46
+ }
47
+
48
+ /**
49
+ * Wrapper for get_api_key API method.
50
+ * Gets access key automatically.
51
+ *
52
+ * @param string $product_name Type of product
53
+ * @param string $email Website admin email
54
+ * @param string $website Website host
55
+ * @param string $platform Website platform
56
+ * @param string|null $timezone
57
+ * @param string|null $language
58
+ * @param string|null $user_ip
59
+ * @param bool $wpms
60
+ * @param bool $white_label
61
+ * @param string $hoster_api_key
62
+ * @param bool $do_check
63
+ *
64
+ * @return array|bool|mixed
65
+ */
66
+ static public function method__get_api_key($product_name, $email, $website, $platform, $timezone = null, $language = null, $user_ip = null, $wpms = false, $white_label = false, $hoster_api_key = '', $do_check = true)
67
+ {
68
+ $request = array(
69
+ 'method_name' => 'get_api_key',
70
+ 'product_name' => $product_name,
71
+ 'email' => $email,
72
+ 'website' => $website,
73
+ 'platform' => $platform,
74
+ 'timezone' => $timezone,
75
+ 'http_accept_language' => $language,
76
+ 'user_ip' => $user_ip,
77
+ 'wpms_setup' => $wpms,
78
+ 'hoster_whitelabel' => $white_label,
79
+ 'hoster_api_key' => $hoster_api_key,
80
+ );
81
+
82
+ $result = static::send_request($request);
83
+ $result = $do_check ? static::check_response($result, 'get_api_key') : $result;
84
+
85
+ return $result;
86
+ }
87
+
88
+ /**
89
+ * Wrapper for get_antispam_report API method.
90
+ * Gets spam report.
91
+ *
92
+ * @param string $host website host
93
+ * @param integer $period report days
94
+ * @param boolean $do_check
95
+ *
96
+ * @return array|bool|mixed
97
+ */
98
+ static public function method__get_antispam_report($host, $period = 1, $do_check = true)
99
+ {
100
+ $request = Array(
101
+ 'method_name' => 'get_antispam_report',
102
+ 'hostname' => $host,
103
+ 'period' => $period
104
+ );
105
+
106
+ $result = static::send_request($request);
107
+ $result = $do_check ? static::check_response($result, 'get_antispam_report') : $result;
108
+
109
+ return $result;
110
+ }
111
+
112
+ /**
113
+ * Wrapper for get_antispam_report_breif API method.
114
+ * Ggets spam statistics.
115
+ *
116
+ * @param string $api_key
117
+ * @param bool $do_check
118
+ *
119
+ * @return array|bool|mixed
120
+ */
121
+ static public function method__get_antispam_report_breif($api_key, $do_check = true)
122
+ {
123
+ $request = array(
124
+ 'method_name' => 'get_antispam_report_breif',
125
+ 'auth_key' => $api_key,
126
+ );
127
+
128
+ $result = static::send_request($request);
129
+ $result = $do_check ? static::check_response($result, 'get_antispam_report_breif') : $result;
130
+
131
+ return $result;
132
+ }
133
+
134
+ /**
135
+ * Wrapper for notice_paid_till API method.
136
+ * Gets information about renew notice.
137
+ *
138
+ * @param string $api_key API key
139
+ * @param string $path_to_cms Website URL
140
+ * @param string $product_name
141
+ * @param bool $do_check
142
+ *
143
+ * @return array|bool|mixed
144
+ */
145
+ static public function method__notice_paid_till($api_key, $path_to_cms, $product_name = 'antispam', $do_check = true)
146
+ {
147
+ $request = array(
148
+ 'method_name' => 'notice_paid_till',
149
+ 'path_to_cms' => $path_to_cms,
150
+ 'auth_key' => $api_key,
151
+ );
152
+
153
+ $product_id = null;
154
+ $product_id = $product_name == 'antispam' ? 1 : $product_id;
155
+ $product_id = $product_name == 'anti-spam-hosting' ? 3 : $product_id;
156
+ $product_id = $product_name == 'security' ? 4 : $product_id;
157
+ if($product_id)
158
+ $request['product_id'] = $product_id;
159
+
160
+ $result = static::send_request($request);
161
+ $result = $do_check ? static::check_response($result, 'notice_paid_till') : $result;
162
+
163
+ return $result;
164
+ }
165
+
166
+ /**
167
+ * Wrapper for ip_info API method.
168
+ * Gets IP country.
169
+ *
170
+ * @param string $data
171
+ * @param bool $do_check
172
+ *
173
+ * @return array|bool|mixed
174
+ */
175
+ static public function method__ip_info($data, $do_check = true)
176
+ {
177
+ $request = array(
178
+ 'method_name' => 'ip_info',
179
+ 'data' => $data
180
+ );
181
+
182
+ $result = static::send_request($request);
183
+ $result = $do_check ? static::check_response($result, 'ip_info') : $result;
184
+ return $result;
185
+ }
186
+
187
+ /**
188
+ * Wrapper for spam_check_cms API method.
189
+ * Checks IP|email via CleanTalk's database.
190
+ *
191
+ * @param string $api_key
192
+ * @param array $data
193
+ * @param null|string $date
194
+ * @param bool $do_check
195
+ *
196
+ * @return array|bool|mixed
197
+ */
198
+ static public function method__spam_check_cms($api_key, $data, $date = null, $do_check = true)
199
+ {
200
+ $request = Array(
201
+ 'method_name' => 'spam_check_cms',
202
+ 'auth_key' => $api_key,
203
+ 'data' => is_array($data) ? implode(',', $data) : $data,
204
+ );
205
+
206
+ if($date) $request['date'] = $date;
207
+
208
+ $result = static::send_request($request, self::URL, 20);
209
+ $result = $do_check ? static::check_response($result, 'spam_check_cms') : $result;
210
+
211
+ return $result;
212
+ }
213
+
214
+ /**
215
+ * Wrapper for spam_check API method.
216
+ * Checks IP|email via CleanTalk's database.
217
+ *
218
+ * @param string $api_key
219
+ * @param array $data
220
+ * @param null|string $date
221
+ * @param bool $do_check
222
+ *
223
+ * @return array|bool|mixed
224
+ */
225
+ static public function method__spam_check($api_key, $data, $date = null, $do_check = true)
226
+ {
227
+ $request = Array(
228
+ 'method_name' => 'spam_check',
229
+ 'auth_key' => $api_key,
230
+ 'data' => is_array($data) ? implode(',', $data) : $data,
231
+ );
232
+
233
+ if($date) $request['date'] = $date;
234
+
235
+ $result = static::send_request($request, self::URL, 10);
236
+ $result = $do_check ? static::check_response($result, 'spam_check') : $result;
237
+
238
+ return $result;
239
+ }
240
+
241
+ /**
242
+ * Wrapper for sfw_logs API method.
243
+ * Sends SpamFireWall logs to the cloud.
244
+ *
245
+ * @param string $api_key
246
+ * @param array $data
247
+ * @param bool $do_check
248
+ *
249
+ * @return array|bool|mixed
250
+ */
251
+ static public function method__sfw_logs($api_key, $data, $do_check = true)
252
+ {
253
+
254
+ $request = array(
255
+ 'auth_key' => $api_key,
256
+ 'method_name' => 'sfw_logs',
257
+ 'data' => json_encode($data),
258
+ 'rows' => count($data),
259
+ 'timestamp' => time()
260
+ );
261
+
262
+ $result = static::send_request($request);
263
+ $result = $do_check ? static::check_response($result, 'sfw_logs') : $result;
264
+
265
+ return $result;
266
+ }
267
+
268
+ /**
269
+ * Wrapper for security_logs API method.
270
+ * Sends security logs to the cloud.
271
+ *
272
+ * @param string $api_key
273
+ * @param array $data
274
+ * @param bool $do_check
275
+ *
276
+ * @return array|bool|mixed
277
+ */
278
+ static public function method__security_logs($api_key, $data, $do_check = true)
279
+ {
280
+ $request = array(
281
+ 'auth_key' => $api_key,
282
+ 'method_name' => 'security_logs',
283
+ 'timestamp' => current_time('timestamp'),
284
+ 'data' => json_encode($data),
285
+ 'rows' => count($data),
286
+ );
287
+
288
+ $result = static::send_request($request);
289
+ $result = $do_check ? static::check_response($result, 'security_logs') : $result;
290
+
291
+ return $result;
292
+ }
293
+
294
+ /**
295
+ * Wrapper for security_logs API method.
296
+ * Sends Securitty Firewall logs to the cloud.
297
+ *
298
+ * @param string $api_key
299
+ * @param array $data
300
+ * @param bool $do_check
301
+ *
302
+ * @return array|bool|mixed
303
+ */
304
+ static public function method__security_logs__sendFWData($api_key, $data, $do_check = true)
305
+ {
306
+
307
+ $request = array(
308
+ 'auth_key' => $api_key,
309
+ 'method_name' => 'security_logs',
310
+ 'timestamp' => current_time('timestamp'),
311
+ 'data_fw' => json_encode($data),
312
+ 'rows_fw' => count($data),
313
+ );
314
+
315
+ $result = static::send_request($request);
316
+ $result = $do_check ? static::check_response($result, 'security_logs') : $result;
317
+
318
+ return $result;
319
+ }
320
+
321
+ /**
322
+ * Wrapper for security_logs API method.
323
+ * Sends empty data to the cloud to syncronize version.
324
+ *
325
+ * @param string $api_key
326
+ * @param bool $do_check
327
+ *
328
+ * @return array|bool|mixed
329
+ */
330
+ static public function method__security_logs__feedback($api_key, $do_check = true)
331
+ {
332
+ $request = array(
333
+ 'auth_key' => $api_key,
334
+ 'method_name' => 'security_logs',
335
+ 'data' => '0',
336
+ );
337
+
338
+ $result = static::send_request($request);
339
+ $result = $do_check ? static::check_response($result, 'security_logs') : $result;
340
+
341
+ return $result;
342
+ }
343
+
344
+ /**
345
+ * Wrapper for security_firewall_data API method.
346
+ * Gets Securitty Firewall data to write to the local database.
347
+ *
348
+ * @param string $api_key
349
+ * @param bool $do_check
350
+ *
351
+ * @return array|bool|mixed
352
+ */
353
+ static public function method__security_firewall_data($api_key, $do_check = true)
354
+ {
355
+
356
+ $request = array(
357
+ 'auth_key' => $api_key,
358
+ 'method_name' => 'security_firewall_data',
359
+ );
360
+
361
+ $result = static::send_request($request);
362
+ $result = $do_check ? static::check_response($result, 'security_firewall_data') : $result;
363
+
364
+ return $result;
365
+ }
366
+
367
+ /**
368
+ * Wrapper for security_firewall_data_file API method.
369
+ * Gets URI with security firewall data in .csv.gz file to write to the local database.
370
+ *
371
+ * @param string $api_key
372
+ * @param bool $do_check
373
+ *
374
+ * @return array|bool|mixed
375
+ */
376
+ static public function method__security_firewall_data_file($api_key, $do_check = true)
377
+ {
378
+
379
+ $request = array(
380
+ 'auth_key' => $api_key,
381
+ 'method_name' => 'security_firewall_data_file',
382
+ );
383
+
384
+ $result = static::send_request($request);
385
+ $result = $do_check ? static::check_response($result, 'security_firewall_data_file') : $result;
386
+
387
+ return $result;
388
+ }
389
+
390
+ /**
391
+ * Wrapper for security_linksscan_logs API method.
392
+ * Send data to the cloud about scanned links.
393
+ *
394
+ * @param string $api_key
395
+ * @param string $scan_time Datetime of scan
396
+ * @param bool $scan_result
397
+ * @param int $links_total
398
+ * @param array $links_list
399
+ * @param bool $do_check
400
+ *
401
+ * @return array|bool|mixed
402
+ */
403
+ static public function method__security_linksscan_logs($api_key, $scan_time, $scan_result, $links_total, $links_list, $do_check = true)
404
+ {
405
+ $request = array(
406
+ 'auth_key' => $api_key,
407
+ 'method_name' => 'security_linksscan_logs',
408
+ 'started' => $scan_time,
409
+ 'result' => $scan_result,
410
+ 'total_links_found' => $links_total,
411
+ 'links_list' => $links_list,
412
+ );
413
+
414
+ $result = static::send_request($request);
415
+ $result = $do_check ? static::check_response($result, 'security_linksscan_logs') : $result;
416
+
417
+ return $result;
418
+ }
419
+
420
+ /**
421
+ * Wrapper for security_mscan_logs API method.
422
+ * Sends result of file scan to the cloud.
423
+ *
424
+ * @param string $api_key
425
+ * @param int $service_id
426
+ * @param string $scan_time Datetime of scan
427
+ * @param bool $scan_result
428
+ * @param int $scanned_total
429
+ * @param array $modified List of modified files with details
430
+ * @param array $unknown List of modified files with details
431
+ * @param bool $do_check
432
+ *
433
+ * @return array|bool|mixed
434
+ */
435
+ static public function method__security_mscan_logs($api_key, $service_id, $scan_time, $scan_result, $scanned_total, $modified, $unknown, $do_check = true)
436
+ {
437
+ $request = array(
438
+ 'method_name' => 'security_mscan_logs',
439
+ 'auth_key' => $api_key,
440
+ 'service_id' => $service_id,
441
+ 'started' => $scan_time,
442
+ 'result' => $scan_result,
443
+ 'total_core_files' => $scanned_total,
444
+ );
445
+
446
+ if(!empty($modified)){
447
+ $request['failed_files'] = json_encode($modified);
448
+ $request['failed_files_rows'] = count($modified);
449
+ }
450
+ if(!empty($unknown)){
451
+ $request['unknown_files'] = json_encode($unknown);
452
+ $request['unknown_files_rows'] = count($unknown);
453
+ }
454
+
455
+ $result = static::send_request($request);
456
+ $result = $do_check ? static::check_response($result, 'security_mscan_logs') : $result;
457
+
458
+ return $result;
459
+ }
460
+
461
+ /**
462
+ * Wrapper for security_mscan_files API method.
463
+ * Sends file to the cloud for analysis.
464
+ *
465
+ * @param string $api_key
466
+ * @param string $file_path Path to the file
467
+ * @param array $file File itself
468
+ * @param string $file_md5 MD5 hash of file
469
+ * @param array $weak_spots List of weak spots found in file
470
+ * @param bool $do_check
471
+ *
472
+ * @return array|bool|mixed
473
+ */
474
+ static public function method__security_mscan_files($api_key, $file_path, $file, $file_md5, $weak_spots, $do_check = true)
475
+ {
476
+ $request = array(
477
+ 'method_name' => 'security_mscan_files',
478
+ 'auth_key' => $api_key,
479
+ 'path_to_sfile' => $file_path,
480
+ 'attached_sfile' => $file,
481
+ 'md5sum_sfile' => $file_md5,
482
+ 'dangerous_code' => $weak_spots,
483
+ );
484
+
485
+ $result = static::send_request($request);
486
+ $result = $do_check ? static::check_response($result, 'security_mscan_files') : $result;
487
+
488
+ return $result;
489
+ }
490
+
491
+ /**
492
+ * Wrapper for get_antispam_report API method.
493
+ * Function gets spam domains report.
494
+ *
495
+ * @param string $api_key
496
+ * @param array|string|mixed $data
497
+ * @param string $date
498
+ * @param bool $do_check
499
+ *
500
+ * @return array|bool|mixed
501
+ */
502
+ static public function method__backlinks_check_cms($api_key, $data, $date = null, $do_check = true)
503
+ {
504
+ $request = array(
505
+ 'method_name' => 'backlinks_check_cms',
506
+ 'auth_key' => $api_key,
507
+ 'data' => is_array($data) ? implode(',', $data) : $data,
508
+ );
509
+
510
+ if($date) $request['date'] = $date;
511
+
512
+ $result = static::send_request($request);
513
+ $result = $do_check ? static::check_response($result, 'backlinks_check_cms') : $result;
514
+
515
+ return $result;
516
+ }
517
+
518
+ /**
519
+ * Wrapper for get_antispam_report API method.
520
+ * Function gets spam domains report
521
+ *
522
+ * @param string $api_key
523
+ * @param array $logs
524
+ * @param bool $do_check
525
+ *
526
+ * @return array|bool|mixed
527
+ */
528
+ static public function method__security_backend_logs($api_key, $logs, $do_check = true)
529
+ {
530
+ $request = array(
531
+ 'method_name' => 'security_backend_logs',
532
+ 'auth_key' => $api_key,
533
+ 'logs' => json_encode($logs),
534
+ 'total_logs' => count($logs),
535
+ );
536
+
537
+ $result = static::send_request($request);
538
+ $result = $do_check ? static::check_response($result, 'security_backend_logs') : $result;
539
+
540
+ return $result;
541
+ }
542
+
543
+ /**
544
+ * Wrapper for get_antispam_report API method.
545
+ * Sends data about auto repairs
546
+ *
547
+ * @param string $api_key
548
+ * @param bool $repair_result
549
+ * @param string $repair_comment
550
+ * @param $repaired_processed_files
551
+ * @param $repaired_total_files_proccessed
552
+ * @param $backup_id
553
+ * @param bool $do_check
554
+ *
555
+ * @return array|bool|mixed
556
+ */
557
+ static public function method__security_mscan_repairs($api_key, $repair_result, $repair_comment, $repaired_processed_files, $repaired_total_files_proccessed, $backup_id, $do_check = true)
558
+ {
559
+ $request = array(
560
+ 'method_name' => 'security_mscan_repairs',
561
+ 'auth_key' => $api_key,
562
+ 'repair_result' => $repair_result,
563
+ 'repair_comment' => $repair_comment,
564
+ 'repair_processed_files' => json_encode($repaired_processed_files),
565
+ 'repair_total_files_processed' => $repaired_total_files_proccessed,
566
+ 'backup_id' => $backup_id,
567
+ 'mscan_log_id' => 1,
568
+ );
569
+
570
+ $result = static::send_request($request);
571
+ $result = $do_check ? static::check_response($result, 'security_mscan_repairs') : $result;
572
+
573
+ return $result;
574
+ }
575
+
576
+ /**
577
+ * Wrapper for get_antispam_report API method.
578
+ * Force server to update checksums for specific plugin\theme
579
+ *
580
+ * @param string $api_key
581
+ * @param string $plugins_and_themes_to_refresh
582
+ * @param bool $do_check
583
+ *
584
+ * @return array|bool|mixed
585
+ */
586
+ static public function method__request_checksums($api_key, $plugins_and_themes_to_refresh, $do_check = true)
587
+ {
588
+ $request = array(
589
+ 'method_name' => 'request_checksums',
590
+ 'auth_key' => $api_key,
591
+ 'data' => $plugins_and_themes_to_refresh
592
+ );
593
+
594
+ $result = static::send_request($request);
595
+ $result = $do_check ? static::check_response($result, 'request_checksums') : $result;
596
+
597
+ return $result;
598
+ }
599
+
600
+ /**
601
+ * Function sends raw request to API server
602
+ *
603
+ * @param array $data to send
604
+ * @param string $url of API server
605
+ * @param integer $timeout timeout in seconds
606
+ * @param boolean $ssl use ssl on not
607
+ *
608
+ * @return array|bool
609
+ */
610
+ static public function send_request($data, $url = self::URL, $timeout = 10, $ssl = false, $ssl_path = '')
611
+ {
612
+ // Possibility to switch agent vaersion
613
+ $data['agent'] = !empty($data['agent'])
614
+ ? $data['agent']
615
+ : (defined('CLEANTALK_AGENT') ? CLEANTALK_AGENT : self::AGENT);
616
+
617
+ // Make URL string
618
+ $data_string = http_build_query($data);
619
+ $data_string = str_replace("&amp;", "&", $data_string);
620
+
621
+ // For debug purposes
622
+ if(defined('CLEANTALK_DEBUG') && CLEANTALK_DEBUG){
623
+ global $apbct_debug;
624
+ $apbct_debug['sent_data'] = $data;
625
+ $apbct_debug['request_string'] = $data_string;
626
+ }
627
+
628
+ // Possibility to switch API url
629
+ $url = defined('CLEANTALK_API_URL') ? CLEANTALK_API_URL : $url;
630
+
631
+ if(function_exists('curl_init')){
632
+
633
+ $ch = curl_init();
634
+
635
+ // Set diff options
636
+ curl_setopt($ch, CURLOPT_URL, $url);
637
+ curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
638
+ curl_setopt($ch, CURLOPT_POST, true);
639
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
640
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
641
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
642
+
643
+ $ssl_path = $ssl_path
644
+ ? $ssl_path
645
+ : (defined('CLEANTALK_CASERT_PATH') ? CLEANTALK_CASERT_PATH : '');
646
+
647
+ // Switch on/off SSL
648
+ if($ssl && $ssl_path){
649
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
650
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
651
+ curl_setopt($ch, CURLOPT_CAINFO, $ssl_path);
652
+ }else{
653
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
654
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
655
+ }
656
+
657
+ // Make a request
658
+ $result = curl_exec($ch);
659
+ $errors = curl_error($ch);
660
+ curl_close($ch);
661
+
662
+ // Retry with SSL enabled if failed
663
+ if($result === false){
664
+ if($ssl === false){
665
+ return self::send_request($data, $url, $timeout, true, $ssl_path);
666
+ }
667
+ if (function_exists('gethostbynamel')) {
668
+ $server_ips = gethostbynamel('api.cleantalk.org');
669
+ if ($server_ips !== false && is_array($server_ips) && count($server_ips)) {
670
+ foreach ($server_ips as $ip) {
671
+ if( strpos( $url, $ip ) === false ) {
672
+ return self::send_request($data, 'https://'.$ip);
673
+ }
674
+ }
675
+ }
676
+ }
677
+ }
678
+
679
+ }else{
680
+ $errors = 'CURL_NOT_INSTALLED';
681
+ }
682
+
683
+ // Trying to use file_get_contents() to make a API call
684
+ if(!empty($errors)){
685
+ if(ini_get('allow_url_fopen')){
686
+ $opts = array(
687
+ 'http' => array(
688
+ 'method' => "POST",
689
+ 'timeout' => $timeout,
690
+ 'content' => $data_string,
691
+ ),
692
+ );
693
+ $context = stream_context_create($opts);
694
+ $result = @file_get_contents($url, 0, $context);
695
+
696
+ $errors = $result === false
697
+ ? $errors . '_FAILED_TO_USE_FILE_GET_CONTENTS'
698
+ : false;
699
+
700
+ }else{
701
+ $errors .= '_AND_ALLOW_URL_FOPEN_IS_DISABLED';
702
+ }
703
+ }
704
+
705
+ return empty($result) || !empty($errors)
706
+ ? array('error' => $errors)
707
+ : $result;
708
+ }
709
+
710
+ /**
711
+ * Function checks server response
712
+ *
713
+ * @param array|string $result
714
+ * @param string $method_name
715
+ *
716
+ * @return mixed (array || array('error' => true))
717
+ */
718
+ static public function check_response($result, $method_name = null)
719
+ {
720
+ // Errors handling
721
+ // Bad connection
722
+ if(isset($result['error'])){
723
+ $last = error_get_last();
724
+ $out = ! empty( $result['error'] )
725
+ ? array( 'error' => 'CONNECTION_ERROR : "' . $result['error'] . '"' )
726
+ : array( 'error' => 'CONNECTION_ERROR : "Unknown Error. Last error: ' . $last['message'] );
727
+ return $out;
728
+ }
729
+
730
+ // JSON decode errors
731
+ $result = json_decode($result, true);
732
+ if(empty($result)){
733
+ return array(
734
+ 'error' => 'JSON_DECODE_ERROR',
735
+ );
736
+ }
737
+
738
+ // Server errors
739
+ if($result &&
740
+ (isset($result['error_no']) || isset($result['error_message'])) &&
741
+ (isset($result['error_no']) && $result['error_no'] != 12)
742
+ ){
743
+ return array(
744
+ 'error' => "SERVER_ERROR NO: {$result['error_no']} MSG: {$result['error_message']}",
745
+ 'error_no' => $result['error_no'],
746
+ 'error_message' => $result['error_message'],
747
+ );
748
+ }
749
+
750
+ // Pathces for different methods
751
+ switch($method_name){
752
+
753
+ // notice_paid_till
754
+ case 'notice_paid_till':
755
+
756
+ $result = isset($result['data']) ? $result['data'] : $result;
757
+
758
+ if((isset($result['error_no']) && $result['error_no'] == 12) ||
759
+ (
760
+ !(isset($result['service_id']) && is_int($result['service_id'])) &&
761
+ empty($result['moderate_ip'])
762
+ )
763
+ )
764
+ $result['valid'] = 0;
765
+ else
766
+ $result['valid'] = 1;
767
+
768
+ return $result;
769
+
770
+ break;
771
+
772
+ // get_antispam_report_breif
773
+ case 'get_antispam_report_breif':
774
+
775
+ $out = isset($result['data']) && is_array($result['data'])
776
+ ? $result['data']
777
+ : array('error' => 'NO_DATA');
778
+
779
+ for($tmp = array(), $i = 0; $i < 7; $i++){
780
+ $tmp[date('Y-m-d', time() - 86400 * 7 + 86400 * $i)] = 0;
781
+ }
782
+ $out['spam_stat'] = (array)array_merge($tmp, isset($out['spam_stat']) ? $out['spam_stat'] : array());
783
+ $out['top5_spam_ip'] = isset($out['top5_spam_ip']) ? $out['top5_spam_ip'] : array();
784
+
785
+ return $out;
786
+
787
+ break;
788
+
789
+ default:
790
+ return isset($result['data']) && is_array($result['data'])
791
+ ? $result['data']
792
+ : array('error' => 'NO_DATA');
793
+ break;
794
+ }
795
+ }
 
796
  }
readme.txt CHANGED
@@ -1,778 +1,782 @@
1
- === Spam protection, AntiSpam, FireWall by CleanTalk ===
2
- Contributors: safronik
3
- Tags: spam, antispam, woocommerce, comments, firewall
4
- Requires at least: 3.0
5
- Tested up to: 5.5
6
- Requires PHP: 5.4
7
- Stable tag: 5.143
8
- License: GPLv2
9
-
10
- Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
11
-
12
- == Description ==
13
-
14
- **Supports: Contact Form 7, Contact Form by WPForms, Ninja Forms, Gravity Forms, MailChimp, Formidable forms, WooCommerce, JetPack comments and contact form, BuddyPress, bbPress, S2Member, MailPoet, wpDiscuz, ConvertKit, ActiveCampaign, any WordPress registrations & contact forms and themes. Just set up and forget the spam!**
15
-
16
- No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bots. Universal AntiSpam plugin.
17
-
18
- = AntiSpam features =
19
- 1. Stops spam comments.
20
- 2. Stops spam registrations.
21
- 3. Stops spam contact emails.
22
- 4. Stops spam orders.
23
- 5. Stops spam bookings.
24
- 6. Stops spam subscriptions.
25
- 7. Stops spam surveys, polls.
26
- 8. Stops spam in widgets.
27
- 9. Stops spam in WooCommerce.
28
- 10. Checks and removes the existing spam comments and spam users.
29
- 11. Compatible with mobile users and devices.
30
- 12. Compatible with General Data Protection Regulation (GDPR) (EU).
31
- 13. Real-time email validation. Is email real or Not.
32
- 14. Blocking disposable & temporary emails.
33
- 15. No Spam - No Google Penalties. Give your SEO boost.
34
- 16. Mobile friendly Anti Spam & FireWall.
35
- 17. Stops spam in Search Form.
36
- 18. Disable comments.
37
- 19. Spam FireWall: Anti-Flood
38
- 20. Spam FireWall: Anti-Crawler
39
-
40
- = Public reviews =
41
- > CleanTalk - Cloud-Based Anti-Spam Service to Keep Your Site Bot-Free.
42
- > <a href="https://newswatchtv.com/2018/07/18/cleantalk-newswatch-review/" rarget="_blank">NewsWatch Review</a>.
43
-
44
- > Using CleanTalk on WPLift was a great test as we receive huge amounts of spam.
45
- > *Oliver Dale, <a href="http://wplift.com/wordpress-anti-spam-plugin" target="_blank">WPLift.com</a>.*
46
-
47
- >I know you have heard of a number of anti-spam plugins. But you must know, the cloud-based ones are the best regarding detection rate. They compare all the content in forms with their own algorithm to find out the legibility.
48
- >*<a href="https://www.techwibe.com/cleantalk-wordpress-plugin-review/" target="_blank">www.techwibe.com</a>*
49
-
50
- > The key selling point of CleanTalk for me is not simply its effectiveness. It's the fact that CleanTalk works in the background. It does not make users jump through hoops in order to submit a comment or complete a form.
51
- > <a href="https://www.kevinmuldoon.com/cleantalk-anti-spam-service/">www.kevinmuldoon.com</a>
52
-
53
- = Free trial then $8 per year =
54
- CleanTalk is a free anti spam plugin which work with the premium Cloud AntiSpam service cleantalk.org. This plugin as a service https://en.wikipedia.org/wiki/Software_as_a_service.
55
-
56
- = AntiSpam protection for comments =
57
- Native spam protection for WordPress, JetPack comments and any other comment plugins. The plugin moves spam comments to SPAM folder or you can set the option to ban spam comments silently. You can also enable the option in the plugin settings to auto-delete comments from SPAM folder.
58
-
59
- = Spam bots registrations filter =
60
- Filters spam bots on registration forms of WordPress, BuddyPress, bbPress, S2Member, WooCommerce, Profile builder, Login with AJAX and any other registration plugins.
61
-
62
- = Protection from contact form spam =
63
- The plugin is tested and ready to protect from spam emails via Formidable forms, Contact form 7, JetPack Contact form, Fast Secure Contact form, Ninja forms, Landing Page Builder, Gravity forms, Contact Form by BestWebSoft, Simple Contact Form Plugin - PirateForms, Visual Form Builder, Contact Form by WebDorado, Contact Form Email, MW WP Form, Contact Form by Jeff Bulllins, Contact Us Form, WCP Contact Form, WPForms Lite, Custom Contact, Forms, Caldera Forms, Visual Form Builder, Contact Form Clean and Simple, Divi by Elegant Themes, The7 theme and any other themes or custom contact forms, amoForms, Ultimate Form Builder, Contact Bank - Contact Forms Builder, Forms easily built with Smart Forms, Usernoise contact form, Contact Form by Web-Settler, HubSpot Marketing Free, QuForm.
64
-
65
- = WooCommerce spam filter =
66
- Anti-spam by CleanTalk filters spam registrations and spam reviews for WooCommerce. The plugin is fully compatible with WooCommerce 2.1 and higher.
67
-
68
- = Newsletters antispam filter =
69
- Anti-spam by CleanTalk filters spam subscriptions for MailPoet, MailChimp, PopupAlly and many other newsletter plugins.
70
-
71
- = Spam filter for theme contact forms =
72
- The plugin blocks spam emails via any theme (built-in ones included) contact forms. The plugin filters spam emails silently (without any error notices on WordPress frontend) in AJAX forms as well.
73
-
74
- = bbPress spam filter =
75
- Spam protection for everything about bbPress: logins, registrations, forums, topics and replies.
76
-
77
- = Other spam filters =
78
- * WordPress Landing Pages.
79
- * WP User Frontend, UserPro.
80
- * Any WordPress form (checkbox 'Custom contact forms').
81
- * Any submission to the site (checkbox 'Check all POST data')
82
-
83
- = Compatible with WordPress cache plugins =
84
- * W3 Total Cache, Quick Cache, WP Fastest Cache, Hyper Cache, WP Super cache, WP-Rocket and any other cache plugins.
85
-
86
- = Check existing comments for spam. Bulk spam comments removal. Spam comment Cleaner =
87
- With the help of anti-spam by CleanTalk you can inspect through existing comments to find and quickly delete spam comments at once. To use this function, go to WP Console -> Comments -> Find spam comments.
88
-
89
- = Check existing users for spam. Bulk spam accounts removal. Spam users cleaner =
90
- With the help of anti-spam by CleanTalk you can inspect through existing accounts to find and quickly delete spam users at once. For use this function, go to WP Console -> Users -> Check for spam. Also, you can export a list of spam users to the CSV.
91
-
92
- = Blocking users by country =
93
- Automatically block comments and registrations from the countries you have set a ban for. This option is useful in cases of manual spam protection and for protection enhancement. If your site is not intended for international audience and you do not expect comments/users from other countries.
94
-
95
- = Blocking comments by "stop words" =
96
- You can block comments which contain "stop words" to enhance spam protection and messages with obscene words blocking. You can add particular words or phrases.
97
-
98
- = Private black lists for anti-spam service =
99
- Automatically block comments and registrations from your private black
100
- IP/email address list. This option helps to strengthen the spam protection from a manual spam or block unwanted comments from users. You can add not only the certain IP addresses, but also a separate subnet to your personal black list.
101
-
102
- = Private black list for Spam FireWall =
103
- It allows you to add individual IP addresses and subnets to Spam FireWall. It
104
- blocks the spam attacks from IP addresses which are not included in the SFW base yet. This option can help to block HTTP/HTTPS DDoS, SQL, brute force attacks and any others that made it through the HTTP/HTTPS. You can add not only the certain IP addresses, but also a separate subnet to your personal black list.
105
-
106
- = Low false/positive rate =
107
- This plugin uses multiple anti-spam tests to filter spam bots having as low false/positive rate as possible. Multiple anti-spam tests help to avoid false/positive blocks of the real website visitors even if one of the tests failed.
108
-
109
- = How effective is CleanTalk? =
110
- Accurately blocking spam is not an easy thing to do, but CleanTalk has a very low proven False/Positive rate. Here is actual statistics on false positives for all customers.
111
-
112
- * Registrations - 0.007%
113
- * Comments - 0.001%
114
- * Contact forms - 0.001%
115
- * Orders (WooCommerce) - 0.008%
116
-
117
- The statistic was calculated on November 10 2017 for 1 million requests.
118
-
119
- = How CleanTalk improves SEO for your website? =
120
- So, you already know that the speed of the site has a direct impact on SEO.
121
-
122
- *CleanTalk works faster than most of the other anti-spam plugins.* It is common knowledge that the faster your site loads, the better your customer experience is, the better your SEO will be, and the better your site will convert. Speed is becoming increasingly important in SEO, conversion and user experience. Today, site speed is one of the most important ranking factors on Google. A site that loads slowly will lose visitors and potential revenue.
123
-
124
- There are different ways of improving your site's loading performance. One important parameter for site performance is to install well-developed plugins from a reputable source.
125
-
126
- Among anti-spam plugins CleanTalk AntiSpam is one of the fastest. Despite the
127
- large plugin functionality, the developers have optimized the performance of
128
- the plugin so that AntiSpam by CleanTalk is faster than most analogs. This contributes to the cloud service architecture, as all calculations take place in the cloud, not on the server, the server receives the finished result for further action.
129
-
130
- https://s.w.org/plugins/cleantalk-spam-protect/screenshot-5.png?r=1288723
131
-
132
- = How CleanTalk works? =
133
- * A visitor writes a comment or registers
134
- * Anti-Spam by CleanTalk plugin sends action parameters into the CleanTalk cloud
135
- * Service analyzes the parameters
136
- * If this is a visitor, the comment will be published. If it's a spam bot, then CleanTalk blocks this comment or registration.
137
- * Parameters are written to the spam log which can be viewed in the Control Panel service.
138
-
139
- CleanTalk team has been developing a cloud antispam system for five years and has created a truly reliable anti-spam service designed for you to guarantee
140
- your safety.
141
-
142
- = Spam attacks log =
143
- Service CleanTalk (this plugin is a client application for CleanTalk anti-spam service) records all filtered comments, registration and other spam attacks in the "Log of spam attacks" and stores the data in the log for up to 45 days. Using the log, you can ensure reliable protection of your website from spam and no false/positive filtering.
144
-
145
- = Spam FireWall =
146
- CleanTalk has an advanced option "Spam FireWall". Spam FireWall allows blocking the most active spam bots before they get access to your website. It prevents spam bots from loading website pages so your web server doesn't have to perform all scripts on these pages. Also it prevents scanning of pages of the website by spam bots. Therefore Spam FireWall significantly reduces the load on your web server. Spam FireWall also makes CleanTalk the two-step protection from spam bots. Spam FireWall is the first step and it blocks the most active spam bots. CleanTalk Anti-Spam is the second step and checks all other requests on the website in the moment of submitting comments/registers etc.
147
-
148
- Spam FireWall is fully compatible with the most popular VPN services.
149
- Also, Spam FireWall supports all search engines Google, Bing, Yahoo, Baidu, MSN, Yandex and etc.
150
-
151
- = How Spam FireWall works? =
152
- * The visitor enters to your web site.
153
- * HTTP request data are being checked in the nearly 5.8 million of the identified spam bot IPs.
154
- * If it is an active spam bot, the bot gets a blank page, if it is a visitor then he receives a normal page. This process is completely transparent for the visitors.
155
-
156
- All the CleanTalk Spam FireWall activity is being logged in the process of filtering.
157
-
158
- = Spam FireWall DDoS Protection =
159
- Spam FireWall can mitigate HTTP/HTTPS DDoS attacks. When an intruder makes GET requests to attack your website, Spam FireWall blocks all requests from bad IP addresses. Your website gives the intruder a special page with the description of DDoS rejection instead of the website pages. Therefore Spam FireWall helps to reduce CPU usage of your server.
160
- [youtube https://www.youtube.com/watch?v=Eu5Zqryvj4k]
161
-
162
- = Spam FireWall: Anti-Flood & Anti-Crawler =
163
- Spam FireWall: Anti-Flood and Anti-Crawler options are intended for blocking unwanted bots, content parsing, shop goods prices parsing or aggressive website scanning bots. Learn more https://cleantalk.org/help/anti-flood-and-anti-crawler
164
-
165
- = XML-RPC brute force protection =
166
- Spam FireWall can mitigate XML-RPC brute force attacks. It blocks XML-RPC attacks from bad IP addresses. This helps to prevent bruteforce attacks by a Remote Procedure Call.
167
-
168
- = No spam comments, no spam registrations, no spam contact emails, no spam trackbacks. CAPTCHA-free anti-spam for WordPress =
169
- Spam is one of the most irritating things. Spam rates are increasing every year and conventional anti-spam can no longer handle all spam bots. CleanTalk prevents and automatically blocks spam. You'll be surprised how effective CleanTalk is in protecting from spam.
170
-
171
- = AntiSpam plugin info =
172
- CleanTalk is an all-in-one antispam solution for WordPress that protects login, comment, contact and WooCommerce forms at once. You don't need to install separate antispam plugins for each form. It allows your blog to work faster and save resources. After installation you will forget about spam; your CleanTalk plugin will do all the work. You won't have to deal with spam as CleanTalk does this for you automatically.
173
-
174
- CleanTalk is a transparent antispam tool, we provide detailed stats of all incoming comments and logins. You can always be sure that **there are no errors**. We have developed a mobile app for you to see antispam stats wherever you want.
175
-
176
- We have developed the antispam for WordPress that protects you from spam bots at the maximum level allowing you to provide your visitors a simple and convenient form of comments/registrations without annoying CAPTCHAs and puzzles. CleanTalk detects spam in multistage tests allowing us to block up to 99.998% of spam bots.
177
- The anti-spam method offered by CleanTalk avoids inconvenient for communication methods (CAPTCHA, question-answer etc.), and offers to your site visitors a more comfortable one.
178
-
179
- CleanTalk is a premium anti-spam service for WordPress, the plugin works with
180
- our own CleanTalk Cloud Service. Anti Spam by CleanTalk offers a free trial, you can look at the <a href="https://cleantalk.org/price">pricing</a> here. We provide anti-spam services at the highest level. To maintain this level we cannot afford to offer a free version of our service, as this will immediately affect the quality of the providing anti-spam protection. Paying for a year of anti-spam service, you save a lot more and receive:
181
-
182
- * Up to 99.998% protection from spam bots.
183
- * Time and resources saving.
184
- * More registrations/comments/visitors.
185
- * Spam protection of the several websites at once in different CMS.
186
- * Ease in installation and using.
187
- * Traffic increase and loyalty to the users.
188
- * 24/7 technical support.
189
- * Clear stats.
190
- * Spam FireWall.
191
- * No captcha (reCaptcha), puzzles, etc.
192
- * Free mobile app to control anti-spam protection on your website.
193
-
194
- = Additional features =
195
- * Daily and weekly detailed anti-spam reports: traffic VS spam.
196
- * Apps for iPhone, Android to control anti-spam service, comments, signups, contacts, traffic and spam stats for the last 7 days.
197
- * AntiSpam apps for most popular CMS on cleantalk.org.
198
-
199
- = How to protect sites from spam bots without CAPTCHA? =
200
- The most popular anti spam method is CAPTCHA - the annoying picture with curved and sloping symbols, which are presented to the visitor to decipher and fill in. In is supposed that spam bots won't discern these CAPTCHA, but a visitor will. CAPTCHA provokes great irritation, but if the visitor wants to comment, he has to fill in these symbols time after time, making mistakes and starting once again. Sometimes CAPTCHA reminds us of the doodles of a two year old child. For users with vision problems CAPTCHA is an insurmountable obstacle. Users hate captcha. Captcha for users means "hate". Unreadable CAPTCHA stops about 80% of site visitors. After 2 failed attempts to decipher CAPTCHA 95% of visitors reject further attempts. At the sight of CAPTCHA and after input errors, many visitors leave the resource. Thus, CAPTCHA helps to protect the resource spam both from bots and visitors. CAPTCHA is not a panacea from spam. Doubts concerning the Need for CAPTCHA?
201
-
202
- *"Ultimately, CAPTCHAs are useless for spam because they're designed to tell you if someone is 'human' or not, but not whether something is spam or not." Matt Mullenweg*
203
-
204
- You do not have to work in IT to know what spam is. Besides piles of unwanted email, there are spam bots, or special software programs designed to act as human website visitors that post unwelcome messages over the Internet to advertise dubious services. More often than not spam messages do not even make sense. Similar to bacteria and virus mutations developing antibiotic resistance, spam bots are becoming more resilient in penetrating Internet firewalls and security layers.
205
-
206
- = CleanTalk's features =
207
- Anti-Spam by CleanTalk with Spam FireWall is one of the fastest plugins that allows you to lower the server load. One of the important parameters for each webmaster is the speed of the site, so we make sure that our plugin consumes as few server resources as possible. The Cloud Service provides the advantage: all data processing takes place in the Cloud.
208
-
209
- CleanTalk team has developed unique anti spam algorithms to assess visitors behavior. CleanTalk analyzes user behavior and the parameters of the filled forms. Our anti-spam module, being installed in your website, sends the behavior parameters of either a visitor or a spam bot. When these parameters are estimated, the anti spam service makes a decision - to post a message or to define it as spam and reject it. Based on these checks, the service forms its own list of email addresses used by spam bots.
210
-
211
- The registrations of visitors are being checked in a similar manner. The service adds to the blacklist not just email addresses, but also IP addresses and domains of websites that promote themselves through spam mailing. All of this happens automatically and requires no action from the administration of the website. In 2.5 million queries the service makes a mistake in 40-45 cases, i.e. CleanTalk detects spam with 99.9982% accuracy. We constantly monitor these errors and make adjustments to our algorithms. Even with this exceptional accuracy our team is aiming to improve the figures over time.
212
-
213
- All-in-one. CleanTalk protects form spam all forms instantaneously - comments, registrations, feedback, contacts. No need to install additional plugins for each form. You save resources and increase performance of your website.
214
-
215
- Spam attacks log. Anti-Spam by CleanTalk records all filtered comments, registrations and other spam attacks in the "Log of spam attacks" and stores the data in the log for up to 45 days. Using the log, you can ensure reliable protection of your website from spam and experience no false/positive filtering.
216
-
217
- With the help of anti-spam by CleanTalk you can check existing comments and users, to find and quickly delete spam comments at once. This allows administrators of websites to automatically check and identify spam bots, comments and users, which were not detected by conventional anti-spam tools. The existing comments and users checking process is performed in a database of the nearly 2 million identified spam bots. Detailed spam stats allows CleanTalk customers to fully control it.
218
-
219
- CleanTalk has an advanced option "Spam FireWall". This option allows you to block the most active spam bots before they get access to your website. It unloads you website pages when an attempt attack was made, so your web server won't run unnecessary scripts on these pages. Also it prevents any scanning of website pages by spam bots. Subsequently Spam FireWall significantly reduces your webserver load. Spam FireWall can mitigate HTTP/HTTPS DDoS attacks. When an intruder makes GET requests to attack your website, Spam FireWall will block requests from bad IP addresses. Your website gives the intruder a special page with a description of DDoS rejection instead of the website pages. Spam FireWall can help to reduce the CPU usage of your server because of this reason.
220
-
221
- "CleanTalk team has been developing a cloud spam protection system for five years and has created a truly reliable anti-spam service designed for you to guarantee your safety".
222
-
223
- = White Label Mode =
224
-
225
- To switch the plugin work in the white-label mode you should set up a few settings on your main site in Wordpress Multisite Network:
226
-
227
- 1. Check setting "Enable White Label Mode".
228
- 2. Fill "Hoster API Key" field with key from CleanTalk's hoster panel.
229
- 3. Fill "Plugin name" field. It could be any name you want for the plugin.
230
- 4. Save settings.
231
-
232
- The plugin will do everything rest.
233
-
234
- = Auto-Update CleanTalk AntiSpam =
235
-
236
- CleanTalk Dashboard allows you to set auto-update plugin and select several websites and update the plugin at once on all sites by one click or you can setup auto-update for all websites or separate websites.
237
-
238
- Note: there is 24 hours delay before auto-update will do. This delay allows needing to avoid any issues. All updates that made through CleanTalk Dashboard manually will do immediately.
239
-
240
- Auto-updating system will work from CleanTalk AntiSpam version 5.88
241
-
242
- = Real-time email validation. Is email real or Not. =
243
- It is very important to be sure that the user used his real email address. Spambots very often use fake email addresses, i.e. which addresses do not exist.
244
-
245
- CleanTalk will check email addresses for existence in real time.
246
-
247
- Non-existing email addresses also entail several other problems for website owners.
248
-
249
- * You can never contact them by email,
250
- * the client will never receive any notifications from you (account activation letter, password recovery, email distribution, notifications, etc.),
251
- * if you use email marketing for your clients, then a large number of nonexistent emails in the mailing list may result in your IP address being added to various blacklists of email servers.
252
-
253
- Improve your email list with email validation without fake emails.
254
-
255
- = Blocking disposable & temporary emails =
256
-
257
- Block fake and suspicious users with disposable & temporary emails to improve email delivery. So, it also prevents malicious activity, spam bots, and internet trolls.
258
-
259
- = Stops Spam in Search Form =
260
-
261
- Spam bots can use your search form to make a GET request with spam text.
262
- CleanTalk Anti-Spam has the option to protect your website search form from spam bots. Each time, the search generates a new page and if there are many requests, this can create additional load. So, under some conditions, spam searches can be indexed, which affects SEO,
263
-
264
- * Spam FireWall blocks access to all website pages for the most active spambots. It lowers your web server load and traffic just by doing this.
265
- * Anti-Spam protection for website search forms repels spambots.
266
- * If your search form gets data too often the CleanTalk Anti-Spam plugin will add a pause and increase it with each new attempt to send data. It saves your web server processor time.
267
- * Spam protection allows you to not forbid indexation for the crawler bots if you really need it but simultaneously you will get protection from spambots.
268
-
269
- You will always know what users were looking for on your site.
270
-
271
- = Disable comments =
272
-
273
- This option disables comments on your site. You can choose one or several options:
274
-
275
- * Disable comments for posts
276
- * Disable comments for pages
277
- * Disable comments for media
278
-
279
- When using Disables comments, existing comments will not be deleted and will remain on the pages.
280
-
281
- = Translations =
282
- * Albanian (sq_AL) - thanks to fjalaime https://wordpress.org/support/users/fjalaime/
283
- * French (fr_FR) - thanks to Gilles Santacreu http://net-ik.net
284
- * Spanish (es_ES) - thanks to Andrew Kurtis and WebHostingHub
285
-
286
- = Requirements =
287
- WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enabled 'allow_url_fopen' setting. The plugin is fully compatible with PHP 7.
288
-
289
- > Max power, all-in-one, premium anti-spam WordPress plugin. No comments & registrations spam, no contact spam, protects any forms. Just install and forget spam.
290
-
291
- == Installation ==
292
-
293
- = Installation instructions =
294
-
295
- 1. Download, install and activate 'Anti-spam by CleanTalk'.
296
-
297
- 2. Get Access key <a href="https://cleantalk.org/register?platform=wordpress" target="_blank">https://cleantalk.org/register</a>
298
-
299
- 3. Enter Access key in the settings: WordPress console -> Settings -> Antispam by CleanTalk
300
-
301
- 4. Do dummy spam comment (registration or contact message) with email **stop_email@example.com**. You should see notice: **Forbidden. Sender blacklisted.**
302
-
303
- 5. Done! The plugin is ready to use.
304
-
305
- = Video guide - Anti-Spam Plugin Installation in WordPress. =
306
-
307
- [youtube https://www.youtube.com/watch?v=SktF0s-go6A ]
308
-
309
- **Important!** To test spam protection you must post a dummy submissions as website visitor (use must logged out from WordPress console), because the plugin doesn't filter submissions from WordPress administrators.
310
-
311
- = How can setup plugin in WPMU version? =
312
- In WordPress multisite version you can switch the plugin to use Global Access key. In this way the plugin doesn't show any options to enter Access key in plugin settings and doesn't show Trial banner in WordPress backend. To setup global CleanTalk access key for all websites in WPMS, define constant in your wp-config.php file before defining database constants:
313
-
314
- define('CLEANTALK_ACCESS_KEY', 'place your key here');
315
-
316
- **Make it before you activated the plugin. If the plugin already activated, deactivate it and add the code and active it again.**
317
- Now, all subsites will have this access key.
318
-
319
- = Manage and control spam protection =
320
-
321
- Go to <a href="https://cleantalk.org/my" target="_blank">Dashboard</a> at the cleantalk.org or use <a href="https://play.google.com/store/apps/details?id=org.cleantalk.app">Android</a>, <a href="https://itunes.apple.com/us/app/cleantalk/id825479913?mt=8">iPhone</a> anti-spam app to manage and control spam protection.
322
-
323
-
324
- == Frequently Asked Questions ==
325
-
326
- = Why are they spamming me? =
327
- Spammers want to get backlinks from your site to improve their site's PageRank or redirect your visitors to malicious sites.This level of spam can damage your reputation with readers and commentators if you fail to tackle it. It is not uncommon for some WordPress websites to receive hundreds or even thousands of comments every week. However, by using a CleanTalk plugin, spam can be easily handled by your WordPress website.
328
-
329
- = Is the anti-spam protection safe for mobile visitors? =
330
- Yes, it is. The plugin doesn't block mobile visitors as well as desktop website visitors. It uses several independent anti-spam tests to decrease the number of false outcomes and to have as low false-positive rate as possible. Multiple anti-spam tests help to avoid false/positive blocks for real website visitors even if one of the tests failed.
331
-
332
- = What does the plugin do with spam comments? =
333
- Spam comments are being moved to SPAM folder by default or you can set the option to ban spam comments silently.
334
-
335
- = How can I test the anti-spam protection? =
336
- Please use the email **stop_email@example.com** for comments, contacts or signups to see how the anti-spam protection works. Also you can see the logs for the last 7 days at the <a href="http://cleantalk.org/my/show_requests">Control panel</a> or look at the folder "Spam" for banned comments.
337
-
338
- = Is the plugin effective against spam bots? =
339
- The plugin Anti-Spam by CleanTalk stops up to 99.998% of spam comments, spam signups (registrations), spam contact emails, spam subscriptions, spam bookings or spam orders.
340
-
341
- = Does the plugin protect from brute force, DoS attacks and spam attacks? =
342
- Yes, it does. Please turn the option 'Spam FireWall' on in the plugin settings to protect your website from DoS/DDoS, XML-RPC attacks.
343
-
344
- = How does the plugin stop spam? =
345
- Please, note - administrator's actions are NOT being checked.
346
-
347
- The plugin uses several simple tests to stop spammers:
348
-
349
- 1. **JavaScript anti-spam test.** 99% of spam bots don't have full JavaScript functions support. So, the plugin has the code which can be run by normal visitor and can't be run by the spam bot.
350
- 1. **Email, IP, domain spam activity list entries check.** The plugin uses spam activity database online at cleantalk.org, consisting of more than 20 billion spam activity records of IPs, Emails, Domains and ASN. If the sender's IP or Email is in the database, the sender gets some spam scores. To reduce false/positive rate the plugin not only uses the blacklist test to ban spammers, the sender will be banned when and only when multiple spam tests have been failed.
351
- 1. **Comment submit time.** Spam bots usually submit the info immediately after the page has been loaded, this happens because spam bots don't actually fill the web form, they just send $_POST data to the blog. The normal visitor sends the data after several seconds or minutes.
352
-
353
- = Will the anti-spam plugin protect my theme? =
354
- Yes, it will. The Anti-spam by CleanTalk is compatible with any WordPress theme.
355
-
356
- = What about pingback, trackback spam? =
357
- The plugin passes pingbacks without any checks by default. All trackbacks will be blocked if the sender had spam activity.
358
-
359
- = Can I use CleanTalk with Akismet? =
360
- Sure, you can use CleanTalk with Akismet. In this case you will probably have higher false/positive rate (when legitimate comments/signups are being denied), but you will have stronger anti-spam protection on your website.
361
-
362
- = Is CleanTalk better than Akismet? =
363
- Please look at this features comparison here https://cleantalk.org/cleantalk-vs-akismet
364
-
365
- = Can I use CleanTalk to remove pending spam comments? =
366
- Yes, you can. The plugin has the option to test all pending comments via database of <a href="https://cleantalk.org/blacklists">spam active IP/Email</a>, found spam comments will be moved to Trash folder.
367
-
368
- = How does the plugin find spam in pending comments or registered accounts? =
369
- The plugin checks all non-spam comments in the blacklist database and shows you those senders who have spam activity on other websites.
370
- There are some differences between blacklist database and API to protect you from spam bot registrations/comments online. Blacklists show all history of spam activity, but our API (which is used in spam tests) relies on other parameters too: last day of activity, number of spam attacks during the last days etc. These mechanisms help us to reduce the number of false outcomes. So, there is nothing strange, if some emails/IPs are not found by bulk comments/accounts test.
371
-
372
- To check comments please go here:
373
- > WordPress console -> Comments -> Find spam comments
374
-
375
- To check users please go here:
376
- > WordPress console -> Users -> Find spam users
377
-
378
- = Should I use other anti-spam tools (Captcha, reCaptcha and etc.)? =
379
- CleanTalk stops up to 99.998% of spam bots, so you can disable other anti-spam plugins (especially CAPTCHA-type anti-spam plugins). In some cases several anti-spam plugins could conflict with each other, so it would be better to use just one plugin.
380
-
381
- = Is the plugin compatible with WordPress MultiUser (WPMU or WordPress network)? =
382
- Yes, the plugin is compatible with WordPress MultiUser. Each blog in multisite environment has individual anti-spam options for the protection from spam bots.
383
-
384
- = After the installation I noticed that the number of spam attacks has been increased in the stats =
385
- There are a few reasons for this:
386
-
387
- * With the indexing of your web-site by the search systems, appearance of external links and better search results position, your web-site attracts more and more spambots.
388
- * Non-transparent protection systems like CAPTCHA or question/answer, that don't have spam attacks stats, don't let you see the whole picture, or the picture is incomplete.
389
- * Counting methods for spam attacks and spam bots are different for different systems, thus the diversity appears. We seek to provide detailed stats.
390
-
391
- = Why my dummy "spam" comment passed to the WordPress? =
392
- The plugin has several options to detect spam bots and humans. If you just post spammy text like this:
393
-
394
- "I want to sell something", "Buy something here.." and etc
395
-
396
- the comments will be passed, because the plugin detects sender as a human. So, use special email *stop_email@example.com* to test the anti-spam functionality or wait a few days to see how the plugin works.
397
-
398
- = Is it free or paid? =
399
- The plugin is free and distributed under the GPLv2 license.
400
-
401
- CleanTalk anti-spam plugin works with a cloud base anti-spam service and this plugin is a Software as a service (SaaS).
402
- CleanTalk it’s a free plugin that works with premium Cloud Anti-Spam service.
403
- https://en.wikipedia.org/wiki/Software_as_a_service
404
-
405
- The fact that the plugin works with a premium type service is mentioned in the plugin annotation and in its WordPress catalog description.
406
-
407
- We are ready to help you with any issue regarding CleanTalk. There are hundreds of environment compositions and we do our best to cover as many as possible.
408
-
409
- = Can I use CleanTalk with cache plugins? =
410
- Anti-spam by CleanTalk doesn't use static HTML code in its templates, so all anti-spam functions work correctly with any WordPress cache plugins.
411
-
412
- = Does the plugin protect from spam bots if I use forms with third-party services? =
413
- Yes, it does. Plugin protects web-forms on your websites which send data to third-party servers (like MailChimp). To enable this protection set the option 'Protect external forms' in the plugin settings.
414
-
415
- = Does CleanTalk compatible with Cloudflare? =
416
- CleanTalk is fully compatible with CloudFlare. Service doesn't filter CloudFlares IP's (AS13335) through blacklists database, so in this case plugin/service filters spam bots using other anti-spam tests.
417
-
418
- = Is CleanTalk compatible with a content delivery network (CDN)? =
419
- Yes, it is. CleanTalk works with any CDN system, i.e. CloudFlare, MaxCDN, Akamai.
420
-
421
- = Can I use CleanTalk functionality in my plugins? =
422
- Yes, you can. Just use following snippet:
423
-
424
- <?php
425
- if(!function_exists('ct_test_message')){
426
- include_once( ABSPATH . '/wp-content/plugins/cleantalk-spam-protect/cleantalk.php' );
427
- }
428
- //for registration test:
429
- $res=ct_test_registration("nickname", "stop_email@example.com", "127.0.0.1");
430
- //or for some other messages (contact forms, comments etc.)
431
- $res=ct_test_message("nickname", "stop_email@example.com", "127.0.0.1", "test message");
432
-
433
-
434
- $res now contents array with two parameters:
435
- * $res['allow'] - is request allowed (1) or not (0)
436
- * $res['comment'] - comment for our server's decision.
437
-
438
- = I see two loads of script cleantalk_nocache.js. Why do you use it twice? =
439
- This script is used for AJAX JavaScript checking. Different themes use different mechanisms of loading, so we use two methods for loading our script. If you absolutely know what you are doing, you can switch one of the methods off by defining constants in your wp-config.php file:
440
-
441
- define('CLEANTALK_AJAX_USE_BUFFER', false); //false - don't use output buffering to include AJAX script, true - use it
442
-
443
- or
444
-
445
- define('CLEANTALK_AJAX_USE_FOOTER_HEADER', false); //false - don't use wp_footer() and wp_header() for including AJAX script, true - use it
446
-
447
- = Can I add exclusions for some pages of my site? =
448
- Yes, you can. There is a special setting in plugin settings.
449
- You could use this guide to learn more: https://cleantalk.org/help/exclusion-from-anti-spam-checking#wordpress
450
-
451
- = Can I not send my personal data to CleanTalk servers? =
452
- Yes, you can exclude your data. There is a special setting in plugin settings.
453
- You could use this guide to learn more: https://cleantalk.org/help/exclusion-from-anti-spam-checking#WordPress_field_exclusions
454
-
455
- = How to test Spam FireWall? =
456
- Use special IP 10.10.10.10 in URL to test Spam FireWall. For example,
457
-
458
- https://cleantalk.org/blog/?sfw_test_ip=10.10.10.10
459
-
460
- Attention! The incognito mode should be enabled in your browser when you do a test. To enable incognito mode press Ctrl+Shift+N for Chrome, Opera и Safari browsers; press Ctrl+Shift+P for Firefox, Internet Explorer and Microsoft Edge. A full guide to enable Incognito mode is here: https://www.wikihow.com/Activate-Incognito-Mode
461
-
462
- = How can I enter access key in WPMU version? =
463
- To set up global CleanTalk access key for all websites in WPMU, define constant in your wp-config.php file before defining database constants:
464
-
465
- define('CLEANTALK_ACCESS_KEY', 'place your key here');
466
-
467
- Now, all subsites will have this access key.
468
-
469
- = Why is CleanTalk faster and more reliable than stand-alone solutions? =
470
- All anti-spam checks are held in the cloud and don't overload the web server. The cloud solutions have a huge advantage since the parameters are being compared with information from more than 100,000 websites.
471
-
472
- = I see a lot of blocked messages with the reason "Forbidden. Please enable JavaScript. Spam sender name." in my logs =
473
- A lot of spam bots can't perform JavaScript code, so it is one of the important checks and most of the spam bots will be blocked with the reason **"Forbidden. Please enable JavaScript. Spam sender name."** All browsers can perform JS code, so real visitors won't be blocked.
474
-
475
- If you or some of your visitors have the error **"Forbidden. Enable JavaScript."** please check JavaScript support in your browser and do this JavaScript test at this page: https://cleantalk.org/checkout-javascript-support.
476
-
477
- If you think that there is something wrong in the messages blocking, let us know about it. Please submit a support request here: https://cleantalk.org/my/support.
478
-
479
- = Does the plugin work with Varnish? =
480
- CleanTalk works with Varnish, it protects WordPress against spam, but by default the plugin generates a few cookies for the protection from spam bots and it also disables Varnish cache on pages where CleanTalk's cookies have been stored. To get rid of the issue with cache turn off the option 'Set cookies' in the plugin settings.
481
-
482
- WordPress console -> Settings -> CleanTalk -> Advanced settings
483
-
484
- Now the plugin will protect WordPress comments, registrations and most of popular contact forms, but will not protect some of rarely used contact forms.
485
-
486
- = Does the anti-spam plugin work with Accelerated Mobile Pages (AMP)? =
487
- Yes, it does. But you have to turn off the option 'Use AJAX for JavaScript check' in Advanced settigns of the plugin to be fully compatible with Accelerated Mobile Pages.
488
-
489
- = How to close renewal or trial notice in the WordPress backend? =
490
- To close the notice please save the plugin settings again or it will be closed automatically within 60 minutes after the renewal.
491
-
492
- = I'm using PHP 4.2 version and i'm getting errors related with JSON. Why does it happens? =
493
- СleanTalk is no longer supports PHP lower than 5.2 version because the support code have incompatibility with PHP 7 version. Please, upgrade your PHP. If you couldn't perform that, let us know about it via support ticket here: https://cleantalk.org/my/support.
494
-
495
- = Should I change anything in the plugin's settings or in my CleanTalk Control Panel when I switch my website from HTTP to HTTPS or vice versa? =
496
- No. You don't need to change anything in the plugin's settings or in your CleanTalk Control Panel. The plugin will work regardless of the protocol.
497
-
498
- = How to use Anti-Spam Log? =
499
- The following possibilities are available for you in the Anti-Spam Log:
500
-
501
- - Time period for all spam records you want to see.
502
-
503
- - Filter spam records by their status: Any status, Denied, Approved.
504
-
505
- - Filter spam records by your websites.
506
-
507
- - Filter spam records by country they came from.
508
-
509
- - Filter spam records by IP address, e-mail address or username.
510
-
511
- - Available options for a specific record:
512
-
513
- * Details - see item 4 below.
514
- * Spam/Not Spam - press this string if our system made wrong decision and blocked or approved a registration, a comment ot a contact form submission. More about it here: https://cleantalk.org/faq#feedback_spam
515
- * Delete - delete a record permanently.
516
- * Personal blacklists - go to your website Black&White Lists page.
517
- * Record details: block reason, body of the message, additional caught data.
518
-
519
- = Spam FireWall and AntiSpam - Networks Blocking =
520
-
521
- Anti-Spam - will blocks users from selected IP or network from using contacts/messages/registrations/comments forms.
522
- Spam FireWall - will blocks users from selected IP or network from entering the website.
523
-
524
- Please, read more here
525
- https://cleantalk.org/help/sfw-blocks-networks
526
-
527
-
528
- = Spam Comment Management =
529
-
530
- By default, all spam comments are placed in the spam folder, now you can change the way the plugin deals with spam comments:
531
-
532
- 1. **Move to the Spam folder.** All spam comments will be placed to the folder "Spam" in the WordPress Comments section except comments with Stop-Words. Stop-Word comments will be always stored in the "Pending" folder.
533
-
534
- You can prevent the proliferation of Spam folder. It can be cleaned automatically using the option "Keep spam comments for 15 days." Enable this option in the settings of the plugin: WordPress Admin Page -> Settings -> Antispam by CleanTalk -> Advanced settings -> enable "Keep spam comments for 15 days" -> Save Changes.
535
-
536
- 2. **Move to Trash.** All spam comments will be placed to the folder "Trash" in the WordPress Comments section except comments with Stop-Words. Stop-Word comments will be always stored in the "Pending" folder.
537
-
538
- 3. **Ban comments without moving to WordPress backend.** All spam comments will be deleted permanently without going to the WordPress backend except comments with Stop-Words. Stop-Word comments will be always stored in the "Pending" folder.
539
-
540
- What comments were blocked and banned can be seen in the Anti-Spam Log here: https://cleantalk.org/my/show_requests?int=week
541
-
542
- To manage the actions with spam comments, go to the Control Panel, select the website you want to change the actions for and go to "Settings" under the name of the website.
543
-
544
- Please, read more here:
545
- https://cleantalk.org/help/spam-comment-management
546
-
547
- = How do I report a missed spam bot or incorrect filter? =
548
-
549
- If you think the service has missed a spam bot or improperly filtered visitor to the website, you may notify us via the Anti-spam control panel. To do this,
550
- Log in to Control panel https://cleantalk.org/my.
551
- Click the line "Log" under the name of your website.
552
- When you mark a record as "SPAM", its e-mail and IP-address will be added to your personal blacklist for your website.
553
- When you mark a record as "Not SPAM", its e-mail and IP-address will be added to your personal white list for your website.
554
-
555
- Please, read more here
556
- https://cleantalk.org/faq#feedback_spam
557
-
558
- = Is the plugin fast? =
559
- We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade response time in backend or frontend. The plugin proccess only POST requests to WordPress core, it tackes less than 1 second to return results.
560
-
561
- = Is the plugin EU GDPR compatible? =
562
- Yes, it is. Please read this article,
563
- <a href="https://cleantalk.org/publicoffer#cleantalk_gdpr_compliance">https://cleantalk.org/publicoffer#cleantalk_gdpr_compliance</a>
564
-
565
- = Check external forms =
566
- If your website has forms that send data to external sources, you can enable option to "Protect external forms". In this case, if plugin determinates that the current message is spam, your form action will be temporary replaced to your current hostname to prevent sending false data to an external source.
567
-
568
- == Screenshots ==
569
- 1. AntiSpam settings are easy to use.
570
- 2. AntiSpam plugin rejected a spam bot at the CAPTCHA less registration form. The plugin provides explanation to visitor and websites about each rejected comment/registration or contact message.
571
- 3. Use AntiSpam analytics tool for each website in service Dashboard to have information about spam/legitimate stats.
572
- 4. Use AntiSpam log to control anti-spam plugin.
573
- 5. CleanTalk works faster than most of other anti-spam plugins.
574
- 6. The Dashboard with a map of most spam active countries per your account.
575
- 7. The plugin deletes/removes the existing spam comments and users accounts.
576
- 8. CleanTalk's dashboard update link.
577
- 9. Auto upadte confimation.
578
- 10. Website's options.
579
-
580
- == Changelog ==
581
-
582
- = 5.143 Aug 05 2020 =
583
- * New: Synchronize button. New way of synchronize with the Cleantalk Cloud.
584
- * Fix: SpamFireWall (firewall against spam) update, storing system.
585
- * Fix: Skip Woocomerce metorik send cart.
586
- * Spam protection improved.
587
- * Minor fixes.
588
-
589
- = 5.142.2 Jul 29 2020 =
590
- * Fix: Issue with SpamFireWall logs.
591
-
592
- = 5.142.1 Jul 28 2020 =
593
- * Fix: Blocking good bots.
594
-
595
- = 5.142 Jul 27 2020 =
596
- * New: Bot Protection module for Firewall.
597
- * New: Anti-Crawler module for Firewall.
598
- * Mod: Improved spam Protection.
599
- * Fix: Caching plugins auto detection.
600
- * Fix: Skip Divi system fields.
601
- * Fix: Ultimate Form Builder exception.
602
- * Plenty of fixes and upgrades.
603
-
604
- = 5.141.3 Jul 17 2020 =
605
- * Fix: 403 error issues with cache plugins.
606
- * Fix: remove apbct-common.js.
607
- * Fix: exclude caspio form.
608
- * Fix: Recompile nocache map.
609
- * Fix: indexof is not a function.
610
- * Fix: SFW updating fix for hosting.
611
- * Upd: Temporary remove spinner for SFW check.
612
-
613
- = 5.141.2 Jul 08 2020 =
614
- * Fix: SFW issues.
615
- * Upd: Temporary remove spinner for SFW check.
616
-
617
- = 5.141.1 Jul 06 2020 =
618
- * Fix: Add timeout for first SFW activation.
619
-
620
- = 5.141 Jul 06 2020 =
621
- * Fix: WP Fusion web hooks skipped.
622
- * Upd: Readme old changelogs replaced.
623
- * Fix: SFW typo fixed.
624
- * Upd: Set update banner timer to 15 minutes.
625
- * Fix: sfw updating after disabling.
626
- * Fix: sendAjax 403 issues.
627
- * New: Add wpmu settings template.
628
- * Fix: SameSite attribute removed for php version <7.3.
629
- * Fix: Nocache parameter added.
630
- * Upd: Add description support for convertkit/active campaign.
631
- * Integration: Enfold Theme contact form.
632
- * Upd: Add update/add hooks for settings to avoid sfw update issues.
633
-
634
- = 5.140.1 Jun 25 2020 =
635
- * Upd: .POT updated.
636
- * Upd: RU .po updated.
637
-
638
- = 5.140 Jun 18 2020 =
639
- * New: Add SFW status in plugin settings.
640
- * Fix: Remove sleep for sfw update.
641
- * Fix: Check account status only once in 86400 seconds.
642
- * Fix: Postmark avocet theme.
643
- * Fix: Find spam users - from-till implemented.
644
- * Upd: Add common.js.
645
- * Fix: Bookly admin action excluded.
646
- * Fix: sfw_pass_key cookie domain attribute removed.
647
- * Fix: SFW no cache meta tags added.
648
- * Fix: MEC Pro plugin compatibility fixed.
649
- * Mod: Catching SpamFireWall update errors.
650
- * Fix: UltimateBuilder skip fields.
651
- * Fix: Strip tags on comment.
652
-
653
- = 5.139 Jun 02 2020 =
654
- * Fix: Profile link fixed.
655
- * Fix: WPMS plugin name fixed.
656
- * Fix: WPMS plugin settings link fixed.
657
- * Fix: Integration with Easy Forms for Mailchimp.
658
- * Fix: JS check on the registration form.
659
- * Fix: Double JS attaching on the login page.
660
- * Fix: Clear SpamFireWall table. Throw error if failed.
661
- * Upd: Cookies attr "samesite" added.
662
- * New: Users checking result icons added.
663
- * Upd: Whitelists support added for SFW.
664
- * Fix: Clear users meta everywhere by complete deactivation.
665
- * New: Comment notification updated - blacklist links added.
666
- * Fix: PHP Warning in cleantalk-pluggable.php.
667
- * Fix: White Label mode is not accessible if CLEANTALK_ACCESS_KEY is defined.
668
- * Fix: Deprecated condition.
669
- * Fix: Setting layout for the right to left direction languages.
670
-
671
- = 5.138.1 May 20 2020 =
672
- * Fix: Ninja Forms. Spam submissions.
673
-
674
- = 5.138 May 14 2020 =
675
- * Fix: Scan users fixed.
676
- * Fix: Notice fixed (Creating default object from empty value).
677
- * Fix: Creating table for SFW data for child blogs on WPMS.
678
- * Upd: SFW query optimized.
679
- * Fix: Adding cleantalk_spamscan_logs table for each blog when updating from 5.137.2.
680
- * New: White Lists for SFW implemented.
681
- * Fix: correct comments checking status text.
682
- * Fix: Users scan. Reducing memory load.
683
- * Fix: "Capture Buffer" settings. The issue with YoastSEO.
684
- * Fix: SFW query fixed.
685
- * Fix: SFW die page fixed.
686
- * Fix: Membermouse API false positives.
687
- * Fix: gz*() functions calling from global namespace for now.
688
-
689
- = 5.137.1 April 29 2020 =
690
- * Fix: Call to undefined function wp_get_current_user().
691
- * Fix: "Capture buffer" setting, YOAST sitemap.
692
- * Integration: Simple Membership plugin integration implemented.
693
- * Fix: Integrations system fixed.
694
- * Fix: Query for SFW fixed.
695
- * Fix: SFW error handling.
696
-
697
- = 5.137 April 23 2020 =
698
- * Fix: WPMU and WhiteLabel mode fixed.
699
- * Fix: 403 Response code for blocked entries.
700
- * Upd: SFW die page updated (spinner and delay).
701
- * New: SFW query updated.
702
- * Fix: SFW truncate instead of delete.
703
- * Fix: AJAX exception for WordPress Membership Plugin – Restrict Content.
704
- * Fix: Check spam users.
705
- * Fix: Debug functionality for users check.
706
- * Fix: Gravity Forms. Modifying message.
707
- * Fix: Sanitizing settings.
708
- * Fix: "Delete all spam users" button.
709
-
710
- = 5.136.4 April 8 2020 =
711
- * Security: Possible XSS vulnerability.
712
-
713
- = 5.136.3 April 7 2020 =
714
- * Security: Possible XSS vulnerability.
715
-
716
- = 5.136.2 April 7 2020 =
717
- * Mod: bbPress is using role exclusions now.
718
- * Mod: Show info on SpamFirewall block page.
719
- * Mod: Log SpamFirewall tests.
720
- * Fix: get_fields_any() fixed.
721
- * Fix: Multiple requests on WooCommerce checkout.
722
- * Fix: The SpamFirewall block page.
723
-
724
- = 5.136.1 April 2 2020 =
725
- * Mod: Setting "Show links to check Emails, IPs for spam" splitted in two.
726
- * Mod: Added setting "Manage comments on public pages".
727
- * Fix: Feedback from public pages.
728
- * Fix: Output for setting "Manage comments on public pages".
729
- * Fix: Public widget errors.
730
-
731
- = 5.136 April 1 2020 =
732
- * New: Feature allowing to track missed spam requests with the special plugin.
733
- * Mod: Enable WooCommerce checkout test by default.
734
- * Fix: Fluent forms integration fixed.
735
- * Fix: Logging skipped requests - actions added.
736
- * Fix: Comments output.
737
- * Fix: External forms protection.
738
- * Fix: PHP 7.4 compatibility.
739
- * Performance improved.
740
-
741
- = 5.135 March 16 2020 =
742
- * New: Setting which disallow sub-sites administrators to manage plugin settings.
743
- * New: Add custom title for message.
744
- * Mod: New headers for spam scan tabs.
745
- * Fix: ARM form login check.
746
- * Fix: For GET requests in HTTP API.
747
- * Fix: Getting variables in Get and Server classes.
748
- * Fix: SFW update system.
749
- * Fix: Empty connection error in Cleantalk/Antispam/API.
750
-
751
- = 5.134 February 27 2020 =
752
- * Fix: SpamFireWall update large data issues.
753
- * Fix: Auto-update for some banner notifications.
754
- * Fix: QuickContactForm protection.
755
- * Minor fixes.
756
- * Spam protection improved.
757
-
758
- = 5.133.2 February 10 2020 =
759
- * Fix: Add no-index meta tag to search page only.
760
- * Fix: Namespace issues.
761
-
762
- = 5.133.1 February 03 2020 =
763
- * Fix: PHP 7.4 issues.
764
- * Fix: Woocommerce options moved to a separate block.
765
- * Fix: CSS/HTML issues on settings page.
766
- * Minor fixes.
767
- * Spam protection improved.
768
-
769
- = 5.133 January 20 2020 =
770
- * Upd: Rebuilding users/comments scan
771
- * Fix: UltimateMember - form validation checking fixed.
772
- * Fix: Exclusion for login form.
773
- * Fix: Disable scripts on excluded pages.
774
- * Fix: PHP 7.4 compability.
775
- * Minor fixes.
776
- * Spam protection improved.
777
-
778
- = Early changelogs look in changelog.txt =
 
 
 
 
1
+ === Spam protection, AntiSpam, FireWall by CleanTalk ===
2
+ Contributors: safronik
3
+ Tags: spam, antispam, woocommerce, comments, firewall
4
+ Requires at least: 3.0
5
+ Tested up to: 5.5
6
+ Requires PHP: 5.4
7
+ Stable tag: 5.143.1
8
+ License: GPLv2
9
+
10
+ Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
11
+
12
+ == Description ==
13
+
14
+ **Supports: Contact Form 7, Contact Form by WPForms, Ninja Forms, Gravity Forms, MailChimp, Formidable forms, WooCommerce, JetPack comments and contact form, BuddyPress, bbPress, S2Member, MailPoet, wpDiscuz, ConvertKit, ActiveCampaign, any WordPress registrations & contact forms and themes. Just set up and forget the spam!**
15
+
16
+ No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bots. Universal AntiSpam plugin.
17
+
18
+ = AntiSpam features =
19
+ 1. Stops spam comments.
20
+ 2. Stops spam registrations.
21
+ 3. Stops spam contact emails.
22
+ 4. Stops spam orders.
23
+ 5. Stops spam bookings.
24
+ 6. Stops spam subscriptions.
25
+ 7. Stops spam surveys, polls.
26
+ 8. Stops spam in widgets.
27
+ 9. Stops spam in WooCommerce.
28
+ 10. Checks and removes the existing spam comments and spam users.
29
+ 11. Compatible with mobile users and devices.
30
+ 12. Compatible with General Data Protection Regulation (GDPR) (EU).
31
+ 13. Real-time email validation. Is email real or Not.
32
+ 14. Blocking disposable & temporary emails.
33
+ 15. No Spam - No Google Penalties. Give your SEO boost.
34
+ 16. Mobile friendly Anti Spam & FireWall.
35
+ 17. Stops spam in Search Form.
36
+ 18. Disable comments.
37
+ 19. Spam FireWall: Anti-Flood
38
+ 20. Spam FireWall: Anti-Crawler
39
+
40
+ = Public reviews =
41
+ > CleanTalk - Cloud-Based Anti-Spam Service to Keep Your Site Bot-Free.
42
+ > <a href="https://newswatchtv.com/2018/07/18/cleantalk-newswatch-review/" rarget="_blank">NewsWatch Review</a>.
43
+
44
+ > Using CleanTalk on WPLift was a great test as we receive huge amounts of spam.
45
+ > *Oliver Dale, <a href="http://wplift.com/wordpress-anti-spam-plugin" target="_blank">WPLift.com</a>.*
46
+
47
+ >I know you have heard of a number of anti-spam plugins. But you must know, the cloud-based ones are the best regarding detection rate. They compare all the content in forms with their own algorithm to find out the legibility.
48
+ >*<a href="https://www.techwibe.com/cleantalk-wordpress-plugin-review/" target="_blank">www.techwibe.com</a>*
49
+
50
+ > The key selling point of CleanTalk for me is not simply its effectiveness. It's the fact that CleanTalk works in the background. It does not make users jump through hoops in order to submit a comment or complete a form.
51
+ > <a href="https://www.kevinmuldoon.com/cleantalk-anti-spam-service/">www.kevinmuldoon.com</a>
52
+
53
+ = Free trial then $8 per year =
54
+ CleanTalk is a free anti spam plugin which work with the premium Cloud AntiSpam service cleantalk.org. This plugin as a service https://en.wikipedia.org/wiki/Software_as_a_service.
55
+
56
+ = AntiSpam protection for comments =
57
+ Native spam protection for WordPress, JetPack comments and any other comment plugins. The plugin moves spam comments to SPAM folder or you can set the option to ban spam comments silently. You can also enable the option in the plugin settings to auto-delete comments from SPAM folder.
58
+
59
+ = Spam bots registrations filter =
60
+ Filters spam bots on registration forms of WordPress, BuddyPress, bbPress, S2Member, WooCommerce, Profile builder, Login with AJAX and any other registration plugins.
61
+
62
+ = Protection from contact form spam =
63
+ The plugin is tested and ready to protect from spam emails via Formidable forms, Contact form 7, JetPack Contact form, Fast Secure Contact form, Ninja forms, Landing Page Builder, Gravity forms, Contact Form by BestWebSoft, Simple Contact Form Plugin - PirateForms, Visual Form Builder, Contact Form by WebDorado, Contact Form Email, MW WP Form, Contact Form by Jeff Bulllins, Contact Us Form, WCP Contact Form, WPForms Lite, Custom Contact, Forms, Caldera Forms, Visual Form Builder, Contact Form Clean and Simple, Divi by Elegant Themes, The7 theme and any other themes or custom contact forms, amoForms, Ultimate Form Builder, Contact Bank - Contact Forms Builder, Forms easily built with Smart Forms, Usernoise contact form, Contact Form by Web-Settler, HubSpot Marketing Free, QuForm.
64
+
65
+ = WooCommerce spam filter =
66
+ Anti-spam by CleanTalk filters spam registrations and spam reviews for WooCommerce. The plugin is fully compatible with WooCommerce 2.1 and higher.
67
+
68
+ = Newsletters antispam filter =
69
+ Anti-spam by CleanTalk filters spam subscriptions for MailPoet, MailChimp, PopupAlly and many other newsletter plugins.
70
+
71
+ = Spam filter for theme contact forms =
72
+ The plugin blocks spam emails via any theme (built-in ones included) contact forms. The plugin filters spam emails silently (without any error notices on WordPress frontend) in AJAX forms as well.
73
+
74
+ = bbPress spam filter =
75
+ Spam protection for everything about bbPress: logins, registrations, forums, topics and replies.
76
+
77
+ = Other spam filters =
78
+ * WordPress Landing Pages.
79
+ * WP User Frontend, UserPro.
80
+ * Any WordPress form (checkbox 'Custom contact forms').
81
+ * Any submission to the site (checkbox 'Check all POST data')
82
+
83
+ = Compatible with WordPress cache plugins =
84
+ * W3 Total Cache, Quick Cache, WP Fastest Cache, Hyper Cache, WP Super cache, WP-Rocket and any other cache plugins.
85
+
86
+ = Check existing comments for spam. Bulk spam comments removal. Spam comment Cleaner =
87
+ With the help of anti-spam by CleanTalk you can inspect through existing comments to find and quickly delete spam comments at once. To use this function, go to WP Console -> Comments -> Find spam comments.
88
+
89
+ = Check existing users for spam. Bulk spam accounts removal. Spam users cleaner =
90
+ With the help of anti-spam by CleanTalk you can inspect through existing accounts to find and quickly delete spam users at once. For use this function, go to WP Console -> Users -> Check for spam. Also, you can export a list of spam users to the CSV.
91
+
92
+ = Blocking users by country =
93
+ Automatically block comments and registrations from the countries you have set a ban for. This option is useful in cases of manual spam protection and for protection enhancement. If your site is not intended for international audience and you do not expect comments/users from other countries.
94
+
95
+ = Blocking comments by "stop words" =
96
+ You can block comments which contain "stop words" to enhance spam protection and messages with obscene words blocking. You can add particular words or phrases.
97
+
98
+ = Private black lists for anti-spam service =
99
+ Automatically block comments and registrations from your private black
100
+ IP/email address list. This option helps to strengthen the spam protection from a manual spam or block unwanted comments from users. You can add not only the certain IP addresses, but also a separate subnet to your personal black list.
101
+
102
+ = Private black list for Spam FireWall =
103
+ It allows you to add individual IP addresses and subnets to Spam FireWall. It
104
+ blocks the spam attacks from IP addresses which are not included in the SFW base yet. This option can help to block HTTP/HTTPS DDoS, SQL, brute force attacks and any others that made it through the HTTP/HTTPS. You can add not only the certain IP addresses, but also a separate subnet to your personal black list.
105
+
106
+ = Low false/positive rate =
107
+ This plugin uses multiple anti-spam tests to filter spam bots having as low false/positive rate as possible. Multiple anti-spam tests help to avoid false/positive blocks of the real website visitors even if one of the tests failed.
108
+
109
+ = How effective is CleanTalk? =
110
+ Accurately blocking spam is not an easy thing to do, but CleanTalk has a very low proven False/Positive rate. Here is actual statistics on false positives for all customers.
111
+
112
+ * Registrations - 0.007%
113
+ * Comments - 0.001%
114
+ * Contact forms - 0.001%
115
+ * Orders (WooCommerce) - 0.008%
116
+
117
+ The statistic was calculated on November 10 2017 for 1 million requests.
118
+
119
+ = How CleanTalk improves SEO for your website? =
120
+ So, you already know that the speed of the site has a direct impact on SEO.
121
+
122
+ *CleanTalk works faster than most of the other anti-spam plugins.* It is common knowledge that the faster your site loads, the better your customer experience is, the better your SEO will be, and the better your site will convert. Speed is becoming increasingly important in SEO, conversion and user experience. Today, site speed is one of the most important ranking factors on Google. A site that loads slowly will lose visitors and potential revenue.
123
+
124
+ There are different ways of improving your site's loading performance. One important parameter for site performance is to install well-developed plugins from a reputable source.
125
+
126
+ Among anti-spam plugins CleanTalk AntiSpam is one of the fastest. Despite the
127
+ large plugin functionality, the developers have optimized the performance of
128
+ the plugin so that AntiSpam by CleanTalk is faster than most analogs. This contributes to the cloud service architecture, as all calculations take place in the cloud, not on the server, the server receives the finished result for further action.
129
+
130
+ https://s.w.org/plugins/cleantalk-spam-protect/screenshot-5.png?r=1288723
131
+
132
+ = How CleanTalk works? =
133
+ * A visitor writes a comment or registers
134
+ * Anti-Spam by CleanTalk plugin sends action parameters into the CleanTalk cloud
135
+ * Service analyzes the parameters
136
+ * If this is a visitor, the comment will be published. If it's a spam bot, then CleanTalk blocks this comment or registration.
137
+ * Parameters are written to the spam log which can be viewed in the Control Panel service.
138
+
139
+ CleanTalk team has been developing a cloud antispam system for five years and has created a truly reliable anti-spam service designed for you to guarantee
140
+ your safety.
141
+
142
+ = Spam attacks log =
143
+ Service CleanTalk (this plugin is a client application for CleanTalk anti-spam service) records all filtered comments, registration and other spam attacks in the "Log of spam attacks" and stores the data in the log for up to 45 days. Using the log, you can ensure reliable protection of your website from spam and no false/positive filtering.
144
+
145
+ = Spam FireWall =
146
+ CleanTalk has an advanced option "Spam FireWall". Spam FireWall allows blocking the most active spam bots before they get access to your website. It prevents spam bots from loading website pages so your web server doesn't have to perform all scripts on these pages. Also it prevents scanning of pages of the website by spam bots. Therefore Spam FireWall significantly reduces the load on your web server. Spam FireWall also makes CleanTalk the two-step protection from spam bots. Spam FireWall is the first step and it blocks the most active spam bots. CleanTalk Anti-Spam is the second step and checks all other requests on the website in the moment of submitting comments/registers etc.
147
+
148
+ Spam FireWall is fully compatible with the most popular VPN services.
149
+ Also, Spam FireWall supports all search engines Google, Bing, Yahoo, Baidu, MSN, Yandex and etc.
150
+
151
+ = How Spam FireWall works? =
152
+ * The visitor enters to your web site.
153
+ * HTTP request data are being checked in the nearly 5.8 million of the identified spam bot IPs.
154
+ * If it is an active spam bot, the bot gets a blank page, if it is a visitor then he receives a normal page. This process is completely transparent for the visitors.
155
+
156
+ All the CleanTalk Spam FireWall activity is being logged in the process of filtering.
157
+
158
+ = Spam FireWall DDoS Protection =
159
+ Spam FireWall can mitigate HTTP/HTTPS DDoS attacks. When an intruder makes GET requests to attack your website, Spam FireWall blocks all requests from bad IP addresses. Your website gives the intruder a special page with the description of DDoS rejection instead of the website pages. Therefore Spam FireWall helps to reduce CPU usage of your server.
160
+ [youtube https://www.youtube.com/watch?v=Eu5Zqryvj4k]
161
+
162
+ = Spam FireWall: Anti-Flood & Anti-Crawler =
163
+ Spam FireWall: Anti-Flood and Anti-Crawler options are intended for blocking unwanted bots, content parsing, shop goods prices parsing or aggressive website scanning bots. Learn more https://cleantalk.org/help/anti-flood-and-anti-crawler
164
+
165
+ = XML-RPC brute force protection =
166
+ Spam FireWall can mitigate XML-RPC brute force attacks. It blocks XML-RPC attacks from bad IP addresses. This helps to prevent bruteforce attacks by a Remote Procedure Call.
167
+
168
+ = No spam comments, no spam registrations, no spam contact emails, no spam trackbacks. CAPTCHA-free anti-spam for WordPress =
169
+ Spam is one of the most irritating things. Spam rates are increasing every year and conventional anti-spam can no longer handle all spam bots. CleanTalk prevents and automatically blocks spam. You'll be surprised how effective CleanTalk is in protecting from spam.
170
+
171
+ = AntiSpam plugin info =
172
+ CleanTalk is an all-in-one antispam solution for WordPress that protects login, comment, contact and WooCommerce forms at once. You don't need to install separate antispam plugins for each form. It allows your blog to work faster and save resources. After installation you will forget about spam; your CleanTalk plugin will do all the work. You won't have to deal with spam as CleanTalk does this for you automatically.
173
+
174
+ CleanTalk is a transparent antispam tool, we provide detailed stats of all incoming comments and logins. You can always be sure that **there are no errors**. We have developed a mobile app for you to see antispam stats wherever you want.
175
+
176
+ We have developed the antispam for WordPress that protects you from spam bots at the maximum level allowing you to provide your visitors a simple and convenient form of comments/registrations without annoying CAPTCHAs and puzzles. CleanTalk detects spam in multistage tests allowing us to block up to 99.998% of spam bots.
177
+ The anti-spam method offered by CleanTalk avoids inconvenient for communication methods (CAPTCHA, question-answer etc.), and offers to your site visitors a more comfortable one.
178
+
179
+ CleanTalk is a premium anti-spam service for WordPress, the plugin works with
180
+ our own CleanTalk Cloud Service. Anti Spam by CleanTalk offers a free trial, you can look at the <a href="https://cleantalk.org/price">pricing</a> here. We provide anti-spam services at the highest level. To maintain this level we cannot afford to offer a free version of our service, as this will immediately affect the quality of the providing anti-spam protection. Paying for a year of anti-spam service, you save a lot more and receive:
181
+
182
+ * Up to 99.998% protection from spam bots.
183
+ * Time and resources saving.
184
+ * More registrations/comments/visitors.
185
+ * Spam protection of the several websites at once in different CMS.
186
+ * Ease in installation and using.
187
+ * Traffic increase and loyalty to the users.
188
+ * 24/7 technical support.
189
+ * Clear stats.
190
+ * Spam FireWall.
191
+ * No captcha (reCaptcha), puzzles, etc.
192
+ * Free mobile app to control anti-spam protection on your website.
193
+
194
+ = Additional features =
195
+ * Daily and weekly detailed anti-spam reports: traffic VS spam.
196
+ * Apps for iPhone, Android to control anti-spam service, comments, signups, contacts, traffic and spam stats for the last 7 days.
197
+ * AntiSpam apps for most popular CMS on cleantalk.org.
198
+
199
+ = How to protect sites from spam bots without CAPTCHA? =
200
+ The most popular anti spam method is CAPTCHA - the annoying picture with curved and sloping symbols, which are presented to the visitor to decipher and fill in. In is supposed that spam bots won't discern these CAPTCHA, but a visitor will. CAPTCHA provokes great irritation, but if the visitor wants to comment, he has to fill in these symbols time after time, making mistakes and starting once again. Sometimes CAPTCHA reminds us of the doodles of a two year old child. For users with vision problems CAPTCHA is an insurmountable obstacle. Users hate captcha. Captcha for users means "hate". Unreadable CAPTCHA stops about 80% of site visitors. After 2 failed attempts to decipher CAPTCHA 95% of visitors reject further attempts. At the sight of CAPTCHA and after input errors, many visitors leave the resource. Thus, CAPTCHA helps to protect the resource spam both from bots and visitors. CAPTCHA is not a panacea from spam. Doubts concerning the Need for CAPTCHA?
201
+
202
+ *"Ultimately, CAPTCHAs are useless for spam because they're designed to tell you if someone is 'human' or not, but not whether something is spam or not." Matt Mullenweg*
203
+
204
+ You do not have to work in IT to know what spam is. Besides piles of unwanted email, there are spam bots, or special software programs designed to act as human website visitors that post unwelcome messages over the Internet to advertise dubious services. More often than not spam messages do not even make sense. Similar to bacteria and virus mutations developing antibiotic resistance, spam bots are becoming more resilient in penetrating Internet firewalls and security layers.
205
+
206
+ = CleanTalk's features =
207
+ Anti-Spam by CleanTalk with Spam FireWall is one of the fastest plugins that allows you to lower the server load. One of the important parameters for each webmaster is the speed of the site, so we make sure that our plugin consumes as few server resources as possible. The Cloud Service provides the advantage: all data processing takes place in the Cloud.
208
+
209
+ CleanTalk team has developed unique anti spam algorithms to assess visitors behavior. CleanTalk analyzes user behavior and the parameters of the filled forms. Our anti-spam module, being installed in your website, sends the behavior parameters of either a visitor or a spam bot. When these parameters are estimated, the anti spam service makes a decision - to post a message or to define it as spam and reject it. Based on these checks, the service forms its own list of email addresses used by spam bots.
210
+
211
+ The registrations of visitors are being checked in a similar manner. The service adds to the blacklist not just email addresses, but also IP addresses and domains of websites that promote themselves through spam mailing. All of this happens automatically and requires no action from the administration of the website. In 2.5 million queries the service makes a mistake in 40-45 cases, i.e. CleanTalk detects spam with 99.9982% accuracy. We constantly monitor these errors and make adjustments to our algorithms. Even with this exceptional accuracy our team is aiming to improve the figures over time.
212
+
213
+ All-in-one. CleanTalk protects form spam all forms instantaneously - comments, registrations, feedback, contacts. No need to install additional plugins for each form. You save resources and increase performance of your website.
214
+
215
+ Spam attacks log. Anti-Spam by CleanTalk records all filtered comments, registrations and other spam attacks in the "Log of spam attacks" and stores the data in the log for up to 45 days. Using the log, you can ensure reliable protection of your website from spam and experience no false/positive filtering.
216
+
217
+ With the help of anti-spam by CleanTalk you can check existing comments and users, to find and quickly delete spam comments at once. This allows administrators of websites to automatically check and identify spam bots, comments and users, which were not detected by conventional anti-spam tools. The existing comments and users checking process is performed in a database of the nearly 2 million identified spam bots. Detailed spam stats allows CleanTalk customers to fully control it.
218
+
219
+ CleanTalk has an advanced option "Spam FireWall". This option allows you to block the most active spam bots before they get access to your website. It unloads you website pages when an attempt attack was made, so your web server won't run unnecessary scripts on these pages. Also it prevents any scanning of website pages by spam bots. Subsequently Spam FireWall significantly reduces your webserver load. Spam FireWall can mitigate HTTP/HTTPS DDoS attacks. When an intruder makes GET requests to attack your website, Spam FireWall will block requests from bad IP addresses. Your website gives the intruder a special page with a description of DDoS rejection instead of the website pages. Spam FireWall can help to reduce the CPU usage of your server because of this reason.
220
+
221
+ "CleanTalk team has been developing a cloud spam protection system for five years and has created a truly reliable anti-spam service designed for you to guarantee your safety".
222
+
223
+ = White Label Mode =
224
+
225
+ To switch the plugin work in the white-label mode you should set up a few settings on your main site in Wordpress Multisite Network:
226
+
227
+ 1. Check setting "Enable White Label Mode".
228
+ 2. Fill "Hoster API Key" field with key from CleanTalk's hoster panel.
229
+ 3. Fill "Plugin name" field. It could be any name you want for the plugin.
230
+ 4. Save settings.
231
+
232
+ The plugin will do everything rest.
233
+
234
+ = Auto-Update CleanTalk AntiSpam =
235
+
236
+ CleanTalk Dashboard allows you to set auto-update plugin and select several websites and update the plugin at once on all sites by one click or you can setup auto-update for all websites or separate websites.
237
+
238
+ Note: there is 24 hours delay before auto-update will do. This delay allows needing to avoid any issues. All updates that made through CleanTalk Dashboard manually will do immediately.
239
+
240
+ Auto-updating system will work from CleanTalk AntiSpam version 5.88
241
+
242
+ = Real-time email validation. Is email real or Not. =
243
+ It is very important to be sure that the user used his real email address. Spambots very often use fake email addresses, i.e. which addresses do not exist.
244
+
245
+ CleanTalk will check email addresses for existence in real time.
246
+
247
+ Non-existing email addresses also entail several other problems for website owners.
248
+
249
+ * You can never contact them by email,
250
+ * the client will never receive any notifications from you (account activation letter, password recovery, email distribution, notifications, etc.),
251
+ * if you use email marketing for your clients, then a large number of nonexistent emails in the mailing list may result in your IP address being added to various blacklists of email servers.
252
+
253
+ Improve your email list with email validation without fake emails.
254
+
255
+ = Blocking disposable & temporary emails =
256
+
257
+ Block fake and suspicious users with disposable & temporary emails to improve email delivery. So, it also prevents malicious activity, spam bots, and internet trolls.
258
+
259
+ = Stops Spam in Search Form =
260
+
261
+ Spam bots can use your search form to make a GET request with spam text.
262
+ CleanTalk Anti-Spam has the option to protect your website search form from spam bots. Each time, the search generates a new page and if there are many requests, this can create additional load. So, under some conditions, spam searches can be indexed, which affects SEO,
263
+
264
+ * Spam FireWall blocks access to all website pages for the most active spambots. It lowers your web server load and traffic just by doing this.
265
+ * Anti-Spam protection for website search forms repels spambots.
266
+ * If your search form gets data too often the CleanTalk Anti-Spam plugin will add a pause and increase it with each new attempt to send data. It saves your web server processor time.
267
+ * Spam protection allows you to not forbid indexation for the crawler bots if you really need it but simultaneously you will get protection from spambots.
268
+
269
+ You will always know what users were looking for on your site.
270
+
271
+ = Disable comments =
272
+
273
+ This option disables comments on your site. You can choose one or several options:
274
+
275
+ * Disable comments for posts
276
+ * Disable comments for pages
277
+ * Disable comments for media
278
+
279
+ When using Disables comments, existing comments will not be deleted and will remain on the pages.
280
+
281
+ = Translations =
282
+ * Albanian (sq_AL) - thanks to fjalaime https://wordpress.org/support/users/fjalaime/
283
+ * French (fr_FR) - thanks to Gilles Santacreu http://net-ik.net
284
+ * Spanish (es_ES) - thanks to Andrew Kurtis and WebHostingHub
285
+
286
+ = Requirements =
287
+ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enabled 'allow_url_fopen' setting. The plugin is fully compatible with PHP 7.
288
+
289
+ > Max power, all-in-one, premium anti-spam WordPress plugin. No comments & registrations spam, no contact spam, protects any forms. Just install and forget spam.
290
+
291
+ == Installation ==
292
+
293
+ = Installation instructions =
294
+
295
+ 1. Download, install and activate 'Anti-spam by CleanTalk'.
296
+
297
+ 2. Get Access key <a href="https://cleantalk.org/register?platform=wordpress" target="_blank">https://cleantalk.org/register</a>
298
+
299
+ 3. Enter Access key in the settings: WordPress console -> Settings -> Antispam by CleanTalk
300
+
301
+ 4. Do dummy spam comment (registration or contact message) with email **stop_email@example.com**. You should see notice: **Forbidden. Sender blacklisted.**
302
+
303
+ 5. Done! The plugin is ready to use.
304
+
305
+ = Video guide - Anti-Spam Plugin Installation in WordPress. =
306
+
307
+ [youtube https://www.youtube.com/watch?v=SktF0s-go6A ]
308
+
309
+ **Important!** To test spam protection you must post a dummy submissions as website visitor (use must logged out from WordPress console), because the plugin doesn't filter submissions from WordPress administrators.
310
+
311
+ = How can setup plugin in WPMU version? =
312
+ In WordPress multisite version you can switch the plugin to use Global Access key. In this way the plugin doesn't show any options to enter Access key in plugin settings and doesn't show Trial banner in WordPress backend. To setup global CleanTalk access key for all websites in WPMS, define constant in your wp-config.php file before defining database constants:
313
+
314
+ define('CLEANTALK_ACCESS_KEY', 'place your key here');
315
+
316
+ **Make it before you activated the plugin. If the plugin already activated, deactivate it and add the code and active it again.**
317
+ Now, all subsites will have this access key.
318
+
319
+ = Manage and control spam protection =
320
+
321
+ Go to <a href="https://cleantalk.org/my" target="_blank">Dashboard</a> at the cleantalk.org or use <a href="https://play.google.com/store/apps/details?id=org.cleantalk.app">Android</a>, <a href="https://itunes.apple.com/us/app/cleantalk/id825479913?mt=8">iPhone</a> anti-spam app to manage and control spam protection.
322
+
323
+
324
+ == Frequently Asked Questions ==
325
+
326
+ = Why are they spamming me? =
327
+ Spammers want to get backlinks from your site to improve their site's PageRank or redirect your visitors to malicious sites.This level of spam can damage your reputation with readers and commentators if you fail to tackle it. It is not uncommon for some WordPress websites to receive hundreds or even thousands of comments every week. However, by using a CleanTalk plugin, spam can be easily handled by your WordPress website.
328
+
329
+ = Is the anti-spam protection safe for mobile visitors? =
330
+ Yes, it is. The plugin doesn't block mobile visitors as well as desktop website visitors. It uses several independent anti-spam tests to decrease the number of false outcomes and to have as low false-positive rate as possible. Multiple anti-spam tests help to avoid false/positive blocks for real website visitors even if one of the tests failed.
331
+
332
+ = What does the plugin do with spam comments? =
333
+ Spam comments are being moved to SPAM folder by default or you can set the option to ban spam comments silently.
334
+
335
+ = How can I test the anti-spam protection? =
336
+ Please use the email **stop_email@example.com** for comments, contacts or signups to see how the anti-spam protection works. Also you can see the logs for the last 7 days at the <a href="http://cleantalk.org/my/show_requests">Control panel</a> or look at the folder "Spam" for banned comments.
337
+
338
+ = Is the plugin effective against spam bots? =
339
+ The plugin Anti-Spam by CleanTalk stops up to 99.998% of spam comments, spam signups (registrations), spam contact emails, spam subscriptions, spam bookings or spam orders.
340
+
341
+ = Does the plugin protect from brute force, DoS attacks and spam attacks? =
342
+ Yes, it does. Please turn the option 'Spam FireWall' on in the plugin settings to protect your website from DoS/DDoS, XML-RPC attacks.
343
+
344
+ = How does the plugin stop spam? =
345
+ Please, note - administrator's actions are NOT being checked.
346
+
347
+ The plugin uses several simple tests to stop spammers:
348
+
349
+ 1. **JavaScript anti-spam test.** 99% of spam bots don't have full JavaScript functions support. So, the plugin has the code which can be run by normal visitor and can't be run by the spam bot.
350
+ 1. **Email, IP, domain spam activity list entries check.** The plugin uses spam activity database online at cleantalk.org, consisting of more than 20 billion spam activity records of IPs, Emails, Domains and ASN. If the sender's IP or Email is in the database, the sender gets some spam scores. To reduce false/positive rate the plugin not only uses the blacklist test to ban spammers, the sender will be banned when and only when multiple spam tests have been failed.
351
+ 1. **Comment submit time.** Spam bots usually submit the info immediately after the page has been loaded, this happens because spam bots don't actually fill the web form, they just send $_POST data to the blog. The normal visitor sends the data after several seconds or minutes.
352
+
353
+ = Will the anti-spam plugin protect my theme? =
354
+ Yes, it will. The Anti-spam by CleanTalk is compatible with any WordPress theme.
355
+
356
+ = What about pingback, trackback spam? =
357
+ The plugin passes pingbacks without any checks by default. All trackbacks will be blocked if the sender had spam activity.
358
+
359
+ = Can I use CleanTalk with Akismet? =
360
+ Sure, you can use CleanTalk with Akismet. In this case you will probably have higher false/positive rate (when legitimate comments/signups are being denied), but you will have stronger anti-spam protection on your website.
361
+
362
+ = Is CleanTalk better than Akismet? =
363
+ Please look at this features comparison here https://cleantalk.org/cleantalk-vs-akismet
364
+
365
+ = Can I use CleanTalk to remove pending spam comments? =
366
+ Yes, you can. The plugin has the option to test all pending comments via database of <a href="https://cleantalk.org/blacklists">spam active IP/Email</a>, found spam comments will be moved to Trash folder.
367
+
368
+ = How does the plugin find spam in pending comments or registered accounts? =
369
+ The plugin checks all non-spam comments in the blacklist database and shows you those senders who have spam activity on other websites.
370
+ There are some differences between blacklist database and API to protect you from spam bot registrations/comments online. Blacklists show all history of spam activity, but our API (which is used in spam tests) relies on other parameters too: last day of activity, number of spam attacks during the last days etc. These mechanisms help us to reduce the number of false outcomes. So, there is nothing strange, if some emails/IPs are not found by bulk comments/accounts test.
371
+
372
+ To check comments please go here:
373
+ > WordPress console -> Comments -> Find spam comments
374
+
375
+ To check users please go here:
376
+ > WordPress console -> Users -> Find spam users
377
+
378
+ = Should I use other anti-spam tools (Captcha, reCaptcha and etc.)? =
379
+ CleanTalk stops up to 99.998% of spam bots, so you can disable other anti-spam plugins (especially CAPTCHA-type anti-spam plugins). In some cases several anti-spam plugins could conflict with each other, so it would be better to use just one plugin.
380
+
381
+ = Is the plugin compatible with WordPress MultiUser (WPMU or WordPress network)? =
382
+ Yes, the plugin is compatible with WordPress MultiUser. Each blog in multisite environment has individual anti-spam options for the protection from spam bots.
383
+
384
+ = After the installation I noticed that the number of spam attacks has been increased in the stats =
385
+ There are a few reasons for this:
386
+
387
+ * With the indexing of your web-site by the search systems, appearance of external links and better search results position, your web-site attracts more and more spambots.
388
+ * Non-transparent protection systems like CAPTCHA or question/answer, that don't have spam attacks stats, don't let you see the whole picture, or the picture is incomplete.
389
+ * Counting methods for spam attacks and spam bots are different for different systems, thus the diversity appears. We seek to provide detailed stats.
390
+
391
+ = Why my dummy "spam" comment passed to the WordPress? =
392
+ The plugin has several options to detect spam bots and humans. If you just post spammy text like this:
393
+
394
+ "I want to sell something", "Buy something here.." and etc
395
+
396
+ the comments will be passed, because the plugin detects sender as a human. So, use special email *stop_email@example.com* to test the anti-spam functionality or wait a few days to see how the plugin works.
397
+
398
+ = Is it free or paid? =
399
+ The plugin is free and distributed under the GPLv2 license.
400
+
401
+ CleanTalk anti-spam plugin works with a cloud base anti-spam service and this plugin is a Software as a service (SaaS).
402
+ CleanTalk it’s a free plugin that works with premium Cloud Anti-Spam service.
403
+ https://en.wikipedia.org/wiki/Software_as_a_service
404
+
405
+ The fact that the plugin works with a premium type service is mentioned in the plugin annotation and in its WordPress catalog description.
406
+
407
+ We are ready to help you with any issue regarding CleanTalk. There are hundreds of environment compositions and we do our best to cover as many as possible.
408
+
409
+ = Can I use CleanTalk with cache plugins? =
410
+ Anti-spam by CleanTalk doesn't use static HTML code in its templates, so all anti-spam functions work correctly with any WordPress cache plugins.
411
+
412
+ = Does the plugin protect from spam bots if I use forms with third-party services? =
413
+ Yes, it does. Plugin protects web-forms on your websites which send data to third-party servers (like MailChimp). To enable this protection set the option 'Protect external forms' in the plugin settings.
414
+
415
+ = Does CleanTalk compatible with Cloudflare? =
416
+ CleanTalk is fully compatible with CloudFlare. Service doesn't filter CloudFlares IP's (AS13335) through blacklists database, so in this case plugin/service filters spam bots using other anti-spam tests.
417
+
418
+ = Is CleanTalk compatible with a content delivery network (CDN)? =
419
+ Yes, it is. CleanTalk works with any CDN system, i.e. CloudFlare, MaxCDN, Akamai.
420
+
421
+ = Can I use CleanTalk functionality in my plugins? =
422
+ Yes, you can. Just use following snippet:
423
+
424
+ <?php
425
+ if(!function_exists('ct_test_message')){
426
+ include_once( ABSPATH . '/wp-content/plugins/cleantalk-spam-protect/cleantalk.php' );
427
+ }
428
+ //for registration test:
429
+ $res=ct_test_registration("nickname", "stop_email@example.com", "127.0.0.1");
430
+ //or for some other messages (contact forms, comments etc.)
431
+ $res=ct_test_message("nickname", "stop_email@example.com", "127.0.0.1", "test message");
432
+
433
+
434
+ $res now contents array with two parameters:
435
+ * $res['allow'] - is request allowed (1) or not (0)
436
+ * $res['comment'] - comment for our server's decision.
437
+
438
+ = I see two loads of script cleantalk_nocache.js. Why do you use it twice? =
439
+ This script is used for AJAX JavaScript checking. Different themes use different mechanisms of loading, so we use two methods for loading our script. If you absolutely know what you are doing, you can switch one of the methods off by defining constants in your wp-config.php file:
440
+
441
+ define('CLEANTALK_AJAX_USE_BUFFER', false); //false - don't use output buffering to include AJAX script, true - use it
442
+
443
+ or
444
+
445
+ define('CLEANTALK_AJAX_USE_FOOTER_HEADER', false); //false - don't use wp_footer() and wp_header() for including AJAX script, true - use it
446
+
447
+ = Can I add exclusions for some pages of my site? =
448
+ Yes, you can. There is a special setting in plugin settings.
449
+ You could use this guide to learn more: https://cleantalk.org/help/exclusion-from-anti-spam-checking#wordpress
450
+
451
+ = Can I not send my personal data to CleanTalk servers? =
452
+ Yes, you can exclude your data. There is a special setting in plugin settings.
453
+ You could use this guide to learn more: https://cleantalk.org/help/exclusion-from-anti-spam-checking#WordPress_field_exclusions
454
+
455
+ = How to test Spam FireWall? =
456
+ Use special IP 10.10.10.10 in URL to test Spam FireWall. For example,
457
+
458
+ https://cleantalk.org/blog/?sfw_test_ip=10.10.10.10
459
+
460
+ Attention! The incognito mode should be enabled in your browser when you do a test. To enable incognito mode press Ctrl+Shift+N for Chrome, Opera и Safari browsers; press Ctrl+Shift+P for Firefox, Internet Explorer and Microsoft Edge. A full guide to enable Incognito mode is here: https://www.wikihow.com/Activate-Incognito-Mode
461
+
462
+ = How can I enter access key in WPMU version? =
463
+ To set up global CleanTalk access key for all websites in WPMU, define constant in your wp-config.php file before defining database constants:
464
+
465
+ define('CLEANTALK_ACCESS_KEY', 'place your key here');
466
+
467
+ Now, all subsites will have this access key.
468
+
469
+ = Why is CleanTalk faster and more reliable than stand-alone solutions? =
470
+ All anti-spam checks are held in the cloud and don't overload the web server. The cloud solutions have a huge advantage since the parameters are being compared with information from more than 100,000 websites.
471
+
472
+ = I see a lot of blocked messages with the reason "Forbidden. Please enable JavaScript. Spam sender name." in my logs =
473
+ A lot of spam bots can't perform JavaScript code, so it is one of the important checks and most of the spam bots will be blocked with the reason **"Forbidden. Please enable JavaScript. Spam sender name."** All browsers can perform JS code, so real visitors won't be blocked.
474
+
475
+ If you or some of your visitors have the error **"Forbidden. Enable JavaScript."** please check JavaScript support in your browser and do this JavaScript test at this page: https://cleantalk.org/checkout-javascript-support.
476
+
477
+ If you think that there is something wrong in the messages blocking, let us know about it. Please submit a support request here: https://cleantalk.org/my/support.
478
+
479
+ = Does the plugin work with Varnish? =
480
+ CleanTalk works with Varnish, it protects WordPress against spam, but by default the plugin generates a few cookies for the protection from spam bots and it also disables Varnish cache on pages where CleanTalk's cookies have been stored. To get rid of the issue with cache turn off the option 'Set cookies' in the plugin settings.
481
+
482
+ WordPress console -> Settings -> CleanTalk -> Advanced settings
483
+
484
+ Now the plugin will protect WordPress comments, registrations and most of popular contact forms, but will not protect some of rarely used contact forms.
485
+
486
+ = Does the anti-spam plugin work with Accelerated Mobile Pages (AMP)? =
487
+ Yes, it does. But you have to turn off the option 'Use AJAX for JavaScript check' in Advanced settigns of the plugin to be fully compatible with Accelerated Mobile Pages.
488
+
489
+ = How to close renewal or trial notice in the WordPress backend? =
490
+ To close the notice please save the plugin settings again or it will be closed automatically within 60 minutes after the renewal.
491
+
492
+ = I'm using PHP 4.2 version and i'm getting errors related with JSON. Why does it happens? =
493
+ СleanTalk is no longer supports PHP lower than 5.2 version because the support code have incompatibility with PHP 7 version. Please, upgrade your PHP. If you couldn't perform that, let us know about it via support ticket here: https://cleantalk.org/my/support.
494
+
495
+ = Should I change anything in the plugin's settings or in my CleanTalk Control Panel when I switch my website from HTTP to HTTPS or vice versa? =
496
+ No. You don't need to change anything in the plugin's settings or in your CleanTalk Control Panel. The plugin will work regardless of the protocol.
497
+
498
+ = How to use Anti-Spam Log? =
499
+ The following possibilities are available for you in the Anti-Spam Log:
500
+
501
+ - Time period for all spam records you want to see.
502
+
503
+ - Filter spam records by their status: Any status, Denied, Approved.
504
+
505
+ - Filter spam records by your websites.
506
+
507
+ - Filter spam records by country they came from.
508
+
509
+ - Filter spam records by IP address, e-mail address or username.
510
+
511
+ - Available options for a specific record:
512
+
513
+ * Details - see item 4 below.
514
+ * Spam/Not Spam - press this string if our system made wrong decision and blocked or approved a registration, a comment ot a contact form submission. More about it here: https://cleantalk.org/faq#feedback_spam
515
+ * Delete - delete a record permanently.
516
+ * Personal blacklists - go to your website Black&White Lists page.
517
+ * Record details: block reason, body of the message, additional caught data.
518
+
519
+ = Spam FireWall and AntiSpam - Networks Blocking =
520
+
521
+ Anti-Spam - will blocks users from selected IP or network from using contacts/messages/registrations/comments forms.
522
+ Spam FireWall - will blocks users from selected IP or network from entering the website.
523
+
524
+ Please, read more here
525
+ https://cleantalk.org/help/sfw-blocks-networks
526
+
527
+
528
+ = Spam Comment Management =
529
+
530
+ By default, all spam comments are placed in the spam folder, now you can change the way the plugin deals with spam comments:
531
+
532
+ 1. **Move to the Spam folder.** All spam comments will be placed to the folder "Spam" in the WordPress Comments section except comments with Stop-Words. Stop-Word comments will be always stored in the "Pending" folder.
533
+
534
+ You can prevent the proliferation of Spam folder. It can be cleaned automatically using the option "Keep spam comments for 15 days." Enable this option in the settings of the plugin: WordPress Admin Page -> Settings -> Antispam by CleanTalk -> Advanced settings -> enable "Keep spam comments for 15 days" -> Save Changes.
535
+
536
+ 2. **Move to Trash.** All spam comments will be placed to the folder "Trash" in the WordPress Comments section except comments with Stop-Words. Stop-Word comments will be always stored in the "Pending" folder.
537
+
538
+ 3. **Ban comments without moving to WordPress backend.** All spam comments will be deleted permanently without going to the WordPress backend except comments with Stop-Words. Stop-Word comments will be always stored in the "Pending" folder.
539
+
540
+ What comments were blocked and banned can be seen in the Anti-Spam Log here: https://cleantalk.org/my/show_requests?int=week
541
+
542
+ To manage the actions with spam comments, go to the Control Panel, select the website you want to change the actions for and go to "Settings" under the name of the website.
543
+
544
+ Please, read more here:
545
+ https://cleantalk.org/help/spam-comment-management
546
+
547
+ = How do I report a missed spam bot or incorrect filter? =
548
+
549
+ If you think the service has missed a spam bot or improperly filtered visitor to the website, you may notify us via the Anti-spam control panel. To do this,
550
+ Log in to Control panel https://cleantalk.org/my.
551
+ Click the line "Log" under the name of your website.
552
+ When you mark a record as "SPAM", its e-mail and IP-address will be added to your personal blacklist for your website.
553
+ When you mark a record as "Not SPAM", its e-mail and IP-address will be added to your personal white list for your website.
554
+
555
+ Please, read more here
556
+ https://cleantalk.org/faq#feedback_spam
557
+
558
+ = Is the plugin fast? =
559
+ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade response time in backend or frontend. The plugin proccess only POST requests to WordPress core, it tackes less than 1 second to return results.
560
+
561
+ = Is the plugin EU GDPR compatible? =
562
+ Yes, it is. Please read this article,
563
+ <a href="https://cleantalk.org/publicoffer#cleantalk_gdpr_compliance">https://cleantalk.org/publicoffer#cleantalk_gdpr_compliance</a>
564
+
565
+ = Check external forms =
566
+ If your website has forms that send data to external sources, you can enable option to "Protect external forms". In this case, if plugin determinates that the current message is spam, your form action will be temporary replaced to your current hostname to prevent sending false data to an external source.
567
+
568
+ == Screenshots ==
569
+ 1. AntiSpam settings are easy to use.
570
+ 2. AntiSpam plugin rejected a spam bot at the CAPTCHA less registration form. The plugin provides explanation to visitor and websites about each rejected comment/registration or contact message.
571
+ 3. Use AntiSpam analytics tool for each website in service Dashboard to have information about spam/legitimate stats.
572
+ 4. Use AntiSpam log to control anti-spam plugin.
573
+ 5. CleanTalk works faster than most of other anti-spam plugins.
574
+ 6. The Dashboard with a map of most spam active countries per your account.
575
+ 7. The plugin deletes/removes the existing spam comments and users accounts.
576
+ 8. CleanTalk's dashboard update link.
577
+ 9. Auto upadte confimation.
578
+ 10. Website's options.
579
+
580
+ == Changelog ==
581
+
582
+ = 5.143.1 Aug 06 2020 =
583
+ * Fix: Recursion fixed.
584
+ * Fix: Rebuild url for SFW updating process.
585
+
586
+ = 5.143 Aug 05 2020 =
587
+ * New: Synchronize button. New way of synchronize with the Cleantalk Cloud.
588
+ * Fix: SpamFireWall (firewall against spam) update, storing system.
589
+ * Fix: Skip Woocomerce metorik send cart.
590
+ * Spam protection improved.
591
+ * Minor fixes.
592
+
593
+ = 5.142.2 Jul 29 2020 =
594
+ * Fix: Issue with SpamFireWall logs.
595
+
596
+ = 5.142.1 Jul 28 2020 =
597
+ * Fix: Blocking good bots.
598
+
599
+ = 5.142 Jul 27 2020 =
600
+ * New: Bot Protection module for Firewall.
601
+ * New: Anti-Crawler module for Firewall.
602
+ * Mod: Improved spam Protection.
603
+ * Fix: Caching plugins auto detection.
604
+ * Fix: Skip Divi system fields.
605
+ * Fix: Ultimate Form Builder exception.
606
+ * Plenty of fixes and upgrades.
607
+
608
+ = 5.141.3 Jul 17 2020 =
609
+ * Fix: 403 error issues with cache plugins.
610
+ * Fix: remove apbct-common.js.
611
+ * Fix: exclude caspio form.
612
+ * Fix: Recompile nocache map.
613
+ * Fix: indexof is not a function.
614
+ * Fix: SFW updating fix for hosting.
615
+ * Upd: Temporary remove spinner for SFW check.
616
+
617
+ = 5.141.2 Jul 08 2020 =
618
+ * Fix: SFW issues.
619
+ * Upd: Temporary remove spinner for SFW check.
620
+
621
+ = 5.141.1 Jul 06 2020 =
622
+ * Fix: Add timeout for first SFW activation.
623
+
624
+ = 5.141 Jul 06 2020 =
625
+ * Fix: WP Fusion web hooks skipped.
626
+ * Upd: Readme old changelogs replaced.
627
+ * Fix: SFW typo fixed.
628
+ * Upd: Set update banner timer to 15 minutes.
629
+ * Fix: sfw updating after disabling.
630
+ * Fix: sendAjax 403 issues.
631
+ * New: Add wpmu settings template.
632
+ * Fix: SameSite attribute removed for php version <7.3.
633
+ * Fix: Nocache parameter added.
634
+ * Upd: Add description support for convertkit/active campaign.
635
+ * Integration: Enfold Theme contact form.
636
+ * Upd: Add update/add hooks for settings to avoid sfw update issues.
637
+
638
+ = 5.140.1 Jun 25 2020 =
639
+ * Upd: .POT updated.
640
+ * Upd: RU .po updated.
641
+
642
+ = 5.140 Jun 18 2020 =
643
+ * New: Add SFW status in plugin settings.
644
+ * Fix: Remove sleep for sfw update.
645
+ * Fix: Check account status only once in 86400 seconds.
646
+ * Fix: Postmark avocet theme.
647
+ * Fix: Find spam users - from-till implemented.
648
+ * Upd: Add common.js.
649
+ * Fix: Bookly admin action excluded.
650
+ * Fix: sfw_pass_key cookie domain attribute removed.
651
+ * Fix: SFW no cache meta tags added.
652
+ * Fix: MEC Pro plugin compatibility fixed.
653
+ * Mod: Catching SpamFireWall update errors.
654
+ * Fix: UltimateBuilder skip fields.
655
+ * Fix: Strip tags on comment.
656
+
657
+ = 5.139 Jun 02 2020 =
658
+ * Fix: Profile link fixed.
659
+ * Fix: WPMS plugin name fixed.
660
+ * Fix: WPMS plugin settings link fixed.
661
+ * Fix: Integration with Easy Forms for Mailchimp.
662
+ * Fix: JS check on the registration form.
663
+ * Fix: Double JS attaching on the login page.
664
+ * Fix: Clear SpamFireWall table. Throw error if failed.
665
+ * Upd: Cookies attr "samesite" added.
666
+ * New: Users checking result icons added.
667
+ * Upd: Whitelists support added for SFW.
668
+ * Fix: Clear users meta everywhere by complete deactivation.
669
+ * New: Comment notification updated - blacklist links added.
670
+ * Fix: PHP Warning in cleantalk-pluggable.php.
671
+ * Fix: White Label mode is not accessible if CLEANTALK_ACCESS_KEY is defined.
672
+ * Fix: Deprecated condition.
673
+ * Fix: Setting layout for the right to left direction languages.
674
+
675
+ = 5.138.1 May 20 2020 =
676
+ * Fix: Ninja Forms. Spam submissions.
677
+
678
+ = 5.138 May 14 2020 =
679
+ * Fix: Scan users fixed.
680
+ * Fix: Notice fixed (Creating default object from empty value).
681
+ * Fix: Creating table for SFW data for child blogs on WPMS.
682
+ * Upd: SFW query optimized.
683
+ * Fix: Adding cleantalk_spamscan_logs table for each blog when updating from 5.137.2.
684
+ * New: White Lists for SFW implemented.
685
+ * Fix: correct comments checking status text.
686
+ * Fix: Users scan. Reducing memory load.
687
+ * Fix: "Capture Buffer" settings. The issue with YoastSEO.
688
+ * Fix: SFW query fixed.
689
+ * Fix: SFW die page fixed.
690
+ * Fix: Membermouse API false positives.
691
+ * Fix: gz*() functions calling from global namespace for now.
692
+
693
+ = 5.137.1 April 29 2020 =
694
+ * Fix: Call to undefined function wp_get_current_user().
695
+ * Fix: "Capture buffer" setting, YOAST sitemap.
696
+ * Integration: Simple Membership plugin integration implemented.
697
+ * Fix: Integrations system fixed.
698
+ * Fix: Query for SFW fixed.
699
+ * Fix: SFW error handling.
700
+
701
+ = 5.137 April 23 2020 =
702
+ * Fix: WPMU and WhiteLabel mode fixed.
703
+ * Fix: 403 Response code for blocked entries.
704
+ * Upd: SFW die page updated (spinner and delay).
705
+ * New: SFW query updated.
706
+ * Fix: SFW truncate instead of delete.
707
+ * Fix: AJAX exception for WordPress Membership Plugin – Restrict Content.
708
+ * Fix: Check spam users.
709
+ * Fix: Debug functionality for users check.
710
+ * Fix: Gravity Forms. Modifying message.
711
+ * Fix: Sanitizing settings.
712
+ * Fix: "Delete all spam users" button.
713
+
714
+ = 5.136.4 April 8 2020 =
715
+ * Security: Possible XSS vulnerability.
716
+
717
+ = 5.136.3 April 7 2020 =
718
+ * Security: Possible XSS vulnerability.
719
+
720
+ = 5.136.2 April 7 2020 =
721
+ * Mod: bbPress is using role exclusions now.
722
+ * Mod: Show info on SpamFirewall block page.
723
+ * Mod: Log SpamFirewall tests.
724
+ * Fix: get_fields_any() fixed.
725
+ * Fix: Multiple requests on WooCommerce checkout.
726
+ * Fix: The SpamFirewall block page.
727
+
728
+ = 5.136.1 April 2 2020 =
729
+ * Mod: Setting "Show links to check Emails, IPs for spam" splitted in two.
730
+ * Mod: Added setting "Manage comments on public pages".
731
+ * Fix: Feedback from public pages.
732
+ * Fix: Output for setting "Manage comments on public pages".
733
+ * Fix: Public widget errors.
734
+
735
+ = 5.136 April 1 2020 =
736
+ * New: Feature allowing to track missed spam requests with the special plugin.
737
+ * Mod: Enable WooCommerce checkout test by default.
738
+ * Fix: Fluent forms integration fixed.
739
+ * Fix: Logging skipped requests - actions added.
740
+ * Fix: Comments output.
741
+ * Fix: External forms protection.
742
+ * Fix: PHP 7.4 compatibility.
743
+ * Performance improved.
744
+
745
+ = 5.135 March 16 2020 =
746
+ * New: Setting which disallow sub-sites administrators to manage plugin settings.
747
+ * New: Add custom title for message.
748
+ * Mod: New headers for spam scan tabs.
749
+ * Fix: ARM form login check.
750
+ * Fix: For GET requests in HTTP API.
751
+ * Fix: Getting variables in Get and Server classes.
752
+ * Fix: SFW update system.
753
+ * Fix: Empty connection error in Cleantalk/Antispam/API.
754
+
755
+ = 5.134 February 27 2020 =
756
+ * Fix: SpamFireWall update large data issues.
757
+ * Fix: Auto-update for some banner notifications.
758
+ * Fix: QuickContactForm protection.
759
+ * Minor fixes.
760
+ * Spam protection improved.
761
+
762
+ = 5.133.2 February 10 2020 =
763
+ * Fix: Add no-index meta tag to search page only.
764
+ * Fix: Namespace issues.
765
+
766
+ = 5.133.1 February 03 2020 =
767
+ * Fix: PHP 7.4 issues.
768
+ * Fix: Woocommerce options moved to a separate block.
769
+ * Fix: CSS/HTML issues on settings page.
770
+ * Minor fixes.
771
+ * Spam protection improved.
772
+
773
+ = 5.133 January 20 2020 =
774
+ * Upd: Rebuilding users/comments scan
775
+ * Fix: UltimateMember - form validation checking fixed.
776
+ * Fix: Exclusion for login form.
777
+ * Fix: Disable scripts on excluded pages.
778
+ * Fix: PHP 7.4 compability.
779
+ * Minor fixes.
780
+ * Spam protection improved.
781
+
782
+ = Early changelogs look in changelog.txt =