1 Commits

Author SHA1 Message Date
Luc Didry
e62cb50ab1 Fix bug in cache system 2018-05-07 18:27:07 +02:00
2 changed files with 6 additions and 1 deletions

View File

@@ -1,5 +1,8 @@
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

View File

@@ -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
},
);