Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
file.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Feb 2019 at 10:11 UTC
Updated:
11 Mar 2019 at 14:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexpottComment #3
amateescu commentedLooks great to me :)
Comment #5
dwwYes, we discovered this bug at #2492171: Provide options to sanitize filenames (transliterate, lowercase, replace whitespace, etc) while adding extensive test coverage for the transliterate case.
We tried to instead fix it as part of #2940383: [META] Unify file upload logic of REST and JSON:API but @wim isn't happy about that. ;)
I agree we might as well fix it here, separately, and then All The Other File Issues(tm) can stop worrying and arguing about it. ;)
Patch looks great. Simple fix. Includes a test. Note: the php bug we're solving seems to mainly impact files with an mb char at the front of the filename, which is why our previous test coverage didn't catch this.
FWIW, this applies cleanly to 8.7.x, too, and at least
Drupal\Tests\file\Functional\FileUploadJsonBasicAuthTestpasses locally (which is a test that usesFileUploadResourceTestBase):All that's to say: definitely RTBC. ;)
Thanks,
-Derek
Comment #6
wim leersLooks great, thanks for splitting this off — this now became a trivial commit :)
Comment #7
wim leers(This came up in #2940383-35: [META] Unify file upload logic of REST and JSON:API, I argued against expanding the scope of that issue to do this bugfix, since #2940383 is solely about moving code. If we both move and change code, it becomes really hard to review.)
Comment #9
dwwI think the testbot is still recovering from all the trouble. Trying to re-upload #2 to see if this helps.
Comment #10
alexpottSo back to rtbc based on #3 and the further comments.
Comment #12
dww#3035320: Random fails in TimestampAgoFormatterTest and DateTimeTimeAgoFormatterTest
Re-queued #9.
Comment #14
alexpottComment #17
larowlanCommitted e1ec253 and pushed to 8.7.x. Thanks!
C/p as 0da311f4b4 and pushed to 8.6.x
Comment #18
wim leers🥳
Thanks for this! 👌
Comment #19
wim leers