Use jquery encoder to solve the problem caused by XSS Script Injection, jqueryxss

Source: Internet
Author: User

Use jquery encoder to solve the problem caused by XSS Script Injection, jqueryxss

Symptom: the front-end receives a data (including html) tag in the background, automatically translates the tag into html page elements, and runs the script automatically, resulting in blocking of the front-end page.

The following code contains a large number of duplicated background data:

<Script> alert ("1"); </script> <button> I am but </button>

I learned about this xss attack.

But what is xss attack?

 Du Niang's explanation is a cross-site scripting attack. What I understand now is to intercept background requests and return a malicious script that can be executed on a page, paralyzing the web application interface and possibly causing greater harm, add (6.14 ).

 So how can we solve alert in the script that the page always executes?
After I found out that jquery encoder provides some column APIs to specifically solve similar problems. Then, the solution becomes a learning api, this is my favorite part in solving the problem.

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.