其中是';安全';标签在Magento cookie上的SSL安全网站


where is 'secure' tag in Magento cookie on SSL secure site?

我们的网站是SSL安全网站,Magento的"安全"answers"不安全"URL变量都指向https://URL。然而PCI审计表明cookie是不安全的。当通过在页眉中设置Cookie创建Cookie时,他们希望看到"安全"关键字。

我看到Magento在''shop''app''code''core''Mage''core''Model''Cookie.php 中使用此功能

if (is_null($secure)) {
            $secure = $this->isSecure();
        }
        if (is_null($httponly)) {
            $httponly = $this->getHttponly();
        }
        setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);

但我不确定isSecure()的值是从哪里来的,为什么不包含文本"secure"?

页眉中的SetCookie:

frontend=sj4j9kltv7nc00gk8s0i81koi3; expires=Thu, 06-Nov-2014 23:39:11 GMT; 
path=/; domain=www.mydomaine.com; HttpOnly"

Magento仅为管理员设置安全cookie,尝试安装http://www.magentocommerce.com/magento-connect/secure-frontend-cookie.html模块,它应该有帮助:)

如果仅从Mage_Core_Model_Cookie模型覆盖isSecure没有帮助,方法:

public function isSecure()
{ 
    return $this->_getRequest()->isSecure(); 
}