diff --git a/Koha/Auth/TwoFactorAuth.pm b/Koha/Auth/TwoFactorAuth.pm index 5cd6d13ac7..6937ab9060 100644 --- a/Koha/Auth/TwoFactorAuth.pm +++ b/Koha/Auth/TwoFactorAuth.pm @@ -75,7 +75,7 @@ sub new { Koha::Exceptions::MissingParameter->throw("No secret passed or patron has no secret"); } - my $issuer = $patron->library->branchname; + my $issuer = Encode::encode_utf8($patron->library->branchname); my $key_id = sprintf "%s_%s", $issuer, ( $patron->email || $patron->userid ); diff --git a/Koha/REST/V1/TwoFactorAuth.pm b/Koha/REST/V1/TwoFactorAuth.pm index f9f199f74b..29679a544c 100644 --- a/Koha/REST/V1/TwoFactorAuth.pm +++ b/Koha/REST/V1/TwoFactorAuth.pm @@ -98,8 +98,8 @@ sub registration { { patron => $patron, secret => $secret } ); my $response = { - issuer => $auth->issuer, - key_id => $auth->key_id, + issuer => Encode::decode_utf8($auth->issuer), + key_id => Encode::decode_utf8($auth->key_id), qr_code => $auth->qr_code, secret32 => $auth->secret32,