Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

It's weird that I only need to type in the first 70% part of the password to be cleared for access.

I used .htaccess and .htpasswd to set up the authentication. And it's more weird that when the password is actually abcabcabc123, I will be allowed access by a wrong password of abcabcabc124.

Why?

FYI, I use this snippet in PHP to generate password string to be used in .htpasswd:

// Password to be encrypted for a .htpasswd file
$clearTextPassword = 'abcabcabc123';

// Encrypt password
$password = crypt($clearTextPassword, base64_encode($clearTextPassword));

// Print encrypted password
echo $password;
share|improve this question

1 Answer 1

up vote 3 down vote accepted

Using htpasswd with DES means that your password can only be 8 characters long. Using MD5 removes this restriction.

Hope this helps!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.