
內容簡介
這個外掛提供 反射型 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: This happens when harmful scripts are hidden in a website’s URL. If a user clicks a link with such a script, it can run in their browser, potentially stealing their data or taking control of their system.
Self-XSS: This occurs when a user’s own input on your website is displayed back to them in an unsafe way, allowing malicious scripts to run in their browser.
This plugin provides several layers of protection:
Blocking: When active, the plugin checks URLs for specific characters. If it finds any of these characters in the URL, it redirects the user to prevent a potential XSS attack. You can customize which characters to block or allow.
Opening Round Bracket (
Closing Round Bracket )
Less than Sign <
Greater than Sign >
Opening Square Bracket [
Closing Square Bracket ]
Opening Curly Bracket {
Pipe or Vertical Bar |
Closing Curly Bracket }
Encoding: For an extra layer of security, the plugin encodes certain characters found in URL parameters. This stops harmful code from running, even if it’s present in the URL. You can also choose to exclude specific parameters from being encoded.
Exclamation Mark !
Double Quotation "
Single Quotation '
Opening Round Bracket (
Closing Round Bracket )
Asterisk Sign *
Less than Sign <
Greater 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 makes HTML characters safe within the $_GET variable. This is vital if your website pulls data from URLs and displays it as part of your web page. It helps prevent malicious scripts from being injected through user-provided input.
Important Notes:
After activating the plugin, thoroughly test your website forms, especially if you use WooCommerce. Make sure the plugin doesn’t interfere with your shopping cart and checkout processes.
We welcome bug reports for this plugin on GitHub: https://github.com/samiahmedsiddiqui/prevent-xss-vulnerability/issues. Please remember that GitHub is for bug reports only, not general support.
By using this plugin and following these recommendations, you can significantly improve your website’s defense against XSS attacks.
