Speculation on the failure of the code verification of Baidu Network disk

Source: Internet
Author: User

The emergence of Baidu cloud disk for the storage and sharing of network resources provides a platform, and because of the protection of the privacy of users, Baidu Cloud disk then limited only to enter the appropriate extraction code to access the shared files.

But recently in the Baidu Cloud disk resource extraction encountered a strange problem: If you open a number of resources to share the link and enter the extraction code, then click on each resource's "Download Resources" or "Save to the network disk", some resources will appear "extraction code Error" prompt.

Then tested several times, still appeared a similar hint, in order to find out the cause of the error, I re-adjusted the extraction of Baidu cloud disk resources operating procedures:

1) Open the Baidu Cloud Disk resource sharing link in turn;

2) After entering the first link extraction code, directly click "Download" or "Save the network disk";

3) Repeat step 2, enter the next link and then download the operation;

and according to the above 3 steps, the original error occurred in the prompt but did not appear, which indicates the right extract code is able to download resources, so I guess this error is not because of the reason to save the code?

Then you need to know that its extraction code will be placed there, in general, in order to maintain user access status, to avoid repeated input of the same authentication or access warrants, the site likes to put the first saved validation into an object in the session.

The concept of the session

How the session works① When a session is first enabled, a unique identifier is stored in a local cookie. ② First uses the Session_Start () function, and PHP loads the stored session variables from the session repository. ③ When executing a PHP script, register the session variable by using the Session_register () function. ④ when the PHP script executes, the non-destroyed session variable is automatically saved in the session library under the local path, which can be specified by Session.save_path in the php.ini file and can be loaded the next time the page is browsed. in order to verify that the session can be disturbed, it is necessary to find the session object of each resource webpage, the result is that the session name of the resource pages is exactly the same, that is to say, these pages save the extract code using the same session object, and its value is not the same. By This step, you can explain the reasons for the error that occurred following the previous action.

Speculation on the failure of the code verification of Baidu Network disk

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.