From d8365f915b55f63656c88b0dc67bafd050a66d1b Mon Sep 17 00:00:00 2001 From: "git@daemon.de" Date: Mon, 17 Jun 2013 11:51:13 +0200 Subject: [PATCH] the unpack() formatstring for the uuid (field 0x01) "L<4" didn't return a hex string, but a number only, which is fine for most cases, but isn't a correct Data::UUID representation. Changed back to "H*". --- CHANGELOG | 10 ++++++++++ lib/Crypt/PWSafe3.pm | 4 ++-- lib/Crypt/PWSafe3/Field.pm | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b3a34b2..f3dddee 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,13 @@ +1.09 + the unpack() formatstring for the uuid (field 0x01) "L<4" didn't + return a hex string, but a number only, which is fine for most + cases, but isn't a correct Data::UUID representation. Changed back + to "H*". + +1.08 + fixed pack/unpack formats to use strictly little-endian values as required. + machine-dependend unpack() formats changed to machine-independend. + 1.07 applied patch by https://github.com/Mekk: https://github.com/TLINDEN/Crypt--PWSafe3/pull/3, diff --git a/lib/Crypt/PWSafe3.pm b/lib/Crypt/PWSafe3.pm index 62f99c7..e95faa3 100644 --- a/lib/Crypt/PWSafe3.pm +++ b/lib/Crypt/PWSafe3.pm @@ -22,7 +22,7 @@ use Data::Dumper; use Exporter (); use vars qw(@ISA @EXPORT); -$Crypt::PWSafe3::VERSION = '1.08'; +$Crypt::PWSafe3::VERSION = '1.09'; use Crypt::PWSafe3::Field; use Crypt::PWSafe3::HeaderField; @@ -952,7 +952,7 @@ and/or modify it under the same terms as Perl itself. =head1 VERSION -Crypt::PWSafe3 Version 1.08. +Crypt::PWSafe3 Version 1.09. =cut diff --git a/lib/Crypt/PWSafe3/Field.pm b/lib/Crypt/PWSafe3/Field.pm index 236243d..4677b4d 100644 --- a/lib/Crypt/PWSafe3/Field.pm +++ b/lib/Crypt/PWSafe3/Field.pm @@ -7,7 +7,7 @@ use Exporter (); use vars qw(@ISA @EXPORT); use utf8; -$Crypt::PWSafe3::Field::VERSION = '1.01'; +$Crypt::PWSafe3::Field::VERSION = '1.03'; %Crypt::PWSafe3::Field::map2type = ( uuid => 0x01, @@ -73,7 +73,7 @@ sub new { $self->{value} = unpack("L<", $param{raw}); } elsif (grep { $_ eq $param{type} } @convhex) { - $self->{value} = unpack('L<4', $param{raw}); + $self->{value} = unpack('H*', $param{raw}); } elsif (grep { $_ eq $param{type} } @convbyte) { $self->{value} = unpack('W<*', $param{raw});