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;
link|improve this question

feedback

1 Answer

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!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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