]> Dogcows Code - chaz/p5-File-KDBX/commitdiff
Use expanded title, username in OTP parameters
authorCharles McGarvey <ccm@cpan.org>
Fri, 8 Jul 2022 03:48:15 +0000 (21:48 -0600)
committerCharles McGarvey <ccm@cpan.org>
Fri, 8 Jul 2022 03:49:28 +0000 (21:49 -0600)
Changes
lib/File/KDBX/Entry.pm

diff --git a/Changes b/Changes
index ec16232b8c69d95901ad6af09790dca625de9ec8..fb326fa22cd05d657d62993547309cb14e46cd7b 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 Revision history for File-KDBX.
 
 {{$NEXT}}
+  * Use expanded title, username in OTP parameters.
 
 0.903     2022-05-11 17:17:13-0600
 
index b6858358fd214092d49c1b882b7a167c408285c3..0119b67363431fe407dfd828c58934330ce26edd 100644 (file)
@@ -11,7 +11,7 @@ use File::KDBX::Constants qw(:history :icon);
 use File::KDBX::Error;
 use File::KDBX::Util qw(:assert :class :coercion :erase :function :uri generate_uuid load_optional);
 use Hash::Util::FieldHash;
-use List::Util qw(first sum0);
+use List::Util qw(any first sum0);
 use Ref::Util qw(is_coderef is_hashref is_plain_hashref);
 use Scalar::Util qw(blessed looks_like_number);
 use Storable qw(dclone);
@@ -654,8 +654,8 @@ sub _hotp_params {
 
     my %params = (
         type    => 'hotp',
-        issuer  => $self->title     || 'KDBX',
-        account => $self->username  || 'none',
+        issuer  => $self->expand_title      || 'KDBX',
+        account => $self->expand_username   || 'none',
         digits  => 6,
         counter => $self->string_value('HmacOtp-Counter') // 0,
         $self->_otp_secret_params('Hmac'),
@@ -680,8 +680,8 @@ sub _totp_params {
     );
     my %params = (
         type        => 'totp',
-        issuer      => $self->title     || 'KDBX',
-        account     => $self->username  || 'none',
+        issuer      => $self->expand_title      || 'KDBX',
+        account     => $self->expand_username   || 'none',
         digits      => $self->string_value('TimeOtp-Length') // 6,
         algorithm   => $algorithms{$self->string_value('TimeOtp-Algorithm') || ''} || 'sha1',
         period      => $self->string_value('TimeOtp-Period') // 30,
This page took 0.030468 seconds and 4 git commands to generate.