Closed rwalkerands closed 1 year ago
The code is wrong.
If you pass an array as the first parameter to set_cookie
, the samesite setting will be ignored, and defaults to $config['cookie_samesite']
from application/config/config.php
.
set_cookie([
'name' => 'foo',
'value' => 'bar',
'samesite' => 'None', // this is ignored
]);
Commit eb770fdc6d809bc7c28d499f897c0ab2c449f669 added the
$samesite
parameter toset_cookie()
. But now there's a contradiction between theforeach
and the comment on the immediately preceding line (system/core/Input.php
lines 311-312):Either the comment or the code is wrong ....