Make CakeSession use httponly by default.

Fixes #2955
This commit is contained in:
mark_story 2012-06-12 20:00:19 -04:00
parent f467785a8c
commit f625742a12

View file

@ -475,6 +475,9 @@ class CakeSession {
if (!isset($sessionConfig['ini']['session.gc_maxlifetime'])) {
$sessionConfig['ini']['session.gc_maxlifetime'] = $sessionConfig['timeout'] * 60;
}
if (!isset($sessionConfig['ini']['session.cookie_httponly'])) {
$sessionConfig['ini']['session.cookie_httponly'] = 1;
}
if (empty($_SESSION)) {
if (!empty($sessionConfig['ini']) && is_array($sessionConfig['ini'])) {