1

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;
datasn.io
  • 279
  • 1
  • 5
  • 16

1 Answers1

3

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

Hope this helps!

Andrew M.
  • 11,182
  • 2
  • 35
  • 29