# Captcha résolu requis avant l'envoi de tout e-mail

**URL:** <https://meta.discourse.org/t/require-solved-captcha-before-sending-any-email/418119>\
**Category:** Bug\
**Tags:** captcha\
**Created:** [Novembre 23, 2026, 4:52 UTC](https://meta.discourse.org/t/require-solved-captcha-before-sending-any-email/418119 "2026-11-23T16:52:40Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)\
**Post date:** [Novembre 26, 2026, 9:35 UTC](https://meta.discourse.org/t/require-solved-captcha-before-sending-any-email/418119/11 "2026-11-26T21:35:32Z")

</div>

Ceci sera mis à jour avec :

> <https://github.com/discourse/discourse/pull/46867>
>
> With email-code signup, the CAPTCHA was shown only after the emailed code had be…en verified. Bots could therefore send login-code emails to any address without ever being challenged, which hurts email deliverability. The old signup flow challenged before sending any email. Reported on Meta: https://meta.discourse.org/t/418119
> 
> The CAPTCHA now sits on the email step, and \`/session/login-code\` refuses to send a code until it's solved.
> 
> \*\*Server (\`discourse-captcha\`)\*\*
> 
> \- \`create\_login\_code\` verifies the CAPTCHA token before calling core. A successful solve is stored in the server session for that address (hashed) for an hour, along with the reCAPTCHA v3 score.
> \- Resending a code to the same address reuses that solve, and verifying the code and creating the account don't challenge again. The stored score is still recorded on the new user.
> \- Logins and signups are challenged alike, so the response doesn't reveal whether an address has an account.
> \- Invitations, password resets and API requests are not challenged, as before.
> 
> \*\*Client\*\*
> 
> \- A new \`request-login-code\` behavior transformer wraps the request that sends the code. The CAPTCHA plugin uses it to attach the token, and skips it for invitations and resends.
> \- The CAPTCHA fields move from the \`code-login-after-code\` outlet to \`code-login-email-step-fields\`. They're hidden for invitations and password resets.
> \- \`create-account\` gets a \`codeLogin\` context, so the plugin doesn't ask for a second CAPTCHA on the details step of a code signup. Password signups are unchanged.
> 
> \*\*Testing\*\*
> 
> \- Request specs cover a missing or rejected token sending no email, existing accounts being challenged too, the solve being reused for resends and signup but not for a different address, reCAPTCHA v3 scores carried through to the new user, and invitations skipping the challenge.
> \- System specs now expect the CAPTCHA before the email is sent and no second challenge afterwards.

---

_[View the full topic](https://meta.discourse.org/t/require-solved-captcha-before-sending-any-email/418119)._
