Problem/Motivation
Follow up to #3041885: Display relevant Security Advisories data for Drupal
That issue had functionality to send emails about security advisories that are displayed in Drupal
When the functionality for showing the advisories got moved from the Update to the System module we no longer had an existing email setting we could use to send the email
Still pending #3196368: [policy, no patch] Determine to which module the new security advisory functionality should be added
The email functionality in #3041885 was removed in this commit which can be used as a starting point.
Proposed resolution
- Add a new setting on the site info form for email addresses to send security advisory emails to.
- If the update module is currently installed copy the emails from the Update setting to the new System module setting
- Determine if the separate setting in the Update module should be deprecated
Remaining tasks
User interface changes
No email setting on site information form
API changes
Data model changes
Release notes snippet
Issue fork drupal-3197333
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3197333-email-sec-advisories
changes, plain diff MR !661
Comments
Comment #2
tedbowComment #3
tedbowJust copying a question we addressed in #3041885: Display relevant Security Advisories data for Drupal so it doesn't get lost. This will be a little different not that it is not in the Update module
Do we really need a separate
psa.notifysetting to control if we send emails?NO emails will be sent to email addresses in the current setting in the Update module. No extra setting will be provided.
Could we just send emails to the email addresses in the existing
notification.emailssetting?This setting is described in the UI now as
"Whenever your site checks for available updates and finds new releases, it can notify a list of users via email."
Would sending emails now for PSAs also to these same emails be a good idea?
If we have a separate check box for "Send email notifications for Public service announcements." then you could set up to send emails for new Updates but not send for PSA's but you could not set up your site to send emails for PSA's but not Updates.
Because the PSA feed is currently being used for only highly critical items it's hard to imagine that you would want emails for Updates and not highly critical PSAs.
Email changes
Changing to Update settings form. Change is highlighted

Email text
SUBJECT: An urgent security announcement requires your attention for Drupal
An important security announcement is available for your Drupal site. You should
read the announcement immediately and follow its instructions.
Public service announcements:
* Critical Release - SA-2019-02-19 [1]
To see all public service announcements, visit
https://www.drupal.org/security/psa [2].
[1] https://www.drupal.org/sa-2019-02-19
[2] https://www.drupal.org/security/psa
Comment #4
tedbowPostponing #3041885: Display relevant Security Advisories data for Drupal for now
Comment #5
larowlanFYI when this is brought back to life, I noticed an issue in the earlier patch on #3041885: Display relevant Security Advisories data for Drupal
It was assuming that the notify emails map 1:1 to user accounts.
There is no such restriction, so in this scenario we're missing any notify emails that aren't associated with user accounts.
Comment #7
larowlanBlocker is in
Comment #8
tedbow@larowlan thanks for reopening and point out #5! I think #5 was fixed later but I will check
Assigning to myself. I am converting the commit where we removed this from the other issue to a merge request
Comment #10
tedbowUnassigning from myself as we have a merge request now. The tests were passing for me locally.
Comment #15
mstrelan commentedThere is a MR but it needs to be rebased and has unresolved threads.