Sharad Mishra has uploaded a new change for review. Change subject: core: fix NPE is Challenger ......................................................................
core: fix NPE is Challenger Calling executeBasicAuthentication() with null httpSession can lead to NPE. Change-Id: I545a2b0b12510b1eed11fde7fe8e4dc25696953a Signed-off-by: Sharad Mishra <snmis...@linux.vnet.ibm.com> --- M backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/security/auth/Challenger.java 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/50/7850/1 diff --git a/backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/security/auth/Challenger.java b/backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/security/auth/Challenger.java index 1f9df3f..7f50d49 100644 --- a/backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/security/auth/Challenger.java +++ b/backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/security/auth/Challenger.java @@ -86,10 +86,12 @@ HttpSession httpSession = getCurrentSession(true); // If the session isn't a new session then we validate it, otherwise we authenticate - if (validator != null && httpSession != null && !httpSession.isNew()) { - successful = executeSessionValidation(httpSession, preferPersistentAuth); - } else { - successful = executeBasicAuthentication(headers, httpSession, preferPersistentAuth); + if (validator != null && httpSession != null) { + if (!httpSession.isNew()) { + successful = executeSessionValidation(httpSession, preferPersistentAuth); + } else { + successful = executeBasicAuthentication(headers, httpSession, preferPersistentAuth); + } } if (!successful) { -- To view, visit http://gerrit.ovirt.org/7850 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I545a2b0b12510b1eed11fde7fe8e4dc25696953a Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sharad Mishra <snmis...@linux.vnet.ibm.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches