{{$NEXT}}
+ * Fix a bug where peeking at memory-protected strings and binaries does not
+ work without unlocking the database at least once.
+
0.900 2022-05-01 12:55:59-0600
* Removed the min_version methods from dumper and loader because it was
@strings or throw 'Must provide strings to lock';
for my $string (@strings) {
- my $item = {str => $string};
+ my $item = {str => $string, off => $self->{counter}};
$item->{filter} = $filter if defined $filter;
if (is_scalarref($string)) {
next if !defined $$string;
is $kdbx->meta->{database_name}, 'Protected Strings Test', 'Extract database name from meta';
- $kdbx->unlock;
-
my $entry = $kdbx->entries->next;
is $entry->title, 'Sample Entry', 'Get entry title';
+
+ is $entry->string_peek('Password'), 'ProtectedPassword', 'Peek at password from entry';
+ is $entry->string_peek('TestProtected'), 'ABC', 'Peek at protected string from entry';
+ $kdbx->unlock;
is $entry->username, 'Protected User Name', 'Get protected username from entry';
is $entry->password, 'ProtectedPassword', 'Get protected password from entry';
is $entry->string_value('TestProtected'), 'ABC', 'Get ABC string from entry';