Skip to content

Commit 9ef438d

Browse files
committed
Fixed: CodeIgniter v3.1.13 Not Declaring CSRF Cookies
1 parent b336193 commit 9ef438d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/core/Security.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public function csrf_set_cookie()
297297
header('Set-Cookie: ' . $this->_csrf_cookie_name . '=' . $this->_csrf_hash
298298
. '; Expires=' . gmdate('D, d-M-Y H:i:s T', $expire)
299299
. '; Max-Age=' . $this->_csrf_expire
300-
. '; Path=' . rawurlencode(config_item('cookie_path'))
300+
. '; Path='.implode('/', array_map('rawurlencode', explode('/', config_item('cookie_path'))))
301301
. ($domain === '' ? '' : '; Domain=' . $domain)
302302
. ($secure_cookie ? '; Secure' : '')
303303
. (config_item('cookie_httponly') ? '; HttpOnly' : '')

0 commit comments

Comments
 (0)