From 3a059c9d43143ea199d44862a5134b2784fd057a Mon Sep 17 00:00:00 2001 From: lajoie Date: Tue, 10 Jul 2007 22:20:11 +0000 Subject: [PATCH] Checked for null format in wrong place git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2304 ab3bd59b-922f-494d-bb5f-6f0a3c29deca --- .../shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java b/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java index 338b392..bfdcfdc 100644 --- a/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java +++ b/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java @@ -641,9 +641,9 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan String nameFormat = null; if (requestContext.getSamlRequest() instanceof AuthnRequest) { AuthnRequest authnRequest = (AuthnRequest) requestContext.getSamlRequest(); - if (authnRequest.getNameIDPolicy() != null) { + if (authnRequest.getNameIDPolicy() != null && !DatatypeHelper.isEmpty(nameFormat)) { nameFormat = authnRequest.getNameIDPolicy().getFormat(); - if (!DatatypeHelper.isEmpty(nameFormat) && assertingPartySupportedFormats.contains(nameFormat)) { + if (assertingPartySupportedFormats.contains(nameFormat)) { nameFormats.add(nameFormat); } else { requestContext.setFailureStatus(buildStatus(StatusCode.RESPONDER_URI, -- 1.7.10.4