[cpp-sp COMMIT] /branches/REL_2/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
noreply at shibboleth.net
noreply at shibboleth.net
Wed Mar 4 18:31:38 EST 2015
Author: scantor
Date: Wed Mar 4 18:31:37 2015
New Revision: 3909
URL: http://svn.shibboleth.net/view/cpp-sp?rev=3909&view=rev
Log:
Work around Solaris issue
Modified:
branches/REL_2/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
Modified: branches/REL_2/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp?rev=3909&r1=3908&r2=3909&view=diff
==============================================================================
--- branches/REL_2/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp (original)
+++ branches/REL_2/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp Wed Mar 4 18:31:37 2015
@@ -320,12 +320,16 @@
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<xstring,xstring> entryKey(name,format);
+ // Trim the format, or the name only if the format is the default (URI).
+ pair<xstring,xstring> entryKey;
if (*format == chNull) {
- trim(entryKey.first);
- }
- trim(entryKey.second);
+ auto_ptr_XMLCh copyName(name);
+ entryKey.first = copyName.get();
+ } else {
+ entryKey.first = name;
+ auto_ptr_XMLCh copyFormat(format);
+ entryKey.second = copyFormat.get();
+ }
pair< boost::shared_ptr<AttributeDecoder>,vector<string> >& decl = m_attrMap[entryKey];
if (decl.first) {
m_log.warn("skipping duplicate Attribute mapping (same name and nameFormat)");
@@ -355,7 +359,6 @@
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<string> new_aliases;
split(new_aliases, dup, is_space(), algorithm::token_compress_on);
set<string>::iterator ru = new_aliases.find("REMOTE_USER");
More information about the commits
mailing list