contao/core

Remove support for deprecated user password hashes

ausi opened this issue · 2 comments

ausi commented

We should remove support for sha1 passwords in

// Handle old sha1() passwords with an optional salt
if (preg_match('/^[a-f0-9]{40}(:[a-f0-9]{23})?$/', $this->password))
{
list($strPassword, $strSalt) = explode(':', $this->password);
$blnAuthenticated = ($strPassword === sha1($strSalt . \Input::postUnsafeRaw('password')));
}

If someone gets read access to the database, they could brute-force the password of a backend user that has still a sha1 password hash. With the password they could then overtake the server.

Removing support shouldn’t be a problem as it only affects users that didn’t log in for a very long time.

I have created a PR for Contao 4.6 here: contao/core-bundle#1602

Fixed in d11a21b.