LPPE fails with lppe.dateAttribute = null

Description

Hello,

I wanted to use LPPE module, with cas 3.5.2 and found out that it fails with NullPointerException.
After debugging I found several users in LDAP who didn't change their password after ppolicy module was enabled. For such users LDAP returns null for pwdChangedTime attribute

Here is a stacktrace

SEVERE: Servlet.service() for servlet cas threw exception
java.lang.NullPointerException at org.joda.time.format.DateTimeFormatterBuilder$NumberFormatter.parseInto(DateTimeFormatterBuilder.java:1292)
at org.joda.time.format.DateTimeFormatterBuilder$Composite.parseInto(DateTimeFormatterBuilder.java:2695)
at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:846)
at org.joda.time.DateTime.parse(DateTime.java:144)
at org.jasig.cas.adaptors.ldap.LdapPasswordPolicyEnforcer.formatDateByPattern(LdapPasswordPolicyEnforcer.java:394)
at org.jasig.cas.adaptors.ldap.LdapPasswordPolicyEnforcer.getExpirationDateToUse(LdapPasswordPolicyEnforcer.java:408)
at org.jasig.cas.adaptors.ldap.LdapPasswordPolicyEnforcer.getNumberOfDaysToPasswordExpirationDate(LdapPasswordPolicyEnforcer.java:225)
at org.jasig.cas.web.flow.PasswordPolicyEnforcementAction.doExecute(PasswordPolicyEnforcementAction.java:120)
at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:77)
at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145)
at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101)

Environment

None

Status

Assignee

Misagh Moayyed

Reporter

Denis Baklikov

Labels

None

Estimated End Date

None

Audience

None

Components

Fix versions

Affects versions

3.5.2

Priority

Major