Skip to content

Commit

Permalink
Merge fix for RoleDescriptor parser bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersAbel committed Sep 26, 2018
2 parents 4901dc5 + c7ddceb commit bac24c9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sustainsys.Saml2/Metadata/MetadataSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1990,14 +1990,14 @@ protected virtual EntityDescriptor ReadEntityDescriptor(XmlReader reader, Securi
{
if (reader.IsStartElement("RoleDescriptor", Saml2MetadataNs))
{
string xsi = reader.GetAttribute("xsi", XsiNs);
int colonPos = xsi.IndexOf(':');
string xsiType = reader.GetAttribute("type", XsiNs);
int colonPos = xsiType.IndexOf(':');
if (colonPos < 0)
{
throw new MetadataSerializationException($"Invalid RoleDescriptor extension type {xsi}");
throw new MetadataSerializationException($"Invalid RoleDescriptor extension type {xsiType}");
}
string extensionNs = reader.LookupNamespace(xsi.Substring(0, colonPos));
string extensionType = xsi.Substring(colonPos + 1);
string extensionNs = reader.LookupNamespace(xsiType.Substring(0, colonPos));
string extensionType = xsiType.Substring(colonPos + 1);
RoleDescriptor roleDescriptor = null;
if (String.Equals(extensionNs, FedNs, StringComparison.Ordinal))
Expand All @@ -2015,7 +2015,7 @@ protected virtual EntityDescriptor ReadEntityDescriptor(XmlReader reader, Securi
}
if (roleDescriptor == null)
{
ReadCustomRoleDescriptor(xsi, reader, descriptor);
ReadCustomRoleDescriptor(xsiType, reader, descriptor);
}
}
else if (reader.IsStartElement("IDPSSODescriptor", Saml2MetadataNs))
Expand Down

0 comments on commit bac24c9

Please sign in to comment.