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= 0MAIN_SECURITY_CSRF_WITH_TOKENnot defined (default)- User: administrator, with all "Emailing" permissions
Steps to reproduce
- Enable the Emailing module.
- Create a new emailing, set a subject, a sender and a content.
- Add at least one recipient.
- 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" 403Other 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" 200Workaround
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
- Enable the Emailing module.
- Create a new emailing, set a subject, a sender and a content.
- Add at least one recipient.
- On the emailing card, click Validate.
Attached files
No response
Source: Dolibarr/dolibarr