Problem/Motivation
Since version 3.1.2 we're getting false positives as already described (and attempted to be fixed) in #3559063: X-Frame-Options false negative, but it's now created the issue instead of solving it.
The reason seems to be that curl responds with lower case header keys, while $this->httpClient->request('GET', $host)->getHeaders() responds with upper case header keys, at least in our instances. I don't know where the difference comes from, but the solution should be dealing with any scenario.
Proposed resolution
Do not just convert the tested header keys to lower case but also the keys in the tested array.
Issue fork security_review-3565523
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:
Comments
Comment #3
jurgenhaasComment #4
yazzbe commentedThanks!
Patched manually . Fixed the problem.
D10.5.6 | PHP 8.3.29
Comment #5
smustgrave commentedshould include a test.
Comment #6
smustgrave commentedAdded test coverage for the different scenarios.