Upd. Firewall. Emergency bypass logic updated to token-via-email model. https://app.doboard.com/1/task/55234 - #897
Merged
Merged
Conversation
alexandergull
force-pushed
the
sfw_bypass.ag
branch
from
September 24, 2026 13:41
1d81043 to
a46f474
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #897 +/- ##
============================================
+ Coverage 30.62% 30.83% +0.20%
- Complexity 6651 6691 +40
============================================
Files 292 293 +1
Lines 26507 26624 +117
============================================
+ Hits 8119 8209 +90
- Misses 18388 18415 +27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Warning
- Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
Copilot review overview
🟡 Changes recommended
Unresolved PHP 5.6 compatibility and token lifecycle issues block approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (5)
Guard random_bytes for PHP 5.6 compatibility · New Replace null-coalescing operator for PHP 5.6 compatibility · New Preserve valid tokens when later email delivery fails · New Atomically consume emailed tokens to prevent replay · New Handle user-token storage failure before consuming ready token · New
What changed in this PR
Adds an email-based, one-time emergency firewall bypass using browser tokens and cookies.
Changes:
- Registers a rate-limited remote call and cooldown state.
- Implements token generation, email delivery, storage, and validation.
- Integrates bypass checks into firewall processing and updates URL escaping documentation.
| File | Summary |
|---|---|
lib/Cleantalk/ApbctWP/State.php |
Adds remote-call cooldown state. |
lib/Cleantalk/ApbctWP/RemoteCalls.php |
Registers the bypass-email remote action. |
lib/Cleantalk/ApbctWP/Firewall/FirewallBypass.php |
Implements the token and cookie bypass flow. |
lib/Cleantalk/ApbctWP/Escape.php |
Updates return documentation. |
cleantalk.php |
Integrates bypass checks into firewall processing. |
Files excluded by content exclusion policy (4)
- tests/ApbctWP/FindSpam/ListTable/TestComments.php
- tests/ApbctWP/FindSpam/ListTable/TestUsers.php
- tests/ApbctWP/FindSpam/ListTable/TestWcSpamOrdersListTable.php
- tests/ApbctWP/Firewall/FirewallBypassTest.php
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
alexandergull
force-pushed
the
sfw_bypass.ag
branch
from
September 25, 2026 05:55
a46f474 to
22e9106
Compare
svedge
approved these changes
Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


https://app.doboard.com/1/task/55234