Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/core/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public function set_cookie($name, $value = '', $expire = 0, $domain = '', $path
$cookie_header .= ($expire === 0 ? '' : '; Expires='.gmdate('D, d-M-Y H:i:s T', $expire)).'; Max-Age='.$maxage;
$cookie_header .= '; Path='.$path.($domain !== '' ? '; Domain='.$domain : '');
$cookie_header .= ($secure ? '; Secure' : '').($httponly ? '; HttpOnly' : '').'; SameSite='.$samesite;
header($cookie_header);
header($cookie_header, FALSE);
return;
}

Expand Down
3 changes: 2 additions & 1 deletion system/core/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ public function csrf_set_cookie()
.($domain === '' ? '' : '; Domain='.$domain)
.($secure_cookie ? '; Secure' : '')
.(config_item('cookie_httponly') ? '; HttpOnly' : '')
.'; SameSite=Strict'
.'; SameSite=Strict',
FALSE
);
}

Expand Down
2 changes: 1 addition & 1 deletion system/libraries/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function __construct(array $params = array())
$header .= '; Path='.$this->_config['cookie_path'];
$header .= ($this->_config['cookie_domain'] !== '' ? '; Domain='.$this->_config['cookie_domain'] : '');
$header .= ($this->_config['cookie_secure'] ? '; Secure' : '').'; HttpOnly; SameSite='.$this->_config['cookie_samesite'];
header($header);
header($header, FALSE);
}

if ( ! $this->_config['cookie_secure'] && $this->_config['cookie_samesite'] === 'None')
Expand Down
2 changes: 1 addition & 1 deletion system/libraries/Session/Session_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ protected function _cookie_destroy()
$header .= '; Path='.$this->_config['cookie_path'];
$header .= ($this->_config['cookie_domain'] !== '' ? '; Domain='.$this->_config['cookie_domain'] : '');
$header .= ($this->_config['cookie_secure'] ? '; Secure' : '').'; HttpOnly; SameSite='.$this->_config['cookie_samesite'];
header($header);
header($header, FALSE);
return;
}

Expand Down