You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2017/04/05 10:42:27 UTC

[4/4] syncope git commit: [SYNCOPE-1041] Check to avoid NPE

[SYNCOPE-1041] Check to avoid NPE


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

Branch: refs/heads/master
Commit: fe07e12dc1503b8db883cef966576a65de6fcecd
Parents: 4a82fb3
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Wed Apr 5 12:42:00 2017 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Wed Apr 5 12:42:15 2017 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/syncope/core/logic/SAML2SPLogic.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/fe07e12d/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java
index fbd0bc5..527d58c 100644
--- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java
+++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java
@@ -270,6 +270,10 @@ public class SAML2SPLogic extends AbstractSAML2Logic<AbstractBaseBean> {
                     : "SAML 2.0 IdP '" + idpEntityID + "'");
         }
 
+        if (idp.getSSOLocation(SAMLConstants.SAML2_POST_BINDING_URI) == null) {
+            throw new IllegalArgumentException("No SingleSignOnService available for " + idp.getId());
+        }
+
         // 2. create AuthnRequest
         Issuer issuer = new IssuerBuilder().buildObject();
         issuer.setValue(spEntityID);