Problem/Motivation
This issue began in 2017 with reporting that in #2804155: If the next minor version of core has a security release, status still says "Security update required!" even if the site is on an equivalent, secure release already, we discovered badly-outdated sites offer up all the security updates. That change meant that every security release was listed on the 'Available updates' page and the user was presented with an overwhelming set of choices. See original image.
In #17 this was reported fixed and this issue is to add test coverage so that doesn't happen again.
To test the fix, one can change the VERSION constant in Drupal.php to 8.1.10, which is used in the 'original image' and compare the results.
Proposed resolution
TBD
Possible solutions:
Remaining tasks
Items in #32
Add test case
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #45 | Screenshot 2024-05-10 at 14.02.17.png | 297.64 KB | simohell |
| #44 | Screenshot 2024-05-06 at 18-01-45 Available updates Drupal.png | 22.18 KB | quietone |
| #40 | 2865920-nr-bot.txt | 150 bytes | needs-review-queue-bot |
| #32 | Screen Shot 2021-11-23 at 9.05.17 AM.png | 71.33 KB | tedbow |
| #22 | 2865920-fix-do-not-test.patch | 699 bytes | tedbow |
Issue fork drupal-2865920
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:
Comments
Comment #2
drummAttached is a first pass at this. I have not tested contrib. #2804155: If the next minor version of core has a security release, status still says "Security update required!" even if the site is on an equivalent, secure release already has some tips on how to fake things to test them.
Comment #3
drummThis may only be relevant when we get to 9.0.x, but there was a key collision with numeric keys. This patch adds the
'sec-'prefix to$key.Comment #6
xjmI don't think this is the right approach. Sometimes we will have joint releases, like 8.2.8 and 8.3.1. So in that case 8.3.1 is equivalent from a security perspective. A couple months later 8.3.4 ccomes out with a new security fix that is not backprted to 8.2.x, so 8.3.1 is then insecure.
I think what we should actually be showing is just the latest security release on that branch and the latest security release on subsequent branches. Or something.
Comment #7
David_Rothstein commentedThere is documentation in https://api.drupal.org/api/drupal/core%21modules%21update%21update.compa... that explains the justification for the current behavior:
Personally I agree with that reasoning, so I don't think all the non-up-to-date security releases should be removed completely.
That said, the old ones definitely don't need to take up so much screen space (with download links and the whole rigmarole). I could definitely imagine it being streamlined down to a single line, something like "Previous security releases: X, Y, Z..." where each one is just a simple link to the release notes.
Comment #8
xjmGood point, this makes sense. Retitling to that scope. Also going to add an annotated screenshot so that I don't continue to confuse this with all the things.
Comment #9
xjmActually, retitling to the bug rather than a proposed resolutiton
Comment #10
xjmSo hm, OTOH. For non-security releases, we don't list all the releases. We only list the latest one. The site owner probably still needs to know the things in the intervening release notes. If you're on 8.3.7 and planning to update to 8.5.1, you probably should review both the 8.4.0 and 8.5.0 release notes.
Comment #11
xjmThis is probably another thing that we should have design/usability work for, rather than three backend developers trying to decide what to do with a UI. :)
Anyway here's the screenshot so I understand/rememebr which issue this is, and separating the problem statement from the proposed resolution in the IS.
Comment #12
xjmSo yeah, I don't think we should link all the releases because we don't want the user to choose one of the releases and install them. We want them to install the latest security release.
Maybe what we should do instead is add a one-liner to our security release notes template that is something like:
Comment #13
xjmTagging for design/UX feedback.
Comment #14
cilefen commentedPerhaps a wall of scary red will encourage upgrading? I just don’t understand how a site owner could see that and not jump to action.
That said, don’t we want to highlight the security release higher than the installed version that is on a supported branch?
Comment #15
dwwThat was indeed the intention of the original design + implementation. ;)
Comment #17
xjmSo this issue is resolved now. Since @drumm marked old releases "insecure" for #2804155: If the next minor version of core has a security release, status still says "Security update required!" even if the site is on an equivalent, secure release already, only the latest security update is shown. This can be tested by installing Drupal 8.1.0 and checking the update status report.
We should use this issue to add test coverage for it.
Comment #18
xjmI think a way to address this:
Would be to instead just add a link to https://www.drupal.org/security?
Comment #19
drummRelease pages on drupal.org also now have links to other releases in the series in the bottom-right. For example, https://www.drupal.org/project/drupal/releases/8.5.6 has links to all 8.x releases. We could add some indication of security releases and/or insecure releases. Not something to rely on since the bottom-right of websites is often ignored, but it’s something.
Comment #20
dyannenovaI think the link in #12 could be helpful, although it won't give the reader clear feedback on which of those advisories applied to their own site.
It seems like the actual goal for #18 is to have a place that the reader can see all of the advisories that apply to their site, in one place. But I feel like that's outside of the scope of this issue, and could be a follow up. Only showing the latest release is much better for the user than showing a wall of releases with the possibility that the user will install the wrong one.
Comment #21
xjmIn #2990511: Add comprehensive test coverage for update status for security releases @tedbow identified that the site can show older security releases than the site's currently installed version, which is definitely not the right behavior. @tedbow filed #2992631: Update report incorrectly recommends security releases for old minors when a security update is needed and a secure version of the old minor is also available for that, though it will probably end up being fixed by whatever's left to fix here following the d.o metadata change. @tedbow has a couple test cases for instances that still show multiple releases and will attach them here for now.
Comment #22
tedbowI don't think we should be solving this on the return template level.
I think
update_calculate_project_update_status()tries to solve this and should be the authority on what security updates are applicable.Insecuretag because they contain security hole that was found in later security updates so they will be marked as insecure. Soupdate_calculate_project_update_status()will no longer return them.Insecure) but they would be a downgrade from the sites current version.This is because in
update_calculate_project_update_status()there is code to try stop looping through releases when we find the current version of project.This seems correct and should avoid showing any releases before the current version. But if we look a little above this
If the current release is insecure then we will
continue;looping through releases and not reach thebreak;above to which should stop us from looping through prior releases.I will upload a fix for just this.
I am not sure what the correct behavior is here.
In the fixture used for the test
8.x-3.0-beta1, the installed version, is taggedInsecure.8.x-3.0-beta2is notInsecurebut is also not a Security update. This because pre-releases besides RC releases cannot marked Security updates.I think @xjm argued we should show the previous Security update
8.x-2.2because the site is on an Insecure version and this the only available Security update.The problem of course is that this would downgrade. The fix above would have to be extended to show at least 1 previous security release. Also if
8.x-3.0-beta1contain any non downgrade changes such as entity field additions or other table changes you site would likely break.The fix above recommend an upgrade
8.x-3.0-beta2but this would not be label as a Security upgrade.Comment #23
xjmComment #24
xjmComment #26
xjmWe determined previously that it's hard to resolve the other UX issues with the status report if this one isn't also solved, so explicitly adding it to the roadmap for the security coverage initiative.
Comment #28
xjmWe should also re-test what happens with this issue now that Drupal.org has changed how insecure releases are handled: Does the wall of terror persist?
Comment #32
tedbowLocally testing 9.2.0 should determine if this problem still exists. I test and this is what I see
I think the problem is fixed but we should have test to confirm this doesn't happen again.
in that case should we recommend
8.x-3.0-beta2which is not security release but also not insecureor should we recommend
8.x-2.2which is security release but it also a downgrade.\Drupal\Tests\update\Functional\UpdateContribTest::securityUpdateAvailabilityProvider()to add the missing test case mention above.We should start a new merge request with that test case which will now fail.
8.x-2.2should be recommended.This would mean we would have to change
update_calculate_project_update_status()to look for a security release that is less than current versionComment #37
phenaproximaSince the original title of this issue no longer really applies, I think we should probably re-title this and update the issue summary. Tagging for those.
Comment #40
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #43
quietone commentedIssue Summary update and title change
Comment #44
quietone commented#31

