mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°2888 Check password policy only if field set with a string
Some callers are setting the field using an ormPassword object containing hashed password + salt examples: - csv import - data synchro - ...
This commit is contained in:
@@ -249,6 +249,14 @@ class UserLocal extends UserInternal
|
||||
$config = MetaModel::GetConfig();
|
||||
}
|
||||
|
||||
//if the $proposedValue is an ormPassword, then it cannot be checked
|
||||
//this if is even more permissive as we can only check against strings
|
||||
if (!is_string($proposedValue) && !empty($proposedValue))
|
||||
{
|
||||
$this->m_oPasswordValidity = new UserLocalPasswordValidity(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (null == $aValidatorCollection)
|
||||
{
|
||||
$aValidatorCollection = MetaModel::EnumPlugins('iModuleExtension', 'UserLocalPasswordValidator');
|
||||
|
||||
Reference in New Issue
Block a user