mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-03-28 17:42:54 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e62cb50ab1 | ||
|
|
cf9504bb30 |
@@ -1,7 +1,13 @@
|
||||
Revision history for Lutim
|
||||
|
||||
0.10.4 2018-05-07
|
||||
- Fix bug in cache system that would allow someone to view an image with an incorrect decryption key
|
||||
|
||||
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)
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -111,10 +111,12 @@ sub _render_file {
|
||||
}
|
||||
});
|
||||
if ($key && $key ne $cache->{key}) {
|
||||
my $tmp = $c->decrypt($key, $path, $iv);
|
||||
$cache->{asset} = $tmp;
|
||||
$c->app->{images_cache}->replace(
|
||||
$img->short,
|
||||
{
|
||||
asset => $c->decrypt($key, $path, $iv),
|
||||
asset => $tmp,
|
||||
key => $key
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user