X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=shibsp%2Fattribute%2Fresolver%2Fimpl%2FXMLAttributeExtractor.cpp;h=ffd910834e0fce2501ecbbd23c5d0edfc00bd121;hb=c51bfd77603cf0ddb0b5e374c35586a8435895d6;hp=54e05914ba22549ebd086b8c499bc0d8fe728c74;hpb=47ec66420ffb015afa60c6402b11eb69c6c19af3;p=shibboleth%2Fcpp-sp.git diff --git a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp index 54e0591..ffd9108 100644 --- a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp +++ b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp @@ -142,7 +142,9 @@ namespace shibsp { class XMLExtractor : public AttributeExtractor, public ReloadableXMLFile { public: - XMLExtractor(const DOMElement* e) : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT".AttributeExtractor.XML")) { + XMLExtractor(const DOMElement* e) : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".AttributeExtractor.XML")) { + if (m_local && m_lock) + m_log.warn("attribute mappings are reloadable; be sure to restart web server when adding new attribute IDs"); background_load(); } ~XMLExtractor() { @@ -343,8 +345,10 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log) name = child->getAttributeNS(nullptr, _aliases); if (name && *name) { + 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"); @@ -352,6 +356,7 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log) m_log.warn("skipping alias, REMOTE_USER is a reserved name"); new_aliases.erase(ru); } + decl.second.insert(decl.second.end(), new_aliases.begin(), new_aliases.end()); m_attributeIds.insert(m_attributeIds.end(), new_aliases.begin(), new_aliases.end()); } @@ -990,7 +995,7 @@ void XMLExtractor::extractAttributes( } } catch (std::exception& ex) { - m_log.error("caught exception decrypting Attribute: %s", ex.what()); + m_log.error("failed to decrypt Attribute: %s", ex.what()); return; } }