<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                > 永遠不要相信用戶提交的數據! ## 安全開發指導 1. 參考ThinkPHP官方[安全指導](http://www.hmoore.net/manual/thinkphp5/268461) 2. 過濾用戶輸入的內容,Tkview提供了html安全過濾方法`htmlpurifier()` 比如:`$html = htmlpurifier(request()->post('content'))` 或者:`$html = request()->post('content', '', 'htmlpurifier')` 也可以加在TP的默認過濾規則,如何設置默認過濾規則請參考ThinkPHP官方文檔 3. 前端過濾可以使用`filterXSS()` ``` <script> // apply function filterXSS in the same way var html = filterXSS('<script>alert("xss");</scr' + 'ipt>'); alert(html); </script> ``` 更多用法,請參考:<https://github.com/leizongmin/js-xss/blob/master/README.zh.md> > 以上方法僅作為安全輔助,沒有一勞永逸的方法可以防止所有攻擊。要做好數據檢查,選用合適的過濾方法。 ### 禁止訪問敏感目錄 為了安全考慮,可以將一些敏感目錄設置為禁止訪問。 【Nginx】 在Nginx配置文件中,加入以下規則 ``` location ^~ /data { deny all; } location ^~ /runtime { deny all; } location ^~ /export { deny all; } location ^~ /application { deny all; } location ^~ /plugins { deny all; } location ^~ /thinkphp { deny all; } location ^~ /vendor { deny all; } ``` 【Apache】 在框架根目錄的.htaccess文件加入以下規則 ``` RewriteRule ^data - [F,L] RewriteRule ^runtime - [F,L] RewriteRule ^export - [F,L] RewriteRule ^application - [F,L] RewriteRule ^plugins - [F,L] RewriteRule ^thinkphp - [F,L] RewriteRule ^vendor - [F,L] ``` 完整內容 ``` <IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] RewriteRule ^data - [F,L] RewriteRule ^runtime - [F,L] RewriteRule ^export - [F,L] RewriteRule ^application - [F,L] RewriteRule ^plugins - [F,L] RewriteRule ^thinkphp - [F,L] RewriteRule ^vendor - [F,L] </IfModule> ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看