From f766d9504c115996c519d849a2576e7baa1148dc Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 9 Sep 2021 12:42:01 +0000 Subject: [PATCH] Bug 28772: (QA follow-up) Apply change to other dbrev too [STABLE] Content-Type: text/plain; charset=utf-8 Signed-off-by: Marcel de Rooy --- installer/data/mysql/atomicupdate/bug_28772_api_keys.perl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_28772_api_keys.perl b/installer/data/mysql/atomicupdate/bug_28772_api_keys.perl index cb4529a71a..6265944586 100755 --- a/installer/data/mysql/atomicupdate/bug_28772_api_keys.perl +++ b/installer/data/mysql/atomicupdate/bug_28772_api_keys.perl @@ -19,8 +19,10 @@ if( CheckVersion( $DBversion ) ) { }); 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} ); + } } NewVersion( $DBversion, 28772, "Store hashed API key secrets" ); -- 2.20.1