Recommended 10 anti-XSS effects (favorites)

Source: Internet
Author: User
function Gjj ($str) {$farr = Array ("/\\s+/", "/< (\\/?)" (script|i?frame|style|html|body|title|link|meta|object|\\?| \\%) ([^>]*?) >/isu ","/(<[^>]*) on[a-za-z]+\s*= ([^>]*>

1. PHP anti-XSS anti-SQL injection code

Description: Function Gjj ($str) {$farr = Array ("/\\s+/", "/< (\\/?)" (script|i?frame|style|html|body|title|link|meta|object|\\?| \\%) ([^>]*?) >/isu ","/(<[^>]*) on[a-za-z]+\s*= ([^>]*>)/isu&quot

2. JavaScript-Rich text editor how to prevent XSS injection?

Summary: If you want to prevent XSS injection from filtering HTML tags, the Rich text Editor's functionality is gone, filtered together, and if you keep HTML, you can't prevent XSS injection. How does normal usually deal with this problem??? Filter only specific tags???

3. thinkphp using the I () function to filter the problem


But the data I want to pass in is the content of the HTML online editor.

Introduction: I use TP, in the settings can set the function I () filter method but I want to pass in the data with the HTML online editor content can contain legitimate tags, such as &lt;li&gt;&lt;/li&gt; To prevent XSS attacks, the I function sets the default filter to Htmlspecialchars ...

4. How to improve security for H5 pages embedded in the app

Summary: In case of being caught, or changing the app's data, how to improve security, anti-XSS attacks, such as anti-SQL injection.

5. &quot; Perfect &quot; anti-XSS anti-SQL injection Code Spray

Introduction:&amp;quot; Perfect &amp;quot; anti-XSS anti-SQL injection Code Spray

6. Anti-XSS attack and SQL injection in PHP _php tutorial

Introduction: Anti-XSS attacks and SQL injection in PHP. This article simply describes the anti-XSS attacks in PHP and SQL injection in detail, you need to understand the friends can refer to the next. The XSS attack code is as follows to copy code arbitrary code package execution

7. Some security prevention issues in PHP build Justice _php Tutorial

Summary: Some security prevention issues in PHP are justified. As long as we have done all kinds of operations can be basic to prevent some friends to use the site itself, the vulnerability of Web site operations, many in PHP, such as XSS with htmlentities () to prevent XSS attacks also

8. XSS Defense PHP using HttpOnly anti-XSS attack _php Tutorial

Introduction: XSS Defense PHP uses httponly anti-XSS attacks. The concept of XSS does not have to say, its harm is great, which means that once your website has an XSS vulnerability, you can execute arbitrary JS code, the most frightening is the attacker to use JS to get

9. PHP prevention of XSS attacks, Ajax cross-domain attack method _php Tutorial

Introduction: PHP Prevention of XSS attacks, Ajax cross-domain attack method. There are many ways to launch an XSS attack on your Web site, and just using some of the built-in filter functions of PHP is not a good deal, even if you will Filter_var,mysql_real_escape_string,htmlentities,htmlspec

PHP "Perfect" anti-XSS anti-SQL injection Code Spray

Introduction: PHP Tutorials

"Related question and answer recommendation":

PHP-About preventing XSS attacks, HTML encoding when user input? HTML encoding for page output? Which plan is better?

PHP-How to improve security for H5 pages embedded in your app

Thinkphp using the I () function to filter the problem

How does JavaScript-rich text editor prevent XSS injection?

Node.js-react not natural anti-XSS?

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.