I am wondering how the Apache server authenticates me with .htpasswd
I have a .htpasswd
file inside a folder. The .htpasswd
content is generated with php and the password is encrypted with the crypt()
function like this:
crypt($password,mb_substr($password,0,2));
The problem is that no matter which salt I use: mb_substr($password,0,2)
or my_private_salt
or 'whatever' the server will always authenticate me if I pass the correct username/password combination.
So, what's the point with that salt?
Thanks