diff --git a/CHANGELOG b/CHANGELOG index 451286f..f857481 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,7 @@ Revision history for Lutim - Add file extension to view link - Add list of user's images in localStorage and a page to list the user's images - Use cryptographically secure random generator + - Allow to set the encryption length in lutim.conf - bugfixes 0.6 2014-10-03 diff --git a/lib/Lutim.pm b/lib/Lutim.pm index a81f877..7122582 100644 --- a/lib/Lutim.pm +++ b/lib/Lutim.pm @@ -19,17 +19,18 @@ sub startup { my $config = $self->plugin('Config', { default => { - provisioning => 100, - provis_step => 5, - length => 8, - always_encrypt => 0, - anti_flood_delay => 5, - tweet_card_via => '@framasky', - max_file_size => 10*1024*1024, - https => 0, - default_delay => 0, - max_delay => 0, - token_length => 24, + provisioning => 100, + provis_step => 5, + length => 8, + always_encrypt => 0, + anti_flood_delay => 5, + tweet_card_via => '@framasky', + max_file_size => 10*1024*1024, + https => 0, + default_delay => 0, + max_delay => 0, + token_length => 24, + crypto_key_length => 8, } }); @@ -187,7 +188,7 @@ sub startup { my $upload = shift; my $filename = shift; - my $key = $c->shortener(8); + my $key = $c->shortener($c->config('crypto_key_length')); my $cipher = Crypt::CBC->new( -key => $key, diff --git a/lutim.conf.template b/lutim.conf.template index c285d04..e3ca17e 100644 --- a/lutim.conf.template +++ b/lutim.conf.template @@ -25,6 +25,10 @@ # optional, default is 8 #length => 8, + # length of the encryption key + # optional, default is 8 + #crypto_key_length => 8, + # how many URLs will be provisioned in a batch ? # optional, default is 5 #provis_step => 5,