Skip to content

Honeypot update#832

Open
alexander-b-clean wants to merge 4 commits into
devfrom
honeypot-update.ab
Open

Honeypot update#832
alexander-b-clean wants to merge 4 commits into
devfrom
honeypot-update.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 honeypot implementation (primarily around WordPress search forms), including aligning the honeypot field naming convention and expanding coverage to Gutenberg’s core/search block rendering.

Changes:

  • Added support for injecting honeypot fields into the block search form via the render_block_core/search hook.
  • Updated honeypot field detection to use the apbct__email_id__* naming pattern across PHP and JS.
  • Changed search-form honeypot transport in bundled JS to a short-lived native cookie (30s TTL), and added the value key to AltSessions allowlist.

Reviewed changes

Copilot reviewed 12 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/Cleantalk/ApbctWP/Variables/AltSessions.php Allowlists apbct_search_form__honeypot_value for alt-sessions storage.
lib/Cleantalk/ApbctWP/Honeypot.php Updates POST honeypot key detection to apbct__email_id and removes unused AltSessions usage.
lib/Cleantalk/Antispam/IntegrationsByClass/WPSearchForm.php Injects honeypot into block search output and adds search honeypot evaluation in testSpam().
js/src/public-1-main.js Updates search-form honeypot field selector to the new apbct__email_id__ naming.
js/prebuild/apbct-public-bundle.js Updates selector and changes honeypot transport to a short-lived native cookie.
js/prebuild/apbct-public-bundle_int-protection.js Same as above for the int-protection build.
js/prebuild/apbct-public-bundle_int-protection_gathering.js Same as above for the int-protection+gathering build.
js/prebuild/apbct-public-bundle_gathering.js Same as above for the gathering build.
js/prebuild/apbct-public-bundle_full-protection.js Same as above for the full-protection build.
js/prebuild/apbct-public-bundle_full-protection_gathering.js Same as above for the full-protection+gathering build.
js/prebuild/apbct-public-bundle_ext-protection.js Same as above for the ext-protection build.
js/prebuild/apbct-public-bundle_ext-protection_gathering.js Same as above for the ext-protection+gathering build.
js/cleantalk-admin-settings-page.min.js.map Rebuilt artifact update (source map content changed).
js/cleantalk-admin-settings-page.min.js Rebuilt artifact update (minified output changed).
js/apbct-public-bundle.min.js Rebuilt public bundle reflecting the updated search-form honeypot behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/Cleantalk/Antispam/IntegrationsByClass/WPSearchForm.php Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

4 participants