json = new JSONObject(); json.put("code", 200); json.put("info", "{‘replace‘:function(){alert(/xss/);}}"); json.put("msg", "success"); System.out.println(json); // 输出:{"code":200,"info":{"replace":function(){ alert(/xss/); }},"msg":"success"}
<script tpye=‘text/javascript‘> json= JSONObject.json_list(‘info‘)[‘replace‘] // 这段是客户端代码会调用到的,所以就会抛出这个函数了 function() { alert(/xss/); } </script>
每天进步一点点——/srv/node不存在导致object-updater和container-updater崩溃(Swift Bug),布布扣,bubuko.com
每天进步一点点——/srv/node不存在导致object-updater和container-updater崩溃(Swift Bug)
原文:http://blog.csdn.net/cywosp/article/details/23850893