Address: http://kdweibo.com/home click in turn: Login --> Forgot login password and then login to the mailbox to check whether the reset link has defects can be seen, the request link has u and t parameters: Try several times can be observed, u is fixed, probably a string related to userName, and t is a regular increase. Then I tried to reset the password and found that the u parameter was useless. THE post request only sent one t parameter and the new password in the form. For example: Well, now we will study this t parameter. On the first page of password retrieval, I submitted my email address several times in a row and obtained 5 password reset links. I listed them below and observed them, the t parameter only has 5-8 bits and the last 4 bits, both of which are auto-incrementing. The variation range is related to the time. It is preliminarily determined that the t parameter is only generated based on the server's timestamp. From this, you can easily guess this t parameter, make a demonstration: Suppose I want to reset the password of this person, his mailbox is target@163.com and my own mailbox is me@163.com, I can do this: 1. on the first page of password retrieval, submit my own mailbox me@163.com 2. then submit the target mailbox target@163.com several times in a row 3. once again I submitted my own mailbox me@163.com at this time my mailbox changed to receive a previous two t parameters: 52df 773f 24ac5b651d28 8d42 52df 774d 24ac5b651d28 8d54 the token received by the target must be an even number between 8d44-8d52 and the last four digits after 7740-774c, try again several times to test the target user's password reset link: After the password is reset, the target user's Weibo homepage is automatically displayed:
Solution:1. random Code should not be easily mined, or encrypted by using dynamic key encryption (that is, the value of the Verification Code cannot be constructed if others know the random code rule.) 2. the link reset failure mechanism can be further improved. The old link is valid when a new reset link is received.