Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
#2535302: Selecting too many files with JS off causes WSOD with data loss stops adding @ at the beginning of file uploads in WebTestBase because we just use PHP5.5's curl_create_file()
. This means we can enable the curl option CURLOPT_SAFE_UPLOAD
to standardise the behaviour across PHP versions. Also we can remove the comment:
* Note that when a form contains file upload fields, other
* fields cannot start with the '@' character.
And the check that random strings don't begin with an @ sign.
See https://secure.php.net/manual/en/function.curl-setopt.php
Comment | File | Size | Author |
---|---|---|---|
#4 | 2538260.4.patch | 2.62 KB | alexpott |
#4 | 2-4-interdiff.txt | 518 bytes | alexpott |
#2 | 2538260.2.patch | 2.63 KB | alexpott |
Comments
Comment #1
alexpottComment #2
alexpottHere's a patch.
Comment #3
mbayntonApplied/tested/reviewed. Can't you get away with a regex as simple as
'/^\s|\s$/'
? Looks like the method is called nearly 200 times in current tests so probably runs pretty frequently, and ditching the capturing subgroups would theoretically perform better. But, that's a total nitpick, we can move on...Comment #4
alexpott@mbaynton you're right.
Comment #5
alexpottAdding @mbaynton to the credit list.
Comment #6
catchCommitted/pushed to 8.0.x, thanks!