From cf9504bb3090803242940e1bdc1b977b62575b75 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Thu, 26 Apr 2018 21:10:02 +0200 Subject: [PATCH] Fix another bug on zip file creation (missing IV on decryption) --- CHANGELOG | 5 ++++- lib/Lutim/Controller.pm | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d105021..820ae47 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,10 @@ Revision history for Lutim +0.10.3 2018-04-26 + - Fix another bug on zip file creation + 0.10.2 2018-04-24 - - Fix bug on zip file creation + - Fix bug on zip file creation 0.10.1 2018-04-15 - Fix bug on theme creation (#73) diff --git a/lib/Lutim/Controller.pm b/lib/Lutim/Controller.pm index 81a68e4..0550047 100644 --- a/lib/Lutim/Controller.pm +++ b/lib/Lutim/Controller.pm @@ -584,7 +584,7 @@ sub short { if (defined($image->width) && defined($image->height)) { ($width, $height) = ($image->width, $image->height); } elsif ($im_loaded) { - my $upload = $c->decrypt($key, $image->path); + my $upload = $c->decrypt($key, $image->path, $image->iv); my $im = Image::Magick->new; $im->BlobToImage($upload->slurp); $width = $im->Get('width'); @@ -724,7 +724,7 @@ sub zip { } if ($key) { - $zip->addString($c->decrypt($key, $path), "images/$filename"); + $zip->addString($c->decrypt($key, $path, $image->iv), "images/$filename"); } else { $zip->addFile($path, "images/$filename"); }