javascript - 瀏覽器請求伺服器遇到412報錯,咋回事?

來源:互聯網
上載者:User
關鍵字 javascript php http
我做一個產生html頁面的功能,在瀏覽器準備好需要產生頁面的html代碼,以post方式,html代碼作為參數傳給產生頁面功能的php檔案,php拿這些html代碼進行寫檔案操作並且返回該檔案路徑,瀏覽器收到路徑跳轉到產生後的頁面。

我在本機伺服器很正常沒有報錯,在外網伺服器卻報了412錯誤,報錯內容如下:

412 ErrorYour request got filtered out due to possible security issues.One or more things in your request were suspicious (defective request header, invalid cookies, bad parameters)If you think you did nothing wrong:try again with a different browseravoid any evil characters inside the request urlIf you are the owner of the website, you can consider revising the rules of the mod_security module or turning it off from your Web Hosting Control Panel.

回複內容:

我做一個產生html頁面的功能,在瀏覽器準備好需要產生頁面的html代碼,以post方式,html代碼作為參數傳給產生頁面功能的php檔案,php拿這些html代碼進行寫檔案操作並且返回該檔案路徑,瀏覽器收到路徑跳轉到產生後的頁面。

我在本機伺服器很正常沒有報錯,在外網伺服器卻報了412錯誤,報錯內容如下:

412 ErrorYour request got filtered out due to possible security issues.One or more things in your request were suspicious (defective request header, invalid cookies, bad parameters)If you think you did nothing wrong:try again with a different browseravoid any evil characters inside the request urlIf you are the owner of the website, you can consider revising the rules of the mod_security module or turning it off from your Web Hosting Control Panel.

mod_security 伺服器這個模組,阻止了這次請求,因為可能會有安全性漏洞,例如xss。

  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.