How to obtain the Logon account and password in htpasswd Mode

Source: Internet
Author: User
Searching for information on the Internet is not so easy to find, but the solution is very simple: after the authentication is passed in the htpasswd browser, each request will contain the Authorization requestheader, after this header is directly decoded with the standard base64, the plaintext username and password will be obtained. This header will be passed through the proxy to the background, so the program can directly retrieve the header and decode it.

Searching for information on the Internet is not so easy to find, but the solution is very simple:

In htPasswdAfter the browser authentication is passed, each request will carry the Authorization request header. After decoding the header directly with the standard base64, the plaintext user name and password will be obtained ...... This header will be worn from the proxy to the background, so the program can get it directly, and the user name and password can be obtained through decoding.

However, this header will be sent for each request. In terms of security, it is too bad if https is not included. In some interception programs, this is equivalent to an explicit code.

Related Article

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.