2016-02-03 XSS Vulnerability

Source: Internet
Author: User

An XSS vulnerability has occurred on the application. is caused by an XSS vulnerability in one of the fields returned by the Ajax interface of a GET request. The field was meant to be shown, but the patch was stripped of the display, and the interface was returned. Now that we have an XSS vulnerability, some of my colleagues are not quite sure why this field I'm returning does not show, and it can cause an XSS bug?

In fact, I understand his meaning, the returned field is not used, it is not put into the page (not with the label in the page caused an XSS vulnerability), and did not execute (really did not do it?). ), why does it appear?

I understood at the time that although it was not put into the page, the browser would still do some processing of the interface's return data. Further check the information, if Content-type is text/html, then the return data is definitely to be executed, for JSONP, if Content-type is Application/javascript browser will not go to execute. So my guess might be right, which means the browser will do some processing on the data, depending on content-type, or some other field. I looked at the HTTP request field for our interface, Content-type is the Application/json type.

Here, there is not enough knowledge about the type of XSS. There is not enough insight into Ajax requests. I'd like to take a look at this recently and record my thoughts here.

  

PostScript: Before always thinking, why do you share it, why do you take notes, what is good to share? Everybody read a material not all understand?

Today, we understand that the degree of understanding is different for the same problem. And a problem to be thoroughly understood, requires in-depth learning and practice, this is not everyone will do.

So you need to share and take notes.

                              

2016, come on!

  

2016-02-03 XSS Vulnerability

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.