From f0116b86f50afba214ae4cbfa256b86b9e9f38d5 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Mon, 19 Jan 2015 22:29:26 +0000 Subject: [PATCH] https://issues.shibboleth.net/jira/browse/SSPCPP-624 --- plugins/GSSAPIAttributeExtractor.cpp | 1 + plugins/TemplateAttributeResolver.cpp | 1 + plugins/TimeAccessControl.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/plugins/GSSAPIAttributeExtractor.cpp b/plugins/GSSAPIAttributeExtractor.cpp index 8933d78..4c1f9be 100644 --- a/plugins/GSSAPIAttributeExtractor.cpp +++ b/plugins/GSSAPIAttributeExtractor.cpp @@ -206,6 +206,7 @@ GSSAPIExtractorImpl::GSSAPIExtractorImpl(const DOMElement* e, Category& log) if (name && *name) { 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"); diff --git a/plugins/TemplateAttributeResolver.cpp b/plugins/TemplateAttributeResolver.cpp index 124e8a4..2baeb6f 100644 --- a/plugins/TemplateAttributeResolver.cpp +++ b/plugins/TemplateAttributeResolver.cpp @@ -150,6 +150,7 @@ TemplateAttributeResolver::TemplateAttributeResolver(const DOMElement* e) throw ConfigurationException("Template AttributeResolver requires dest attribute."); string s(XMLHelper::getAttrString(e, nullptr, _sources)); + trim(s); split(m_sources, s, is_space(), algorithm::token_compress_on); if (m_sources.empty()) throw ConfigurationException("Template AttributeResolver requires sources attribute."); diff --git a/plugins/TimeAccessControl.cpp b/plugins/TimeAccessControl.cpp index 60550b1..ca5de84 100644 --- a/plugins/TimeAccessControl.cpp +++ b/plugins/TimeAccessControl.cpp @@ -114,6 +114,7 @@ Rule::Rule(const DOMElement* e) auto_ptr_char temp(e->getTextContent()); string s(temp.get() ? temp.get() : ""); + trim(s); vector tokens; if (split(tokens, s, is_space(), algorithm::token_compress_on).size() != 2) throw ConfigurationException("Time-based rule requires element content of the form \"LT|LE|EQ|GE|GT value\"."); -- 2.1.4