Udp. Search form. Process requests only if a native search form is used. - #821
Open
alexandergull wants to merge 5 commits into
Open
Udp. Search form. Process requests only if a native search form is used.#821alexandergull wants to merge 5 commits into
alexandergull wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the native WordPress search form integration so spam checks run only when the request originates from a search form that CleanTalk actually rendered/protected, preventing unintended processing of arbitrary search requests.
Changes:
- Track “protected search form rendered” state per-page via AltSessions and verify it against
HTTP_REFERERbefore running search spam checks. - Clear the tracked state after a protected search is submitted to prevent reuse.
- Add PHPUnit coverage for the new tracking/verification behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
lib/Cleantalk/Antispam/IntegrationsByClass/WPSearchForm.php |
Adds AltSessions-backed tracking for rendered native search forms and gates testSpam() on that state. |
tests/Antispam/IntegrationsByClass/TestWPSearchForm.php |
Adds tests for storing, matching, and clearing the rendered-search-form state. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
alexandergull
force-pushed
the
get-forms-vai-alt.ag
branch
from
June 26, 2026 12:00
4a3da08 to
da5b5a6
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #821 +/- ##
============================================
+ Coverage 28.03% 28.10% +0.07%
- Complexity 6155 6175 +20
============================================
Files 284 284
Lines 25394 25426 +32
============================================
+ Hits 7118 7146 +28
- Misses 18276 18280 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AntonV1211
approved these changes
Jun 30, 2026
Glomberg
removed their request for review
July 24, 2026 08:29
# Conflicts: # lib/Cleantalk/Antispam/IntegrationsByClass/WPSearchForm.php
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/49674