[java-identity-provider] branch master updated: IDP-1217 Preliminary review
Rod Widdowson
rdw at steadingsoftware.com
Mon Jun 18 10:05:22 EDT 2018
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=a5365cef91040d1436d94c53801b3caaf6938387
The following commit(s) were added to refs/heads/master by this push:
new a5365ce IDP-1217 Preliminary review
a5365ce is described below
commit a5365cef91040d1436d94c53801b3caaf6938387
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Jun 18 15:03:51 2018 +0100
IDP-1217 Preliminary review
https://issues.shibboleth.net/jira/browse/IDP-1217
Do not assume that an AttributeConsumingService is already there,
and do not use one if there is - the request didn't ask for it by
name so it isn't relevant.
---
...equestedAttributesToAttributeConsumingService.java | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/AddRequestedAttributesToAttributeConsumingService.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/AddRequestedAttributesToAttributeConsumingService.java
index 5a34dca..7c702de 100644
--- a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/AddRequestedAttributesToAttributeConsumingService.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/AddRequestedAttributesToAttributeConsumingService.java
@@ -77,9 +77,6 @@ public class AddRequestedAttributesToAttributeConsumingService extends AbstractP
/** The context we use to get and put the {@link AttributeConsumingService}.*/
private AttributeConsumingServiceContext acsContext;
- /** The {@link AttributeConsumingService}} we are going to clone.*/
- private AttributeConsumingService oldACS;
-
/** Lookup strategy for an {@link AttributeConsumingService} index. */
@Nullable private Function<ProfileRequestContext,Integer> indexLookupStrategy;
@@ -153,12 +150,6 @@ public class AddRequestedAttributesToAttributeConsumingService extends AbstractP
ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX);
return false;
}
- oldACS = acsContext.getAttributeConsumingService();
- if (oldACS == null) {
- log.error("{} Unable to find peer's AttributeConsumingService", getLogPrefix());
- ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX);
- return false;
- }
return true;
}
@@ -180,9 +171,9 @@ public class AddRequestedAttributesToAttributeConsumingService extends AbstractP
}
try {
- // Clone the ACS
- final AttributeConsumingService newACS =
- XMLObjectSupport.cloneXMLObject(oldACS, CloneOutputOption.DropDOM);
+ // Create the ACS
+ final AttributeConsumingService newACS = (AttributeConsumingService)
+ XMLObjectSupport.buildXMLObject(AttributeConsumingService.DEFAULT_ELEMENT_NAME);
// Add in the RequestedAttributes
for (final RequestedAttribute attribute: requestedAttributes) {
newACS.getRequestAttributes().add(
@@ -197,10 +188,10 @@ public class AddRequestedAttributesToAttributeConsumingService extends AbstractP
log.error("{} Error mapping Attributesresponding to request", getLogPrefix(), e);
ActionSupport.buildEvent(profileRequestContext, EventIds.RUNTIME_EXCEPTION);
} catch (final MarshallingException e) {
- log.error("{} Error Cloning ACS", getLogPrefix(), e);
+ log.error("{} Error Cloning RequestedAttributes", getLogPrefix(), e);
ActionSupport.buildEvent(profileRequestContext, EventIds.RUNTIME_EXCEPTION);
} catch (final UnmarshallingException e) {
- log.error("{} Error Cloning ACS", getLogPrefix(), e);
+ log.error("{} Error Cloning RequestedAttributes", getLogPrefix(), e);
ActionSupport.buildEvent(profileRequestContext, EventIds.RUNTIME_EXCEPTION);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list