Mod. Integrations. Opting out of force alt cookies for SmartForms.#808
Open
svfcode wants to merge 7 commits into
Open
Mod. Integrations. Opting out of force alt cookies for SmartForms.#808svfcode wants to merge 7 commits into
svfcode wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the SmartForms integration to stop forcing “alternative cookies” globally, and instead relies on targeted request parameter injection for SmartForms submissions while keeping existing behavior for other integrations.
Changes:
- Updated PHP SmartForms integration to avoid forcing alt cookies and to extract the email from
formStringbefore building thect_gfa_dto()payload. - Updated frontend JS to stop treating SmartForms as a reason to enable
ctPublic.force_alt_cookies, and added SmartForms-specific handling for AJAX payload injection (unwrapped keys). - Added PHPUnit coverage for SmartForms
getDataForChecking()behavior across multipleformStringformats; rebuilt bundled/prebuilt JS artifacts.
Reviewed changes
Copilot reviewed 11 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Antispam/IntegrationsByHook/TestSmartForms.php | Adds unit tests for SmartForms request parsing and action-gating behavior. |
| lib/Cleantalk/Antispam/Integrations/SmartForms.php | Removes cookie-forcing side effect and parses formString to reliably extract email. |
| js/src/public-1-main.js | Removes SmartForms from forced-alt-cookie detection and injects CT fields into SmartForms AJAX with unwrapped keys. |
| js/prebuild/apbct-public-bundle.js | Rebuilt bundle reflecting the SmartForms alt-cookie and injection changes. |
| js/prebuild/apbct-public-bundle_int-protection.js | Rebuilt bundle reflecting the SmartForms alt-cookie and injection changes. |
| js/prebuild/apbct-public-bundle_int-protection_gathering.js | Rebuilt bundle reflecting the SmartForms alt-cookie and injection changes. |
| js/prebuild/apbct-public-bundle_gathering.js | Rebuilt bundle reflecting the SmartForms alt-cookie and injection changes. |
| js/prebuild/apbct-public-bundle_full-protection.js | Rebuilt bundle reflecting the SmartForms alt-cookie and injection changes. |
| js/prebuild/apbct-public-bundle_full-protection_gathering.js | Rebuilt bundle reflecting the SmartForms alt-cookie and injection changes. |
| js/prebuild/apbct-public-bundle_ext-protection.js | Rebuilt bundle reflecting the SmartForms alt-cookie and injection changes. |
| js/prebuild/apbct-public-bundle_ext-protection_gathering.js | Rebuilt bundle reflecting the SmartForms alt-cookie and injection changes. |
| js/cleantalk-users-editscreen.min.js.map | Regenerated sourcemap (unrelated minification output change). |
| js/cleantalk-users-editscreen.min.js | Regenerated minified admin JS (unrelated minification output change). |
| js/cleantalk-comments-editscreen.min.js.map | Regenerated sourcemap (unrelated minification output change). |
| js/cleantalk-comments-editscreen.min.js | Regenerated minified admin JS (unrelated minification output change). |
| js/apbct-public-bundle.min.js | Regenerated minified public bundle containing the updated SmartForms logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #808 +/- ##
============================================
+ Coverage 26.09% 26.16% +0.06%
- Complexity 5631 5642 +11
============================================
Files 265 265
Lines 24157 24172 +15
============================================
+ Hits 6304 6324 +20
+ Misses 17853 17848 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Glomberg
approved these changes
Jun 8, 2026
AntonV1211
approved these changes
Jun 8, 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.
task https://app.doboard.com/1/task/50460