X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-sp.git;a=blobdiff_plain;f=shibsp%2Fattribute%2Fresolver%2Fimpl%2FXMLAttributeExtractor.cpp;h=37e77ddcca9f7c7582e13866c2ac88bccafe86bc;hp=d37720d16a12974e660cc828133d4e36b94b10df;hb=806829d1015250a4357914af3093c79aff81cc39;hpb=cb536b02e94824f30fdc1a39ed35140b7b97075c diff --git a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp index d37720d..37e77dd 100644 --- a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp +++ b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp @@ -320,12 +320,16 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log) format = &chNull; // ignore default Format/Namespace values // Fetch/create the map entry and see if it's a duplicate rule. - // Trim the format and the name only if the format is the default (URI). - pair entryKey(name,format); + // Trim the format, or the name only if the format is the default (URI). + pair entryKey; if (*format == chNull) { - trim(entryKey.first); + auto_ptr_XMLCh copyName(name); + entryKey.first = copyName.get(); + } else { + entryKey.first = name; + auto_ptr_XMLCh copyFormat(format); + entryKey.second = copyFormat.get(); } - trim(entryKey.second); pair< boost::shared_ptr,vector >& decl = m_attrMap[entryKey]; if (decl.first) { m_log.warn("skipping duplicate Attribute mapping (same name and nameFormat)"); @@ -355,7 +359,6 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log) m_log.warn("attribute mapping rule (%s) uses deprecated aliases feature, consider revising", id.get()); auto_ptr_char aliases(name); string dup(aliases.get()); - trim(dup); set new_aliases; split(new_aliases, dup, is_space(), algorithm::token_compress_on); set::iterator ru = new_aliases.find("REMOTE_USER");