Problem/Motivation
Compressed files, binaries, and databases are difficult to maintain and inspect.
This issue is to address:
./core/modules/update/tests/aaa_update_test.tar.gz
Background information
This was first reported to the Drupal security team who determined this could be a public followup.
- security.drupal.org private issue: https://security.drupal.org/node/180341
(included for reference. Please do not report access denied as an error.)
Steps to reproduce
Proposed resolution
This archive is used explicitly to test uploading an archive. I see a few options for solving this.
Option 1:
- Extract the archive
- Just before uploading archive the directory
- Run test
Downside, this means an archive process runs every test.
Upside, test artifact remains local.
Option 2:
Delete archiveMove to contrib or related space to create the archive as a releaseLoad the archive from that location for this test
Option 3:
- Extract Archive
- Delete Archive
- Have periodic build that generates the archive (or on a branch where the source changes for testing)
Remaining tasks
./core/modules/update/tests/aaa_update_test.tar.gz
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3455819
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:
- 3455819-decompress-files-for
changes, plain diff MR !16494
Comments
Comment #2
nicxvan commentedOk the only reference to this archive file is here:
I think we can just extract it and compress it right before this step as part of the step. It creates a bit of churn on each test, but it does solve the immediate security concern.
There are a lot of references in the code to modules/update/tests/aaa_update_test.module, that file does not exist though so I'm not sure if there is a process I'm missing that extracts the archive first.
Comment #3
nicxvan commentedComment #4
nicxvan commentedSetting needs review for the two approaches in the IS.
Comment #5
nicxvan commentedComment #6
longwaveOption 2 is not viable because we should be able to run tests without internet access.
I wonder if this is even worthwhile because update manager's ability to handle tarballs is going away once we have Automatic Updates, perhaps we should just do nothing until then (same for #3455818: Decompress files for update_test_new_module)
Comment #7
nicxvan commentedComment #8
nicxvan commentedComment #9
nicxvan commentedComment #10
quietone commentedI agree with longwave. And would rather see progress on #3403649: Rework database update tests so we don't have to ship database dumps in git
Comment #11
nicxvan commentedI think as long as there is a way to generate it locally just like https://www.drupal.org/project/drupal/issues/3403649#comment-15331668 suggests it should be fine.
I also think this is much lower stakes and easier to tinker with than full DB dump generation.
We can also just postpone this and #3455818: Decompress files for update_test_new_module
Comment #12
smustgrave commentedSo should this be postponed?
Comment #13
smustgrave commentedLet me know if I'm wrong on this assumption.
Comment #16
quietone commentedI can't find any usages of the file in core. Uses were removing in #3417136: Remove adding an extension via a URL and #3062757: Remove deprecated legacy include files from Drupal 9 .
I created an MR to remove the file and tests are passing. So, I have changed the title to show that this is removing a file. And not a bug.
Comment #17
longwaveYes, this is unused since #3417136: Remove adding an extension via a URL as far as I can tell, there are no remaining references at all now.
Comment #20
godotislateCommitted and pushed b2a155b to main and 24c6256 to 11.x. Thanks!
Do we bother doing this on 11.4.x? I'm going to mark this fixed, but can reopen if we want to backport.