mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-29 09:54:44 +08:00
fix: 修复潜在的 XXE 漏洞风险
This commit is contained in:
@@ -270,6 +270,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Utilities
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
XmlDocument xmlDoc = new XmlDocument();
|
XmlDocument xmlDoc = new XmlDocument();
|
||||||
|
xmlDoc.XmlResolver = null;
|
||||||
xmlDoc.LoadXml(xml);
|
xmlDoc.LoadXml(xml);
|
||||||
|
|
||||||
XmlNode? xmlRoot = xmlDoc.FirstChild;
|
XmlNode? xmlRoot = xmlDoc.FirstChild;
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Utilities
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
XmlDocument xmlDoc = new XmlDocument();
|
XmlDocument xmlDoc = new XmlDocument();
|
||||||
|
xmlDoc.XmlResolver = null;
|
||||||
xmlDoc.LoadXml(xml);
|
xmlDoc.LoadXml(xml);
|
||||||
|
|
||||||
XmlNode? xmlRoot = xmlDoc.FirstChild;
|
XmlNode? xmlRoot = xmlDoc.FirstChild;
|
||||||
|
|||||||
Reference in New Issue
Block a user