Tencent Weibo private message interface storage XSS and repair

Source: Internet
Author: User

1. Send a private message with the following content:


2. Of course, direct access to private messages is not a problem, but there are two json interfaces related to private messages.

The following interface is used to return the number of users with private messages, and the colleague returns the last private message, including the number of returned records:
Http://api.t.qq.com/inbox/pm_list.php

The following interface returns and specifies the user's private message content, including the number of returned records:
Http://api.t.qq.com/inbox/pm_conversation.php? Account = xxx </code>

3. Because the Content-Type returned by the above two interfaces is text/html, charset = UTF-8, and oc in the returned private message json data is also private message Content, but it is not encoded, the direct output is: . This vulnerability may occur.


Send a private message to a user, but find a way to access the interface address.

 

 

 

Solution:
1. Specify Content-Type as application/json; charset = UTF-8
2. html encoding of oc values

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.