如何重现安全问题 CVE-2014-0094 。我用谷歌搜索但找不到任何相同的引用。
最佳答案
成功了。
我必须启用日志记录(对于 ognl 包)才能查看错误。
将class.classLoader.resource.dircontext.docBase=someText等参数传递给struts2应用程序。
localhost:8080/sampleApp/showlogin.do?class.classLoader.resource.diretext.docBase=someText
然后在日志中我会看到类似这样的内容。
java.lang.IllegalArgumentException: Document base base does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
应用解决方法后,我在日志中没有看到上述错误。
引用: http://www.brentron.com/safe/web/9248.html http://isayan.cocolog-nifty.com/diary/2014/04/s2-020.html
关于security - Struts2 + 类加载器漏洞 + 如何重现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23341344/