Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-10366

it is not possible to add user if ldap import/export enabled and ldap.password.policy.enabled=true

    Details

      Description

      Hi! We have ldap import/export configured and we have
      ldap.password.policy.enabled=true
      property defined in portal-ext.properties

      Now, then we trying to create any new user (via Create Account or via Control Panel) - we got NPE:

      20:35:47,954 ERROR [jsp:156] java.lang.NullPointerException
      at com.liferay.portal.security.pwd.PasswordPolicyToolkit.generateDynamic(PasswordPolicyToolkit.java:164)
      at com.liferay.portal.security.pwd.PasswordPolicyToolkit.generate(PasswordPolicyToolkit.java:77)
      at com.liferay.portal.security.pwd.PwdToolkitUtil._generate(PwdToolkitUtil.java:58)
      at com.liferay.portal.security.pwd.PwdToolkitUtil.generate(PwdToolkitUtil.java:34)
      at com.liferay.portal.service.impl.UserLocalServiceImpl.doAddUser(UserLocalServiceImpl.java:2299)
      at com.liferay.portal.service.impl.UserLocalServiceImpl.addUser(UserLocalServiceImpl.java:326)

      It happens because passwordPolicy is null. In doAddUser we get password Policy from passwordPolicyLocalServiceImpl,getPasswordPolicy and it has code:

      if (LDAPSettingsUtil.isPasswordPolicyEnabled(companyId))

      { return null; }

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 15 weeks, 3 days ago

                Packages

                Version Package
                --Sprint 12/11
                6.1.0 CE RC1