Skip to content

Commit

Permalink
Have better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouzierinverse committed Jan 9, 2025
1 parent d6f7e47 commit 655fb1d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/pf/Authentication/Source/SAMLSource.pm
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,16 @@ sub handle_response {
}

my $assertion = $lassoLogin->get_assertion();
my @attribute_list = $assertion->AttributeStatement->Attribute;

if (!$assertion) {
return ($FALSE, "No assertion found");
}

my $attribute_statement = $assertion->AttributeStatement;
if (!$attribute_statement) {
return ($FALSE, "No assertion statement found");
}

my @attribute_list = $attribute_statement->Attribute;
my $username;
# For debug
foreach my $attribute (@attribute_list){
Expand Down

0 comments on commit 655fb1d

Please sign in to comment.