cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/3] cxf-fediz git commit: Avoid NPE
Date Fri, 08 Apr 2016 16:41:01 GMT
Avoid NPE


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/ad26d39f
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/ad26d39f
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/ad26d39f

Branch: refs/heads/master
Commit: ad26d39f5e835c9810a0befb271282785c74e323
Parents: e34b37f
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Apr 8 17:34:25 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Apr 8 17:40:44 2016 +0100

----------------------------------------------------------------------
 .../fediz/service/idp/beans/samlsso/AuthnRequestValidator.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/ad26d39f/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestValidator.java
----------------------------------------------------------------------
diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestValidator.java
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestValidator.java
index 0b99805..11be3f7 100644
--- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestValidator.java
+++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestValidator.java
@@ -74,6 +74,9 @@ public class AuthnRequestValidator {
         throws Exception {
         AuthnRequest authnRequest = 
             (AuthnRequest)WebUtils.getAttributeFromFlowScope(context, IdpConstants.SAML_AUTHN_REQUEST);
+        if (authnRequest == null) {
+            throw new ProcessingException(TYPE.BAD_REQUEST);
+        }
         
         validateSignature(context, authnRequest, idp, signature, relayState, samlRequest,
realm);
         


Mime
View raw message