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

better variable name

parent 43d54cd9
No related branches found
No related tags found
No related merge requests found
......@@ -353,14 +353,14 @@ sub req_complete_challenge {
my $metadata_file = $self->get_metadata_file(federation => $federation);
my $provider = AccountManager::ServiceProvider->new(
my $sp = AccountManager::ServiceProvider->new(
db => $self->{db},
entityid => $entityid,
);
$self->abort(
log => sprintf("No such SP '%s' in database", $entityid),
user => "no_such_entity"
) if !$provider->load(speculative => 1);
) if !$sp->load(speculative => 1);
# override metadata contacts if needed
my $contacts =
......@@ -369,10 +369,10 @@ sub req_complete_challenge {
if ($contacts) {
if ($contacts =~ /^\+(.+)/) {
# complement original contacts
$provider->contacts($provider->contacts(), split(/, */, $1));
$sp->contacts($sp->contacts(), split(/, */, $1));
} else {
# replace original contacts
$provider->contacts(split(/, */, $contacts));
$sp->contacts(split(/, */, $contacts));
}
}
......@@ -380,7 +380,7 @@ sub req_complete_challenge {
$self->abort(
log => "Requested a token for SP $entityid with unautorized address $email",
user => "internal",
) if !$provider->is_contact($email);
) if !$sp->is_contact($email);
# delete any previous token for the same email/service couple
my $old_token = AccountManager::Token->new(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment