Skip to content

Udp.Code.Firewall sorting - #852

Open
alexander-b-clean wants to merge 4 commits into
devfrom
anti-crawler-sorting.ab
Open

Udp.Code.Firewall sorting#852
alexander-b-clean wants to merge 4 commits into
devfrom
anti-crawler-sorting.ab

Conversation

@alexander-b-clean

Copy link
Copy Markdown
Contributor

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.

Pull request overview

This PR updates the firewall result prioritization so that AntiCrawler/User-Agent blacklist decisions can outweigh SFW whitelist/trusted-network passes, by collecting all module results before deciding the final outcome.

Changes:

  • Reordered $statuses_priority and introduced explicit PERSONAL-prefixed priority entries to control ordering between personal vs common SFW results.
  • Removed the early-exit whitelist break so all firewall modules run and contribute results before prioritize() chooses the final status.
  • Refactored priority computation into a dedicated calculatePriority() helper.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/Cleantalk/Common/Firewall.php Outdated
Comment thread lib/Cleantalk/Common/Firewall.php Outdated
}
}

$this->isWhitelisted($results);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not relevant

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.54%. Comparing base (0a8de78) to head (8f99338).
⚠️ Report is 47 commits behind head on dev.

Files with missing lines Patch % Lines
lib/Cleantalk/Common/Firewall.php 0.00% 12 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) 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     #852      +/-   ##
============================================
+ Coverage     27.71%   28.54%   +0.82%     
- Complexity     6079     6214     +135     
============================================
  Files           283      286       +3     
  Lines         25241    25667     +426     
============================================
+ Hits           6996     7327     +331     
- Misses        18245    18340      +95     

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

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@alexander-b-clean alexander-b-clean changed the title Anti crawler sorting Udp.Code.Firewall sorting Aug 18, 2026
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