JsonConvert.DeserializeXmlNode and Fortify Warns of JSON Injection

一世执手 提交于 2019-12-12 02:13:02

问题


Fortify is warning me that "JsonConvert.DeserializeXmlNode(JsonString);" could allow an attacker to inject arbitrary elements or attributes into the JSON entity.

Json coming into my app is unfortunately dynamic, is there anything I can do to mitigate this? Is there a better method to convert my Json to XML?

It says I can "ensure all serialization to JSON is performed using a safe serialization function that delimits untrusted data within single or double quotes and escapes any special characters... is there a simple way to do this?

Thanks in advance for the help.

来源:https://stackoverflow.com/questions/38364747/jsonconvert-deserializexmlnode-and-fortify-warns-of-json-injection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!