Hello,
I don't understand very well why in PHP there is this 2 lines :
if ($sha1_available) // There's an MD5 hash in the database, but SHA1 hashing is available, so we update the DB
$db->query('UPDATE '.$db->prefix.'users SET password=\''.$form_password_hash.'\' WHERE id='.$user_id) or error('Unable to update user password', __FILE__, __LINE__, $db->error());
}
(if the login is successfull).
It is designed to convert md5 passwords to sha1, that's ok, but why are those lines in login.php ? Does this update must be done on every login step ? I would have said that it has just to be done one time (admin maintenance operation).
About this conversion I too have "conceptual" difficulties with this on-the-fly conversion (I had troubles with this to use PEAR:Auth (which doesn't handle sha1, just crypt() and md5()) with punBB), wouldn't it be preferable to have this outside login.php ?