Verified Commit e62cb50a authored by Luc Didry's avatar Luc Didry
Browse files

Fix bug in cache system

parent cf9504bb
Pipeline #51353 passed with stages
in 8 minutes and 29 seconds
Revision history for Lutim 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 0.10.3 2018-04-26
- Fix another bug on zip file creation - Fix another bug on zip file creation
......
...@@ -111,10 +111,12 @@ sub _render_file { ...@@ -111,10 +111,12 @@ sub _render_file {
} }
}); });
if ($key && $key ne $cache->{key}) { if ($key && $key ne $cache->{key}) {
my $tmp = $c->decrypt($key, $path, $iv);
$cache->{asset} = $tmp;
$c->app->{images_cache}->replace( $c->app->{images_cache}->replace(
$img->short, $img->short,
{ {
asset => $c->decrypt($key, $path, $iv), asset => $tmp,
key => $key key => $key
}, },
); );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment