X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=shibsp%2Fattribute%2Ffiltering%2Fimpl%2FAttributeValueRegexFunctor.cpp;h=5fc4fa014e3a2695e02c1c9ae002bb1bb8611e09;hb=9eb59cb19ab82e4668b4e2505e49416fb5150e2b;hp=b4a899e5ef991f4e80048e453e5f97258d7f9eb2;hpb=4f6580b9d29bf3ba2f0464fdb19ae314a2a322d2;p=shibboleth%2Fsp.git diff --git a/shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp index b4a899e..5fc4fa0 100644 --- a/shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp +++ b/shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp @@ -57,10 +57,10 @@ namespace shibsp { try { m_regex = new RegularExpression(r, e->getAttributeNS(NULL,options)); } - catch (XMLException& ex) { - xmltooling::auto_ptr_char temp(ex.getMessage()); - throw ConfigurationException(temp.get()); - } + catch (XMLException& ex) { + xmltooling::auto_ptr_char temp(ex.getMessage()); + throw ConfigurationException(temp.get()); + } } bool evaluatePolicyRequirement(const FilteringContext& filterContext) const { @@ -70,9 +70,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); } };