[java-shib-common COMMIT] in /branches/REL_1: doc/RELEASE-NOTES.txt pom.xml src/main/java/edu/internet2/middleware/sh...

noreply at shibboleth.net noreply at shibboleth.net
Thu Jul 28 13:04:20 BST 2011


Author: lajoie
Date: Thu Jul 28 13:04:20 2011
New Revision: 998

URL: http://svn.shibboleth.net/view/java-shib-common?rev=998&view=rev
Log:
Add some logging
Fix filter engine which is removing "duplicate" scoped values based solely on the value and ignoring the scope

Modified:
    branches/REL_1/doc/RELEASE-NOTES.txt
    branches/REL_1/pom.xml
    branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethAttributeFilteringEngine.java
    branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethFilteringContext.java
    branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/resolver/provider/ShibbolethAttributeResolver.java

Modified: branches/REL_1/doc/RELEASE-NOTES.txt
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/doc/RELEASE-NOTES.txt?rev=998&r1=997&r2=998&view=diff
==============================================================================
--- branches/REL_1/doc/RELEASE-NOTES.txt (original)
+++ branches/REL_1/doc/RELEASE-NOTES.txt Thu Jul 28 13:04:20 2011
@@ -1,3 +1,7 @@
+Changes in Release 1.3.3
+=============================================
+[SIDP-161] - Filter engine removes "duplicate" scoped values based soley on the value and ignores the scope
+
 Changes in Release 1.3.2
 =============================================
 [SC-159] - attributeID property on match functors not getting loaded

Modified: branches/REL_1/pom.xml
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/pom.xml?rev=998&r1=997&r2=998&view=diff
==============================================================================
--- branches/REL_1/pom.xml (original)
+++ branches/REL_1/pom.xml Thu Jul 28 13:04:20 2011
@@ -6,7 +6,7 @@
     
     <groupId>edu.internet2.middleware</groupId>
     <artifactId>shibboleth-common</artifactId>
-    <version>1.3.2</version>
+    <version>1.3.3-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <name>Shibboleth Common Library</name>

Modified: branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethAttributeFilteringEngine.java
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethAttributeFilteringEngine.java?rev=998&r1=997&r2=998&view=diff
==============================================================================
--- branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethAttributeFilteringEngine.java (original)
+++ branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethAttributeFilteringEngine.java Thu Jul 28 13:04:20 2011
@@ -106,7 +106,8 @@
                 log.debug("Removing attribute from return set, no more values: {}", attribute.getId());
                 attributeEntryItr.remove();
             }else{
-                log.trace("Permitted values for attribute {} are: {}", attribute.getId(), attribute.getValues());
+                log.debug("Attribute {} has {} values after filtering", attribute.getId(), attribute
+                        .getValues().size());
             }
         }
 
@@ -156,7 +157,6 @@
     protected void filterAttributes(ShibbolethFilteringContext filterContext, AttributeRule attributeRule)
             throws FilterProcessingException {
         String attributeId = attributeRule.getAttributeId();
-        Collection attributeValues = filterContext.getRetainedValues(attributeId, false);
 
         MatchFunctor permitRule = attributeRule.getPermitValueRule();
         if (permitRule != null) {
@@ -168,14 +168,15 @@
             }
             
             Collection unfilteredValues = attribute.getValues();
-            for (Object attributeValue : unfilteredValues) {
-                if (permitRule.evaluatePermitValue(filterContext, attributeId, attributeValue)) {
+            Collection retainedValues = filterContext.getRetainedValues(attributeId, false);
+            for (Object value : unfilteredValues) {
+                if (permitRule.evaluatePermitValue(filterContext, attributeId, value)) {
                     log.trace("The following value for attribute {} meets the permit value rule: {}", attributeId,
-                            attributeValue == null ? "<null>" : attributeValue.toString());
-                    attributeValues.add(attributeValue);
+                            value == null ? "<null>" : value.toString());
+                    retainedValues.add(value);
                 } else {
                     log.trace("The following value for attribute {} does not meet permit value rule: {}", attributeId,
-                            attributeValue == null ? "<null>" : attributeValue.toString());
+                            value == null ? "<null>" : value.toString());
                 }
             }
         }


[... 121 lines stripped ...]


More information about the commits mailing list