No need to limit to 3 keys

Just create new when needed, and remove the old ones
This commit is contained in:
Daniel Berteaud 2015-06-30 17:22:55 +02:00
parent d04ada23f0
commit d19733bf15
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ helper update_session_keys => sub {
};
$sth->execute;
my $recent_keys = $sth->fetchrow;
if (scalar @keys < 3 && $recent_keys < 1){
if ($recent_keys < 1){
$self->app->log->debug("Generating a new key to sign session cookies");
my $new_key = Session::Token->new(
alphabet => ['a'..'z', 'A'..'Z', '0'..'9', '.:;,/!%$#~{([-_)]}=+*|'],