Closed (fixed)
Project:
Drupal core
Version:
8.9.x-dev
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Jan 2021 at 22:35 UTC
Updated:
18 Feb 2021 at 21:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
xjmIt seems to be only on the environments with dev versions of PHP (7.3.x-dev and 7.4.x-dev both) so maybe an upstream change or regression impacting the test? It's been broken since January 4.
Comment #3
MixologicThis was also on the 7.2.x-dev environment, oddly, because 7.2.x is no longer supported, and shouldnt have had any new commits, yet here it is: https://github.com/php/php-src/commit/2d3d72412a6734e19a38ed10f385227a62...
So that commit probably broke our test.
Comment #4
MixologicAlso:
https://bugs.php.net/bug.php?id=77423
Is the actual bug report.
Comment #5
kim.pepperThis fix is included in 7.4.14 and 7.3.26 https://www.php.net/ChangeLog-7.php#7.4.14 and 8.0.1 https://www.php.net/ChangeLog-8.php#8.0.1
Comment #6
xjmThis is related to a CVE, so we definitely need to fix it.
@Mixologic what patch versions of PHP are the 7.4 and 7.3 environments running?
Comment #7
larowlanComment #8
larowlanFor testing this locally
Here's the output
So previously `base://AKI@&hO@` was something
parse_urlcouldn't parse, but now it can and is treated as valid.So I guess we just remove it? This was introduced in #2418169: Expand and document test coverage in UnroutedUrlTest but there's not really any discussion around why that case was needed.
Comment #9
kim.pepperCorrect parse_url() can now parse that value. Not sure of the value of the test, so I agree it can be removed.
Here's the output of
parse_url('base://AKI@&hO@')with different versions of PHP to demonstrate.https://3v4l.org/qQm1i
Comment #10
xjm#2418169: Expand and document test coverage in UnroutedUrlTest just moved the pattern from one place in the data provider to another. The string was being tested before.
Before we commit this, let's blame the line in
HEAD^from that commit to see what the actual original issue was?This is probably still the right approach but we should be sure.
Comment #11
catchThis was added in #2353347: Random failure in DisplayPathTest, which fixed a random test failure where we were sometimes generating that string and it would fail tests due to not getting past parse_url().
So I think it probably is fine to remove here - we only added it to account for parse_url() behaviour and it's that which is being changed, was never a functional bug.
Comment #12
alexpottCommitted dc90906 and pushed to 9.2.x. Thanks!
Will backport to 9.1.x and 8.9.x once the bugfix release has taken place.
Comment #14
xjmHmm based on #11 I think it would have been better to move the string to the correct test for disallowed patterns rather than removing it entirely?
Comment #15
larowlanIt was already in the disallowed list, but PHP now allows it, per the link in Kim's comment
Comment #16
xjmSorry; you know what I mean -- shouldn't it still be tested somewhere?
Comment #17
catchI thought about adding it to a list of allowed patterns somewhere - to test the opposite of what we do now, but if we did that, it would mean all the stable versions of PHP fail until new releases come out. Unless we add our own validation on top of parse_url() to handle this specific case I'm not sure this is testable at least without special casing PHP versions).
Comment #18
alexpottBackported to 8.9.x and 9.1.x
Comment #21
MixologicMissed #6 but in the future, you can always check the version of php that was used by the test by going to the artifacts on dispatcher:
e.g: https://www.drupal.org/pift-ci-job/1963069 -> click on 'view results on dispatcher' -> click on 'Build Artifacts' -> click on 'artifacts' -> click on 'runcontainers' -> and there you will see the output of phpinfo: https://dispatcher.drupalci.org/job/drupal_patches/75398/artifact/jenkin...