How can I solve this problem when xss bypasses the htmlspecialchars filtering principle?
Source: Internet
Author: User
Ask xss to bypass the htmlspecialchars filtering principle and check the website security recently. When we see xss, some documents say that it is very easy to bypass htmlspecialchars filtering. Which of the following methods can bypass htmlspecialchars to attack the website? how can we prevent xss from bypassing the htmlspecialchars filter principle?
Recently, I am looking at website security. When we see xss, some documents say that it is very easy to bypass htmlspecialchars filtering. Which of the following methods can bypass htmlspecialchars to attack the website? how can this problem be prevented? It is best to give a systematic summary.
------ Solution --------------------
Which of the following methods can be used to bypass htmlspecialchars filtering.
------ Solution --------------------
I want to know how to bypass this.
------ Solution --------------------
The core of XSS attacks is to execute Javascript scripts by HTML script tags or element attributes.
Htmlspecialchars can be used to turn the meaning <> so that the script tag cannot be used for attacks. At the same time, double quotation marks and single quotation marks can be filtered out (additional parameters are required) to prevent the event execution script from being triggered by Element attributes.
------ Solution --------------------
To be honest, you are a little worried. you should try his code.
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