
Inside http_response_headers.install file, in the line 24, this if operation is wrong:
$strict_transport_security instanceof ResponseHeaderInterface
Is wrong because according PHP documentation http://php.net/manual/en/internals2.opcodes.instanceof.php, When checking instanceof against a class that implements a interface, it will return true.
inside ResponseHeader.php, the class ResponseHeader implements ResponseHeaderInterface
Comment | File | Size | Author |
---|---|---|---|
#4 | invalid-content-security-policy-check--3014523.patch | 945 bytes | MykolaVeryha |
Comments
Comment #2
pierre@edumobi.com.br commentedThis bug still presents in 8.x-2.x version as well
Comment #3
gappleIt looks like the intent of the
if
statement is to 1. check that a header is configured 2. that it implements the expected interface and 3. that it has a non-empty value.Checking against the interface is correct, but in this case should be negated:
!($strict_transport_security instanceof ResponseHeaderInterface)
. It is probably superfluous though, since the entity manager should only return entities of the expected type.Comment #4
MykolaVeryha commentedComment #5
minnur commentedComment #6
minnur commented