// Check the NameID based on the format.\r
const XMLCh* name;\r
const XMLCh* format = ctx.getNameID().getFormat();\r
- if (!format) {\r
+ if (!format || !*format)\r
format = NameID::UNSPECIFIED;\r
#ifdef HAVE_GOOD_STL\r
- if ((rule=m_attrMap.find(make_pair(format,xstring()))) != m_attrMap.end()) {\r
+ if ((rule=m_attrMap.find(make_pair(format,xstring()))) != m_attrMap.end()) {\r
#else\r
- auto_ptr_char temp(format);\r
- if ((rule=m_attrMap.find(make_pair(temp.get(),string()))) != m_attrMap.end()) {\r
+ auto_ptr_char temp(format);\r
+ if ((rule=m_attrMap.find(make_pair(temp.get(),string()))) != m_attrMap.end()) {\r
#endif\r
- if (aset.empty() || aset.count(rule->second.second)) {\r
- resolved.push_back(\r
- rule->second.first->decode(\r
- rule->second.second.c_str(), &ctx.getNameID(), assertingParty.get(), relyingParty\r
- )\r
- );\r
- }\r
+ if (aset.empty() || aset.count(rule->second.second)) {\r
+ resolved.push_back(\r
+ rule->second.first->decode(\r
+ rule->second.second.c_str(), &ctx.getNameID(), assertingParty.get(), relyingParty\r
+ )\r
+ );\r
}\r
}\r
\r
format = (*a)->getAttributeNamespace();\r
if (!name || !*name)\r
continue;\r
- if (!format)\r
+ if (!format || XMLString::equals(format, shibspconstants::SHIB1_ATTRIBUTE_NAMESPACE_URI))\r
format = &chNull;\r
#ifdef HAVE_GOOD_STL\r
if ((rule=m_attrMap.find(make_pair(name,format))) != m_attrMap.end()) {\r
// Check the NameID based on the format.\r
const XMLCh* name;\r
const XMLCh* format = ctx.getNameID().getFormat();\r
- if (!format) {\r
+ if (!format || !*format)\r
format = NameID::UNSPECIFIED;\r
#ifdef HAVE_GOOD_STL\r
- if ((rule=m_attrMap.find(make_pair(format,xstring()))) != m_attrMap.end()) {\r
+ if ((rule=m_attrMap.find(make_pair(format,xstring()))) != m_attrMap.end()) {\r
#else\r
- auto_ptr_char temp(format);\r
- if ((rule=m_attrMap.find(make_pair(temp.get(),string()))) != m_attrMap.end()) {\r
+ auto_ptr_char temp(format);\r
+ if ((rule=m_attrMap.find(make_pair(temp.get(),string()))) != m_attrMap.end()) {\r
#endif\r
- if (aset.empty() || aset.count(rule->second.second)) {\r
- resolved.push_back(\r
- rule->second.first->decode(\r
- rule->second.second.c_str(), &ctx.getNameID(), assertingParty.get(), relyingParty\r
- )\r
- );\r
- }\r
+ if (aset.empty() || aset.count(rule->second.second)) {\r
+ resolved.push_back(\r
+ rule->second.first->decode(\r
+ rule->second.second.c_str(), &ctx.getNameID(), assertingParty.get(), relyingParty\r
+ )\r
+ );\r
}\r
}\r
\r
format = (*a)->getNameFormat();\r
if (!name || !*name)\r
continue;\r
- if (!format)\r
+ if (!format || !*format)\r
+ format = saml2::Attribute::UNSPECIFIED;\r
+ else if (XMLString::equals(format, saml2::Attribute::URI_REFERENCE))\r
format = &chNull;\r
#ifdef HAVE_GOOD_STL\r
if ((rule=m_attrMap.find(make_pair(name,format))) != m_attrMap.end()) {\r
}\r
const vector<const char*>& getAssertionIDs() const {\r
if (m_ids.empty()) {\r
- DDF id = m_obj["assertions"].first();\r
+ DDF ids = m_obj["assertions"];\r
+ DDF id = ids.first();\r
while (id.isstring()) {\r
m_ids.push_back(id.string());\r
- id = id.next();\r
+ id = ids.next();\r
}\r
}\r
return m_ids;\r
void RemotedSession::unmarshallAttributes() const\r
{\r
Attribute* attribute;\r
- DDF attr = m_obj["attributes"].first();\r
+ DDF attrs = m_obj["attributes"];\r
+ DDF attr = attrs.first();\r
while (!attr.isnull()) {\r
try {\r
attribute = Attribute::unmarshall(attr);\r
const char* id = attr.first().name();\r
m_cache->m_log.error("error unmarshalling attribute (ID: %s): %s", id ? id : "none", ex.what());\r
}\r
- attr = attr.next();\r
+ attr = attrs.next();\r
}\r
}\r
\r
}\r
const vector<const char*>& getAssertionIDs() const {\r
if (m_ids.empty()) {\r
- DDF id = m_obj["assertions"].first();\r
+ DDF ids = m_obj["assertions"];\r
+ DDF id = ids.first();\r
while (id.isstring()) {\r
m_ids.push_back(id.string());\r
- id = id.next();\r
+ id = ids.next();\r
}\r
}\r
return m_ids;\r
void StoredSession::unmarshallAttributes() const\r
{\r
Attribute* attribute;\r
- DDF attr = m_obj["attributes"].first();\r
+ DDF attrs = m_obj["attributes"];\r
+ DDF attr = attrs.first();\r
while (!attr.isnull()) {\r
try {\r
attribute = Attribute::unmarshall(attr);\r
const char* id = attr.first().name();\r
m_cache->m_log.error("error unmarshalling attribute (ID: %s): %s", id ? id : "none", ex.what());\r
}\r
- attr = attr.next();\r
+ attr = attrs.next();\r
}\r
}\r
\r