wiki.techinc.nl/tests/phpunit/includes/Request
Máté Szabó 530b6a408b WebRequest: Gracefully handle array values in getCookie()
Given a cookie header like "Cookie: foo[]=bar;foo[]=bar2', PHP will
assign $_COOKIE['foo'] = [ 'bar','bar2']. This is not expected by
callers in MediaWiki and can trigger various errors in code that does
not expect to be dealing with arrays in this situation, nor is it
specified by RFC 6265[1] or any of its predecessors. So, stick to RFC
semantics here and treat the cookie as absent, since the name foo[] is
not the same as foo.

[1] https://datatracker.ietf.org/doc/html/rfc6265

Bug: T363980
Change-Id: Idaa175234de2d25a90e6be8fb6279c39089726bd
2024-05-02 12:05:43 +02:00
..
ContentSecurityPolicyTest.php tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
FauxRequestTest.php tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
WebRequestTest.php WebRequest: Gracefully handle array values in getCookie() 2024-05-02 12:05:43 +02:00
WebResponseTest.php tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00