Allow for a NameIDPolicy without a specified format
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / idp / profile / saml2 / AbstractSAML2ProfileHandler.java
index c820f02..338b392 100644 (file)
@@ -643,7 +643,7 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan
             AuthnRequest authnRequest = (AuthnRequest) requestContext.getSamlRequest();
             if (authnRequest.getNameIDPolicy() != null) {
                 nameFormat = authnRequest.getNameIDPolicy().getFormat();
-                if (assertingPartySupportedFormats.contains(nameFormat)) {
+                if (!DatatypeHelper.isEmpty(nameFormat) && assertingPartySupportedFormats.contains(nameFormat)) {
                     nameFormats.add(nameFormat);
                 } else {
                     requestContext.setFailureStatus(buildStatus(StatusCode.RESPONDER_URI,