• Resolved jeremyjsimmons

    (@jeremyjsimmons)


    the cookie used by the plugin wordpress_apbct_antibot is conflicting with wordpress engine rules that treat the request as “logged in” preventing cache hits.
    I want to be able to change the cookie name. I don’t see a hook for this.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jeremyjsimmons

    (@jeremyjsimmons)

    Issue: CleanTalk always sets wordpress_apbct_antibot in wp-admin. WP Engine treats any cookie whose name contains wordpress_ as logged-in and skips Varnish. After a dashboard visit, that session cookie (path=/) is sent on logged-out frontend requests → cache miss.

    Issue: CleanTalk always sets wordpress_apbct_antibot in wp-admin. WP Engine treats any cookie whose name contains wordpress_ as logged-in and skips Varnish. After a dashboard visit, that session cookie (path=/) is sent on logged-out frontend requests → cache miss.

    Anti-Crawler being off does not stop this. The checkbox only skips the frontend firewall module.

    Always-on setter (admin only; no sfw__anti_crawler check):

    // Crunch for Anti-Bot
    add_action('admin_head', 'apbct_admin_set_cookie_for_anti_bot');
    // ...
    function apbct_admin_set_cookie_for_anti_bot()
    {
        global $apbct;
    
        if ( $apbct->data['key_is_ok'] ) {
            echo
                '<script ' . (class_exists('Cookiebot_WP') ? 'data-cookieconsent="ignore"' : '') . '>
                    var ctSecure = location.protocol === "https:" ? "; secure" : "";
                    document.cookie = "wordpress_apbct_antibot=' . hash('sha256', $apbct->api_key . $apbct->data['salt']) . '; path=/; expires=0; samesite=lax" + ctSecure;
                </script>';
        }
    }

    Loaded whenever is_admin():

    if ( is_admin() || is_network_admin() ) {
        require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-find-spam.php');
        require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-admin.php');

    What the setting actually gates (frontend only):

        if ( $apbct->settings['sfw__anti_crawler'] && $apbct->stats['sfw']['entries'] > 50 ) {
            $firewall->loadFwModule(
                new \Cleantalk\ApbctWP\Firewall\AntiCrawler(
    Plugin Support eugenecleantalk

    (@eugenecleantalk)

    Hello jeremyjsimmons,

    Thank you for the details. We will review your request and respond within 3 business days.

    Plugin Support amagsumov

    (@amagsumov)

    Hello @jeremyjsimmons,

    We renamed the affected cookie and prepared a fix. The new name is apbct_antibot. Please download and install the plugin from this link:

    https://github.com/CleanTalk/wordpress-antispam/releases/download/fix-version/cleantalk-spam-protect.zip

    Cookies with the old name will automatically expire over the next 30 days, as we unfortunately cannot delete them right now. The new cookie will be issued to clients upon their next visit.

    Thank you,

    • This reply was modified 1 week, 1 day ago by amagsumov.
    Thread Starter jeremyjsimmons

    (@jeremyjsimmons)

    Thank you for the prompt turn-around. I assume this will make it into the next main release, right?

    Plugin Support amagsumov

    (@amagsumov)

    Yes, this change will be added into the next release.

    Thread Starter jeremyjsimmons

    (@jeremyjsimmons)

    Thanks so much for making an exception for me and releasing a hotfix. I greatly appreciate it.

    Plugin Support denisxam

    (@denisxam)

    Hello,

    We are glad that we were able to help you quickly.
    If you have a moment, can you please leave us a review on the WordPress forum? We would greatly appreciate it:
    https://wordpress.org/support/plugin/cleantalk-spam-protect/reviews/

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.