- Status changed to Needs review
over 1 year ago 5:03pm 4 May 2023 - last update
over 1 year ago 2,149 pass - last update
over 1 year ago 2,149 pass - 🇸🇰Slovakia poker10
Uploading two patches:
- 3214047-3-update-extensions.patch - only updates the list of unsafe extensions on all three places where these are used.
- 3214047-3-new-constant.patch - updates the list of unsafe extensions and creates a new constant to use on all three places.
I also looked at the tests, but it seems that D7 is currently not testing all these unsafe extensions at all. Only selected use-cases (extensions) are tested in various functions, but we do not have a general test like the one in D10 (
SecurityFileUploadEventSubscriberTest::testSanitizeName()
). For example theasp
extension is not tested anywhere. That's why I have not backported the test changes from D10 patch. Probably the best approach will be to create a follow-up issue, where we should consider adding tests for all these extensions (including phtml). - Status changed to RTBC
over 1 year ago 11:46pm 8 May 2023 - 🇨🇦Canada mparker17 UTC-4
@poker10, these patches look good - they appear to conform to coding standards, are clear, and make good use of the API. I tried out
3214047-3-new-constant.patch
on my local d7 site and it works for me. I'm going to boldly mark this as RTBC. - last update
over 1 year ago 2,150 pass - last update
over 1 year ago 2,150 pass - last update
over 1 year ago 2,151 pass - last update
over 1 year ago run-tests.sh exception - last update
over 1 year ago run-tests.sh exception - last update
over 1 year ago 2,151 pass - last update
over 1 year ago 2,151 pass - last update
over 1 year ago 2,151 pass - 🇸🇰Slovakia poker10
Adding a tag for the final review. I think the benefits of this patch are greater that the need of a complete new tests (see #3), but if needed, we can do that in this issue also.
50:17 46:54 Running- 🇬🇧United Kingdom mcdruid 🇬🇧🇪🇺
D9/10 has constants for this:
https://git.drupalcode.org/project/drupal/-/blob/10.1.0-beta1/core/lib/D...
So I vote for 3214047-3-new-constant.patch and am happy for that to be committed.
- last update
over 1 year ago 2,155 pass - last update
over 1 year ago 2,155 pass - last update
over 1 year ago 2,155 pass - last update
over 1 year ago 2,155 pass - last update
over 1 year ago 2,116 pass - last update
over 1 year ago 2,155 pass - last update
over 1 year ago 2,155 pass - last update
over 1 year ago 2,151 pass - last update
over 1 year ago 2,116 pass - Status changed to Fixed
over 1 year ago 5:42pm 26 May 2023 - 🇸🇰Slovakia poker10
Created a follow-up issue for tests: 📌 [D7] Add tests for handling files with insecure extensions Active
Automatically closed - issue fixed for 2 weeks with no activity.