前言介紹
- 這款 WordPress 外掛「Prevent XSS Vulnerability」是 2017-08-22 上架。
- 目前有 7000 個安裝啟用數。
- 上一次更新是 2024-12-23,距離現在已有 131 天。
- 外掛最低要求 WordPress 3.5 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
- 有 7 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
xss | attack | security | vulnerability | cross-site scripting |
內容簡介
這個外掛提供 反射型 XSS 和 自我 XSS 的功能。
對於反射型 XSS,如果您啟用了 啟用阻擋 選項,並且 URL 包含任何易受攻擊的代碼,它會檢查 URL 並重新導向它。它只會阻擋一些不允許在 URL 中使用的參數,並顯示阻擋參數部分。如果您仍然希望使用某些參數,則可以從中跳過一些參數。
為了提供更多安全,防止 XSS 漏洞 還會對 $_GET 參數中的 HTML 進行轉義。這是 PHP 用於從 URL 中獲取參數並在 HTML 中打印它們的常用方法。這樣,如果有人在 URL 中提供 HTML 屬性,它將不起作用。
插件可以以許多方式進行測試,但根據其結構和開發功能的不同,它會有所不同。
阻擋參數
如果已從插件設置頁面啟用,則 防止 XSS 漏洞 會阻擋 URL 中的以下參數。
開始圓括號 (
結束圓括號 )
小於符號 <
大於符號 >
開始方括號 [
結束方括號 ]
開始花括號 {
管道符或垂直條 |
結束花括號 }
您可以從插件設置頁面中排除任何預定義的參數或包括任何其他參數。
編碼參數
如果已從插件設置頁面啟用,則 防止 XSS 漏洞 會在 URL 中編碼以下參數。
驚嘆號 !
雙引號 "
單引號 '
開始圓括號 (
結束圓括號 )
星號 *
小於符號 <
大於符號 >
重音符號 `
caret 符號 ^
開始方括號 [
結束方括號 ]
開始花括號 {
管道符或垂直條 |
結束花括號 }
您可以從插件設置頁面中排除任何預定義參數的編碼。
在 `$_GET` 變量中轉義 HTML
防止 XSS 漏洞在 `$_GET` 變量中轉義 HTML。`$_GET` 變量通常用於從 URL 中獲取值並將其放入 HTML。如果您的站點從 URL 中取得任何內容並在 HTML 中打印它,此檢查非常有用。它保護您的搜索和其他部分,根據您的站點功能。
注意:在啟用插件後,請務必檢查您的表單,如果您有 WooCommerce 網站,請還要檢查購物車和結帳流程。
錯誤報告
感謝使用者在 GitHub 上發布 防止 XSS 漏洞 的錯誤報告。請注意,GitHub 不是支持論壇,未經適當驗證為錯誤的問題將被關閉。
原文外掛簡介
This plugin helps safeguard your website against two common types of Cross-Site Scripting (XSS) vulnerabilities:
Reflected XSS: In Reflected XSS, malicious scripts are injected into the URL of a website. When a user clicks on a link containing this malicious script, it can be executed on their browser, potentially stealing their information or compromising their system.
Self-XSS: This occurs when a user’s own input on the website is reflected back to them in an insecure manner, allowing malicious scripts to be executed in their browser.
This plugin provides several layers of protection:
Blocking: When enabled, the plugin scans URLs for specific parameters. If any of the listed parameters are found in the URL, the plugin redirects the user to prevent potential XSS attacks. You can customize the list by excluding specific parameters you still want to allow.
Opening Round Bracket (
Closing Round Bracket )
Less than Sign
Opening Square Bracket [
Closing Square Bracket ]
Opening Curly Bracket {
Pipe or Vertical Bar |
Closing Curly Bracket }
Encoding: For additional security, the plugin encodes certain characters within the URL parameters. This prevents malicious code from being executed even if it’s included in the URL. You can also exclude specific parameters from being encoded.
Exclamation Mark !
Double Quotation "
Single Quotation '
Opening Round Bracket (
Closing Round Bracket )
Asterisk Sign *
Less than Sign
Grave Accent “`
Cap Sign ^
Opening Square Bracket [
Closing Square Bracket ]
Opening Curly Bracket {
Pipe or Vertical Bar |
Closing Curly Bracket }
Escaping HTML in $_GET: This plugin automatically escapes HTML characters within the $_GET variable. This is crucial if your website retrieves data from URLs and displays it in the HTML content. This helps prevent malicious scripts from being injected through user-controlled input.
Important Notes:
After activating the plugin, thoroughly test your website forms, especially if you use WooCommerce. Ensure the plugin doesn’t disrupt your cart and checkout processes.
Bug reports for this plugin are welcome on GitHub: https://github.com/samiahmedsiddiqui/prevent-xss-vulnerability/issues. Please note that GitHub is not a support forum, and only genuine bug reports will be addressed.
By implementing this plugin and following the recommendations, you can significantly enhance your website’s security against XSS attacks.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Prevent XSS Vulnerability」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1 | 0.2 | 0.2.1 | 0.3.0 | 0.3.1 | 0.3.2 | 0.3.3 | 0.3.4 | 0.3.5 | 1.0.0 | 2.0.0 | 2.0.1 | 2.0.2 | trunk |
延伸相關外掛(你可能也想知道)
Basic Security: Prevent Cross Site Scripting 》這個外掛可以透過簡短的程式碼,幫助防止跨站腳本攻擊 (Cross Site Scripting, XSS), 啟用後即可運作,不需要設定,也不會影響網站效能。, 雖然不能完全避免...。