Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
Memperbaiki konfigurasi cookie samesite dan cookie secure
Browse files Browse the repository at this point in the history
  • Loading branch information
noplanalderson committed Oct 22, 2021
1 parent be70913 commit efc6290
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions system/core/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ public function csrf_set_cookie()
$this->_csrf_cookie_name,
$this->_csrf_hash,
array(
'samesite' => 'None',
'secure' => true,
'samesite' => config_item('cookie_samesite'),
'secure' => config_item('cookie_secure'),
'expires' => $expire,
'path' => config_item('cookie_path'),
'domain' => config_item('cookie_domain'),
'httponly' => config_item('cookie_httponly')
'httponly' => TRUE // Not configureable for security reason
)
);
log_message('info', 'CSRF cookie sent');
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 @@ -173,7 +173,7 @@ public function __construct(array $params = array())
$this->_config['cookie_name'],
session_id(),
array(
'samesite' => 'None',
'samesite' => config_item('cookie_samesite'),
'secure' => $this->_config['cookie_secure'],
'expires' => (empty($this->_config['cookie_lifetime']) ? 0 : time() + $this->_config['cookie_lifetime']),
'path' => $this->_config['cookie_path'],
Expand Down

0 comments on commit efc6290

Please sign in to comment.