dvwright / xss-mw

XssMw is an middleware designed to "auto remove XSS" from user submitted input, it’s written in Go and targets the Gin web framework.
MIT License
33 stars 12 forks source link

当 json 有两层节点的时候数据解析错误 #1

Closed ranhan closed 6 years ago

ranhan commented 6 years ago

嗯 确实是个问题没有用递归进行遍历 json结构。只解析一层

dvwright commented 6 years ago

Hi, unfortunately, I don't speak Chinese, google translate shows "Well it really is a problem There is no recursive traversal json structure. Only parse layer". I'm not sure what your are asking or reporting. Thanks

hxmhlt commented 6 years ago

The guy @ranhan said when the json contains json array , it will be error. For example: :When the input json is "{"A":[{"B":7},{"B":8}]}". The json will become "{"A":map["B":7],map["B":8]}". Can you fix it as soon as possible? @dvwright

dvwright commented 6 years ago

ahh, I see now, thank you @hxmhlt and @ranhan Yes, I will try to address this. Thanks

dvwright commented 6 years ago

Hi @hxmhlt and @ranhan I have taken a try to better support nested/complex JSON, see the newest release, v1.1-Beta. If you get a chance, please test it with your data to confirm. Thanks