{"id":5017,"date":"2020-05-31T10:04:10","date_gmt":"2020-05-31T02:04:10","guid":{"rendered":"https:\/\/www.xttblog.com\/?p=5017"},"modified":"2020-05-31T10:04:10","modified_gmt":"2020-05-31T02:04:10","slug":"%e9%98%bf%e9%87%8c%e5%b7%b4%e5%b7%b4-fastjson-%e5%8f%88%e5%8f%8c%e5%8f%92%e5%8f%95%e5%87%ba%e6%bc%8f%e6%b4%9e%e4%ba%86%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=5017","title":{"rendered":"\u963f\u91cc\u5df4\u5df4 fastjson \u53c8\u53cc\u53d2\u53d5\u51fa\u6f0f\u6d1e\u4e86\uff01"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">5 \u6708 29 \u65e5\uff0c\u4e00\u5927\u65e9\u5c31\u5f97\u5230\u4e86\u6d88\u606f\uff0c\u963f\u91cc\u5df4\u5df4\u7684 fastjson \u53c8\u51fa\u6f0f\u6d1e\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7d27\u63a5\u7740\uff0c\u6ca1\u8fc7\u591a\u4e45\uff0c\u5f88\u591a\u5ba2\u6237\u53d1\u6765\u90ae\u4ef6\uff0c\u8981\u6c42\u6392\u67e5\u4ea7\u54c1\u4e2d\u6d89\u53ca fastjson \u7684\u5b89\u5168\u6f0f\u6d1e\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7531\u4e8e\u516c\u53f8\u9879\u76ee\u4f17\u591a\uff0c\u4e00\u4e2a\u4e00\u4e2a\u6392\u67e5\u8d77\u6765\u771f\u7684\u662f\u9ebb\u70e6\u3002\u6211\u53ea\u80fd\u7ed9\u5927\u5bb6\u53e3\u5934\u4ea4\u5f85\uff0c\u4ee5\u540e\u7981\u6b62\u4f7f\u7528\u963f\u91cc\u5df4\u5df4 fastjson\uff0c\u4f7f\u7528 gson \u6216 Jackson \u66ff\u6362\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u662f\u6211\u4e0d\u559c\u6b22\u56fd\u4ea7\u5f00\u6e90\u9879\u76ee\uff0c\u5b9e\u5c5e\u65e0\u5948\u4e4b\u4e3e\u3002fastjson \u5149\u4eca\u5e74\u5c31\u9646\u7eed\u7206\u51fa\u4e86 3 \u4e2a\u6f0f\u6d1e\u3002\u548c\u6f0f\u6d1e\u4e4b\u738b\uff0cStruts2 \u771f\u662f\u6709\u7684\u4e00\u62fc\u4e86\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6b21 fastjson \u7684\u6f0f\u6d1e\u6d89\u53ca &lt;= 1.2.68 \u7684\u7248\u672c\u3002\u5b58\u5728\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\uff0c\u6f0f\u6d1e\u88ab\u5229\u7528\u53ef\u76f4\u63a5\u83b7\u53d6\u670d\u52a1\u5668\u6743\u9650\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fastjson \u662f\u963f\u91cc\u5df4\u5df4\u5f00\u6e90\u7684 JSON \u89e3\u6790\u5e93\uff0c\u5b83\u53ef\u4ee5\u89e3\u6790 JSON \u683c\u5f0f\u7684\u5b57\u7b26\u4e32\uff0c\u652f\u6301\u5c06 Java Bean \u5e8f\u5217\u5316\u4e3a JSON \u5b57\u7b26\u4e32\uff0c\u4e5f\u53ef\u4ee5\u4ece JSON \u5b57\u7b26\u4e32\u53cd\u5e8f\u5217\u5316\u5230JavaBean\u3002\u81ea\u53d1\u5e03\u4ee5\u6765\uff0c\u6df1\u53d7\u5e7f\u5927\u7a0b\u5e8f\u5458\u559c\u7231\u3002\u6211\u4eec\u7ecf\u5e38\u628a\u5b83\u62ff\u6765\u548c\u5176\u4ed6 JSON \u89e3\u6790\u6846\u67b6\u5bf9\u6bd4\uff0c\u5b83\u4ee5\u201c\u901f\u5ea6\u5feb\u201d\u8457\u79f0\uff01\u4f46\u8fd1\u5e74\u6765\uff0c\u9010\u6e10\u88ab\u5927\u5bb6\u6240\u8ba8\u538c\uff0c\u53c2\u8003\u8fd9\u7bc7\u6587\u7ae0\uff1a<a rel=\"noreferrer noopener\" aria-label=\"\u4e3a\u4ec0\u4e48 FastJson \u706b\u4e0d\u8d77\u6765\uff0c\u56fd\u5916\u4eba\u90fd\u4e0d\u4f7f\u7528\uff1f\uff08\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff09\" href=\"https:\/\/mp.weixin.qq.com\/s\/gonrTr_Q2u43tTXU6G6mZQ\" target=\"_blank\">\u4e3a\u4ec0\u4e48 FastJson \u706b\u4e0d\u8d77\u6765\uff0c\u56fd\u5916\u4eba\u90fd\u4e0d\u4f7f\u7528\uff1f<\/a>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5230\u4eca\u5929\u4f4d\u7f6e\uff0c\u5df2\u7ecf\u8fc7\u53bb 3 \u5929\u4e86\uff0c1.2.69 \u7248\u672c\u76ee\u524d\u8fd8\u672a\u89c1\u8eab\u5f71\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6240\u4ee5\uff0c\u5728\u6f0f\u6d1e\u88ab\u53d1\u73b0\u7684\u7b2c\u4e00\u5929\uff0c\u6211\u4eec\u53ea\u80fd\u624b\u52a8\u7684\u8be5\u4ee3\u7801\u6765\u4fee\u590d\u8fd9\u4e2a Bug\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6839\u636e\u817e\u8baf\u5b89\u5168\u56e2\u961f\u7684\u5efa\u8bae\uff0c\u9700\u8981\u5347\u7ea7\u5230 Fastjson 1.2.68 \u7248\u672c\uff0c\u7136\u540e\u901a\u8fc7\u914d\u7f6e\u4ee5\u4e0b\u53c2\u6570\u5f00\u542f SafeMode \u6765\u9632\u62a4\u653b\u51fb\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ParserConfig.getGlobalInstance().setSafeMode(true);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u9700\u8981\u6ce8\u610f\u7684\u662f\uff1asafeMode \u4f1a\u5b8c\u5168\u7981\u7528 autotype\uff0c\u65e0\u89c6\u767d\u540d\u5355\uff0c\u8bf7\u6ce8\u610f\u8bc4\u4f30\u5bf9\u4e1a\u52a1\u5f71\u54cd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9e\u9645\u4e0a\uff0c\u8fd9\u4e2a\u6f0f\u6d1e Jackson \u4eca\u5e74 2 \u6708\u4efd\u4e5f\u51fa\u73b0\u8fc7\u3002\u5177\u4f53\u6f0f\u6d1e\u7f16\u53f7\u4e3a\uff1aCVE-2020-8840\uff0c\u4f46\u8fd9\u4e2a\u6f0f\u6d1e\u5e94\u8be5\u662f\u5e76\u672a\u5f15\u8d77 Fastjson \u7684\u8db3\u591f\u91cd\u89c6\uff0c\u4ee5\u81f3\u4e8e\u5728 Fastjson \u4e0a\u4e5f\u53d1\u73b0\u4e86\u7c7b\u4f3c\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/gitee.com\/xmtblog\/img\/raw\/master\/2020\/WX20200531-095106.png\" alt=\"\" \/><figcaption>Fastjson \u7684 issue<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u622a\u6b62\u4eca\u5929\u53d1\u7a3f\u524d\uff0cFastjson \u6709 1322 \u4e2a issue\u3002\u548c\u4e0a\u6b21\u6587\u7ae0\u4e2d\u76841283 \u4e2a\u76f8\u6bd4\uff0c\u53c8\u589e\u52a0\u4e86\u4e0d\u5c11\uff0c\u8fd9\u8fd8\u4e0d\u7b97\u5176\u4e2d\u88ab\u5173\u95ed\u7684\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/gitee.com\/xmtblog\/img\/raw\/master\/2020\/WX20200531-095106.png\" alt=\"\" \/><figcaption>Jackson \u7684 issue<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u5927\u5bb6\u7cfb\u7edf\u4e2d\u6709\u91c7\u7528 Fastjson \u7684\uff0c\u5efa\u8bae\u81ea\u884c\u68c0\u67e5\uff0c\u8d76\u7d27\u4fee\u590d\u8d77\u6765\u3002\u5b98\u65b9\u7684 1.2.69 \u7248\u672c\uff0c\u9884\u8ba1\u5728\u4e0b\u5468\u4f1a\u51fa\u6765\u3002Fastjson \u7684\u73b0\u72b6\u4e0d\u5fcd\u76f4\u89c6\uff0c\u5efa\u8bae\u6709\u80fd\u529b\u7684\u53ef\u4ee5\u63d0 PR\u3002Jackson \u548c Gson \u8bf4\u4e0d\u5b9a\u548c\u6628\u5929 Consul \u4e00\u6837\uff0c\u67d0\u5929\u5b98\u65b9\u7a81\u7136\u6765\u4e2a\u5ba3\u5e03\uff0c\u7981\u6b62\u56fd\u5185\u4f7f\u7528 Jackson \u548c Gson \u5c31\u5c34\u5c2c\u4e86\uff0c\u6211\u4eec\u4f1a\u975e\u5e38\u7684\u88ab\u52a8\u7684\uff01<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=5017\">\u963f\u91cc\u5df4\u5df4 fastjson \u53c8\u53cc\u53d2\u53d5\u51fa\u6f0f\u6d1e\u4e86\uff01<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>5 \u6708 29 \u65e5\uff0c\u4e00\u5927\u65e9\u5c31\u5f97\u5230\u4e86\u6d88\u606f\uff0c\u963f\u91cc\u5df4\u5df4\u7684 fastjson \u53c8\u51fa\u6f0f\u6d1e\u4e86\u3002 \u7d27\u63a5\u7740\uff0c\u6ca1\u8fc7\u591a\u4e45\uff0c\u5f88\u591a\u5ba2\u6237\u53d1 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[358,415,354,355,243],"class_list":["post-5017","post","type-post","status-publish","format-standard","hentry","category-java","tag-admin","tag-fastjson","tag-sql","tag-xss","tag-243"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5017"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5017\/revisions"}],"predecessor-version":[{"id":5018,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5017\/revisions\/5018"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}