Commit 4d27a747 authored by Gary Wong's avatar Gary Wong
Browse files

Fix XML search for "privilege" elements in credentials.

The previous code searched for _all_ privileges, which returned
extraneous results in case of delegation.  We are now more precise
about the locations in the tree we're considering.
parent a2ec477d
......@@ -519,8 +519,9 @@ sub CreateFromSigned($$;$)
bless($self, $class);
# Dig out the capabilities
foreach my $cap (GeniXML::FindNodes('.//n:privileges/n:privilege',
$root)->get_nodelist()) {
foreach my $cap (GeniXML::FindNodes('n:signed-credential/n:credential/' .
'n:privileges/n:privilege',
$root)->get_nodelist()) {
my $name = GeniXML::FindElement('n:name', $cap);
my $delegate = GeniXML::FindElement('n:can_delegate', $cap);
if (defined($name) && defined($delegate)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment