使用如下请求调试你的微信支付结果通知接口java
1.将 https://path/to/your/wxApp/notify
替换为你的微信支付通知接口便可git
curl -X POST -H "Content-Type: application/xml" -H "Cache-Control: no-cache" -d '<?xml version="1.0"?> <!DOCTYPE ANY [<!ENTITY send SYSTEM "http://www.baidu.com">]> <x>send;</x>' "https://path/to/your/wxApp/notify"
2.若是后台输出如下错误,说明不存在XXE漏洞github
org.xml.sax.SAXParseExcepxception; lineNumber: 2; columnNumber: 10; DOCTYPE is disallowed when the feature "e "http://apache.org/xml/features/disallow-doctype-decl" se" set to true.
因为目前我这里使用的都是SAXReader解析XML,因此个别报错信息会和个人有差异,供参考。shell
能够使用微信官方SDK包中的com.github.wxpay.sdk.WXPayXmlUtil类来生成可预防XXE漏洞的documentBuilderFactoryapache
参考文档: https://blog.csdn.net/u013224189/article/details/49759845微信