mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
only update password to salted if database field is long enough
git-svn-id: http://www.observium.org/svn/observer/trunk@1939 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -11,7 +11,12 @@ function authenticate($username,$password)
|
||||
// Migrate from old, unhashed password
|
||||
if ($row['password'] == $encrypted_old)
|
||||
{
|
||||
changepassword($username,$password);
|
||||
$query = mysql_query("DESCRIBE users password");
|
||||
$row = mysql_fetch_assoc($query);
|
||||
if ($row['Type'] == 'varchar(34)')
|
||||
{
|
||||
changepassword($username,$password);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if ($row['password'] == crypt($password,$row['password']))
|
||||
|
Reference in New Issue
Block a user