PHP 使用:if ($_SESSION['user_agent'] != $_SERVER['HTTP_USER_AGENT']
|| $_SESSION['user_ip'] != $_SERVER['REMOTE_ADDR']) {
//Something fishy is going on here?
}
7.设置 httpOnly 避免 Session 攻击
参考:http://ilia.ws/archives/121-httpOnly-cookie-flag-support-in-PHP-5.2.html
8.Lock down access to the sessions on the file system or use custom session handling
引用
可是自定义session session_set_save_handler()
将session存储在DB, memcached等
9.For sensitive operations consider requiring logged in users to provide their authenication details again