Skip to content

Fix. Anti Flood. Passed cookie fixed. - #910

Merged
Glomberg merged 4 commits into
devfrom
Fix-Anti-flood-Skipping-cookie-fixed-VI
Oct 20, 2026
Merged

Glomberg merged 4 commits into
devfrom
Fix-Anti-flood-Skipping-cookie-fixed-VI

Conversation

@Glomberg

Copy link
Copy Markdown
Member

@Glomberg
Glomberg requested a review from AntonV1211 October 19, 2026 05:40
@Glomberg
Glomberg requested a balanced review from Copilot October 19, 2026 05:57
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.69%. Comparing base (0f98955) to head (ba27fb9).

Files with missing lines Patch % Lines
lib/Cleantalk/ApbctWP/Firewall/AntiFlood.php 71.42% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #910      +/-   ##
============================================
+ Coverage     33.39%   33.69%   +0.30%     
- Complexity     6983     6991       +8     
============================================
  Files           297      297              
  Lines         27314    27311       -3     
============================================
+ Hits           9121     9203      +82     
+ Misses        18193    18108      -85     

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Fallback token validation, PHP compatibility, and database-load issues remain unresolved.

3 open issues
1 file not reviewed
What changed in this PR

This PR replaces reusable AntiFlood pass cookies with short-lived, single-use tokens.

Changes:

  • Adds IP-bound token storage and atomic consumption.
  • Logs passed requests in the activity counter.
  • Reduces the browser cookie lifetime to one minute.
File Description
lib/​Cleantalk/​ApbctWP/​Firewall/​die_page_antiflood.html Shortens pass-cookie expiration.
lib/​Cleantalk/​ApbctWP/​Firewall/​AntiFlood.php Implements token issuance, consumption, and pass accounting.

Review effort: Balanced

Comment thread lib/Cleantalk/ApbctWP/Firewall/AntiFlood.php
Comment thread lib/Cleantalk/ApbctWP/Firewall/AntiFlood.php Outdated
Comment thread lib/Cleantalk/ApbctWP/Firewall/AntiFlood.php

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The security-sensitive token lifecycle needs human validation because the changed AntiFlood tests were unavailable for review.

No open issues 🎉

3 resolved since last review
1 file not reviewed

Review effort: Balanced

@Glomberg
Glomberg merged commit 4cd8da9 into dev Oct 20, 2026
10 checks passed
@Glomberg
Glomberg deleted the Fix-Anti-flood-Skipping-cookie-fixed-VI branch October 20, 2026 12:07
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.

3 participants