Bug 28772: Do not hash secrets twice
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
07eff56a73
commit
6c3951d414
1 changed files with 4 additions and 2 deletions
|
@ -25,8 +25,10 @@ return {
|
|||
});
|
||||
|
||||
foreach my $api_key (@$results) {
|
||||
my $digest = Koha::AuthUtils::hash_password( $api_key->{secret} );
|
||||
$sth->execute( $digest, $api_key->{client_id} );
|
||||
unless ( $api_key->{secret} =~ m/^\$2a\$08\$/ ) {
|
||||
my $digest = Koha::AuthUtils::hash_password( $api_key->{secret} );
|
||||
$sth->execute( $digest, $api_key->{client_id} );
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue