mirror of
https://github.com/dani/vroom.git
synced 2024-06-01 21:11:41 +02:00
No need to limit to 3 keys
Just create new when needed, and remove the old ones
This commit is contained in:
parent
d04ada23f0
commit
d19733bf15
2
vroom.pl
2
vroom.pl
|
@ -168,7 +168,7 @@ helper update_session_keys => sub {
|
||||||
};
|
};
|
||||||
$sth->execute;
|
$sth->execute;
|
||||||
my $recent_keys = $sth->fetchrow;
|
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");
|
$self->app->log->debug("Generating a new key to sign session cookies");
|
||||||
my $new_key = Session::Token->new(
|
my $new_key = Session::Token->new(
|
||||||
alphabet => ['a'..'z', 'A'..'Z', '0'..'9', '.:;,/!%$#~{([-_)]}=+*|'],
|
alphabet => ['a'..'z', 'A'..'Z', '0'..'9', '.:;,/!%$#~{([-_)]}=+*|'],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user