Skip to content

Fix. Code. Improve statement.#804

Merged
svfcode merged 2 commits into
devfrom
ref-statement
Jun 1, 2026
Merged

Fix. Code. Improve statement.#804
svfcode merged 2 commits into
devfrom
ref-statement

Conversation

@svfcode
Copy link
Copy Markdown
Member

@svfcode svfcode commented May 31, 2026

Copilot AI review requested due to automatic review settings May 31, 2026 08:05
@codecov
Copy link
Copy Markdown

codecov Bot commented May 31, 2026

Codecov Report

❌ Patch coverage is 11.11111% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.93%. Comparing base (dde7e1c) to head (52a7b72).

Files with missing lines Patch % Lines
lib/Cleantalk/ApbctWP/FindSpam/UsersChecker.php 0.00% 17 Missing ⚠️
lib/Cleantalk/ApbctWP/Firewall/AntiFlood.php 0.00% 6 Missing ⚠️
lib/Cleantalk/ApbctWP/Firewall/AntiCrawler.php 0.00% 4 Missing ⚠️
inc/cleantalk-find-spam.php 0.00% 2 Missing ⚠️
lib/Cleantalk/Common/SupportUser.php 0.00% 2 Missing ⚠️
lib/Cleantalk/ApbctWP/Cron.php 80.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (11.11%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #804      +/-   ##
============================================
- Coverage     25.93%   25.93%   -0.01%     
- Complexity     5612     5621       +9     
============================================
  Files           264      264              
  Lines         24117    24124       +7     
============================================
+ Hits           6255     6256       +1     
- Misses        17862    17868       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens several security-sensitive paths in the anti-spam plugin, including support-user credential generation, UA blacklist matching, CSV export escaping, localhost-only debug user insertion, and cron option unserialization.

Changes:

  • Replaces weak random generation for support-user login/password paths.
  • Adds UA regex delimiter escaping and CSV formula/field escaping.
  • Restricts debug AJAX user insertion to localhost and tightens cron task unserialization.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/Cleantalk/Common/SupportUser.php Uses stronger randomness for support-user credentials.
lib/Cleantalk/ApbctWP/Firewall/AntiCrawler.php Hardens UA blacklist regex construction/error handling.
lib/Cleantalk/ApbctWP/FindSpam/UsersChecker.php Adds CSV field escaping and localhost guard for debug user insertion.
lib/Cleantalk/ApbctWP/Cron.php Validates and restricts cron option unserialization.
inc/cleantalk-find-spam.php Registers debug user insertion AJAX action only on localhost.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/Cleantalk/ApbctWP/FindSpam/UsersChecker.php
Comment thread lib/Cleantalk/ApbctWP/Firewall/AntiCrawler.php
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@svfcode svfcode requested review from AntonV1211, Glomberg, alexander-b-clean and alexandergull and removed request for alexander-b-clean May 31, 2026 08:21
@svfcode svfcode merged commit af56aac into dev Jun 1, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants