Subject: | Attributes not decoded from Shibboleth 3 IdP SAML responses |
Date: | Mon, 4 Jan 2016 11:56:24 -0500 |
To: | <bug-Net-SAML2 [...] rt.cpan.org> |
From: | Jorj Bauer <jorj [...] temple.edu> |
Fix is line 49 of Assertion.pm:
- my @values = $node->findnodes('saml:AttributeValue');
+ my @values = ($node->findnodes('saml:AttributeValue'), $node);
$ perl -MNet::SAML2 -e 'print $Net::SAML2::VERSION, "\n";'
0.17
$ perl -MXML::XPath -e 'print ${XML::XPath::VERSION},"\n";'
1.13
Test program:
#!/usr/bin/perl
use strict;
use warnings;
use MIME::Base64 qw/decode_base64/;
use Net::SAML2;
use File::Slurp;
use Data::Dumper;
my $assertion = Net::SAML2::Protocol::Assertion->new_from_xml(xml =>
decode_base64(read_file('reply.b64')));
print Dumper $assertion->{attributes};
exit 0;
... does not print any values (it gets the names of the values correct,
with no contents). After the patch, it successfully also shows the values.
Test input file ('reply.b64' referenced above):
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHNhbWwycDpSZXNwb25zZSBEZXN0aW5hdGlvbj0iaHR0cHM6Ly9zZXltb3VyLm9jaXMudGVtcGxlLmVkdS9TaGliYm9sZXRoLnNzby9TQU1MMi9QT1NUI
iBJRD0iXzg1ODBjYTU5NWRhZDY0NDk2M2I3ZDE3ZmViYmQ2NzdkIiBJc3N1ZUluc3RhbnQ9IjIwMTYtMDEtMDRUMTU6NDU6MTguNDI5WiIgVmVyc2lvbj0iMi4wIiB4bWxuczpzYW1sMnA9InVybjpvYXNpczpuYW1lczp0Yz
pTQU1MOjIuMDpwcm90b2NvbCIgeG1sbnM6eHNkPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSI+PHNhbWwyOklzc3VlciB4bWxuczpzYW1sMj0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmFzc2VydGl
vbiI+aHR0cHM6Ly9ucC1maW0udGVtcGxlLmVkdS9pZHAvc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