From 46151c87c09ed4f85cd22e1c522d036e4f99ce96 Mon Sep 17 00:00:00 2001 From: bruno DA SILVA Date: Wed, 25 Mar 2020 12:43:41 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02888=20Check=20password=20policy=20only?= =?UTF-8?q?=20if=20field=20set=20with=20a=20string=20Some=20callers=20are?= =?UTF-8?q?=20setting=20the=20field=20using=20an=20ormPassword=20object=20?= =?UTF-8?q?containing=20hashed=20password=20+=20salt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit examples: - csv import - data synchro - ... --- datamodels/2.x/authent-local/model.authent-local.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/datamodels/2.x/authent-local/model.authent-local.php b/datamodels/2.x/authent-local/model.authent-local.php index 9b3b6772d..764e2aaf3 100755 --- a/datamodels/2.x/authent-local/model.authent-local.php +++ b/datamodels/2.x/authent-local/model.authent-local.php @@ -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');