Repository: cxf
Updated Branches:
  refs/heads/master b62ea1115 -> c6ec59987


NPE fix if a SAML Issuer is null


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

Branch: refs/heads/master
Commit: c6ec599873a67cccae0a75270900c1cbec2cd796
Parents: b62ea11
Author: Colm O hEigeartaigh <cohei...@apache.org>
Authored: Thu Aug 10 15:10:58 2017 +0100
Committer: Colm O hEigeartaigh <cohei...@apache.org>
Committed: Thu Aug 10 15:31:46 2017 +0100

----------------------------------------------------------------------
 .../apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c6ec5998/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java
 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java
index 5d38be7..0e70836 100644
--- 
a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java
+++ 
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java
@@ -172,7 +172,7 @@ public class SAMLSSOResponseValidator {
         }
 
         // Issuer value must match (be contained in) Issuer IDP
-        if (enforceKnownIssuer && !issuerIDP.startsWith(issuer.getValue())) {
+        if (enforceKnownIssuer && (issuer.getValue() == null || 
!issuerIDP.startsWith(issuer.getValue()))) {
             LOG.fine("Issuer value: " + issuer.getValue() + " does not match 
issuer IDP: "
                 + issuerIDP);
             throw new 
WSSecurityException(WSSecurityException.ErrorCode.FAILURE, 
"invalidSAMLsecurity");

Reply via email to