diff --git a/CHANGELOG b/CHANGELOG index 4fb33fe..27cfd2d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,17 @@ +1.11 + fixed: + https://github.com/TLINDEN/Crypt--PWSafe3/issues/6 + https://github.com/TLINDEN/Crypt--PWSafe3/issues/5 + This was NOT caused by polish characters, but by the + password expire field being set (I didn't use it so far + and my test database doesn't contain records with this + field set). The 'W<*' pack identifier had been used + for this field and W doesn't support < indeed. I changed + it to use 'S<' now, which is a 2 byte little endian + value according to the db-spec. I also edited the + test database so that it contains the field now, so that + a make test catches it. + 1.10 I forgot to fix the pack() format as well. diff --git a/lib/Crypt/PWSafe3.pm b/lib/Crypt/PWSafe3.pm index 502a509..4ac114e 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.10'; +$Crypt::PWSafe3::VERSION = '1.11'; use Crypt::PWSafe3::Field; use Crypt::PWSafe3::HeaderField; @@ -942,7 +942,7 @@ in this module are his ideas ported to perl. =head1 COPYRIGHT -Copyright (c) 2011-2012 by T.Linden . +Copyright (c) 2011-2013 by T.Linden . All rights reserved. =head1 LICENSE @@ -952,7 +952,7 @@ and/or modify it under the same terms as Perl itself. =head1 VERSION -Crypt::PWSafe3 Version 1.10. +Crypt::PWSafe3 Version 1.11. =cut diff --git a/lib/Crypt/PWSafe3/Field.pm b/lib/Crypt/PWSafe3/Field.pm index fc0190d..ccdcb77 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.03'; +$Crypt::PWSafe3::Field::VERSION = '1.04'; %Crypt::PWSafe3::Field::map2type = ( uuid => 0x01, @@ -76,11 +76,11 @@ sub new { $self->{value} = unpack('H*', $param{raw}); } elsif (grep { $_ eq $param{type} } @convbyte) { - $self->{value} = unpack('W<*', $param{raw}); + $self->{value} = unpack('S<', $param{raw}); } else { $self->{value} = $param{raw}; - utf8::decode($self->{value}); + utf8::decode($self->{value}); } $self->{len} = length($param{raw}); } @@ -93,11 +93,11 @@ sub new { $self->{raw} = pack('H*', $param{value}); } elsif (grep { $_ eq $param{type} } @convbyte) { - $self->{raw} = pack('W<*', $param{value}); + $self->{raw} = pack('S<', $param{value}); } else { $self->{raw} = $param{value}; - utf8::encode($param{raw}); + utf8::encode($param{raw}); } } else { @@ -170,7 +170,7 @@ T. Linden =head1 COPYRIGHT -Copyright (c) 2011 by T.Linden . +Copyright (c) 2011-2013 by T.Linden . All rights reserved. =head1 LICENSE diff --git a/lib/Crypt/PWSafe3/HeaderField.pm b/lib/Crypt/PWSafe3/HeaderField.pm index 2ae4d90..a91d04f 100644 --- a/lib/Crypt/PWSafe3/HeaderField.pm +++ b/lib/Crypt/PWSafe3/HeaderField.pm @@ -195,7 +195,7 @@ T. Linden =head1 COPYRIGHT -Copyright (c) 2011 by T.Linden . +Copyright (c) 2011-2013 by T.Linden . All rights reserved. =head1 LICENSE diff --git a/lib/Crypt/PWSafe3/Record.pm b/lib/Crypt/PWSafe3/Record.pm index 0120f31..7ccdf05 100644 --- a/lib/Crypt/PWSafe3/Record.pm +++ b/lib/Crypt/PWSafe3/Record.pm @@ -300,7 +300,7 @@ T. Linden =head1 COPYRIGHT -Copyright (c) 2011-2012 by T.Linden . +Copyright (c) 2011-2013 by T.Linden . All rights reserved. =head1 LICENSE diff --git a/lib/Crypt/PWSafe3/SHA256.pm b/lib/Crypt/PWSafe3/SHA256.pm index eb1db82..452f6dd 100644 --- a/lib/Crypt/PWSafe3/SHA256.pm +++ b/lib/Crypt/PWSafe3/SHA256.pm @@ -44,7 +44,7 @@ L =head1 COPYRIGHT -Copyright (c) 2011 by T.Linden . +Copyright (c) 2011-2013 by T.Linden . All rights reserved. =head1 LICENSE diff --git a/t/tom.psafe3 b/t/tom.psafe3 index 6ad60b5..3b983f5 100644 Binary files a/t/tom.psafe3 and b/t/tom.psafe3 differ