A custom JavaScript validation script used for password resets in Identity Manager, which functioned correctly in version 14.4, fails in Identity Portal version 14.5.1, specifically when upgrading to 14.5.1. The error appears to be related to the `errorMessage.reference` line within the script. The script also fails in Identity Portal 14.5.1 CHF1, suggesting a change in task behavior during the upgrade process.
function validate(ScreenContext, errorMessage) {
var Password = String(ScreenContext.getFieldValue("Password"));
var variabletest = /.{5,}$/;
if (variabletest.test(Password) === true) {
return true;
} else {
var msgerror = "The password must contain the following:";
var msgerror2 = "5 character password";
errorMessage.reference = 'Password Policy ' + msgerror + msgerror2;
return false;
}
}
The expected result in Identity Portal is when changing self password when forgotten the password and putting a password with less than 5 letters get a WARNING instead of above error
"The password must contain the following:
5 characters"
Analysis suggests that changes introduced in Identity Portal version 14.5.1 affect the execution and interpretation of custom JavaScript validation scripts, particularly concerning the `errorMessage.reference` property. This behavior is linked to the Identity Manager backend, as the error message is partially displayed in the Identity Portal `server.log` and the issue stems from CA Identity Manager.
A fix has been developed and validated for this issue. The following test fixes are available. You just need open a Support case to request the fixes. Support will evaluate if your environment is eligible to receive these fixes and after the review of information that you share (exactly versions, SP installed, CP installed, the script that is using)
These fixes have passed Quality Assurance tests in other environments and are approved for direct deployment in Production.
Deployment Instructions for the Fix:
Workaround (Temporary):
If immediate deployment of the fix is not possible, a temporary workaround involves creating a form on the Identity Portal to display password policy information to users. This form would simply show a message and would not involve the problematic JavaScript conditioning. This type of message can be customized by following Article How to add Password Policy details to CA Identity Portal Forgot Password Reset screen.