Certain posts are sent to Anti-Spam service with empty body

Created on 27 June 2025, 6 days ago

Problem/Motivation

Certain posts are sent to Anti-Spam service with empty body. In the antispam logs, one can see "Message: -", while the actual post contains body that contains spam. Since body is empty, Anti-Spam just accepts as "not spam" and spammers can still post malicious content.

Steps to reproduce

Enable the module. In some cases (in more than half of them), an empty message body is sent to the API, resulting in broken SPAM detection.

🐛 Bug report
Status

Active

Version

9.6

Component

Code

Created by

🇸🇮Slovenia KlemenDEV

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @KlemenDEV
  • 🇸🇮Slovenia KlemenDEV

    Could it be because we use Redis?

  • 🇸🇮Slovenia KlemenDEV

    It also seem that when editing a certain node, empty message is sent in all cases - 100% reproducible

  • 🇷🇺Russia znaeff

    Hello,

    Could you please provide us with the following information?
    1) What version of Drupal and PHP are you using?
    2) Are you using the default form or some custom one? If custom, how did you make it?

    This information will help us better diagnose the issue.

    Looking forward to your reply.

  • 🇸🇮Slovenia KlemenDEV

    1)

    PHP: 8.3.11
    Drupal: 10.5.1
    Server: nginx/1.24.0 with MySQL DB

    2) We have observed this on forum topics by forum module, as well as when users post custom content types, but with built-in node forms. When editing nodes, the message body seems to be empty in every case.

    We also have custom validators applied to those node forms using a custom module, but those validators only check for certain patterns in e.g., topic body and fail server-side form validation by using "setErrorByName".

    Here you can see some examples with an empty message in logs:

  • 🇷🇺Russia znaeff

    Hello,

    The reason the message body and sender's information are empty in the allowed requests on your site is that you've deactivated the storage of allowed requests. This means no data, except IP from allowed requests, is being stored on our servers. Please take a look at this article to learn more about this option: https://cleantalk.org/help/store-the-content-of-messages

    Thank you.

  • 🇸🇮Slovenia KlemenDEV

    I figured that out as well :) Sorry for the inconvenience.

Production build 0.71.5 2024