我正在测试的代码中出现了信任边界违规行为。代码在会话中添加表单,并且由于信任边界冲突而出现缺陷。
Inside Struts Action class execute method
{
EditForm editform = new EditForm ();
All the values are set either from databse or from request params and then the form is added to session as below
**request.getSession(false).setAttribute("EDIT_FORM", editform );**
}我正在违反显示为粗体的代码。
我怎么才能解决这个问题?我不知道在哪里添加验证。它是在Action类执行方法中创建的新表单,vaues是从请求和db中填充的。
发布于 2015-05-07 09:36:44
您应该尝试使用esapy库,尝试这样的方法:
在设置属性之前。我发现了对象类型变量的漏洞,这是最糟糕的,因为您无法验证它,因为您无法知道类型。
https://stackoverflow.com/questions/18453426
复制相似问题