IBM appcsan扫描安全漏洞--会话标识未更新
2014-07-27 22:14
796 查看
IBM appcsan扫描安全漏洞--会话标识未更新
url: http://www.cnblogs.com/jimor/p/3418070.html
posted on 2013-11-11 16:03 jinjinwang
IBM appcsan扫描安全漏洞--会话标识未更新
appcsan修订建议:
始终生成新的会话,供用户成功认证时登录。 防止用户操纵会话标识。 请勿接受用户浏览器登录时所提供的会话标识
在登录验证成功之后调用下面方法
@SuppressWarnings("unchecked")
private void createNewSession(HttpServletRequest request, HttpServletResponse response) throws Exception {
HttpSession oldSession = request.getSession();
// get the content of old session.
Enumeration<String> attributeNames = oldSession.getAttributeNames();
Map<String, Object> attributeMap = new HashMap<String, Object>();
while(attributeNames != null && attributeNames.hasMoreElements()){
String attributeName = attributeNames.nextElement();
attributeMap.put(attributeName, oldSession.getAttribute(attributeName));
}
oldSession.invalidate();
HttpSession newSession = request.getSession(true);
// put the content into the new session.
for (String key : attributeMap.keySet()) {
newSession.setAttribute(key, attributeMap.get(key));
}
}
url: http://www.cnblogs.com/jimor/p/3418070.html
posted on 2013-11-11 16:03 jinjinwang
IBM appcsan扫描安全漏洞--会话标识未更新
appcsan修订建议:
始终生成新的会话,供用户成功认证时登录。 防止用户操纵会话标识。 请勿接受用户浏览器登录时所提供的会话标识
在登录验证成功之后调用下面方法
@SuppressWarnings("unchecked")
private void createNewSession(HttpServletRequest request, HttpServletResponse response) throws Exception {
HttpSession oldSession = request.getSession();
// get the content of old session.
Enumeration<String> attributeNames = oldSession.getAttributeNames();
Map<String, Object> attributeMap = new HashMap<String, Object>();
while(attributeNames != null && attributeNames.hasMoreElements()){
String attributeName = attributeNames.nextElement();
attributeMap.put(attributeName, oldSession.getAttribute(attributeName));
}
oldSession.invalidate();
HttpSession newSession = request.getSession(true);
// put the content into the new session.
for (String key : attributeMap.keySet()) {
newSession.setAttribute(key, attributeMap.get(key));
}
}
相关文章推荐
- IBM Security Appscan漏洞--会话标识未更新
- IBM AppScan 安全扫描:加密会话(SSL)Cookie 中缺少 Secure 属性 处理办法 分类: 数据安全 2014-06-28 11:35 2805人阅读 评论(0) 收藏
- IBM AppScan 安全扫描:加密会话(SSL)Cookie 中缺少 Secure 属性 处理办法 分类: 数据安全 2014-06-28 11:35 2804人阅读 评论(0) 收藏
- java或者jsp中修复会话标识未更新漏洞
- IBM AppScan 安全扫描:加密会话(SSL)Cookie 中缺少 Secure 属性 处理办法
- 【AppScan深入浅出】修复漏洞:会话标识未更新(中危)
- java或者jsp中修复会话标识未更新漏洞
- java或者jsp中修复会话标识未更新漏洞
- 网络安全-已解密的登录请求,会话标识未更新,跨站点请求伪造
- [AppScan深入浅出]修复漏洞:会话标识未更新
- java或者jsp中修复会话标识未更新漏洞
- java或者jsp中修复会话标识未更新漏洞
- 会话标识未更新(AppScan扫描结果)
- 【AppScan深入浅出】修复漏洞:会话标识未更新(中危)
- 会话标识未更新 漏洞处理
- Appscan---会话标识未更新
- 会话标识未更新
- 【386w.com】安全补丁更新修复大量Windows和Office漏洞
- Web安全漏洞之:JDK1.5环境下扫描远程调试端口导致JVM崩溃【JDWP exit error JVMTI_ERROR_NONE(0)】
- Canonical发布Ubuntu 14.04 LTS内核安全更新,修补8个漏洞