Fixed attribute-based functors.
[shibboleth/sp.git] / shibsp / attribute / filtering / impl / AttributeValueStringFunctor.cpp
index c969ac5..0c2739c 100644 (file)
@@ -59,9 +59,9 @@ namespace shibsp {
         }
 
         bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
-            if (!XMLString::equals(m_attributeID.get(), attribute.getId()))
-                return hasValue(filterContext);
-            return matches(attribute, index);
+            if (!m_attributeID.get() || !*m_attributeID.get() || XMLString::equals(m_attributeID.get(), attribute.getId()))
+                return matches(attribute, index);
+            return hasValue(filterContext);
         }
     };