{"id":1218,"date":"2023-09-20T18:51:34","date_gmt":"2023-09-20T10:51:34","guid":{"rendered":"https:\/\/log.tanxiaodian.com\/?p=1218"},"modified":"2023-09-24T13:53:45","modified_gmt":"2023-09-24T05:53:45","slug":"%e5%af%b9discuz%e6%89%b9%e9%87%8f%e5%8f%91%e5%b8%96%e7%9a%84%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/log.tanxiaodian.com\/?p=1218","title":{"rendered":"\u5bf9Discuz\u6279\u91cf\u53d1\u5e16\u7684\u5206\u6790"},"content":{"rendered":"\n<p>\u7b2c\u4e00\u6b65\u5148\u6d4b\u8bd5\u65e0\u9644\u4ef6\u53d1\u5e16<br>\u6b63\u5e38\u53d1\u5e16\u6d41\u7a0b\u5206\u6790<br>\u8868\u5355forum.php?mod=post&amp;action=newthread&amp;fid=3&amp;extra=&amp;topicsubmit=yes<br>\u8868\u5355\u63d0\u4ea4\u6309\u94ae\u540d :topicsubmit<br>\u4ee3\u7801\u5bfb\u627e<br>upload\\source\\module\\forum\\forum_post.php<br>206\u884c\u5bf9\u83b7\u53d6\u4e3b\u9898\u548c\u5185\u5bb9\u7684\u5904\u7406:<br>$subject = isset($_GET[&#8216;subject&#8217;]) ? dhtmlspecialchars(censor(trim($_GET[&#8216;subject&#8217;]), NULL, FALSE, FALSE)) : &#8221;;<br>$subject = !empty($subject) ? str_replace(&#8220;\\t&#8221;, &#8216; &#8216;, $subject) : $subject;<br>$message = isset($_GET[&#8216;message&#8217;]) ? censor($_GET[&#8216;message&#8217;], NULL, FALSE, FALSE) : &#8221;;<br>$sortid = intval(getgpc(&#8216;sortid&#8217;));<\/p>\n\n\n\n<p>316\u884c:<\/p>\n\n\n\n<h2>require_once libfile(&#8216;post\/newthread&#8217;, &#8216;include&#8217;);<\/h2>\n\n\n\n<p>upload\\source\\include\\post\\post_newthread.php<br>142\u884c\u5f00\u59cb\u67e5\u770b\u63d0\u4ea4\u540e\u5904\u7406=======================================================<br>160\u884c\u6ce8\u610f\u7ec4\u88c5\u5b58\u50a8\u5bf9\u8c61<br>$params = array(<br>&#8216;subject&#8217; =&gt; $subject, \/\/\u6807\u9898<br>&#8216;message&#8217; =&gt; $message, \/\/ \u5185\u5bb9<br>&#8216;typeid&#8217; =&gt; $typeid,<br>&#8216;sortid&#8217; =&gt; $sortid, \/\/\u5206\u7c7bid \u5982\u679c\u5e16\u5b50\u662f\u5206\u7c7b\u4fe1\u606f\u578b\u5e16\u5b50<br>&#8216;special&#8217; =&gt; $special, \/\/\u7279\u6b8a\u4e3b\u9898~~\u5982\u6295\u7968\u6216\u81ea\u5b9a\u4e49<br>);<\/p>\n\n\n\n<p>180\u884c\u5bf9$params\u8865\u5145\u4e86:<br>$params[&#8216;publishdate&#8217;] = $publishdate;\/\/\u53d1\u5e03\u65f6\u95f4<br>$params[&#8216;save&#8217;] = $_GET[&#8216;save&#8217;];<br>$params[&#8216;sticktopic&#8217;] = getgpc(&#8216;sticktopic&#8217;);<br>$params[&#8216;digest&#8217;] = getgpc(&#8216;addtodigest&#8217;);<br>$params[&#8216;readperm&#8217;] = $readperm;<br>$params[&#8216;isanonymous&#8217;] = getgpc(&#8216;isanonymous&#8217;);<br>$params[&#8216;price&#8217;] = $_GET[&#8216;price&#8217;];<\/p>\n\n\n\n<p>231\u884c\u5bf9$params\u8865\u5145\u4e86:<br>$params[&#8216;typeexpiration&#8217;] = getgpc(&#8216;typeexpiration&#8217;);<br>$params[&#8216;ordertype&#8217;] = getgpc(&#8216;ordertype&#8217;);<br>$params[&#8216;hiddenreplies&#8217;] = getgpc(&#8216;hiddenreplies&#8217;);<br>$params[&#8216;allownoticeauthor&#8217;] = $_GET[&#8216;allownoticeauthor&#8217;];<br>$params[&#8216;tags&#8217;] = $_GET[&#8216;tags&#8217;];<br>$params[&#8216;bbcodeoff&#8217;] = getgpc(&#8216;bbcodeoff&#8217;);<br>$params[&#8216;smileyoff&#8217;] = getgpc(&#8216;smileyoff&#8217;);<br>$params[&#8216;parseurloff&#8217;] = getgpc(&#8216;parseurloff&#8217;);<br>$params[&#8216;usesig&#8217;] = $_GET[&#8216;usesig&#8217;];<br>$params[&#8216;htmlon&#8217;] = getgpc(&#8216;htmlon&#8217;);<\/p>\n\n\n\n<p>276\u548c277\u884c:<br>$modthread-&gt;attach_before_methods(&#8216;newthread&#8217;, $bfmethods);<br>$modthread-&gt;attach_after_methods(&#8216;newthread&#8217;, $afmethods);<br>$return = $modthread-&gt;newthread($params);<\/p>\n\n\n\n<p>\u6a21\u578b\u7c7b:source\/class\/model\/model_forum_thread.php<br>38\u884cpublic function newthread($parameters)<br><strong>61\u884c\u9632\u704c\u6c34\u9700\u8981\u6253\u6389<\/strong><br>if(checkflood()) {<br>return $this-&gt;showmessage(&#8216;post_flood_ctrl&#8217;, &#8221;, array(&#8216;floodctrl&#8217; =&gt; $this-&gt;setting[&#8216;floodctrl&#8217;]));<br>} elseif(checkmaxperhour(&#8216;tid&#8217;)) {<br>return $this-&gt;showmessage(&#8216;thread_flood_ctrl_threads_per_hour&#8217;, &#8221;, array(&#8216;threads_per_hour&#8217; =&gt; $this-&gt;group[&#8216;maxthreadsperhour&#8217;]));<br>}<\/p>\n\n\n\n<p>86\u884c:<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u4e3b\u9898\u5206\u7c7b\nif(!$this-&gt;param&#91;'typeid'] &amp;&amp; !empty($this-&gt;forum&#91;'threadtypes']&#91;'required']) &amp;&amp; !$this-&gt;param&#91;'special']) {\nreturn $this-&gt;showmessage('post_type_isnull');\n}    \n\/\/\u5206\u7c7b\u4fe1\u606f\n    if(!$this-&gt;param&#91;'sortid'] &amp;&amp; !empty($this-&gt;forum&#91;'threadsorts']&#91;'required']) &amp;&amp; !$this-&gt;param&#91;'special']) {\n        return $this-&gt;showmessage('post_sort_isnull');\n    }\n\n    \/\/\u7279\u6b8a\u4e3b\u9898\n    if(!$this-&gt;param&#91;'special'] &amp;&amp; $this-&gt;param&#91;'price'] &gt; 0 &amp;&amp; floor($this-&gt;param&#91;'price'] * (1 - $this-&gt;setting&#91;'creditstax'])) == 0) {\n        return $this-&gt;showmessage('post_net_price_iszero');\n    }<\/code><\/pre>\n\n\n\n<p>240\u884c\u7531\u4e8e\u662f\u65b0\u5e16\u53ea\u4f1a\u8fdbif\u4e0d\u4f1a\u8fdbelse:<br>if($this-&gt;param[&#8216;modnewthreads&#8217;]) {<br>updatemoderate(&#8216;tid&#8217;, $this-&gt;tid);<br>C::t(&#8216;forum_forum&#8217;)-&gt;update_forum_counter($this-&gt;forum[&#8216;fid&#8217;], 0, 0, 1);<br>manage_addnotify(&#8216;verifythread&#8217;);<br>return &#8216;post_newthread_mod_succeed&#8217;;<br>}<\/p>\n\n\n\n<p>\u7b2c\u4e8c\u6b65\u3001\u9644\u4ef6\u548c\u56fe\u7247\u5185\u5bb9<br>\u9644\u4ef6\u548c\u56fe\u7247\u5185\u5bb9\u7684\u731c\u6d4b:<br>\u5148\u4e0a\u4f20\u4e0a\u4f20\u5b8c\u6210\u8fd4\u56de\u9644\u4ef6id \u56fe\u7247id, \u7136\u540e\u7ec4\u88c5\u5185\u5bb9,\u7136\u540e\u8d70\u53d1\u5e16\u6d41\u7a0b<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u5173\u4e8ewebupload.js\u4e2dconsole.log(22) \u8f93\u51fa\u5bfc\u81f4SWFUpload\u00a0\u5bf9\u8c61\u9519\u8bef\u7684\u5224\u65ad<\/strong><\/p>\n\n\n\n<p>\u5f53\u6211\u4ee5if(2){ alert(2)} \u8fd9\u6837\u7684\u683c\u5f0f\u505a\u8f93\u51fa\u8bca\u65ad\u7684\u65f6\u5019\u4ee5\u4e0a\u9519\u8bef\u6d88\u5931\u4e86,\u90a3\u4e48\u6211\u5224\u65ad\u5e94\u8be5\u662fconsole.log(3) \u5bfc\u81f4js\u5bf9\u8c61\u683c\u5f0f\u9519\u4e86\uff0c\u800cif(3){dddd}\u8fd9\u6837\u7684\u683c\u5f0f\u521a\u597d\u9002\u5e94js\u5bf9\u8c61\u683c\u5f0f<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c\u4e00\u6b65\u5148\u6d4b\u8bd5\u65e0\u9644\u4ef6\u53d1\u5e16\u6b63\u5e38\u53d1\u5e16\u6d41\u7a0b\u5206\u6790\u8868\u5355foru&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/log.tanxiaodian.com\/?p=1218\">Continue reading<span class=\"screen-reader-text\">\u5bf9Discuz\u6279\u91cf\u53d1\u5e16\u7684\u5206\u6790<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[152],"_links":{"self":[{"href":"https:\/\/log.tanxiaodian.com\/index.php?rest_route=\/wp\/v2\/posts\/1218"}],"collection":[{"href":"https:\/\/log.tanxiaodian.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/log.tanxiaodian.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/log.tanxiaodian.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/log.tanxiaodian.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1218"}],"version-history":[{"count":2,"href":"https:\/\/log.tanxiaodian.com\/index.php?rest_route=\/wp\/v2\/posts\/1218\/revisions"}],"predecessor-version":[{"id":1221,"href":"https:\/\/log.tanxiaodian.com\/index.php?rest_route=\/wp\/v2\/posts\/1218\/revisions\/1221"}],"wp:attachment":[{"href":"https:\/\/log.tanxiaodian.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/log.tanxiaodian.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/log.tanxiaodian.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}