diff --git a/components/identity-mgt/org.wso2.carbon.identity.mgt/src/main/java/org/wso2/carbon/identity/mgt/ChallengeQuestionProcessor.java b/components/identity-mgt/org.wso2.carbon.identity.mgt/src/main/java/org/wso2/carbon/identity/mgt/ChallengeQuestionProcessor.java index 04dc07216a58..5304bc3f90f1 100644 --- a/components/identity-mgt/org.wso2.carbon.identity.mgt/src/main/java/org/wso2/carbon/identity/mgt/ChallengeQuestionProcessor.java +++ b/components/identity-mgt/org.wso2.carbon.identity.mgt/src/main/java/org/wso2/carbon/identity/mgt/ChallengeQuestionProcessor.java @@ -597,6 +597,10 @@ public boolean verifyUserChallengeAnswers(String userName, int tenantId, } } + if (count == 0) { + verification = false; + } + if (verification) { verification = (storedUserChallengeDTOs.length == count); }