#41142·dolibarr

Mass emailing: "Validate" button returns 403 (missing CSRF token in URL) in v24.0.0

Author: barto95100Created Sep 30, 2026Updated Sep 30, 2026
LabelsBug

Bug

Bug

On the mass emailing card, clicking the Validate button returns an HTTP 403. The generated link does not contain the token parameter, so the request is rejected by the CSRF protection.

Environment

  • Dolibarr version: 24.0.0 (official Docker image dolibarr/dolibarr:24.0.0)
  • Web server: Apache 2.4.68 (Debian)
  • PHP: 8.2.33
  • Database: MariaDB 11.4.13
  • MAIN_FEATURES_LEVEL = 0
  • MAIN_SECURITY_CSRF_WITH_TOKEN not defined (default)
  • User: administrator, with all "Emailing" permissions

Steps to reproduce

  1. Enable the Emailing module.
  2. Create a new emailing, set a subject, a sender and a content.
  3. Add at least one recipient.
  4. On the emailing card, click Validate.

Expected behavior

The validation confirmation page is displayed.

Actual behavior

HTTP 403. The access log shows the request without any token:

GET /comm/mailing/card.php?action=valid&id=1 HTTP/1.1" 403

Other action links on the same page (for example the test email link) do include the token:

GET /comm/mailing/card.php?action=test&token=xxxxxxxx&id=1 HTTP/1.1" 200

Workaround

Adding the current session token manually to the URL works, and displays the confirmation page as expected:

/comm/mailing/card.php?action=valid&id=1&token=<session token>

Dolibarr Version

24.0.0

Environment PHP

8.2.33

Environment Database

MariaDB 11.4.13

Steps to reproduce the behavior and expected behavior

  1. Enable the Emailing module.
  2. Create a new emailing, set a subject, a sender and a content.
  3. Add at least one recipient.
  4. On the emailing card, click Validate.

Attached files

No response