|
是用阿里云虚拟主机cdn配置的https,查看原因,是在Security.php是这样写的
public function csrf_set_cookie()
{
$expire = time() + $this->_csrf_expire;
$secure_cookie = (bool) config_item('cookie_secure');
if ($secure_cookie && ! is_https())
{
return FALSE;
}
setcookie(
$this->_csrf_cookie_name,
$this->_csrf_hash,
$expire,
config_item('cookie_path'),
config_item('cookie_domain'),
$secure_cookie,
config_item('cookie_httponly')
);
log_message('info', 'CSRF cookie sent');
return $this;
}
是下面这句阻断了
if ($secure_cookie && ! is_https())
{
return FALSE;
}
所以如果cookie中Secure=true,然后设置成https,就不能使用csrf了吗?
|
|