此规则会检测是否使用了 WebLogic setAttribute 和 getAttribute 属性来解析 XML。 此规则会检测 Java 代码。 另一规则会检测是否使用了 WebLogic weblogic.servlet.XMLParsingHelper(用来启用此功能部件)。
例如:
request.setAttribute("org.xml.sax.helpers.DefaultHandler", someObject)
例如:
String handler = "org.xml.sax.helpers.DefaultHandler";
request.setAttribute(handler, someObject);
示例: Document myDocument = request.getAttribute("org.w3c.dom.Document")
示例:
String handler = "org.w3c.dom.Document";
Document myDoc = request.getAttribute(handler);
示例:
request.setAttribute("org.xml.sax.helpers.DefaultHandler", myHandler);
request.getAttribute("org.w3c.dom.Document");
当自动修正应用到之前的行时,这些行将被删除。
注意: 验证对象、
myHandler
, 在以后的代码中使用时,将以其他方式进行初始化。
示例:
Document myDocument = request.getAttribute("org.w3c.dom.Document");
应用自动修复时,之前的代码将更改为
Document myDocument;
注意: 验证对象、
myDocument
, 在以后的代码中使用时,将以其他方式进行初始化。