mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
- Fixed bug #102: regression introduced with the encoding of passwords: users were no longer able to change their own password...
SVN:trunk[778]
This commit is contained in:
@@ -380,12 +380,6 @@ EOF
|
||||
$oPage->output();
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remember the changed password
|
||||
$_SESSION['auth_pwd'] = $sNewPwd;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
self::Login();
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
// Class: UserLocal
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Class:UserLocal' => 'Utilisateur iTop',
|
||||
'Class:UserLocal+' => 'Utilisateur authentifié par iTop',
|
||||
'Class:UserLocal/Attribute:password' => 'Mot de passe',
|
||||
|
||||
@@ -56,10 +56,6 @@ class UserLocal extends UserInternal
|
||||
|
||||
public function CheckCredentials($sPassword)
|
||||
{
|
||||
// if ($this->Get('password') == $sPassword)
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
$oPassword = $this->Get('password'); // ormPassword object
|
||||
// Cannot compare directly the values since they are hashed, so
|
||||
// Let's ask the password to compare the hashed values
|
||||
@@ -89,7 +85,10 @@ class UserLocal extends UserInternal
|
||||
|
||||
public function ChangePassword($sOldPassword, $sNewPassword)
|
||||
{
|
||||
if ($this->Get('password') == $sOldPassword)
|
||||
$oPassword = $this->Get('password'); // ormPassword object
|
||||
// Cannot compare directly the values since they are hashed, so
|
||||
// Let's ask the password to compare the hashed values
|
||||
if ($oPassword->CheckPassword($sOldPassword))
|
||||
{
|
||||
$this->Set('password', $sNewPassword);
|
||||
$oChange = MetaModel::NewObject("CMDBChange");
|
||||
@@ -103,6 +102,7 @@ class UserLocal extends UserInternal
|
||||
$sUserString = UserRights::GetUser();
|
||||
}
|
||||
$oChange->Set("userinfo", $sUserString);
|
||||
$oChange->DBInsert();
|
||||
$this->DBUpdateTracked($oChange);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ SetupWebPage::AddModule(
|
||||
),
|
||||
'dictionary' => array(
|
||||
'en.dict.authent-local.php',
|
||||
'fr.dict.authent-local.php',
|
||||
),
|
||||
'data.struct' => array(
|
||||
//'data.struct.authent-local.xml',
|
||||
|
||||
Reference in New Issue
Block a user