{"id":199411,"date":"2025-05-03T08:49:38","date_gmt":"2025-05-03T00:49:38","guid":{"rendered":"https:\/\/server.hk\/cnblog\/199411\/"},"modified":"2025-05-03T08:49:38","modified_gmt":"2025-05-03T00:49:38","slug":"%e4%bf%ae%e5%a4%8decshop%e6%9f%a5%e8%af%a2this-sql-may-contain-updatedeletetruncat%e6%8a%a5%e9%94%99","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/199411\/","title":{"rendered":"\u4fee\u590decshop\u67e5\u8be2this sql May contain UPDATE,DELETE,TRUNCAT\u62a5\u9519"},"content":{"rendered":"<p style=\"margin: 5px 0px;line-height: 18px\"> \u5e02\u9762\u4e0a\u76db\u884c\u7684\u7edd\u5927\u90e8\u5206ECSHOP\u6a21\u677f\uff0c\u5b89\u88c5\u7684\u65f6\u5019\u90fd\u9700\u8981\u5c65\u884c\u4e00\u6bb5\u6216\u51e0\u6bb5SQL\u53e5\u5b50\u6765\u4fee\u6b63\u6570\u636e\u7ed3\u6784\u6216\u8bb8\u521d\u59cb\u5316\u4e00\u4e9b\u6570\u636e\u3002<br \/> \u5927\u591a\u6570ECSHOP\u7ba1\u7406\u5458\u4e3a\u4e86\u7701\u52b2\uff0c\u90fd\u4f1a\u901a\u8fc7&nbsp;\u201cECSHOP\u540e\u53f0\u300b\u6570\u636e\u5e93\u7ba1\u7406 \u300bSQL\u67e5\u8be2\u201d \u6765\u5c65\u884c\u8fd9\u4e9bSQL\u53e5\u5b50\u3002<br \/> \u8fd9\u65f6\u95ee\u9898\u5c31\u6765\u4e86\uff0c\u5f53\u4f60\u7c98\u8d34\u8fdbSQL\u53e5\u5b50\uff0c\u70b9\u201c\u63d0\u4ea4\u67e5\u8be2\u201d\u65f6\uff0c\u4f53\u7cfb\u5c31\u4f1a\u62a5\u51fa\u4e0b\u9762\u7684\u8fc7\u9519\uff1a<br \/> this sql May contain UPDATE,DELETE,TRUNCATE,ALTER,DROP,FLUSH,INSERT,REPLACE,SET,CREATE,CONCAT<\/p>\n<p style=\"margin: 5px 0px;line-height: 18px\"> \u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p style=\"margin: 5px 0px;line-height: 18px\"> <img decoding=\"async\" src=\"https:\/\/www.ldhost.cn\/helphmb\/uploads\/allimg\/150702\/11355LS7-0.png\" style=\"border: 0px;width: 700px;height: 144px\" class=\"aligncenter\"><\/p>\n<p style=\"margin: 5px 0px;line-height: 18px\"> \u7559\u610f\uff1a<\/p>\n<p style=\"margin: 5px 0px;line-height: 18px\"> \u4e0a\u8ff0\u8fc7\u9519\u53ea\u8981\u5728\u6253\u4e86ECSHOP2.7.3\u6700\u65b0\u8865\u4e01\u7684\u4f53\u7cfb\u4e0b\u624d\u4f1a\u5448\u73b0\uff0c\u5982\u679c\u60a8\u7684ECSHOP\u4f53\u7cfb\u6ca1\u6709\u6253\u6700\u65b0\u8865\u4e01\uff0c\u662f\u4e0d\u4f1a\u5448\u73b0\u8fd9\u4e2a\u8fc7\u9519\u63d0\u793a\u3002<\/p>\n<p style=\"margin: 5px 0px;line-height: 18px\"> \u4e0b\u9762\u6765\u8bf4\u4e00\u4e0b\u8fc7\u9519\u539f\u56e0\uff1a<br \/> \u4e4b\u6240\u4ee5\u4f1a\u5448\u73b0\u4e0a\u9762\u7684\u8fc7\u9519\u63d0\u793a\uff0c\u662f\u56e0\u4e3aECSHOP2.7.3\u6700\u65b0\u8865\u4e01\u6587\u4ef6\uff0c\u5bf9ECSHOP\u540e\u53f0\u7684\u201cSQL\u67e5\u8be2\u201d\u529f\u80fd\u505a\u4e86\u7ea6\u675f\uff0c<br \/> \u53ea\u5141\u8bb8\u5c65\u884c select \u67e5\u8be2\u53e5\u5b50\uff0c\u9664select\u4ee5\u5916\u7684\u522b\u7684\u67e5\u8be2\u53e5\u5b50\uff0c\u6bd4\u5982 alter, update, delete, truncate\u7b49\u4e4b\u7c7b\u7684SQL\u53e5\u5b50\u90fd\u662f\u88ab\u5236\u6b62\u5c65\u884c\u7684\u3002<br \/> \u4e8c\uff09\u3001<br \/> \u4e0b\u9762\u518d\u6765\u8bf4\u4e00\u8bf4\u89e3\u51b3\u65b9\u6cd5\uff1a<br \/> \u7ffb\u5f00 admin\/sql.php &nbsp;\u627e\u5230\u4e0b\u9762\u8fd9\u6bb5\u4ee3\u7801\uff0c\u5220\u6389\u5373\u53ef<\/p>\n<table cellpadding=\"5\" cellspacing=\"0\" style=\"border-collapse: collapse\">\n<tbody>\n<tr>\n<td style=\"line-height: 1.5\"> if(!empty($_POST[&#8216;sql&#8217;]))<br \/> {<br \/> preg_match_all(&#8220;\/(SELECT)\/i&#8221;, $_POST[&#8216;sql&#8217;],$matches);<br \/> if(isset($matches[1]) &amp;&amp; count($matches[1])&gt;1)<br \/> {<br \/> sys_msg(&#8220;this sql more than one SELECT &#8220;);<br \/> }<br \/> if(preg_match(&#8220;\/(UPDATE|DELETE|TRUNCATE|ALTER|DROP|FLUSH|INSERT|REPLACE|SET|CREATE|CONCAT)\/i&#8221;, $_POST[&#8216;sql&#8217;]))<br \/> {<br \/> sys_msg(&#8220;this sql May contain UPDATE,DELETE,TRUNCATE,ALTER,DROP,FLUSH,INSERT,REPLACE,SET,CREATE,CONCAT &#8220;);<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5e02\u9762\u4e0a\u76db\u884c\u7684\u7edd\u5927\u90e8\u5206ECSHOP&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-199411","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=199411"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199411\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=199411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=199411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=199411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}