Fix NPE in DefaultStepHandler
@@ -566,7 +566,10 @@ public class DefaultStepHandler implements StepHandler {
AuthHistory authHistory = new AuthHistory(authenticator.getName(), idpName);
if (context.getParameters().containsKey(parameterName)) {
- idpSessionIndex = context.getParameter(parameterName).toString();
+ Object idpSessionIndexParamValue = context.getParameter(parameterName);
+ if (idpSessionIndexParamValue != null) {
+ idpSessionIndex = idpSessionIndexParamValue.toString();
+ }
}
if (StringUtils.isNotBlank(context.getCurrentAuthenticator()) && StringUtils.isNotBlank(idpSessionIndex)
&& FED_AUTH_NAME.equals(context.getCurrentAuthenticator())) {
