Skip to content

Fix. SFW. AC/AF pass cookie value fixed. - #917

Merged
svedge merged 2 commits into
devfrom
Fix-SFW-AC/AF-pass-cookie-value-fixed-VI
Oct 27, 2026
Merged

svedge merged 2 commits into
devfrom
Fix-SFW-AC/AF-pass-cookie-value-fixed-VI

Conversation

@Glomberg

Copy link
Copy Markdown
Member

@Glomberg
Glomberg requested a review from svedge October 26, 2026 11:53
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.25490% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.54%. Comparing base (c85acbb) to head (b385044).

Files with missing lines Patch % Lines
cleantalk.php 0.00% 22 Missing ⚠️
lib/Cleantalk/ApbctWP/Firewall/SFW.php 65.51% 10 Missing ⚠️

❌ Your patch check has failed because the patch coverage (37.25%) 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     #917      +/-   ##
============================================
- Coverage     34.54%   34.54%   -0.01%     
- Complexity     7066     7071       +5     
============================================
  Files           298      298              
  Lines         27427    27468      +41     
============================================
+ Hits           9476     9488      +12     
- Misses        17951    17980      +29     

☔ 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.

🟢 Approval recommended

Production cookie generation and validation use the new format consistently, with no blocking issues identified.

No open issues 🎉

What changed in this PR

This PR hardens SpamFireWall pass cookies by including the pass/whitelist status in the hash and using a consistent format across cookie creation and validation.

Changes:

  • Adds shared helpers to generate and strictly validate status-signed pass cookies.
  • Updates firewall and AC/AF cookie issuance to use the shared generator.
  • Updates related test code; test files were excluded from review.
File Description
tests/​ApbctWP/​Firewall/​TestSFW.php Updates pass-cookie tests; excluded from review.
lib/​Cleantalk/​ApbctWP/​Firewall/​SFW.php Adds status-signed cookie helpers and integrates validation and issuance.
cleantalk.php Uses the shared generator for AC/AF pass cookies.

Review effort: Balanced

@svedge
svedge merged commit 71e481d into dev Oct 27, 2026
7 of 8 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.

3 participants