Skip to content
Snippets Groups Projects
Commit 18e94d8e authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

use plain string comparaison instead of regexp

parent 1a4563f0
Branches
Tags
No related merge requests found
...@@ -56,7 +56,7 @@ sub parse { ...@@ -56,7 +56,7 @@ sub parse {
## Ignoringnodes of type XML::LibXML::Text or XML::LibXML::Comment ## Ignoringnodes of type XML::LibXML::Text or XML::LibXML::Comment
next unless $child->nodeType() == XML_ELEMENT_NODE; next unless $child->nodeType() == XML_ELEMENT_NODE;
if ($child->nodeName =~ /IDPSSODescriptor$/) { if ($child->localname() eq 'IDPSSODescriptor') {
$data->{type} = 'idp'; $data->{type} = 'idp';
...@@ -81,7 +81,7 @@ sub parse { ...@@ -81,7 +81,7 @@ sub parse {
push @{ $data->{domain} }, $scope->textContent(); push @{ $data->{domain} }, $scope->textContent();
} }
} elsif ($child->nodeName =~ /SPSSODescriptor$/) { } elsif ($child->localname() eq 'SPSSODescriptor') {
$data->{type} = 'sp'; $data->{type} = 'sp';
...@@ -126,7 +126,7 @@ sub parse { ...@@ -126,7 +126,7 @@ sub parse {
}; };
} }
} elsif ($child->nodeName =~ /Extensions$/) { } elsif ($child->localname() eq 'Extensions') {
foreach my $registrationinfo ( foreach my $registrationinfo (
$child->getElementsByLocalName('RegistrationInfo')) $child->getElementsByLocalName('RegistrationInfo'))
...@@ -151,7 +151,7 @@ sub parse { ...@@ -151,7 +151,7 @@ sub parse {
} }
} }
} }
} elsif ($child->nodeName =~ /ContactPerson$/) { } elsif ($child->localname() eq 'ContactPerson') {
my %contact_details; my %contact_details;
$contact_details{type} = $child->getAttribute('contactType'); $contact_details{type} = $child->getAttribute('contactType');
if (defined $contact_details{type}) { if (defined $contact_details{type}) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment