Open nickmalcolm opened 7 months ago
This is ready for review @carlosantoniodasilva 🙇
👋 @carlosantoniodasilva do you or another contributor have capacity to review this? If it's not a contribution that's a good fit, I can close it 👍
Thanks for all the time & effort you put in to devise.
Devise sends email containing sensitive values such as confirmation URLs, password reset URLs, and unlock URLs. In most (all?) cases, these should only be sent to a single person so that they alone can click the link. If the email is sent to multiple addresses, another person could click the link.
Set
Devise.strict_single_recipient_emails
to an array of actions to raise an error when the email would be sent to more than one email address.By default Devise is secure:
Devise.email_regexp
will reject email addresses containing separators (,;
)record.email
However, when using
opts
, and particularly if providing untrusted user input toopts
, multiple values could be present into:
,cc:
, orbcc:
.Example:
This work is similar to what I introduced at GitLab, but disabled by default and more configurable:
a) to avoid breaking changes, b) to make it easier to enable for a subset of actions
GitLab MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/145753
This is my first contribution to Devise - very happy to receive feedback and change things up as needed ❤️ Also fine if you'd rather not include this change 👍