UsePHPConstructedWebHow can applications avoidXSSAttackThe development of Web 2.0 provides more opportunities for interactions between network users. Users may intentionally or unintentionally enter some destructive content by posting comments on a
Update20151202: Thank you for your attention and answers. The defense methods I have learned from various methods are as follows: PHP outputs html directly, and the following methods can be used for filtering: {code ...} if PHP is output to JS Code
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
Transferred from: http://www.uml.org.cn/Test/201407161.aspXSS vulnerability testing of Web applications cannot be limited to entering XSS attack fields on Web pages and submitting them. Bypassing JavaScript detection, entering an XSS script, usually
Main content
What is XSS? {: &.movein}
What are the dangers of XSS?
Common XSS Vulnerabilities
How to prevent XSS?
What is XSS?
Cross Site scripting attacks (Scripting), a WEB application vulnerability, is
Xss: cross-site Scripting attacks, attackers, a piece of malicious code mosaic to the Web page, when users browse the page, the embedded page of malicious code will be executed, so as to reach the purpose of attacking Users.The focus is on scripting,
The functions of the Htmlspecialchars () function are as follows:The Htmlspecialchars () function converts pre-defined characters to HTML entities.The predefined characters are:
& (and number) becomes &
"(double quotes) becomes"
'
0x00 Preface
At the beginning of the article, I 'd like to apologize for the article (about the inheritance of cross-origin character sets) that was recently published with an outrageous conclusion but was deleted in a timely manner. I also hope
Talking about PHP security and anti-SQL injection, prevent XSS attack, anti-theft chain, anti-CSRF
Objective:
First of all, the author is not a web security experts, so this is not a Web security expert-level article, but learning notes, careful
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.