From 2bea436991ff735485454ac0c2e38cb573809e31 Mon Sep 17 00:00:00 2001 From: Thamindu Aluthwala Date: Mon, 22 Jul 2024 13:32:12 +0530 Subject: [PATCH] Fix verify user challenge answer related bug --- .../wso2/carbon/identity/mgt/ChallengeQuestionProcessor.java | 4 ++++ 1 file changed, 4 insertions(+) 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); }