Skip to content

Conversation

@SegiNyn
Copy link
Contributor

@SegiNyn SegiNyn commented Mar 14, 2024

No description provided.

@SegiNyn SegiNyn changed the title Send emails from only allowed senders and replace From with Sender in Forms Send emails only from allowed senders and replace From with Sender in Forms Mar 14, 2024
@ThiefMaster
Copy link
Member

ThiefMaster commented Mar 15, 2024

Is it really necessary to change the APIs internally? At least what I had in mind was simply changing the logic in the emails module to determine how to use From and Reply-to and only changing the form label in the various other places...

Also, I think we agreed to "name via Indico" <noreply...> in the From, and not using the site title in a very generic way.. Nevermind, that was just an early return where I saw that.

@SegiNyn
Copy link
Contributor Author

SegiNyn commented Mar 15, 2024

Is it really necessary to change the APIs internally? At least what I had in mind was simply changing the logic in the emails module to determine how to use From and Reply-to and only changing the form label in the various other places...

I saw that you already had a function _rewrite_sender that makes changes to the From address that's why I removed that and added a new function. And I thought it was better to make the changes before creating the EmailMessage. Also, to be sure where in the emails module did you have in mind? do_send_email?

@SegiNyn
Copy link
Contributor Author

SegiNyn commented Mar 15, 2024

The changes to the names to sender_address instead of from_address isn't actually necessary but it makes it obvious to developers as well not just the users as is the case if only the label is changed.

@ThiefMaster ThiefMaster changed the title Send emails only from allowed senders and replace From with Sender in Forms Avoid spoofing email senders Oct 1, 2024
@ThiefMaster ThiefMaster requested a review from tomasr8 October 2, 2024 09:07
@ThiefMaster
Copy link
Member

Just FYI, I plan to merge this end of next week, shortly before we're going to put this in production at CERN.

@ThiefMaster ThiefMaster added this to the v3.3 milestone Nov 7, 2024
SegiNyn and others added 5 commits November 18, 2024 11:28
- prefer putting the email in the name part instead of just indico in
  cases where no name is available
- avoid storing full emails with names in the database; instead lookup
  the name when the email address is used for sending an email
- refactor logic to generate the real sender address, and also handle
  reply-to address in the same place
- update documentation
@ThiefMaster ThiefMaster merged commit c19b6f7 into indico:master Nov 18, 2024
9 checks passed
@ThiefMaster ThiefMaster deleted the add-email-sender branch November 18, 2024 12:12
SegiNyn added a commit to UNOG-Indico/indico-core that referenced this pull request Nov 20, 2024
AjobK pushed a commit to AjobK/indico that referenced this pull request Dec 19, 2024
AjobK pushed a commit to AjobK/indico that referenced this pull request Jan 7, 2025
AjobK pushed a commit to AjobK/indico that referenced this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants