Recently encountered discuz some problem solving methods

Source: Internet
Author: User

  • "Sorry, your request was not routed correctly or the form validation string did not match, unable to submit"
    Open "Source\class\helper\helper_form.php" and then "$_get[' formhash '] = = Formhash ()" modified to "$_g[' formhash '] = = Formhash () "

  • Your current access request contains illegal characters that have been rejected by the system
    Find the discuz_application.php replacement for \source\class\discuz
    Privatefunction _xss_check () {Static$check = Array ('"','>','<','\ '','(',')','content-transfer-encoding'); if(Isset ($_get['Formhash']) && $_get['Formhash'] !==Formhash ()) {System_error ('request_tainting'); }                if($_server['Request_method'] =='GET') {$temp= $_server['Request_uri']; } elseif (Empty ($_get['Formhash']) {$temp= $_server['Request_uri'].file_get_contents ('Php://input'); } Else{$temp="'; }                if(!empty ($temp)) {$temp=Strtoupper (UrlDecode (UrlDecode ($temp))); foreach($check as$str) {                                if(Strpos ($temp, $STR)!==false) {System_error ('request_tainting'); }                        }                }                return true; }

    To be replaced by:

    Privatefunction _xss_check () {$temp= Strtoupper (UrlDecode (UrlDecode ($_server['Request_uri']))); if(Strpos ($temp,'<') !==false|| Strpos ($temp,'"') !==false|| Strpos ($temp,'content-transfer-encoding') !==false) {System_error ('request_tainting'); }                return true; }

Recently encountered discuz some problem solving methods

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.