1. Already fixed.
2. Added test case and removed @todo in UpdateContribTest.
3. The MR for this is MR1615
4. Check if these results are what is wanted:
Comment #45
simohell commentedSince 1. was her the part affecting usability and was fixed already and the remaining task for this ticket is the test, I'm removing "usability" and needs usability review" tags. If we need to look at the usability aspects of the message (such as order of the recommendations, security updates on each supported minor etc.) it should prbably be a new issue.
Attaching an example screnshot for 10.1.1 message for reference.
Comment #49
smustgrave commentedRebased and fixed phpcs issue
Hiding patches and old MR (but then un-hid_
Will remove tests tag as test branch is showing failure.
But can we update the MR 1594 for 11.x and include tests too please.
Comment #50
xjmUnsure about the retitle and IS rewrite here. I am not sure the issue was totally fixed, just that it was mitigated by a recent change to d.o. The issue is still partly present AFAIK.
Comment #51
quietone commentedAccording to #32.1 this original problem is fixed. tedbow states that they tested on 9.2 and "I think the problem is fixed but we should have test to confirm this doesn't happen again".
Comment #52
simohell commentedAs this was tagged, I had this queued for UX review meeting on May 10 but while preparing, I couldn't reproduce the original usability issue as it was already fixed as mentioned in #32. We didn't therefore do a formal review/recommendations and the related discussion is not included in the meeting recording.