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:26 UTC

[3/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/29aaecbb
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/29aaecbb
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/29aaecbb

Branch: refs/heads/2_0_X
Commit: 29aaecbb92bd7ae8fb828ede552f056076a59a9a
Parents: c712af1
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:00 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/29aaecbb/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);